ENUM NFT_PAYLOAD_ATTRIBUTES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum nft_payload_attributes(9) β€” the Kernel API Manual bestie edition

okay so picture this: you're in the Linux kernel API Manual (that's the manual name, it's giving official), and you've stumbled into the netlink attributes for the nf_tables payload expression. literally all this page does is name the constants. that's it. that's the whole vibe. and yet?? we're gonna read it together because i'm obsessed with you understanding it. πŸŽ€


✨ NAME ✨

enum nft_payload_attributes β€” the netlink attributes for the nf_tables payload expression. yep, the whole thing. short king.


πŸ¦‹ SYNOPSIS πŸ¦‹

enum nft_payload_attributes {
    NFTA_PAYLOAD_UNSPEC ,
    NFTA_PAYLOAD_DREG ,
    NFTA_PAYLOAD_BASE ,
    NFTA_PAYLOAD_OFFSET ,
    NFTA_PAYLOAD_LEN ,
    NFTA_PAYLOAD_SREG ,
    NFTA_PAYLOAD_CSUM_TYPE ,
    NFTA_PAYLOAD_CSUM_OFFSET ,
    NFTA_PAYLOAD_CSUM_FLAGS ,
    __NFTA_PAYLOAD_MAX

};

look at her. gorgeous. ten entries, every one accounted for, literally no notes πŸ’œ


🌸 Constants 🌸

okay now the actual roster, one by one, no skipping, we don't do that here:

  • NFTA_PAYLOAD_UNSPEC β€” -- undescribed -- πŸ’€ the docs really just said "no thoughts, head empty" on this one. it's the placeholder, she's mysterious, we respect it.
  • NFTA_PAYLOAD_DREG β€” destination register to load data into (NLA_U32: nft_registers). this is where the data goes. the destination. the main character's final resting spot 🫢
  • NFTA_PAYLOAD_BASE β€” payload base (NLA_U32: nft_payload_bases). i.e. where in the packet we're even looking. gotta know your base, bestie.
  • NFTA_PAYLOAD_OFFSET β€” payload offset relative to base (NLA_U32). the little hop from the base to the actual byte you want. relative to base, remember that, it comes back later πŸ‘€
  • NFTA_PAYLOAD_LEN β€” payload length (NLA_U32). how much ya grabbing. how many bytes are invited to the party.
  • NFTA_PAYLOAD_SREG β€” source register to load data from (NLA_U32: nft_registers). opposite twin of DREG, this is the source. not me noticing the symmetry 😭
  • NFTA_PAYLOAD_CSUM_TYPE β€” checksum type (NLA_U32). checksums are so real and so valid.
  • NFTA_PAYLOAD_CSUM_OFFSET β€” checksum offset relative to base (NLA_U32). again: relative to base. consistent queen 🌈
  • NFTA_PAYLOAD_CSUM_FLAGS β€” checksum flags (NLA_U32). flags for the checksum. iconic, no further detail given, and honestly? she said enough.
  • __NFTA_PAYLOAD_MAX β€” -- undescribed -- πŸ’€ second mysterious icon. the docs clocked out on this one too. we still list her. periodt.
ngl, both UNSPEC and __NFTA_PAYLOAD_MAX are marked -- undescribed -- in the source. i'm not making that up and i'm not filling it in either β€” that's the actual documentation, bestie 🫢

πŸ”₯ SEE ALSO πŸ”₯

grab a snack, this list is long and i am NOT leaving a single one out:

Kernel file ./include/uapi/linux/netfilter/nf_tables.h, enum nft_registers(9), enum nft_verdicts(9), enum nf_tables_msg_types(9), enum nft_list_attributes(9), enum nft_hook_attributes(9), enum nft_table_flags(9), enum nft_table_attributes(9), enum nft_chain_attributes(9), enum nft_rule_attributes(9), enum nft_rule_compat_flags(9), enum nft_rule_compat_attributes(9), enum nft_set_flags(9), enum nft_set_policies(9), enum nft_set_desc_attributes(9), enum nft_set_field_attributes(9), enum nft_set_attributes(9), enum nft_set_elem_flags(9), enum nft_set_elem_attributes(9), enum nft_set_elem_list_attributes(9), enum nft_data_types(9), enum nft_data_attributes(9), enum nft_verdict_attributes(9), enum nft_expr_attributes(9), enum nft_immediate_attributes(9), enum nft_bitwise_ops(9), enum nft_bitwise_attributes(9), enum nft_byteorder_ops(9), enum nft_byteorder_attributes(9), enum nft_cmp_ops(9), enum nft_cmp_attributes(9), enum nft_range_ops(9), enum nft_range_attributes(9), enum nft_lookup_attributes(9), enum nft_dynset_attributes(9), enum nft_payload_bases(9), enum nft_payload_csum_types(9), enum nft_exthdr_op(9), enum nft_exthdr_attributes(9), enum nft_meta_keys(9), enum nft_rt_keys(9), enum nft_hash_types(9), enum nft_hash_attributes(9), enum nft_meta_attributes(9), enum nft_rt_attributes(9), enum nft_socket_attributes(9), enum nft_ct_keys(9), enum nft_ct_attributes(9), enum nft_offload_attributes(9), enum nft_limit_attributes(9), enum nft_connlimit_attributes(9), enum nft_counter_attributes(9), enum nft_last_attributes(9), enum nft_log_attributes(9), enum nft_log_level(9), enum nft_queue_attributes(9), enum nft_quota_attributes(9), enum nft_secmark_attributes(9), enum nft_reject_types(9), enum nft_reject_inet_code(9), enum nft_reject_attributes(9), enum nft_nat_types(9), enum nft_nat_attributes(9), enum nft_tproxy_attributes(9), enum nft_masq_attributes(9), enum nft_redir_attributes(9), enum nft_dup_attributes(9), enum nft_fwd_attributes(9), enum nft_objref_attributes(9), enum nft_gen_attributes(9), enum nft_object_attributes(9), enum nft_flowtable_flags(9), enum nft_flowtable_attributes(9), enum nft_flowtable_hook_attributes(9), enum nft_osf_attributes(9), enum nft_synproxy_attributes(9), enum nft_devices_attributes(9), enum nft_trace_attributes(9), enum nft_ng_attributes(9).

like. eighty-odd enums. a whole extended universe. and every single one made the cut πŸ’…βœ¨


🧚 sign-off 🧚

this little baddie lives in the source tree at ./include/uapi/linux/netfilter, the date on her birth certificate says October 2026, and yes, the page name on the door is still enum nft_payload_attributes(9). she's consistent, she's documented, she's thriving. mwah πŸ’– bye bestie, go read the header file πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from