'\" t .\" Title: skb_copy .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "SKB_COPY" "9" "June 2017" "Kernel Hackers Manual 4\&.11\&" "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_copy \- create private copy of an sk_buff .SH "SYNOPSIS" .HP \w'struct\ sk_buff\ *\ skb_copy('u .BI "struct sk_buff * skb_copy(const\ struct\ sk_buff\ *\ " "skb" ", gfp_t\ " "gfp_mask" ");" .SH "ARGUMENTS" .PP \fIconst struct sk_buff * skb\fR .RS 4 buffer to copy .RE .PP \fIgfp_t gfp_mask\fR .RS 4 allocation priority .RE .SH "DESCRIPTION" .PP Make a copy of both an &sk_buff and its data\&. This is used when the caller wishes to modify the data and needs a private copy of the data to alter\&. Returns \fBNULL\fR on failure or the pointer to the buffer on success\&. The returned buffer has a reference count of 1\&. .PP As by\-product this function converts non\-linear &sk_buff to linear one, so that &sk_buff becomes completely private and caller is allowed to modify all the data of returned buffer\&. This means that this function is not recommended for use in circumstances when only header is going to be modified\&. Use \fBpskb_copy\fR instead\&. .SH "COPYRIGHT" .br