aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 5ba398e90304..ab5d3126831f 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -176,13 +176,18 @@ struct netlink_skb_parms
176#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) 176#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
177 177
178 178
179extern void netlink_table_grab(void);
180extern void netlink_table_ungrab(void);
181
179extern struct sock *netlink_kernel_create(struct net *net, 182extern struct sock *netlink_kernel_create(struct net *net,
180 int unit,unsigned int groups, 183 int unit,unsigned int groups,
181 void (*input)(struct sk_buff *skb), 184 void (*input)(struct sk_buff *skb),
182 struct mutex *cb_mutex, 185 struct mutex *cb_mutex,
183 struct module *module); 186 struct module *module);
184extern void netlink_kernel_release(struct sock *sk); 187extern void netlink_kernel_release(struct sock *sk);
188extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
185extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); 189extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
190extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group);
186extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); 191extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group);
187extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); 192extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
188extern int netlink_has_listeners(struct sock *sk, unsigned int group); 193extern int netlink_has_listeners(struct sock *sk, unsigned int group);
@@ -217,12 +222,13 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
217 222
218struct netlink_callback 223struct netlink_callback
219{ 224{
220 struct sk_buff *skb; 225 struct sk_buff *skb;
221 struct nlmsghdr *nlh; 226 const struct nlmsghdr *nlh;
222 int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); 227 int (*dump)(struct sk_buff * skb,
223 int (*done)(struct netlink_callback *cb); 228 struct netlink_callback *cb);
224 int family; 229 int (*done)(struct netlink_callback *cb);
225 long args[6]; 230 int family;
231 long args[6];
226}; 232};
227 233
228struct netlink_notify 234struct netlink_notify
@@ -258,7 +264,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
258 NLMSG_NEW(skb, pid, seq, type, len, 0) 264 NLMSG_NEW(skb, pid, seq, type, len, 0)
259 265
260extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, 266extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
261 struct nlmsghdr *nlh, 267 const struct nlmsghdr *nlh,
262 int (*dump)(struct sk_buff *skb, struct netlink_callback*), 268 int (*dump)(struct sk_buff *skb, struct netlink_callback*),
263 int (*done)(struct netlink_callback*)); 269 int (*done)(struct netlink_callback*));
264 270