46
46
#define genl_family rpl_genl_family
47
47
#define genl_notify rpl_genl_notify
48
void genl_notify(struct genl_family *family,
49
struct sk_buff *skb, struct net *net, u32 portid, u32 group,
50
struct nlmsghdr *nlh, gfp_t flags);
48
void rpl_genl_notify(struct genl_family *family,
49
struct sk_buff *skb, struct net *net, u32 portid, u32 group,
50
struct nlmsghdr *nlh, gfp_t flags);
52
52
static inline void *rpl_genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq,
53
53
struct genl_family *family, int flags, u8 cmd)
108
#ifndef HAVE_GENL_HAS_LISTENERS
109
static inline int genl_has_listeners(struct genl_family *family,
110
struct net *net, unsigned int group)
112
#ifdef HAVE_MCGRP_OFFSET
113
if (WARN_ON_ONCE(group >= family->n_mcgrps))
115
group = family->mcgrp_offset + group;
117
return netlink_has_listeners(net->genl_sock, group);
121
#ifndef HAVE_GENL_HAS_LISTENERS_TAKES_NET
122
static inline int rpl_genl_has_listeners(struct genl_family *family,
123
struct net *net, unsigned int group)
125
#ifdef HAVE_GENL_NOTIFY_TAKES_FAMILY
126
return genl_has_listeners(family, net->genl_sock, group);
128
return genl_has_listeners(&family->compat_family, net->genl_sock, group);
132
#define genl_has_listeners rpl_genl_has_listeners
135
#endif /* HAVE_GENL_HAS_LISTENERS */
137
#ifndef HAVE_GENLMSG_PARSE
138
static inline int genlmsg_parse(const struct nlmsghdr *nlh,
139
const struct genl_family *family,
140
struct nlattr *tb[], int maxtype,
141
const struct nla_policy *policy)
143
return nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype,
108
148
#endif /* genetlink.h */