Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61741
b: refs/heads/master
c: 2dbba6f
h: refs/heads/master
i:
  61739: 35923ca
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Jul 18, 2007
1 parent b6c618d commit 7c282d4
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84659eb529b33572bb3f8c94e0978bd5d084bc7e
refs/heads/master: 2dbba6f773d1e1e4c78f03b0dbf19790d9017693
13 changes: 13 additions & 0 deletions trunk/include/linux/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ enum {
CTRL_CMD_NEWOPS,
CTRL_CMD_DELOPS,
CTRL_CMD_GETOPS,
CTRL_CMD_NEWMCAST_GRP,
CTRL_CMD_DELMCAST_GRP,
CTRL_CMD_GETMCAST_GRP, /* unused */
__CTRL_CMD_MAX,
};

Expand All @@ -52,6 +55,7 @@ enum {
CTRL_ATTR_HDRSIZE,
CTRL_ATTR_MAXATTR,
CTRL_ATTR_OPS,
CTRL_ATTR_MCAST_GROUPS,
__CTRL_ATTR_MAX,
};

Expand All @@ -66,4 +70,13 @@ enum {

#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)

enum {
CTRL_ATTR_MCAST_GRP_UNSPEC,
CTRL_ATTR_MCAST_GRP_NAME,
CTRL_ATTR_MCAST_GRP_ID,
__CTRL_ATTR_MCAST_GRP_MAX,
};

#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)

#endif /* __LINUX_GENERIC_NETLINK_H */
22 changes: 22 additions & 0 deletions trunk/include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
#include <linux/genetlink.h>
#include <net/netlink.h>

/**
* struct genl_multicast_group - generic netlink multicast group
* @name: name of the multicast group, names are per-family
* @id: multicast group ID, assigned by the core, to use with
* genlmsg_multicast().
* @list: list entry for linking
* @family: pointer to family, need not be set before registering
*/
struct genl_multicast_group
{
struct genl_family *family; /* private */
struct list_head list; /* private */
char name[GENL_NAMSIZ];
u32 id;
};

/**
* struct genl_family - generic netlink family
* @id: protocol family idenfitier
Expand All @@ -14,6 +30,7 @@
* @attrbuf: buffer to store parsed attributes
* @ops_list: list of all assigned operations
* @family_list: family list
* @mcast_groups: multicast groups list
*/
struct genl_family
{
Expand All @@ -25,6 +42,7 @@ struct genl_family
struct nlattr ** attrbuf; /* private */
struct list_head ops_list; /* private */
struct list_head family_list; /* private */
struct list_head mcast_groups; /* private */
};

/**
Expand Down Expand Up @@ -73,6 +91,10 @@ extern int genl_register_family(struct genl_family *family);
extern int genl_unregister_family(struct genl_family *family);
extern int genl_register_ops(struct genl_family *, struct genl_ops *ops);
extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops);
extern int genl_register_mc_group(struct genl_family *family,
struct genl_multicast_group *grp);
extern void genl_unregister_mc_group(struct genl_family *family,
struct genl_multicast_group *grp);

extern struct sock *genl_sock;

Expand Down
Loading

0 comments on commit 7c282d4

Please sign in to comment.