ENUM NFNL_HOOK_CHAIN_INFO_ATTRIBUTES(9)
π enum nfnl_hook_chain_info_attributes β chain description (Kernel API Manual, bestie edition)
okay so this is a page straight out of the Kernel API Manual, and it's literally just one lil enum called nfnl_hook_chain_info_attributes that holds the chain description info. tiny enum, big main character energy β¨
β¨ SYNOPSIS β¨
enum nfnl_hook_chain_info_attributes {
NFNLA_HOOK_INFO_UNSPEC ,
NFNLA_HOOK_INFO_DESC ,
NFNLA_HOOK_INFO_TYPE ,
__NFNLA_HOOK_INFO_MAX
};
no cap, that's the whole vibe π«Ά
πΈ Constants πΈ
NFNLA_HOOK_INFO_UNSPECβ-- undescribed --π the manpage literally says nothing about it, so i'm not gonna make stuff up, that's the whole ruleNFNLA_HOOK_INFO_DESCβ it's the nft chain and table name, and it's aNLA_NESTEDattribute πNFNLA_HOOK_INFO_TYPEβ this one's the chain type, typed asenum nfnl_hook_chaintype, and it rides in as aNLA_U32π₯__NFNLA_HOOK_INFO_MAXβ also-- undescribed --π it's just sitting there being mysterious
π¦ Description π¦
bestie listen, this is the important bit π NFNLA_HOOK_INFO_DESC is a shape-shifter β what it actually contains depends on the value of NFNLA_HOOK_INFO_TYPE:
NFNL_HOOK_TYPE_NFTABLESβ it's anenum nft_table_attributesNFNL_HOOK_TYPE_BPFβ it's anenum nfnl_hook_bpf_attributes
so like, same label, different payload depending on the type. iykyk π
not me emphasizing this but fr fr: the DESC attribute's meaning is not fixed β always go check the TYPE first before you assume anything π
π SEE ALSO π
- Kernel file
./include/uapi/linux/netfilter/nfnetlink_hook.hβ the source of truth, go read it π enum nfnl_hook_attributes(9)enum nfnl_hook_chaintype(9)enum nfnl_hook_bpf_attributes(9)
okay that's the whole page, slay β¨π this lil enum lives its best life in ./include/uapi/linux/netfilter, and this edition is dated October 2026 ποΈβ go forth and nest your attributes correctly, icon π§ββοΈπ
π¦ 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