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