]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netlink.h
[NET]: Support multiple network namespaces with netlink
[linux-2.6-omap-h63xx.git] / include / linux / netlink.h
index f41688f5663281a98f6fa395d72a5411558390eb..d2843ae4a83a35d0d4d6e880c773a392ce8ff247 100644 (file)
 
 #define MAX_LINKS 32           
 
+struct net;
+
 struct sockaddr_nl
 {
        sa_family_t     nl_family;      /* AF_NETLINK   */
        unsigned short  nl_pad;         /* zero         */
-       __u32           nl_pid;         /* process pid  */
+       __u32           nl_pid;         /* port ID      */
                __u32           nl_groups;      /* multicast groups mask */
 };
 
@@ -41,7 +43,7 @@ struct nlmsghdr
        __u16           nlmsg_type;     /* Message content */
        __u16           nlmsg_flags;    /* Additional flags */
        __u32           nlmsg_seq;      /* Sequence number */
-       __u32           nlmsg_pid;      /* Sending process PID */
+       __u32           nlmsg_pid;      /* Sending process port ID */
 };
 
 /* Flags values */
@@ -157,10 +159,13 @@ struct netlink_skb_parms
 #define NETLINK_CREDS(skb)     (&NETLINK_CB((skb)).creds)
 
 
-extern struct sock *netlink_kernel_create(int unit, unsigned int groups,
+extern struct sock *netlink_kernel_create(struct net *net,
+                                         int unit,unsigned int groups,
                                          void (*input)(struct sock *sk, int len),
                                          struct mutex *cb_mutex,
                                          struct module *module);
+extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
+extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group);
 extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
 extern int netlink_has_listeners(struct sock *sk, unsigned int group);
 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
@@ -204,6 +209,7 @@ struct netlink_callback
 
 struct netlink_notify
 {
+       struct net *net;
        int pid;
        int protocol;
 };