STRUCT NFT_TABLE(9)
π 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 weirdchains_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, periodtfamilyβ address family π‘flagsβ table flag (seeenum 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:listandvalidate_stateare 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
- 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