include/uapi/linux/netfilter/nf_tables.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/netfilter/nf_tables.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/netfilter/nf_tables.h- Extension
.h- Size
- 59563 bytes
- Lines
- 2023
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
enum nft_registersenum nft_verdictsenum nf_tables_msg_typesenum nft_list_attributesenum nft_hook_attributesenum nft_table_flagsenum nft_table_attributesenum nft_chain_flagsenum nft_chain_attributesenum nft_rule_attributesenum nft_rule_compat_flagsenum nft_rule_compat_attributesenum nft_set_flagsenum nft_set_policiesenum nft_set_desc_attributesenum nft_set_field_attributesenum nft_set_attributesenum nft_set_elem_flagsenum nft_set_elem_attributesenum nft_set_elem_list_attributesenum nft_data_typesenum nft_data_attributesenum nft_verdict_attributesenum nft_expr_attributesenum nft_immediate_attributesenum nft_bitwise_opsenum nft_bitwise_attributesenum nft_byteorder_opsenum nft_byteorder_attributesenum nft_cmp_opsenum nft_cmp_attributesenum nft_range_opsenum nft_range_attributesenum nft_lookup_flagsenum nft_lookup_attributesenum nft_dynset_opsenum nft_dynset_flagsenum nft_dynset_attributesenum nft_payload_basesenum nft_payload_csum_typesenum nft_payload_csum_flagsenum nft_inner_typeenum nft_inner_flagsenum nft_inner_attributesenum nft_payload_attributesenum nft_exthdr_flagsenum nft_exthdr_openum nft_exthdr_attributes
Annotated Snippet
#ifndef _LINUX_NF_TABLES_H
#define _LINUX_NF_TABLES_H
#define NFT_NAME_MAXLEN 256
#define NFT_TABLE_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_CHAIN_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_SET_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_OBJ_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_USERDATA_MAXLEN 256
#define NFT_OSF_MAXGENRELEN 16
/**
* enum nft_registers - nf_tables registers
*
* nf_tables used to have five registers: a verdict register and four data
* registers of size 16. The data registers have been changed to 16 registers
* of size 4. For compatibility reasons, the NFT_REG_[1-4] registers still
* map to areas of size 16, the 4 byte registers are addressed using
* NFT_REG32_00 - NFT_REG32_15.
*/
enum nft_registers {
NFT_REG_VERDICT,
NFT_REG_1,
NFT_REG_2,
NFT_REG_3,
NFT_REG_4,
__NFT_REG_MAX,
NFT_REG32_00 = 8,
NFT_REG32_01,
NFT_REG32_02,
NFT_REG32_03,
NFT_REG32_04,
NFT_REG32_05,
NFT_REG32_06,
NFT_REG32_07,
NFT_REG32_08,
NFT_REG32_09,
NFT_REG32_10,
NFT_REG32_11,
NFT_REG32_12,
NFT_REG32_13,
NFT_REG32_14,
NFT_REG32_15,
};
#define NFT_REG_MAX (__NFT_REG_MAX - 1)
#ifdef __KERNEL__
#define NFT_REG32_MAX NFT_REG32_15
#endif
#define NFT_REG_SIZE 16
#define NFT_REG32_SIZE 4
#define NFT_REG32_COUNT (NFT_REG32_15 - NFT_REG32_00 + 1)
/**
* enum nft_verdicts - nf_tables internal verdicts
*
* @NFT_CONTINUE: continue evaluation of the current rule
* @NFT_BREAK: terminate evaluation of the current rule
* @NFT_JUMP: push the current chain on the jump stack and jump to a chain
* @NFT_GOTO: jump to a chain without pushing the current chain on the jump stack
* @NFT_RETURN: return to the topmost chain on the jump stack
*
* The nf_tables verdicts share their numeric space with the netfilter verdicts.
*/
enum nft_verdicts {
NFT_CONTINUE = -1,
NFT_BREAK = -2,
NFT_JUMP = -3,
NFT_GOTO = -4,
NFT_RETURN = -5,
};
/**
* enum nf_tables_msg_types - nf_tables netlink message types
*
* @NFT_MSG_NEWTABLE: create a new table (enum nft_table_attributes)
* @NFT_MSG_GETTABLE: get a table (enum nft_table_attributes)
* @NFT_MSG_DELTABLE: delete a table (enum nft_table_attributes)
* @NFT_MSG_NEWCHAIN: create a new chain (enum nft_chain_attributes)
* @NFT_MSG_GETCHAIN: get a chain (enum nft_chain_attributes)
* @NFT_MSG_DELCHAIN: delete a chain (enum nft_chain_attributes)
* @NFT_MSG_NEWRULE: create a new rule (enum nft_rule_attributes)
* @NFT_MSG_GETRULE: get a rule (enum nft_rule_attributes)
* @NFT_MSG_DELRULE: delete a rule (enum nft_rule_attributes)
* @NFT_MSG_NEWSET: create a new set (enum nft_set_attributes)
* @NFT_MSG_GETSET: get a set (enum nft_set_attributes)
* @NFT_MSG_DELSET: delete a set (enum nft_set_attributes)
* @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes)
Annotation
- Detected declarations: `enum nft_registers`, `enum nft_verdicts`, `enum nf_tables_msg_types`, `enum nft_list_attributes`, `enum nft_hook_attributes`, `enum nft_table_flags`, `enum nft_table_attributes`, `enum nft_chain_flags`, `enum nft_chain_attributes`, `enum nft_rule_attributes`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.