1 #ifndef __NET_GENERIC_NETLINK_H
2 #define __NET_GENERIC_NETLINK_H
4 #include <linux/genetlink.h>
8 #define GENLMSG_DEFAULT_SIZE (NLMSG_DEFAULT_SIZE - GENL_HDRLEN)
125 struct genl_ops *ops,
size_t n_ops);
149 return (
struct nlmsghdr *)((
char *)user_hdr -
168 nl_dump_check_consistent(cb, genlmsg_nlhdr(user_hdr, family));
181 static inline void *genlmsg_put_reply(
struct sk_buff *
skb,
195 static inline int genlmsg_end(
struct sk_buff *
skb,
void *
hdr)
205 static inline void genlmsg_cancel(
struct sk_buff *
skb,
void *
hdr)
219 static inline int genlmsg_multicast_netns(
struct net *
net,
struct sk_buff *skb,
222 return nlmsg_multicast(net->
genl_sock, skb, portid, group, flags);
232 static inline int genlmsg_multicast(
struct sk_buff *skb,
u32 portid,
235 return genlmsg_multicast_netns(&
init_net, skb, portid, group, flags);
255 static inline int genlmsg_unicast(
struct net *
net,
struct sk_buff *skb,
u32 portid)
257 return nlmsg_unicast(net->
genl_sock, skb, portid);
267 return genlmsg_unicast(genl_info_net(info), skb, info->
snd_portid);
274 static inline void *genlmsg_data(
const struct genlmsghdr *gnlh)
283 static inline int genlmsg_len(
const struct genlmsghdr *gnlh)
294 static inline int genlmsg_msg_size(
int payload)
303 static inline int genlmsg_total_size(
int payload)
315 return nlmsg_new(genlmsg_total_size(payload), flags);