diff options
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 6552b71bfa73..167518668936 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define NETLINK_W1 1 /* 1-wire subsystem */ | 8 | #define NETLINK_W1 1 /* 1-wire subsystem */ |
9 | #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ | 9 | #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ |
10 | #define NETLINK_FIREWALL 3 /* Firewalling hook */ | 10 | #define NETLINK_FIREWALL 3 /* Firewalling hook */ |
11 | #define NETLINK_TCPDIAG 4 /* TCP socket monitoring */ | 11 | #define NETLINK_INET_DIAG 4 /* INET socket monitoring */ |
12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ | 12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ |
13 | #define NETLINK_XFRM 6 /* ipsec */ | 13 | #define NETLINK_XFRM 6 /* ipsec */ |
14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ | 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ |
@@ -90,6 +90,15 @@ struct nlmsgerr | |||
90 | struct nlmsghdr msg; | 90 | struct nlmsghdr msg; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | #define NETLINK_ADD_MEMBERSHIP 1 | ||
94 | #define NETLINK_DROP_MEMBERSHIP 2 | ||
95 | #define NETLINK_PKTINFO 3 | ||
96 | |||
97 | struct nl_pktinfo | ||
98 | { | ||
99 | __u32 group; | ||
100 | }; | ||
101 | |||
93 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ | 102 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ |
94 | 103 | ||
95 | enum { | 104 | enum { |
@@ -106,9 +115,8 @@ struct netlink_skb_parms | |||
106 | { | 115 | { |
107 | struct ucred creds; /* Skb credentials */ | 116 | struct ucred creds; /* Skb credentials */ |
108 | __u32 pid; | 117 | __u32 pid; |
109 | __u32 groups; | ||
110 | __u32 dst_pid; | 118 | __u32 dst_pid; |
111 | __u32 dst_groups; | 119 | __u32 dst_group; |
112 | kernel_cap_t eff_cap; | 120 | kernel_cap_t eff_cap; |
113 | __u32 loginuid; /* Login (audit) uid */ | 121 | __u32 loginuid; /* Login (audit) uid */ |
114 | }; | 122 | }; |
@@ -117,11 +125,11 @@ struct netlink_skb_parms | |||
117 | #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) | 125 | #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) |
118 | 126 | ||
119 | 127 | ||
120 | extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len)); | 128 | extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module); |
121 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 129 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
122 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 130 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
123 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 131 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
124 | __u32 group, int allocation); | 132 | __u32 group, unsigned int __nocast allocation); |
125 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 133 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
126 | extern int netlink_register_notifier(struct notifier_block *nb); | 134 | extern int netlink_register_notifier(struct notifier_block *nb); |
127 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 135 | extern int netlink_unregister_notifier(struct notifier_block *nb); |