netlink: kill netlink_set_nonroot
Replace netlink_set_nonroot by one new field `flags' in struct netlink_kernel_cfg that is passed to netlink_kernel_create. This patch also renames NL_NONROOT_* to NL_CFG_F_NONROOT_* since now the flags field in nl_table is generic (so we can add more flags if needed in the future). Also adjust all callers in the net-next tree to use these flags instead of netlink_set_nonroot. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
16fa9e1d10
commit
9785e10aed
@@ -176,12 +176,16 @@ struct netlink_skb_parms {
|
||||
extern void netlink_table_grab(void);
|
||||
extern void netlink_table_ungrab(void);
|
||||
|
||||
#define NL_CFG_F_NONROOT_RECV (1 << 0)
|
||||
#define NL_CFG_F_NONROOT_SEND (1 << 1)
|
||||
|
||||
/* optional Netlink kernel configuration parameters */
|
||||
struct netlink_kernel_cfg {
|
||||
unsigned int groups;
|
||||
void (*input)(struct sk_buff *skb);
|
||||
struct mutex *cb_mutex;
|
||||
void (*bind)(int group);
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
extern struct sock *netlink_kernel_create(struct net *net, int unit,
|
||||
@@ -260,11 +264,6 @@ extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
||||
const struct nlmsghdr *nlh,
|
||||
struct netlink_dump_control *control);
|
||||
|
||||
|
||||
#define NL_NONROOT_RECV 0x1
|
||||
#define NL_NONROOT_SEND 0x2
|
||||
extern void netlink_set_nonroot(int protocol, unsigned flag);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __LINUX_NETLINK_H */
|
||||
|
||||
Reference in New Issue
Block a user