STRUCT NFT_OBJECT_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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. an unsigned int, keeping it simple, we love to see it.
  • init β€” initialize object from netlink attributes. the glow-up phase where she's born from struct nlattr *const tb[]. ✨
  • destroy β€” release existing stateful object. say bye bestie 🫢
  • dump β€” netlink dump stateful object. yes, there's a bool reset in there, don't @ me, that's just what the signature says. πŸ’€
  • update β€” update stateful object. takes the object and a newobj, very "old me / new me" of her.
  • type β€” pointer to object type. it's a const 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