[GENL]: Provide more information to userspace about registered genl families
[linux-2.6/suspend2-2.6.18.git] / include / linux / genetlink.h
blob9049dc65ae51b6b34751c4011e43e36646d56bcb
1 #ifndef __LINUX_GENERIC_NETLINK_H
2 #define __LINUX_GENERIC_NETLINK_H
4 #include <linux/netlink.h>
6 #define GENL_NAMSIZ 16 /* length of family name */
8 #define GENL_MIN_ID NLMSG_MIN_TYPE
9 #define GENL_MAX_ID 1023
11 struct genlmsghdr {
12 __u8 cmd;
13 __u8 version;
14 __u16 reserved;
17 #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
19 #define GENL_ADMIN_PERM 0x01
22 * List of reserved static generic netlink identifiers:
24 #define GENL_ID_GENERATE 0
25 #define GENL_ID_CTRL NLMSG_MIN_TYPE
27 /**************************************************************************
28 * Controller
29 **************************************************************************/
31 enum {
32 CTRL_CMD_UNSPEC,
33 CTRL_CMD_NEWFAMILY,
34 CTRL_CMD_DELFAMILY,
35 CTRL_CMD_GETFAMILY,
36 CTRL_CMD_NEWOPS,
37 CTRL_CMD_DELOPS,
38 CTRL_CMD_GETOPS,
39 __CTRL_CMD_MAX,
42 #define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
44 enum {
45 CTRL_ATTR_UNSPEC,
46 CTRL_ATTR_FAMILY_ID,
47 CTRL_ATTR_FAMILY_NAME,
48 CTRL_ATTR_VERSION,
49 CTRL_ATTR_HDRSIZE,
50 CTRL_ATTR_MAXATTR,
51 CTRL_ATTR_OPS,
52 __CTRL_ATTR_MAX,
55 #define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
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,
67 #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
69 #endif /* __LINUX_GENERIC_NETLINK_H */