[GENL]: Add genlmsg_reply() to simply unicast replies to requests

A generic netlink user has no interest in knowing how to
address the source of the original request.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Graf
2006-11-14 19:45:27 -08:00
committed by David S. Miller
parent 3dabc71578
commit 81878d27fd
5 changed files with 15 additions and 5 deletions

View File

@@ -149,6 +149,16 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid)
return nlmsg_unicast(genl_sock, skb, pid);
}
/**
* genlmsg_reply - reply to a request
* @skb: netlink message to be sent back
* @info: receiver information
*/
static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info)
{
return genlmsg_unicast(skb, info->snd_pid);
}
/**
* gennlmsg_data - head of message payload
* @gnlh: genetlink messsage header