linux/include/uapi/linux/netfilter/nfnetlink.h
<<
>>
Prefs
   1#ifndef _UAPI_NFNETLINK_H
   2#define _UAPI_NFNETLINK_H
   3#include <linux/types.h>
   4#include <linux/netfilter/nfnetlink_compat.h>
   5
   6enum nfnetlink_groups {
   7        NFNLGRP_NONE,
   8#define NFNLGRP_NONE                    NFNLGRP_NONE
   9        NFNLGRP_CONNTRACK_NEW,
  10#define NFNLGRP_CONNTRACK_NEW           NFNLGRP_CONNTRACK_NEW
  11        NFNLGRP_CONNTRACK_UPDATE,
  12#define NFNLGRP_CONNTRACK_UPDATE        NFNLGRP_CONNTRACK_UPDATE
  13        NFNLGRP_CONNTRACK_DESTROY,
  14#define NFNLGRP_CONNTRACK_DESTROY       NFNLGRP_CONNTRACK_DESTROY
  15        NFNLGRP_CONNTRACK_EXP_NEW,
  16#define NFNLGRP_CONNTRACK_EXP_NEW       NFNLGRP_CONNTRACK_EXP_NEW
  17        NFNLGRP_CONNTRACK_EXP_UPDATE,
  18#define NFNLGRP_CONNTRACK_EXP_UPDATE    NFNLGRP_CONNTRACK_EXP_UPDATE
  19        NFNLGRP_CONNTRACK_EXP_DESTROY,
  20#define NFNLGRP_CONNTRACK_EXP_DESTROY   NFNLGRP_CONNTRACK_EXP_DESTROY
  21        NFNLGRP_NFTABLES,
  22#define NFNLGRP_NFTABLES                NFNLGRP_NFTABLES
  23        NFNLGRP_ACCT_QUOTA,
  24#define NFNLGRP_ACCT_QUOTA              NFNLGRP_ACCT_QUOTA
  25        __NFNLGRP_MAX,
  26};
  27#define NFNLGRP_MAX     (__NFNLGRP_MAX - 1)
  28
  29/* General form of address family dependent message.
  30 */
  31struct nfgenmsg {
  32        __u8  nfgen_family;             /* AF_xxx */
  33        __u8  version;          /* nfnetlink version */
  34        __be16    res_id;               /* resource id */
  35};
  36
  37#define NFNETLINK_V0    0
  38
  39/* netfilter netlink message types are split in two pieces:
  40 * 8 bit subsystem, 8bit operation.
  41 */
  42
  43#define NFNL_SUBSYS_ID(x)       ((x & 0xff00) >> 8)
  44#define NFNL_MSG_TYPE(x)        (x & 0x00ff)
  45
  46/* No enum here, otherwise __stringify() trick of MODULE_ALIAS_NFNL_SUBSYS()
  47 * won't work anymore */
  48#define NFNL_SUBSYS_NONE                0
  49#define NFNL_SUBSYS_CTNETLINK           1
  50#define NFNL_SUBSYS_CTNETLINK_EXP       2
  51#define NFNL_SUBSYS_QUEUE               3
  52#define NFNL_SUBSYS_ULOG                4
  53#define NFNL_SUBSYS_OSF                 5
  54#define NFNL_SUBSYS_IPSET               6
  55#define NFNL_SUBSYS_ACCT                7
  56#define NFNL_SUBSYS_CTNETLINK_TIMEOUT   8
  57#define NFNL_SUBSYS_CTHELPER            9
  58#define NFNL_SUBSYS_NFTABLES            10
  59#define NFNL_SUBSYS_NFT_COMPAT          11
  60#define NFNL_SUBSYS_COUNT               12
  61
  62/* Reserved control nfnetlink messages */
  63#define NFNL_MSG_BATCH_BEGIN            NLMSG_MIN_TYPE
  64#define NFNL_MSG_BATCH_END              NLMSG_MIN_TYPE+1
  65
  66#endif /* _UAPI_NFNETLINK_H */
  67