aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/genetlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r--include/net/genetlink.h22
1 files changed, 22 insertions, 0 deletions
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 */
15struct 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 */
18struct genl_family 35struct 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);
73extern int genl_unregister_family(struct genl_family *family); 91extern int genl_unregister_family(struct genl_family *family);
74extern int genl_register_ops(struct genl_family *, struct genl_ops *ops); 92extern int genl_register_ops(struct genl_family *, struct genl_ops *ops);
75extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops); 93extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops);
94extern int genl_register_mc_group(struct genl_family *family,
95 struct genl_multicast_group *grp);
96extern void genl_unregister_mc_group(struct genl_family *family,
97 struct genl_multicast_group *grp);
76 98
77extern struct sock *genl_sock; 99extern struct sock *genl_sock;
78 100