diff options
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 52e48959cfa1..a390e9d54827 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -237,22 +237,8 @@ struct netlink_notify { | |||
237 | int protocol; | 237 | int protocol; |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static __inline__ struct nlmsghdr * | 240 | struct nlmsghdr * |
241 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) | 241 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags); |
242 | { | ||
243 | struct nlmsghdr *nlh; | ||
244 | int size = NLMSG_LENGTH(len); | ||
245 | |||
246 | nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); | ||
247 | nlh->nlmsg_type = type; | ||
248 | nlh->nlmsg_len = size; | ||
249 | nlh->nlmsg_flags = flags; | ||
250 | nlh->nlmsg_pid = pid; | ||
251 | nlh->nlmsg_seq = seq; | ||
252 | if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0) | ||
253 | memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); | ||
254 | return nlh; | ||
255 | } | ||
256 | 242 | ||
257 | #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ | 243 | #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ |
258 | ({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \ | 244 | ({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \ |