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_NFTRACE,
26#define NFNLGRP_NFTRACE NFNLGRP_NFTRACE
27 __NFNLGRP_MAX,
28};
29#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
30
31
32
33struct nfgenmsg {
34 __u8 nfgen_family;
35 __u8 version;
36 __be16 res_id;
37};
38
39#define NFNETLINK_V0 0
40
41
42
43
44
45#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
46#define NFNL_MSG_TYPE(x) (x & 0x00ff)
47
48
49
50#define NFNL_SUBSYS_NONE 0
51#define NFNL_SUBSYS_CTNETLINK 1
52#define NFNL_SUBSYS_CTNETLINK_EXP 2
53#define NFNL_SUBSYS_QUEUE 3
54#define NFNL_SUBSYS_ULOG 4
55#define NFNL_SUBSYS_OSF 5
56#define NFNL_SUBSYS_IPSET 6
57#define NFNL_SUBSYS_ACCT 7
58#define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8
59#define NFNL_SUBSYS_CTHELPER 9
60#define NFNL_SUBSYS_NFTABLES 10
61#define NFNL_SUBSYS_NFT_COMPAT 11
62#define NFNL_SUBSYS_COUNT 12
63
64
65#define NFNL_MSG_BATCH_BEGIN NLMSG_MIN_TYPE
66#define NFNL_MSG_BATCH_END NLMSG_MIN_TYPE+1
67
68#endif
69