STRUCT NFT_OBJECT_OPS(9)
π struct nft_object_ops(9) β Kernel API Manual β¨
okay bestie, buckle up, because this is the manpage for struct nft_object_ops β AKA the stateful object operations table β straight out of the Kernel API Manual. it's giving "backstage pass to nf_tables," fr fr. π
πΈ NAME πΈ
struct nft_object_ops β stateful object operations. that's it, that's the vibe. π
β¨ SYNOPSIS β¨
here's the whole struct, and yes you're gonna want to look at it carefully because every single field matters:
struct nft_object_ops {
void (*eval)(struct nft_object *obj, struct nft_regs *regs, const
struct nft_pktinfo *pkt);
unsigned int size;
int (*init)(const struct nft_ctx *ctx, const struct nlattr *const
tb[], struct nft_object *obj);
void (*destroy)(const struct nft_ctx *ctx, struct nft_object *obj);
int (*dump)(struct sk_buff *skb, struct nft_object *obj, bool
reset);
void (*update)(struct nft_object *obj, struct nft_object *newobj);
const struct nft_object_type *type;
};
likeβ¦ look at those function pointers. main character energy tbh. π¦
π§ Members π§
okay so here's the breakdown of every single member, no gatekeeping:
evalβ the stateful object evaluation function. this is the moment, the whole reason she's here. π₯sizeβ the stateful object size. anunsigned int, keeping it simple, we love to see it.initβ initialize object from netlink attributes. the glow-up phase where she's born fromstruct nlattr *const tb[]. β¨destroyβ release existing stateful object. say bye bestie π«Άdumpβ netlink dump stateful object. yes, there's abool resetin there, don't @ me, that's just what the signature says. πupdateβ update stateful object. takes the object and anewobj, very "old me / new me" of her.typeβ pointer to object type. it's aconst struct nft_object_type *, and it's iconic. π
π SEE ALSO π
the whole friend group, and yes you're meeting all of them:
Kernel file ./include/net/netfilter/nf_tables.h β plus 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(9), struct nft_object_type(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. the whole group chat. π
ngl bestie this one's a struct, not a command β so no flags to memorize, just fields to respect. read the signatures exactly, no cap. π
okay that's the whole page!! signing off from ./include/net/netfilter, dated October 2026, struct nft_object_ops(9) era β slay, bye, ily, go read nf_tables.h ππ§ββοΈβ
π¦ 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