STRUCT UDP_TABLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the struct udp_table(9) page in the Kernel API Manual β€” and yes, this is literally the UDP table. struct udp_table β€” UDP table. That’s the whole vibe. πŸ’…βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

here’s the struct in all its iconic glory, no cap:

       struct udp_table {
           struct udp_hslot        *hash;
           struct udp_hslot_main   *hash2;
         #if !IS_ENABLED(CONFIG_BASE_SMALL);
           struct udp_hslot        *hash4;
         #endif;
           unsigned int            mask;
           unsigned int            log;
        };

that #if !IS_ENABLED(CONFIG_BASE_SMALL); situation around hash4? yeah, it’s right there in the struct, bestie 🫢


🌸 Members 🌸

  • hash β€” hash table, sockets are hashed on (local port) πŸ’–
  • hash2 β€” hash table, sockets are hashed on (local port, local address) πŸŽ€
  • hash4 β€” hash table, connected sockets are hashed on (local port, local address, remote port, remote address) πŸ¦‹
  • mask β€” number of slots in hash tables, minus 1 πŸ”₯
  • log β€” log2(number of slots in hash table) ⭐

like, each member is doing its own little main character thing, and honestly? obsessed πŸ˜ŒπŸ’…


πŸ”₯ SEE ALSO πŸ”₯

go peek at these besties, fr fr:

  • Kernel file ./include/net/udp.h πŸ“
  • struct udp_skb_cb(9) 🧚
  • struct udp_hslot(9) ✨
  • struct udp_hslot_main(9) 🌈
  • udp_csum_outgoing(9) πŸ‘‘

mwah πŸ’‹ β€” this little page is sourced from ./include/net, dated October 2026, and it’s struct udp_table(9) in the Kernel API Manual. go off, bestie πŸ’–πŸŽ€

πŸ“¦ where this page comes from