1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI__LINUX_GENERIC_NETLINK_H
3 #define _UAPI__LINUX_GENERIC_NETLINK_H
5 #include <linux/types.h>
6 #include <linux/netlink.h>
8 #define GENL_NAMSIZ 16 /* length of family name */
10 #define GENL_MIN_ID NLMSG_MIN_TYPE
11 #define GENL_MAX_ID 1023
19 #define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
21 #define GENL_ADMIN_PERM 0x01
22 #define GENL_CMD_CAP_DO 0x02
23 #define GENL_CMD_CAP_DUMP 0x04
24 #define GENL_CMD_CAP_HASPOL 0x08
25 #define GENL_UNS_ADMIN_PERM 0x10
28 * List of reserved static generic netlink identifiers:
30 #define GENL_ID_CTRL NLMSG_MIN_TYPE
31 #define GENL_ID_VFS_DQUOT (NLMSG_MIN_TYPE + 1)
32 #define GENL_ID_PMCRAID (NLMSG_MIN_TYPE + 2)
33 /* must be last reserved + 1 */
34 #define GENL_START_ALLOC (NLMSG_MIN_TYPE + 3)
36 /**************************************************************************
38 **************************************************************************/
48 CTRL_CMD_NEWMCAST_GRP,
49 CTRL_CMD_DELMCAST_GRP,
50 CTRL_CMD_GETMCAST_GRP, /* unused */
55 #define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
60 CTRL_ATTR_FAMILY_NAME,
65 CTRL_ATTR_MCAST_GROUPS,
72 #define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
81 #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
84 CTRL_ATTR_MCAST_GRP_UNSPEC,
85 CTRL_ATTR_MCAST_GRP_NAME,
86 CTRL_ATTR_MCAST_GRP_ID,
87 __CTRL_ATTR_MCAST_GRP_MAX,
90 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
93 CTRL_ATTR_POLICY_UNSPEC,
95 CTRL_ATTR_POLICY_DUMP,
97 __CTRL_ATTR_POLICY_DUMP_MAX,
98 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
101 #define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)
103 #endif /* _UAPI__LINUX_GENERIC_NETLINK_H */