STRUCT NFT_CHAIN(9)
π struct nft_chain(9) β the Kernel API Manual glow-up π
okay so bestie, we're in the struct nft_chain(9) page rn β a whole kernel API manual page, and honestly? it's giving main character energy. this is the nf_tables chain, and i'm gonna walk you through every single field like we're doing a vibe check on each one. no skipping, no cap. β¨
π¦ NAME π¦
struct nft_chain β literally the nf_tables chain, that's her, that's the whole thing π
β¨ SYNOPSIS β¨
like, here's her whole personality laid out, character for character, don't @ me:
struct nft_chain {
struct nft_rule_blob *blob_gen_0;
struct nft_rule_blob *blob_gen_1;
struct list_head rules;
struct list_head list;
struct rhlist_head rhlhead;
struct nft_table *table;
u64 handle;
u32 use;
u8 flags:5, bound:1, genmask:2;
char *name;
u16 udlen;
u8 *udata;
struct nft_rule_blob *blob_next;
struct nft_chain_validate_state vstate;
};
πΈ Members πΈ
okay this is the fun part, let's meet the cast π«Ά
blob_gen_0β rule blob pointer to the current generation. she's the present, she's now, she's living her truth π₯blob_gen_1β rule blob pointer to the future generation. manifesting β¨rulesβ list of rules in the chain. the whole squad, in order πlistβ used internally. not your business bestie, it's giving backstage πrhlheadβ used internally. also backstage, also not your business πtableβ table that this chain belongs to. found family πhandleβ chain handle. her little ID badge πͺͺuseβ number of jump references to this chain. how many people are jumping to her, iconic behavior πflagsβ bitmask ofenum NFTA_CHAIN_FLAGS. tiny bitmask, huge personality πboundβ bind or not. binary queen, she either is or she isn't πgenmaskβ generation mask. time-travel makeup π§nameβ name of the chain. yes she has a name, say it with your chest βudlenβ user data length. how much user data, numerically speaking πudataβ user data in the chain. her personal lore π¦blob_nextβ rule blob pointer to the next in the chain. linked-list slay, periodt πvstateβ validation state. she's getting checked and she's passing, obviously β
π₯ SEE ALSO π₯
okay so like, the whole friend group, no gatekeeping. Kernel file ./include/net/netfilter/nf_tables.h, plus every one of these icons:
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_type(9), struct nft_base_chain(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)
ngl, that's a lot of structs. read them all, bestie, they're all connected iykyk π
and that's the whole page, no crumbs left π this baby lives under ./include/net/netfilter, it's from October 2026, and it's filed under struct nft_chain(9). slay, go read nf_tables.h now, 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