udp_csum_outgoing(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ udp_csum_outgoing(9) ✨

okay so this is a page straight out of the Kernel API Manual, bestie β€” section 9, kernel internals, the good stuff πŸ’… and today's main character is udp_csum_outgoing, which is literally the function that computes the UDPv4/v6 checksum over fragments. no cap.


πŸŽ€ NAME πŸŽ€

udp_csum_outgoing β€” compute UDPv4/v6 checksum over fragments πŸ”₯

She does v4 and v6, and she does it across fragments, which is honestly iconic of her.


πŸ¦‹ SYNOPSIS πŸ¦‹

__wsum udp_csum_outgoing (struct sock *sk , struct sk_buff *skb );

Returns a __wsum β€” that's the checksum vibe. Takes two args, both pointers, both important, don't skip either 🫢


🌸 ARGUMENTS 🌸

  • sk β€” the socket we are writing to πŸ’Œ like, that's the socket, she's the destination of all this outgoing energy.
  • skb β€” the sk_buff containing the filled-in UDP header. the checksum field must be zeroed out β€” not "kind of zeroed", not "mostly zeroed", literally zeroed out before you call this. do not forget. i'm begging πŸ™ˆ
fr fr, that zeroed-checksum thing is the whole bit β€” the function is computing over that header, so a leftover checksum in there would be a whole situation 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./include/net/udp.h β€” the source of truth, go read her πŸ’œ
  • struct udp_skb_cb(9)
  • struct udp_hslot(9)
  • struct udp_hslot_main(9)
  • struct udp_table(9)

like, the whole udp header family reunion, honestly. ate. πŸ“


that's the whole page, bestie β€” no filler, no skips, every single detail accounted for ✨

signing off from ./include/net, dated October 2026, per the Kernel API Manual β€” mwah πŸ’‹

πŸ“¦ where this page comes from