STRUCT NFT_OBJECT(9)
π struct nft_object(9) π
okay so real talk β welcome to the kernel API manual, bestie. this one is struct nft_object(9), straight out of the kernel API manual pages, and it's literally the blueprint for a nf_tables stateful object. no cap, it's a good one. π
β¨ NAME β¨
struct nft_object β the nf_tables stateful object, fr fr. that's the whole vibe. π
π¦ SYNOPSIS π¦
here's the whole struct, copied exactly, no edits, we do not touch the code:
struct nft_object {
struct list_head list;
struct rhlist_head rhlhead;
struct nft_object_hash_key key;
u32 genmask:2;
u32 use;
u64 handle;
u16 udlen;
u8 *udata;
const struct nft_object_ops *ops;
unsigned char data[];
};
look at that layout. the data[] at the end? iconic flex. π
πΈ Members πΈ
breakdown time, one member at a time, main character energy only:
listβ this is the table stateful object list node π«Ά it's how this object links up with the rest of the crew.rhlheadβ thenft_objname_htnode. yes, that's the whole description, it's giving minimal and mysterious.keyβ the keys that identify this object π like, its whole identity.genmaskβ the generation mask β¨ (yes, it's a:2bitfield, tiny but mighty).useβ number of references to this stateful object. every bestie that's holding onto it counts here πhandleβ a unique object handle. one of a kind, lowkey a fingerprint.udlenβ length of user data πudataβ the user data itself πopsβ object operations, i.e. the actual behaviour.dataβ object data, and the layout depends on type. so like, it's flexible. it's adaptable. it's whatever the type needs it to be π¦
π SEE ALSO π
the whole extended friend group, all of them, in order, exactly as listed. the kernel file is ./include/net/netfilter/nf_tables.h and honestly there's a LOT of cross-references, so buckle up:
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_base_chain(9)struct nft_table(9)struct nft_object_hash_key(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 bestie, if you're poking at nf_tables internals, read the whole list. iykyk. π
and that's the whole page!! source is ./include/net/netfilter, dated October 2026, and the page itself signs off as struct nft_object(9) πβ¨ go forth and slay your netfilter debugging session, you've got this ππ«Ά
π¦ 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