skb_copy_and_csum_datagram(9)
π skb_copy_and_csum_datagram(9) π
okay so bestie, welcome to the Kernel API Manual β yes we are literally in the kernel rn, put your hair up, it's giving main character energy π
β¨ NAME β¨
skb_copy_and_csum_datagram β copy a datagram into an iovec iterator and update a checksum at the same time. two jobs, one function, she's multitasking and we love her for it π
πΈ SYNOPSIS πΈ
int skb_copy_and_csum_datagram (const struct sk_buff *skb , int offset ,
struct iov_iter *to , int len , __wsum *csump );
no cap, that's the whole signature. five args, returns an int. she's not complicated, she's just precise π¦
π ARGUMENTS π
skbβ the buffer to copy from. she's the source of truth, the moment, the origin story β¨offsetβ where in the buffer to start copying from. like skipping the intro of a song, except it's bytes π΅toβ the iovec iterator you're copying into. the destination. the final form. the glow-up π«lenβ how much data to copy from the buffer to the iovec. this is the amount, okay, respect the amount πcsumpβ checksum pointer. she gets updated along the way, she's doing the most and honestly? iconic π
π«Ά SEE ALSO π«Ά
all the siblings and neighbors, fr fr β they all live in the kernel file ./net/core/datagram.c:
__skb_try_recv_datagram(9)skb_kill_datagram(9)skb_copy_and_crc32c_datagram_iter(9)skb_copy_datagram_iter(9)skb_copy_datagram_from_iter(9)zerocopy_sg_from_iter(9)skb_copy_and_csum_datagram_msg(9)datagram_poll_queue(9)datagram_poll(9)
go read them, iykwim ππ
lowkey reminder: csump is a pointer, so she's updating checksum state through it. don't ignore her, she's the whole point of the "and csum" part π
π mwah, that's the page! this lil beauty lives in ./net/core and the source/version line says October 2026 β so yes, she's dated, she's documented, she's slaying. bye bestie, go checksum something πππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms