skb_copy_and...datagram_msg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– skb_copy_and_csum_datagram_msg β€” Kernel API Manual πŸ’–

okay bestie, welcome to the skb_copy_and...datagram_msg(9) page, like the actual kernel API manual entry for skb_copy_and_csum_datagram_msg. yes the title got truncated with dots, that's just how the man page shows it, we don't fix it, we respect it ✨


🌸 NAME 🌸

skb_copy_and_csum_datagram_msg β€” literally does what it says on the tin: copy an skb over to a user iovec and checksum it at the same time. two jobs, one function, main character energy πŸ‘‘


✨ SYNOPSIS ✨

int skb_copy_and_csum_datagram_msg (struct sk_buff *skb , int hlen ,
struct msghdr *msg );

that's the whole vibe check right there 🫢 three args, returns an int.


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the skbuff in question, the little packet bb itself πŸ¦‹
  • hlen β€” the hardware length, yes that's what it is, don't come for me
  • msg β€” the destination, like where it's all going 🎯

πŸ’… DESCRIPTION πŸ’…

okay so this is the important part and I need you to lock in: the Caller _must_ check that skb will fit to this iovec. not "should", not "maybe", must. that underscore emphasis is in the original and it's there for a REASON 😭 this is one of those things where if you skip it, that's on you, not on the function πŸ’€


⭐ RETURN ⭐

  • 0 β€” success, we ate, no notes πŸ’–
  • -EINVAL β€” checksum failure πŸ™ˆ something didn't add up (literally)
  • -EFAULT β€” fault during copy 🌧️ the copy went sideways

🌈 SEE ALSO 🌈

Kernel file ./net/core/datagram.c and honestly the whole friend group:


not me ending the page but like, go read those too, iykyk 🧚

and that's the whole thing bestie!! this page lives under ./net/core and it's dated October 2026 in the Kernel API Manual β€” so yeah, freshly stamped, iconic, periodt πŸŽ€πŸ’œπŸ”₯

πŸ“¦ where this page comes from