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.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 27e4d164a108..167518668936 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -5,21 +5,20 @@
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7#define NETLINK_ROUTE 0 /* Routing/device hook */ 7#define NETLINK_ROUTE 0 /* Routing/device hook */
8#define NETLINK_SKIP 1 /* Reserved for ENskip */ 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 */
15#define NETLINK_ARPD 8 15#define NETLINK_ISCSI 8 /* Open-iSCSI */
16#define NETLINK_AUDIT 9 /* auditing */ 16#define NETLINK_AUDIT 9 /* auditing */
17#define NETLINK_FIB_LOOKUP 10 17#define NETLINK_FIB_LOOKUP 10
18#define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ 18#define NETLINK_NETFILTER 12 /* netfilter subsystem */
19#define NETLINK_IP6_FW 13 19#define NETLINK_IP6_FW 13
20#define NETLINK_DNRTMSG 14 /* DECnet routing messages */ 20#define NETLINK_DNRTMSG 14 /* DECnet routing messages */
21#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ 21#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
22#define NETLINK_TAPBASE 16 /* 16 to 31 are ethertap */
23 22
24#define MAX_LINKS 32 23#define MAX_LINKS 32
25 24
@@ -91,6 +90,15 @@ struct nlmsgerr
91 struct nlmsghdr msg; 90 struct nlmsghdr msg;
92}; 91};
93 92
93#define NETLINK_ADD_MEMBERSHIP 1
94#define NETLINK_DROP_MEMBERSHIP 2
95#define NETLINK_PKTINFO 3
96
97struct nl_pktinfo
98{
99 __u32 group;
100};
101
94#define NET_MAJOR 36 /* Major 36 is reserved for networking */ 102#define NET_MAJOR 36 /* Major 36 is reserved for networking */
95 103
96enum { 104enum {
@@ -107,9 +115,8 @@ struct netlink_skb_parms
107{ 115{
108 struct ucred creds; /* Skb credentials */ 116 struct ucred creds; /* Skb credentials */
109 __u32 pid; 117 __u32 pid;
110 __u32 groups;
111 __u32 dst_pid; 118 __u32 dst_pid;
112 __u32 dst_groups; 119 __u32 dst_group;
113 kernel_cap_t eff_cap; 120 kernel_cap_t eff_cap;
114 __u32 loginuid; /* Login (audit) uid */ 121 __u32 loginuid; /* Login (audit) uid */
115}; 122};
@@ -118,11 +125,11 @@ struct netlink_skb_parms
118#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) 125#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
119 126
120 127
121extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len)); 128extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module);
122extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); 129extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
123extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); 130extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
124extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, 131extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
125 __u32 group, int allocation); 132 __u32 group, unsigned int __nocast allocation);
126extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); 133extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
127extern int netlink_register_notifier(struct notifier_block *nb); 134extern int netlink_register_notifier(struct notifier_block *nb);
128extern int netlink_unregister_notifier(struct notifier_block *nb); 135extern int netlink_unregister_notifier(struct notifier_block *nb);