Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

skb_copy(9) [centos man page]

SKB_COPY(9)							 Linux Networking						       SKB_COPY(9)

skb_copy - create private copy of an sk_buff SYNOPSIS
struct sk_buff * skb_copy(const struct sk_buff * skb, gfp_t gfp_mask); ARGUMENTS
skb buffer to copy gfp_mask allocation priority DESCRIPTION
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 NULL on failure or the pointer to the buffer on success. The returned buffer has a reference count of 1. 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 pskb_copy instead. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 SKB_COPY(9)

Check Out this Related Man Page

CFG80211_TESTMODE_AL(9) 					     Test mode						   CFG80211_TESTMODE_AL(9)

cfg80211_testmode_alloc_reply_skb - allocate testmode reply SYNOPSIS
struct sk_buff * cfg80211_testmode_alloc_reply_skb(struct wiphy * wiphy, int approxlen); ARGUMENTS
wiphy the wiphy approxlen an upper bound of the length of the data that will be put into the skb DESCRIPTION
This function allocates and pre-fills an skb for a reply to the testmode command. Since it is intended for a reply, calling it outside of the testmode_cmd operation is invalid. The returned skb is pre-filled with the wiphy index and set up in a way that any data that is put into the skb (with skb_put, nla_put or similar) will end up being within the NL80211_ATTR_TESTDATA attribute, so all that needs to be done with the skb is adding data for the corresponding userspace tool which can then read that data out of the testdata attribute. You must not modify the skb in any other way. When done, call cfg80211_testmode_reply with the skb and return its error code as the result of the testmode_cmd operation. RETURN
An allocated and pre-filled skb. NULL if any errors happen. AUTHOR
Johannes Berg <> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 CFG80211_TESTMODE_AL(9)
Man Page

Featured Tech Videos