skb_cow
Prev | Socket Buffer Functions | Next

## Name

skb_cow — copy header of skb when it is required

## Synopsis

`int skb_cow (` | struct sk_buff * | skb,
| unsigned int | headroom`)`;

## Arguments

`skb`

  buffer to cow

`headroom`

  needed headroom

## Description

If the skb passed lacks sufficient headroom or its data part is shared, data is reallocated. If reallocation fails, an error is returned and original skb is not changed.

The result is skb with writable area skb->head...skb->tail and at least `headroom` of space at head.

Prev | Up | Next
skb_clone_writable | Home | skb_cow_head