---
name: "skb_zerocopy"
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_zerocopy"
---

# skb\_zerocopy(9)

Zero copy skb to skb

## NAME

skb\_zerocopy - Zero copy skb to skb

## SYNOPSIS

**int skb\_zerocopy(struct sk\_buff \*** *to***, struct sk\_buff \*** *from***, int** *len***, int** *hlen***);**

## ARGUMENTS

*to*

destination buffer

*from*

source buffer

*len*

number of bytes to copy from source buffer

*hlen*

size of linear headroom in destination buffer

## DESCRIPTION

Copies up to \`len\` bytes from \`from\` to \`to\` by creating references to the frags in the source buffer.

The \`hlen\` as calculated by **skb\_zerocopy\_headlen** specifies the headroom in the \`to\` buffer.

Return value: 0: everything is OK -ENOMEM: couldn't orphan frags of *from* due to lack of memory -EFAULT: **skb\_copy\_bits** found some problem with skb geometry

## COPYRIGHT
