diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-11-14 22:46:02 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:42 -0500 |
commit | 17c157c889f4b07258af6bfec9e4e9dcf3c00178 (patch) | |
tree | f17be049a40b5742ca7e67094d6a7063146568d5 /net/netlabel/netlabel_user.h | |
parent | 81878d27fdd297a33f3cfcf29483fe1abaf26dec (diff) |
[GENL]: Add genlmsg_put_reply() to simplify building reply headers
By modyfing genlmsg_put() to take a genl_family and by adding
genlmsg_put_reply() the process of constructing the netlink
and generic netlink headers is simplified.
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 'net/netlabel/netlabel_user.h')
-rw-r--r-- | net/netlabel/netlabel_user.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/net/netlabel/netlabel_user.h b/net/netlabel/netlabel_user.h index 47967ef32964..6d7f4ab46c2b 100644 --- a/net/netlabel/netlabel_user.h +++ b/net/netlabel/netlabel_user.h | |||
@@ -42,37 +42,6 @@ | |||
42 | /* NetLabel NETLINK helper functions */ | 42 | /* NetLabel NETLINK helper functions */ |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * netlbl_netlink_hdr_put - Write the NETLINK buffers into a sk_buff | ||
46 | * @skb: the packet | ||
47 | * @pid: the PID of the receipient | ||
48 | * @seq: the sequence number | ||
49 | * @type: the generic NETLINK message family type | ||
50 | * @cmd: command | ||
51 | * | ||
52 | * Description: | ||
53 | * Write both a NETLINK nlmsghdr structure and a Generic NETLINK genlmsghdr | ||
54 | * struct to the packet. Returns a pointer to the start of the payload buffer | ||
55 | * on success or NULL on failure. | ||
56 | * | ||
57 | */ | ||
58 | static inline void *netlbl_netlink_hdr_put(struct sk_buff *skb, | ||
59 | u32 pid, | ||
60 | u32 seq, | ||
61 | int type, | ||
62 | int flags, | ||
63 | u8 cmd) | ||
64 | { | ||
65 | return genlmsg_put(skb, | ||
66 | pid, | ||
67 | seq, | ||
68 | type, | ||
69 | 0, | ||
70 | flags, | ||
71 | cmd, | ||
72 | NETLBL_PROTO_VERSION); | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * netlbl_netlink_auditinfo - Fetch the audit information from a NETLINK msg | 45 | * netlbl_netlink_auditinfo - Fetch the audit information from a NETLINK msg |
77 | * @skb: the packet | 46 | * @skb: the packet |
78 | * @audit_info: NetLabel audit information | 47 | * @audit_info: NetLabel audit information |