#define NFT_CHAIN_MAXNAMELEN 32 |
Referenced by nft_chain_attr_set_data(), and nft_chain_nlmsg_parse().
#define NFT_DATA_RESERVED_MASK 0xffffff00U |
#define NFT_QUEUE_FLAG_BYPASS 0x01 /* for compatibility with v2 */ |
#define NFT_QUEUE_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */ |
#define NFT_QUEUE_FLAG_MASK 0x03 |
#define NFT_REG_MAX (__NFT_REG_MAX - 1) |
#define NFT_USERDATA_MAXLEN 256 |
#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1) |
#define NFTA_BYTEORDER_MAX (__NFTA_BYTEORDER_MAX - 1) |
#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1) |
Referenced by nfnlmsg_nft_chain_parse(), and nft_chain_nlmsg_parse().
#define NFTA_CMP_MAX (__NFTA_CMP_MAX - 1) |
#define NFTA_COUNTER_MAX (__NFTA_COUNTER_MAX - 1) |
#define NFTA_CT_MAX (__NFTA_CT_MAX - 1) |
#define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1) |
Referenced by nfnl_nft_data_parse(), and nft_parse_data().
#define NFTA_EXPR_MAX (__NFTA_EXPR_MAX - 1) |
Referenced by nfnl_nft_expr_parse().
#define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1) |
#define NFTA_HOOK_MAX (__NFTA_HOOK_MAX - 1) |
Referenced by nfnlmsg_nft_chain_parse().
#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1) |
#define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1) |
#define NFTA_LIST_MAX (__NFTA_LIST_MAX - 1) |
#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) |
#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1) |
#define NFTA_META_MAX (__NFTA_META_MAX - 1) |
#define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) |
#define NFTA_PAYLOAD_MAX (__NFTA_PAYLOAD_MAX - 1) |
#define NFTA_QUEUE_MAX (__NFTA_QUEUE_MAX - 1) |
#define NFTA_REJECT_MAX (__NFTA_REJECT_MAX - 1) |
#define NFTA_RULE_COMPAT_MAX (__NFTA_RULE_COMPAT_MAX - 1) |
#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1) |
Referenced by nfnlmsg_nft_rule_parse(), and nft_rule_nlmsg_parse().
#define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1) |
#define NFTA_SET_ELEM_LIST_MAX (__NFTA_SET_ELEM_LIST_MAX - 1) |
Referenced by nft_set_elems_nlmsg_parse().
#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) |
#define NFTA_SET_MAX (__NFTA_SET_MAX - 1) |
Referenced by nfnlmsg_nft_set_parse(), and nft_set_nlmsg_parse().
#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1) |
Referenced by nfnlmsg_nft_table_parse(), and nft_table_nlmsg_parse().
#define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1) |
Referenced by nfnl_nft_data_parse().
enum nf_tables_msg_types |
enum nf_tables_msg_types - nf_tables netlink message types
: create a new table (enum nft_table_attributes) : get a table (enum nft_table_attributes) : delete a table (enum nft_table_attributes) : create a new chain (enum nft_chain_attributes) : get a chain (enum nft_chain_attributes) : delete a chain (enum nft_chain_attributes) : create a new rule (enum nft_rule_attributes) : get a rule (enum nft_rule_attributes) : delete a rule (enum nft_rule_attributes) : create a new set (enum nft_set_attributes) : get a set (enum nft_set_attributes) : delete a set (enum nft_set_attributes) : create a new set element (enum nft_set_elem_attributes) : get a set element (enum nft_set_elem_attributes) : delete a set element (enum nft_set_elem_attributes)
enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
: source register (NLA_U32: nft_registers) : destination register (NLA_U32: nft_registers) : length of operands (NLA_U32) : mask value (NLA_NESTED: nft_data_attributes) : xor value (NLA_NESTED: nft_data_attributes)
The bitwise expression performs the following operation:
dreg = (sreg & mask) ^ xor
which allow to express all bitwise operations:
mask xor
NOT: 1 1 OR: 0 x XOR: 1 x AND: x 0
enum nft_byteorder_attributes - nf_tables byteorder expression netlink attributes
: source register (NLA_U32: nft_registers) : destination register (NLA_U32: nft_registers) : operator (NLA_U32: enum nft_byteorder_ops) : length of the data (NLA_U32) : data size in bytes (NLA_U32: 2 or 4)
enum nft_byteorder_ops |
enum nft_byteorder_ops - nf_tables byteorder operators
: network to host operator : host to network opertaor
Enumerator | |
---|---|
NFT_BYTEORDER_NTOH | |
NFT_BYTEORDER_HTON | |
NFT_BYTEORDER_NTOH | |
NFT_BYTEORDER_HTON | |
NFT_BYTEORDER_NTOH | |
NFT_BYTEORDER_HTON | |
NFT_BYTEORDER_NTOH | |
NFT_BYTEORDER_HTON | |
NFT_BYTEORDER_NTOH | |
NFT_BYTEORDER_HTON |
enum nft_chain_attributes |
enum nft_chain_attributes - nf_tables chain netlink attributes
: name of the table containing the chain (NLA_STRING) : numeric handle of the chain (NLA_U64) : name of the chain (NLA_STRING) : hook specification for basechains (NLA_NESTED: nft_hook_attributes) : numeric policy of the chain (NLA_U32) : number of references to this chain (NLA_U32) : type name of the string (NLA_NUL_STRING) : counter specification of the chain (NLA_NESTED: nft_counter_attributes)
enum nft_cmp_attributes |
enum nft_cmp_attributes - nf_tables cmp expression netlink attributes
: source register of data to compare (NLA_U32: nft_registers) : cmp operation (NLA_U32: nft_cmp_ops) : data to compare against (NLA_NESTED: nft_data_attributes)
enum nft_cmp_ops |
enum nft_cmp_ops - nf_tables relational operator
: equal : not equal : less than : less than or equal to : greater than : greater than or equal to
enum nft_counter_attributes - nf_tables counter expression netlink attributes
: number of bytes (NLA_U64) : number of packets (NLA_U64)
enum nft_ct_attributes |
enum nft_ct_attributes - nf_tables ct expression netlink attributes
: destination register (NLA_U32) : conntrack data item to load (NLA_U32: nft_ct_keys) : direction in case of directional keys (NLA_U8) : source register (NLA_U32)
enum nft_ct_keys |
enum nft_ct_keys - nf_tables ct expression keys
: conntrack state (bitmask of enum ip_conntrack_info) : conntrack direction (enum ip_conntrack_dir) : conntrack status (bitmask of enum ip_conntrack_status) : conntrack mark value : conntrack secmark value : relative conntrack expiration time in ms : connection tracking helper assigned to conntrack : conntrack layer 3 protocol : conntrack layer 3 protocol source (IPv4/IPv6 address) : conntrack layer 3 protocol destination (IPv4/IPv6 address) : conntrack layer 4 protocol : conntrack layer 4 protocol source : conntrack layer 4 protocol destination
enum nft_data_attributes |
enum nft_data_attributes - nf_tables data netlink attributes
: generic data (NLA_BINARY) : nf_tables verdict (NLA_NESTED: nft_verdict_attributes)
enum nft_data_types |
enum nft_data_types - nf_tables data types
: generic data : netfilter verdict
The type of data is usually determined by the kernel directly and is not explicitly specified by userspace. The only difference are sets, where userspace specifies the key and mapping data types.
The values 0xffffff00-0xffffffff are reserved for internally used types. The remaining range can be freely used by userspace to encode types, all values are equivalent to NFT_DATA_VALUE.
Enumerator | |
---|---|
NFT_DATA_VALUE | |
NFT_DATA_VERDICT | |
NFT_DATA_VALUE | |
NFT_DATA_VERDICT | |
NFT_DATA_VALUE | |
NFT_DATA_VERDICT | |
NFT_DATA_VALUE | |
NFT_DATA_VERDICT | |
NFT_DATA_VALUE | |
NFT_DATA_VERDICT |
enum nft_expr_attributes |
enum nft_expr_attributes - nf_tables expression netlink attributes
: name of the expression type (NLA_STRING) : type specific data (NLA_NESTED)
enum nft_exthdr_attributes - nf_tables IPv6 extension header expression netlink attributes
: destination register (NLA_U32: nft_registers) : extension header type (NLA_U8) : extension header offset (NLA_U32) : extension header length (NLA_U32)
enum nft_hook_attributes |
enum nft_hook_attributes - nf_tables netfilter hook netlink attributes
: netfilter hook number (NLA_U32) : netfilter hook priority (NLA_U32)
enum nft_immediate_attributes - nf_tables immediate expression netlink attributes
: destination register to load data into (NLA_U32) : data to load (NLA_NESTED: nft_data_attributes)
enum nft_limit_attributes |
enum nft_limit_attributes - nf_tables limit expression netlink attributes
: refill rate (NLA_U64) : refill unit (NLA_U64)
enum nft_list_attributes |
enum nft_list_attributes - nf_tables generic list netlink attributes
: list element (NLA_NESTED)
enum nft_log_attributes |
enum nft_log_attributes - nf_tables log expression netlink attributes
: netlink group to send messages to (NLA_U32) : prefix to prepend to log messages (NLA_STRING) : length of payload to include in netlink message (NLA_U32) : queue threshold (NLA_U32) : log level (NLA_U32) : logging flags (NLA_U32)
enum nft_lookup_attributes - nf_tables set lookup expression netlink attributes
: name of the set where to look for (NLA_STRING) : source register of the data to look for (NLA_U32: nft_registers) : destination register (NLA_U32: nft_registers) : uniquely identifies a set in a transaction (NLA_U32)
enum nft_meta_attributes |
enum nft_meta_attributes - nf_tables meta expression netlink attributes
: destination register (NLA_U32) : meta data item to load (NLA_U32: nft_meta_keys) : source register (NLA_U32)
enum nft_meta_keys |
enum nft_meta_keys - nf_tables meta expression keys
: packet length (skb->len) : packet ethertype protocol (skb->protocol), invalid in OUTPUT : packet priority (skb->priority) : packet mark (skb->mark) : packet input interface index (dev->ifindex) : packet output interface index (dev->ifindex) : packet input interface name (dev->name) : packet output interface name (dev->name) : packet input interface type (dev->type) : packet output interface type (dev->type) : originating socket UID (fsuid) : originating socket GID (fsgid) : packet nftrace bit : realm value of packet's route (skb->dst->tclassid) : packet secmark (skb->secmark) : netfilter protocol : layer 4 protocol number : packet input bridge interface name : packet output bridge interface name
enum nft_nat_attributes |
enum nft_nat_attributes - nf_tables nat expression netlink attributes
: NAT type (NLA_U32: nft_nat_types) : NAT family (NLA_U32) : source register of address range start (NLA_U32: nft_registers) : source register of address range end (NLA_U32: nft_registers) : source register of proto range start (NLA_U32: nft_registers) : source register of proto range end (NLA_U32: nft_registers)
enum nft_nat_types |
enum nft_payload_attributes - nf_tables payload expression netlink attributes
: destination register to load data into (NLA_U32: nft_registers) : payload base (NLA_U32: nft_payload_bases) : payload offset relative to base (NLA_U32) : payload length (NLA_U32)
enum nft_payload_bases |
enum nft_payload_bases - nf_tables payload expression offset bases
: link layer header : network header : transport header
enum nft_queue_attributes |
enum nft_queue_attributes - nf_tables queue expression netlink attributes
: netlink queue to send messages to (NLA_U16) : number of queues to load balance packets on (NLA_U16) : various flags (NLA_U16)
enum nft_registers |
enum nft_reject_attributes - nf_tables reject expression netlink attributes
: packet type to use (NLA_U32: nft_reject_types) : ICMP code to use (NLA_U8)
enum nft_reject_types |
enum nft_reject_types - nf_tables reject expression reject types
: reject using ICMP unreachable : reject using TCP RST
enum nft_rule_attributes |
enum nft_rule_attributes - nf_tables rule netlink attributes
: name of the table containing the rule (NLA_STRING) : name of the chain containing the rule (NLA_STRING) : numeric handle of the rule (NLA_U64) : list of expressions (NLA_NESTED: nft_expr_attributes) : compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes) : numeric handle of the previous rule (NLA_U64) : user data (NLA_BINARY, NFT_USERDATA_MAXLEN)
enum nft_rule_compat_attributes - nf_tables rule compat attributes
: numerice value of handled protocol (NLA_U32) : bitmask of enum nft_rule_compat_flags (NLA_U32)
enum nft_set_attributes |
enum nft_set_attributes - nf_tables set netlink attributes
: table name (NLA_STRING) : set name (NLA_STRING) : bitmask of enum nft_set_flags (NLA_U32) : key data type, informational purpose only (NLA_U32) : key data length (NLA_U32) : mapping data type (NLA_U32) : mapping data length (NLA_U32) : selection policy (NLA_U32) : set description (NLA_NESTED) : uniquely identifies a set in a transaction (NLA_U32)
enum nft_set_elem_attributes - nf_tables set element netlink attributes
: key value (NLA_NESTED: nft_data) : data value of mapping (NLA_NESTED: nft_data_attributes) : bitmask of nft_set_elem_flags (NLA_U32)
enum nft_set_elem_flags |
enum nft_set_elem_list_attributes - nf_tables set element list netlink attributes
: table of the set to be changed (NLA_STRING) : name of the set to be changed (NLA_STRING) : list of set elements (NLA_NESTED: nft_set_elem_attributes) : uniquely identifies a set in a transaction (NLA_U32)
enum nft_set_flags |
enum nft_set_flags - nf_tables set flags
: name allocation, automatic cleanup on unlink : set contents may not change while bound : set contains intervals : set is used as a dictionary
enum nft_set_policies |
enum nft_table_attributes |
enum nft_table_attributes - nf_tables table netlink attributes
: name of the table (NLA_STRING) : bitmask of enum nft_table_flags (NLA_U32) : number of chains in this table (NLA_U32)
enum nft_table_flags |
enum nft_verdict_attributes - nf_tables verdict netlink attributes
: nf_tables verdict (NLA_U32: enum nft_verdicts) : jump target chain name (NLA_STRING)
enum nft_verdicts |
enum nft_verdicts - nf_tables internal verdicts
: continue evaluation of the current rule : terminate evaluation of the current rule : push the current chain on the jump stack and jump to a chain : jump to a chain without pushing the current chain on the jump stack : return to the topmost chain on the jump stack
The nf_tables verdicts share their numeric space with the netfilter verdicts.