STRUCT FLOW_DISSECTOR_KEY_PORTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct flow_dissector_key_ports β€” Kernel API Manual ✨

okay so real talk, this page lives in the Kernel API Manual, and it's all about struct flow_dissector_key_ports πŸŽ€ lowkey a tiny little struct with big main character energy. iykyk.


🌸 NAME 🌸

struct flow_dissector_key_ports β€” bestie... that's literally it 😭 the original page has no description line after it. just the name, standing there, serving nothing. so we're not gonna invent one, periodt. the struct itself is the whole vibe πŸ’…


✨ SYNOPSIS ✨

here's the exact shape of it, no cap, don't touch the formatting bestie:

struct flow_dissector_key_ports {
    union {
      __be32 ports;
      struct {
        __be16 src;
        __be16 dst;
      };
    };
 };

so there's a union, and inside that union there's a __be32 ports living alongside an anonymous struct holding __be16 src and __be16 dst. the way that all three share the same memory... iconic 🫢


πŸ‘‘ Members πŸ‘‘

  • {unnamed_union} β€” the anonymous union. it's giving mysterious. no name, just vibes πŸ’€
  • ports β€” port numbers of Transport header 🌈 that's the raw __be32 one, seeing both ports at once
  • {unnamed_struct} β€” another anonymous one, this time a struct πŸ™ˆ also nameless, also slaying
  • src β€” source port number πŸ’–
  • dst β€” destination port number πŸ¦‹
ok real note: src and dst are the two halves of ports because union, so like β€” same bytes, two ways to look at 'em. that's the whole trick. cute right? πŸŽ€

πŸ’œ SEE ALSO πŸ’œ

so the kernel file this bad girl comes from is ./include/net/flow_dissector.h, and the original entry lists a whole struct-family group chat 🫢 β€” every one of these, we're keeping all of them, no skipping:

  • struct flow_dissector_key_control(9)
  • struct flow_dissector_key_basic(9)
  • struct flow_dissector_key_enc_opts(9)
  • struct flow_dissector_key_ipv4_addrs(9)
  • struct flow_dissector_key_ipv6_addrs(9)
  • struct flow_dissector_key_tipc(9)
  • struct flow_dissector_key_addrs(9)
  • struct flow_dissector_key_arp(9)
  • struct flow_dissector_key_ports_range(9)
  • struct flow_dissector_key_icmp(9)
  • struct flow_dissector_key_eth_addrs(9)
  • struct flow_dissector_key_tcp(9)
  • struct flow_dissector_key_ip(9)
  • struct flow_dissector_key_meta(9)
  • struct flow_dissector_key_ct(9)
  • struct flow_dissector_key_hash(9)
  • struct flow_dissector_key_num_of_vlans(9)
  • struct flow_dissector_key_pppoe(9)
  • struct flow_dissector_key_l2tpv3(9)
  • struct flow_dissector_key_ipsec(9)
  • struct flow_dissector_key_cfm(9)

like, that's the entire friend group bestie, go read them all, they're all struct entries in that same header 🌟


okay that's the whole page, you ate that πŸ’… this came out of ./include/net and the version stamp on it is October 2026 β€” leaving you with a little signed-off kiss from the kernel docs, mwah πŸ“πŸ’–

πŸ“¦ where this page comes from