STRUCT NFT_SET_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nft_set_desc(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so real talk, this is a page from the Kernel API Manual all about struct nft_set_desc(9), and honestly? it's the blueprint page. it's the little struct that tells you what a netfilter set is made of. no cap. πŸ¦‹


✨ NAME ✨

struct nft_set_desc β€” description of set elements (yes, literally the description of set elements, she's not hiding anything πŸ’β€β™€οΈ)


🌸 SYNOPSIS 🌸

bestie, here's the whole struct, verbatim, don't touch a single character:

struct nft_set_desc {
    u32 ktype;
    unsigned int            klen;
    u32 dtype;
    unsigned int            dlen;
    u32 objtype;
    unsigned int            size;
    u32 policy;
    u32 gc_int;
    u64 timeout;
    u8 field_len[NFT_REG32_COUNT];
    u8 field_count;
    bool expr;
 };

πŸ‘‘ Members πŸ‘‘

these are the fields, and each one ate, no notes πŸ’…

  • ktype β€” key type. the what kind of key of it all.
  • klen β€” key length. how long the key is, obviously πŸŽ€
  • dtype β€” data type. the vibe of the data.
  • dlen β€” data length. how much data we're talking.
  • objtype β€” object type. the object's whole identity tbh.
  • size β€” number of set elements. like, how many besties are in the set 🫢
  • policy β€” set policy. the rules of the house.
  • gc_int β€” garbage collector interval. how often the cleanup crew comes through 🧹
  • timeout β€” element timeout. elements don't stay forever, they have a curfew ⏰
  • field_len β€” length of each field in concatenation, bytes. yup, in bytes, keep it exact πŸ“
  • field_count β€” number of concatenated fields in element. count 'em up.
  • expr β€” set must support for expressions. not optional in the vibes department πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

so many icons in one list, i'm obsessed 😭 β€” kernel file ./include/net/netfilter/nf_tables.h, and then:

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), 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_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)


ok that's the whole page, go read the structs, i believe in you πŸ’–

and that's a wrap, bestie πŸŽ€ sign-off time: this iconic little number lives in ./include/net/netfilter, dated October 2026. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from