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
30
31struct nfgenmsg {
32 __u8 nfgen_family;
33 __u8 version;
34 __be16 res_id;
35};
36
37#define NFNETLINK_V0 0
38
39
40
41
42
43#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
44#define NFNL_MSG_TYPE(x) (x & 0x00ff)
45
46
47
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
63#define NFNL_MSG_BATCH_BEGIN NLMSG_MIN_TYPE
64#define NFNL_MSG_BATCH_END NLMSG_MIN_TYPE+1
65
66#endif
67