diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-09-18 03:01:59 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:51 -0400 |
commit | eb328111efde7bca782f340fe805756039ec6a0c (patch) | |
tree | 77c38b0a7ee67703c95caf16c6691576e2f77d03 /include/linux/genetlink.h | |
parent | 78e5b8916e7db119850f57ce8548fbb9767078fc (diff) |
[GENL]: Provide more information to userspace about registered genl families
Additionaly exports the following information when providing
the list of registered generic netlink families:
- protocol version
- header size
- maximum number of attributes
- list of available operations including
- id
- flags
- avaiability of policy and doit/dumpit function
libnl HEAD provides a utility to read this new information:
0x0010 nlctrl version 1
hdrsize 0 maxattr 6
op GETFAMILY (0x03) [POLICY,DOIT,DUMPIT]
0x0011 NLBL_MGMT version 1
hdrsize 0 maxattr 0
op unknown (0x02) [DOIT]
op unknown (0x03) [DOIT]
....
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/genetlink.h')
-rw-r--r-- | include/linux/genetlink.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index 84f12a41dc01..9049dc65ae51 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -16,6 +16,8 @@ struct genlmsghdr { | |||
16 | 16 | ||
17 | #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr)) | 17 | #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr)) |
18 | 18 | ||
19 | #define GENL_ADMIN_PERM 0x01 | ||
20 | |||
19 | /* | 21 | /* |
20 | * List of reserved static generic netlink identifiers: | 22 | * List of reserved static generic netlink identifiers: |
21 | */ | 23 | */ |
@@ -43,9 +45,25 @@ enum { | |||
43 | CTRL_ATTR_UNSPEC, | 45 | CTRL_ATTR_UNSPEC, |
44 | CTRL_ATTR_FAMILY_ID, | 46 | CTRL_ATTR_FAMILY_ID, |
45 | CTRL_ATTR_FAMILY_NAME, | 47 | CTRL_ATTR_FAMILY_NAME, |
48 | CTRL_ATTR_VERSION, | ||
49 | CTRL_ATTR_HDRSIZE, | ||
50 | CTRL_ATTR_MAXATTR, | ||
51 | CTRL_ATTR_OPS, | ||
46 | __CTRL_ATTR_MAX, | 52 | __CTRL_ATTR_MAX, |
47 | }; | 53 | }; |
48 | 54 | ||
49 | #define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1) | 55 | #define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1) |
50 | 56 | ||
57 | enum { | ||
58 | CTRL_ATTR_OP_UNSPEC, | ||
59 | CTRL_ATTR_OP_ID, | ||
60 | CTRL_ATTR_OP_FLAGS, | ||
61 | CTRL_ATTR_OP_POLICY, | ||
62 | CTRL_ATTR_OP_DOIT, | ||
63 | CTRL_ATTR_OP_DUMPIT, | ||
64 | __CTRL_ATTR_OP_MAX, | ||
65 | }; | ||
66 | |||
67 | #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) | ||
68 | |||
51 | #endif /* __LINUX_GENERIC_NETLINK_H */ | 69 | #endif /* __LINUX_GENERIC_NETLINK_H */ |