STRUCT NFT_BASE_CHAIN(9)
π struct nft_base_chain(9) β the nf_tables base chain, bestie
okay so real talk, this is a page from the Kernel API Manual and it's all about struct nft_base_chain, which is literally the nf_tables base chain. it's giving kernel-internals main character energy and honestly? we're obsessed. let's get into it π«Ά
β¨ NAME β¨
struct nft_base_chain β the nf_tables base chain. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
here's the whole struct, copied exactly because we do not mess with kernel source in this house:
struct nft_base_chain {
struct nf_hook_ops ops;
struct list_head hook_list;
const struct nft_chain_type *type;
u8 policy;
u8 flags;
struct nft_stats __percpu *stats;
struct nft_chain chain;
struct flow_block flow_block;
};
look at her. eight members. iconic. β¨
π Members π
okay so let's meet the cast, one by one:
opsβ netfilter hook ops. yes bestie, the actual hook operations πhook_listβ a list of netfilter hooks (for theNFPROTO_NETDEVfamily β iykyk) π₯typeβ the chain type. literally what kind of chain she is πpolicyβ the default policy. the default!! the blueprint!! πflagsβ these indicate whether the base chain is disabled or not. vibe check, basically πstatsβ per-cpu chain stats. per. cpu. she's tracking everything fr fr πchainβ the chain. yes the chain inside the base chain, it's chains all the way down π§flow_blockβ flow block (for hardware offload). offloading to the hardware, slay β
π¦ SEE ALSO π¦
bestie, this section is LONG and we are NOT skipping a single one of these, so buckle up. all of these live in the kernel file ./include/net/netfilter/nf_tables.h:
struct nft_verdict(9)struct nft_regs(9)struct nft_ctx(9)struct nft_userdata(9)struct nft_set_elem(9)enum nft_iter_type(9)struct nft_set_desc(9)enum nft_set_class(9)struct nft_set_estimate(9)struct nft_expr(9)struct nft_set_ops(9)struct nft_set_type(9)struct nft_set(9)struct nft_set_binding(9)enum nft_set_extensions(9)struct nft_set_ext_type(9)struct nft_set_ext_tmpl(9)struct nft_set_ext(9)struct nft_expr_type(9)struct nft_expr_ops(9)struct nft_rule(9)struct nft_chain_validate_state(9)struct nft_chain(9)struct nft_chain_type(9)struct nft_table(9)struct nft_object_hash_key(9)struct nft_object(9)struct nft_object_type(9)struct nft_object_ops(9)struct nft_flowtable(9)struct nft_traceinfo(9)struct nft_trans(9)struct nft_trans_hook(9)struct nft_trans_binding(9)
like I said. a whole friend group. go read all of them, no cap π
ngl this page is just the struct and its members β no options, no exit statuses, no bugs section. so if you made it this far you've literally absorbed 100% of the content. ate and left no crumbs π
and that's the page!! this one ships from ./include/net/netfilter, dated October 2026, and yeah β the manual name on the tin is struct nft_base_chain(9). mwah πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms