diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:23:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:23:21 -0400 |
commit | ce8c2293be47999584908069e78bf6d94beadc53 (patch) | |
tree | dfd6909e6866998d2103341b1e1af8c129d0cea8 /include | |
parent | 41e9d344bf52c57ec16648d08618b61d3f1d4bdc (diff) | |
parent | ee6a99b539a50b4e9398938a0a6d37f8bf911550 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
[TG3]: Fix msi issue with kexec/kdump.
[NET] XFRM: Fix whitespace errors.
[NET] TIPC: Fix whitespace errors.
[NET] SUNRPC: Fix whitespace errors.
[NET] SCTP: Fix whitespace errors.
[NET] RXRPC: Fix whitespace errors.
[NET] ROSE: Fix whitespace errors.
[NET] RFKILL: Fix whitespace errors.
[NET] PACKET: Fix whitespace errors.
[NET] NETROM: Fix whitespace errors.
[NET] NETFILTER: Fix whitespace errors.
[NET] IPV4: Fix whitespace errors.
[NET] DCCP: Fix whitespace errors.
[NET] CORE: Fix whitespace errors.
[NET] BLUETOOTH: Fix whitespace errors.
[NET] AX25: Fix whitespace errors.
[PATCH] mac80211: remove rtnl locking in ieee80211_sta.c
[PATCH] mac80211: fix GCC warning on 64bit platforms
[GENETLINK]: Dynamic multicast groups.
[NETLIKN]: Allow removing multicast groups.
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genetlink.h | 13 | ||||
-rw-r--r-- | include/linux/netlink.h | 2 | ||||
-rw-r--r-- | include/net/genetlink.h | 22 |
3 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index f7a93770e1be..7da02c93002b 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -39,6 +39,9 @@ enum { | |||
39 | CTRL_CMD_NEWOPS, | 39 | CTRL_CMD_NEWOPS, |
40 | CTRL_CMD_DELOPS, | 40 | CTRL_CMD_DELOPS, |
41 | CTRL_CMD_GETOPS, | 41 | CTRL_CMD_GETOPS, |
42 | CTRL_CMD_NEWMCAST_GRP, | ||
43 | CTRL_CMD_DELMCAST_GRP, | ||
44 | CTRL_CMD_GETMCAST_GRP, /* unused */ | ||
42 | __CTRL_CMD_MAX, | 45 | __CTRL_CMD_MAX, |
43 | }; | 46 | }; |
44 | 47 | ||
@@ -52,6 +55,7 @@ enum { | |||
52 | CTRL_ATTR_HDRSIZE, | 55 | CTRL_ATTR_HDRSIZE, |
53 | CTRL_ATTR_MAXATTR, | 56 | CTRL_ATTR_MAXATTR, |
54 | CTRL_ATTR_OPS, | 57 | CTRL_ATTR_OPS, |
58 | CTRL_ATTR_MCAST_GROUPS, | ||
55 | __CTRL_ATTR_MAX, | 59 | __CTRL_ATTR_MAX, |
56 | }; | 60 | }; |
57 | 61 | ||
@@ -66,4 +70,13 @@ enum { | |||
66 | 70 | ||
67 | #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) | 71 | #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) |
68 | 72 | ||
73 | enum { | ||
74 | CTRL_ATTR_MCAST_GRP_UNSPEC, | ||
75 | CTRL_ATTR_MCAST_GRP_NAME, | ||
76 | CTRL_ATTR_MCAST_GRP_ID, | ||
77 | __CTRL_ATTR_MCAST_GRP_MAX, | ||
78 | }; | ||
79 | |||
80 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | ||
81 | |||
69 | #endif /* __LINUX_GENERIC_NETLINK_H */ | 82 | #endif /* __LINUX_GENERIC_NETLINK_H */ |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 2e23353c28a5..83d8239f0cce 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -161,6 +161,8 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, | |||
161 | void (*input)(struct sock *sk, int len), | 161 | void (*input)(struct sock *sk, int len), |
162 | struct mutex *cb_mutex, | 162 | struct mutex *cb_mutex, |
163 | struct module *module); | 163 | struct module *module); |
164 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); | ||
165 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); | ||
164 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 166 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
165 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); | 167 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); |
166 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 168 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index b6eaca122db8..decdda546829 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -5,6 +5,22 @@ | |||
5 | #include <net/netlink.h> | 5 | #include <net/netlink.h> |
6 | 6 | ||
7 | /** | 7 | /** |
8 | * struct genl_multicast_group - generic netlink multicast group | ||
9 | * @name: name of the multicast group, names are per-family | ||
10 | * @id: multicast group ID, assigned by the core, to use with | ||
11 | * genlmsg_multicast(). | ||
12 | * @list: list entry for linking | ||
13 | * @family: pointer to family, need not be set before registering | ||
14 | */ | ||
15 | struct genl_multicast_group | ||
16 | { | ||
17 | struct genl_family *family; /* private */ | ||
18 | struct list_head list; /* private */ | ||
19 | char name[GENL_NAMSIZ]; | ||
20 | u32 id; | ||
21 | }; | ||
22 | |||
23 | /** | ||
8 | * struct genl_family - generic netlink family | 24 | * struct genl_family - generic netlink family |
9 | * @id: protocol family idenfitier | 25 | * @id: protocol family idenfitier |
10 | * @hdrsize: length of user specific header in bytes | 26 | * @hdrsize: length of user specific header in bytes |
@@ -14,6 +30,7 @@ | |||
14 | * @attrbuf: buffer to store parsed attributes | 30 | * @attrbuf: buffer to store parsed attributes |
15 | * @ops_list: list of all assigned operations | 31 | * @ops_list: list of all assigned operations |
16 | * @family_list: family list | 32 | * @family_list: family list |
33 | * @mcast_groups: multicast groups list | ||
17 | */ | 34 | */ |
18 | struct genl_family | 35 | struct genl_family |
19 | { | 36 | { |
@@ -25,6 +42,7 @@ struct genl_family | |||
25 | struct nlattr ** attrbuf; /* private */ | 42 | struct nlattr ** attrbuf; /* private */ |
26 | struct list_head ops_list; /* private */ | 43 | struct list_head ops_list; /* private */ |
27 | struct list_head family_list; /* private */ | 44 | struct list_head family_list; /* private */ |
45 | struct list_head mcast_groups; /* private */ | ||
28 | }; | 46 | }; |
29 | 47 | ||
30 | /** | 48 | /** |
@@ -73,6 +91,10 @@ extern int genl_register_family(struct genl_family *family); | |||
73 | extern int genl_unregister_family(struct genl_family *family); | 91 | extern int genl_unregister_family(struct genl_family *family); |
74 | extern int genl_register_ops(struct genl_family *, struct genl_ops *ops); | 92 | extern int genl_register_ops(struct genl_family *, struct genl_ops *ops); |
75 | extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops); | 93 | extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops); |
94 | extern int genl_register_mc_group(struct genl_family *family, | ||
95 | struct genl_multicast_group *grp); | ||
96 | extern void genl_unregister_mc_group(struct genl_family *family, | ||
97 | struct genl_multicast_group *grp); | ||
76 | 98 | ||
77 | extern struct sock *genl_sock; | 99 | extern struct sock *genl_sock; |
78 | 100 | ||