'\" t .\" Title: skb_cow .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "SKB_COW" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" skb_cow \- copy header of skb when it is required .SH "SYNOPSIS" .HP \w'int\ skb_cow('u .BI "int skb_cow(struct\ sk_buff\ *\ " "skb" ", unsigned\ int\ " "headroom" ");" .SH "ARGUMENTS" .PP \fIstruct sk_buff * skb\fR .RS 4 buffer to cow .RE .PP \fIunsigned int headroom\fR .RS 4 needed headroom .RE .SH "DESCRIPTION" .PP 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\&. .PP The result is skb with writable area skb\->head\&.\&.\&.skb\->tail and at least \fIheadroom\fR of space at head\&. .SH "COPYRIGHT" .br