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