diff options
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 0f628ffa420c..f74dd133788f 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -174,11 +174,17 @@ struct netlink_skb_parms { | |||
174 | extern void netlink_table_grab(void); | 174 | extern void netlink_table_grab(void); |
175 | extern void netlink_table_ungrab(void); | 175 | extern void netlink_table_ungrab(void); |
176 | 176 | ||
177 | extern struct sock *netlink_kernel_create(struct net *net, | 177 | /* optional Netlink kernel configuration parameters */ |
178 | int unit,unsigned int groups, | 178 | struct netlink_kernel_cfg { |
179 | void (*input)(struct sk_buff *skb), | 179 | unsigned int groups; |
180 | struct mutex *cb_mutex, | 180 | void (*input)(struct sk_buff *skb); |
181 | struct module *module); | 181 | struct mutex *cb_mutex; |
182 | void (*bind)(int group); | ||
183 | }; | ||
184 | |||
185 | extern struct sock *netlink_kernel_create(struct net *net, int unit, | ||
186 | struct module *module, | ||
187 | struct netlink_kernel_cfg *cfg); | ||
182 | extern void netlink_kernel_release(struct sock *sk); | 188 | extern void netlink_kernel_release(struct sock *sk); |
183 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); | 189 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); |
184 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); | 190 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); |
@@ -241,14 +247,6 @@ struct netlink_notify { | |||
241 | struct nlmsghdr * | 247 | struct nlmsghdr * |
242 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags); | 248 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags); |
243 | 249 | ||
244 | #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ | ||
245 | ({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \ | ||
246 | goto nlmsg_failure; \ | ||
247 | __nlmsg_put(skb, pid, seq, type, len, flags); }) | ||
248 | |||
249 | #define NLMSG_PUT(skb, pid, seq, type, len) \ | ||
250 | NLMSG_NEW(skb, pid, seq, type, len, 0) | ||
251 | |||
252 | struct netlink_dump_control { | 250 | struct netlink_dump_control { |
253 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); | 251 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); |
254 | int (*done)(struct netlink_callback*); | 252 | int (*done)(struct netlink_callback*); |