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 */
54 #define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
59 CTRL_ATTR_FAMILY_NAME
,
64 CTRL_ATTR_MCAST_GROUPS
,
68 #define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
77 #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
80 CTRL_ATTR_MCAST_GRP_UNSPEC
,
81 CTRL_ATTR_MCAST_GRP_NAME
,
82 CTRL_ATTR_MCAST_GRP_ID
,
83 __CTRL_ATTR_MCAST_GRP_MAX
,
86 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
89 #endif /* _UAPI__LINUX_GENERIC_NETLINK_H */