---
name: "skb_to_sgvec"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/skb_to_sgvec"
---

# skb\_to\_sgvec(9)

Fill a scatter-gather list from a socket buffer

## NAME

skb\_to\_sgvec - Fill a scatter-gather list from a socket buffer

## SYNOPSIS

**int skb\_to\_sgvec(struct sk\_buff \*** *skb***, struct scatterlist \*** *sg***, int** *offset***, int** *len***);**

## ARGUMENTS

*skb*

Socket buffer containing the buffers to be mapped

*sg*

The scatter-gather list to map into

*offset*

The offset into the buffer's contents to start mapping

*len*

Length of buffer space to be mapped

## DESCRIPTION

Fill the specified scatter-gather list with mappings/pointers into a region of the buffer space attached to a socket buffer. Returns either the number of scatterlist items used, or -EMSGSIZE if the contents could not fit.

## COPYRIGHT
