STRUCT UDP_HSLOT_MAIN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so bestie, welcome to the Kernel API Manual ✨ β€” this page is struct udp_hslot_main, and it's literally the UDP hash slot used by udp_table.hash2. that's the whole vibe. main character energy for the networking stack fr fr πŸ’…


🌸 SYNOPSIS 🌸

the way it's giving struct realness:

struct udp_hslot_main {
    struct udp_hslot        hslot;
  #if !IS_ENABLED(CONFIG_BASE_SMALL);
    u32 hash4_cnt;
  #endif;
 };

ngl copy this exactly as it's written, semicolons after #if and #endif and all β€” that's just how it appears here, so keep it character for character, no cap πŸŽ€


πŸŽ€ Members πŸŽ€

  • hslot β€” the basic hash slot. that's it, that's the whole thing, she's the foundation 🫢
  • hash4_cnt β€” number of sockets in hslot4 of the same (local port, local address). literally counting her little socket besties πŸ’–
heads up babes: hash4_cnt is wrapped in #if !IS_ENABLED(CONFIG_BASE_SMALL);, so when that config situation flips, she's simply not invited to the struct πŸ”₯

πŸ’« SEE ALSO πŸ’«

go read these next, i'm obsessed:

  • Kernel file ./include/net/udp.h
  • struct udp_skb_cb(9)
  • struct udp_hslot(9)
  • struct udp_table(9)
  • udp_csum_outgoing(9)

okay that's the page! πŸŽ€ this whole thing lives in ./include/net, dated October 2026, and it's filed under struct udp_hslot_main(9) β€” slay, go read the other structs now, iykyk βœ¨πŸ’œπŸŒ·

πŸ“¦ where this page comes from