skb_to_sgvec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… skb_to_sgvec(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for skb_to_sgvec(9) β€” yes, the whole title is in the house. This is the function that fills a scatter-gather list from a socket buffer, and we're gonna make it make sense. 🫢


🌸 NAME 🌸

skb_to_sgvec β€” fill a scatter-gather list from a socket buffer. that's the whole name vibe. πŸ’–


✨ SYNOPSIS ✨

int skb_to_sgvec (struct sk_buff *skb , struct scatterlist *sg , int
       offset , int len );

no cap, that's the signature. πŸŽ€


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” socket buffer containing the buffers to be mapped. literally the source snack. πŸ“
  • sg β€” the scatter-gather list to map into. this is the destination bestie. πŸŽ€
  • offset β€” the offset into the buffer's contents to start mapping. where the mapping begins, iykyk. ✨
  • len β€” length of buffer space to be mapped. how much buffer space we're mapping. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so what it does: fill the specified scatter-gather list with mappings/pointers into a region of the buffer space attached to a socket buffer. that's the main character move. πŸ’«

It returns either the number of scatterlist items used, or -EMSGSIZE if the contents could not fit. so if it doesn't fit, it's giving -EMSGSIZE, and that's the error, periodt. 😭


🌈 SEE ALSO 🌈

Kernel file ./net/core/skbuff.c is lowkey the source spot, and the whole extended universe is here. no cap, every single reference:


πŸ’– and that's the page, bestie. source/version: ./net/core Β· date: October 2026 Β· page: skb_to_sgvec(9) β€” slay. πŸ’…

πŸ“¦ where this page comes from