ENUM NFNL_HOOK_CHAIN_INFO_ATTRIBUTES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 rule
  • NFNLA_HOOK_INFO_DESC β€” it's the nft chain and table name, and it's a NLA_NESTED attribute πŸŽ€
  • NFNLA_HOOK_INFO_TYPE β€” this one's the chain type, typed as enum nfnl_hook_chaintype, and it rides in as a NLA_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 an enum nft_table_attributes
  • NFNL_HOOK_TYPE_BPF β†’ it's an enum 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