aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2006-11-14 19:45:27 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:22:41 -0800
commit81878d27fdd297a33f3cfcf29483fe1abaf26dec (patch)
tree4ce8183643abce3ec5fe5fdab0c9104204e88e6e /include/net
parent3dabc7157859e706770c825aa229f8943db4e0e1 (diff)
[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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/genetlink.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 2010465fa7d..797c18b5041 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -150,6 +150,16 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 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
*/