STRUCT NFT_SET_EXT_TMPL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nft_set_ext_tmpl β€” set extension template πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one's a struct page and it's honestly kind of a vibe β€” it's all about the set extension template, which is the little blueprint that says "here's where each extension lives and how big it is." lowkey the backstage crew of nf_tables πŸŽ€


🌸 NAME 🌸

struct nft_set_ext_tmpl β€” set extension template πŸ’–


✨ SYNOPSIS ✨

here's the whole glow-up, copy it exactly pls:

struct nft_set_ext_tmpl {
    u16 len;
    u8 offset[NFT_SET_EXT_NUM];
    u8 ext_len[NFT_SET_EXT_NUM];
 };

πŸ¦‹ Members πŸ¦‹

okay so let's meet the cast πŸ‘‘

  • len β€” the length of the extension area. that's the whole chunk's size, periodt πŸ’…
  • offset β€” the offsets of the individual extension types. like a little map of where each one starts πŸ“
  • ext_len β€” the length of the expected extension (this one's used to sanity check, so it's giving hall monitor energy 🧚)

🌈 SEE ALSO 🌈

in the kernel file ./include/net/netfilter/nf_tables.h, and these iconic neighbours:

  • 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(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_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)

πŸ’€ reminder bestie: ext_len isn't decorative, it's the sanity check. don't skip it, fr fr.

and that's the whole page!! sourced from ./include/net/netfilter, dated October 2026, and it's struct nft_set_ext_tmpl(9) β€” go be iconic with your extensions πŸ«ΆπŸ’œπŸŒΈ

πŸ“¦ where this page comes from