linux/include/uapi/linux/genetlink.h
<<
>>
Prefs
   1#ifndef _UAPI__LINUX_GENERIC_NETLINK_H
   2#define _UAPI__LINUX_GENERIC_NETLINK_H
   3
   4#include <linux/types.h>
   5#include <linux/netlink.h>
   6
   7#define GENL_NAMSIZ     16      /* length of family name */
   8
   9#define GENL_MIN_ID     NLMSG_MIN_TYPE
  10#define GENL_MAX_ID     1023
  11
  12struct genlmsghdr {
  13        __u8    cmd;
  14        __u8    version;
  15        __u16   reserved;
  16};
  17
  18#define GENL_HDRLEN     NLMSG_ALIGN(sizeof(struct genlmsghdr))
  19
  20#define GENL_ADMIN_PERM         0x01
  21#define GENL_CMD_CAP_DO         0x02
  22#define GENL_CMD_CAP_DUMP       0x04
  23#define GENL_CMD_CAP_HASPOL     0x08
  24
  25/*
  26 * List of reserved static generic netlink identifiers:
  27 */
  28#define GENL_ID_GENERATE        0
  29#define GENL_ID_CTRL            NLMSG_MIN_TYPE
  30#define GENL_ID_VFS_DQUOT       (NLMSG_MIN_TYPE + 1)
  31#define GENL_ID_PMCRAID         (NLMSG_MIN_TYPE + 2)
  32
  33/**************************************************************************
  34 * Controller
  35 **************************************************************************/
  36
  37enum {
  38        CTRL_CMD_UNSPEC,
  39        CTRL_CMD_NEWFAMILY,
  40        CTRL_CMD_DELFAMILY,
  41        CTRL_CMD_GETFAMILY,
  42        CTRL_CMD_NEWOPS,
  43        CTRL_CMD_DELOPS,
  44        CTRL_CMD_GETOPS,
  45        CTRL_CMD_NEWMCAST_GRP,
  46        CTRL_CMD_DELMCAST_GRP,
  47        CTRL_CMD_GETMCAST_GRP, /* unused */
  48        __CTRL_CMD_MAX,
  49};
  50
  51#define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
  52
  53enum {
  54        CTRL_ATTR_UNSPEC,
  55        CTRL_ATTR_FAMILY_ID,
  56        CTRL_ATTR_FAMILY_NAME,
  57        CTRL_ATTR_VERSION,
  58        CTRL_ATTR_HDRSIZE,
  59        CTRL_ATTR_MAXATTR,
  60        CTRL_ATTR_OPS,
  61        CTRL_ATTR_MCAST_GROUPS,
  62        __CTRL_ATTR_MAX,
  63};
  64
  65#define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
  66
  67enum {
  68        CTRL_ATTR_OP_UNSPEC,
  69        CTRL_ATTR_OP_ID,
  70        CTRL_ATTR_OP_FLAGS,
  71        __CTRL_ATTR_OP_MAX,
  72};
  73
  74#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
  75
  76enum {
  77        CTRL_ATTR_MCAST_GRP_UNSPEC,
  78        CTRL_ATTR_MCAST_GRP_NAME,
  79        CTRL_ATTR_MCAST_GRP_ID,
  80        __CTRL_ATTR_MCAST_GRP_MAX,
  81};
  82
  83#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
  84
  85
  86#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */
  87