STRUCT NFT_TABLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct nft_table(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” yes we're reading kernel docs together, this is our bonding time πŸ’– and today's main character is struct nft_table, aka the nf_tables table. She's iconic, she holds everything, let's get into it ✨


🌸 NAME 🌸

struct nft_table β€” the nf_tables table πŸ’…


✨ SYNOPSIS ✨

no cap, here's the whole vibe of her:

struct nft_table {
    struct list_head                list;
    struct rhltable                 chains_ht;
    struct list_head                chains;
    struct list_head                sets;
    struct list_head                objects;
    struct list_head                flowtables;
    struct rhltable                 objname_ht;
    u64 hgenerator;
    u64 handle;
    u32 use;
    u16 family:6, flags:8, genmask:2;
    u32 nlpid;
    char *name;
    u16 udlen;
    u8 *udata;
    u8 validate_state;
 };

like, look at her. she's got range πŸ¦‹


🫢 Members 🫢

every field gets her moment, as she deserves πŸ‘‘

  • list β€” used internally 🧚 lowkey a private thing, don't make it weird
  • chains_ht β€” the chains in the table πŸ”₯
  • chains β€” same thing honestly, but this one's for stable walks ✨
  • sets β€” the sets in the table πŸŽ€
  • objects β€” the stateful objects in the table 🌈
  • flowtables β€” the flow tables in the table (flow tables in the table, yes, it's giving inception πŸ’€)
  • objname_ht β€” hashtable for looking up objects by name πŸ”
  • hgenerator β€” the handle generator state 🎰
  • handle β€” the table's handle βœ‹
  • use β€” number of chain references to this table πŸ‘€ she's popular, periodt
  • family β€” address family 🏑
  • flags β€” table flag (see enum nft_table_flags) 🚩
  • genmask β€” generation mask 🎭
  • nlpid β€” netlink port ID πŸ“‘
  • name β€” the name of the table 🏷️
  • udlen β€” length of the user data πŸ“
  • udata β€” user data πŸ’Ύ
  • validate_state β€” internal, set when a transaction adds jumps πŸ™ˆ lowkey bookkeeping, not for you

πŸ’œ SEE ALSO πŸ’œ

literally the whole friend group, she rolls deep 🫢 kernel file ./include/net/netfilter/nf_tables.h:

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

bestie reminder: list and validate_state are marked internal, so admire from a respectful distance, okay? 😭 no poking the internals fr fr

that's the whole page, you ate that πŸ’… sourced from ./include/net/netfilter, dated October 2026, filed under struct nft_table(9) β€” go be a kernel girlie, iykyk πŸ¦‹βœ¨πŸ“

πŸ“¦ where this page comes from