'\" t .\" Title: cfg80211_testmode_alloc_reply_skb .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Test mode .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "CFG80211_TESTMODE_AL" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Test mode" .\" ----------------------------------------------------------------- .\" * 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" cfg80211_testmode_alloc_reply_skb \- allocate testmode reply .SH "SYNOPSIS" .HP \w'struct\ sk_buff\ *\ cfg80211_testmode_alloc_reply_skb('u .BI "struct sk_buff * cfg80211_testmode_alloc_reply_skb(struct\ wiphy\ *\ " "wiphy" ", int\ " "approxlen" ");" .SH "ARGUMENTS" .PP \fIwiphy\fR .RS 4 the wiphy .RE .PP \fIapproxlen\fR .RS 4 an upper bound of the length of the data that will be put into the skb .RE .SH "DESCRIPTION" .PP 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 \fItestmode_cmd\fR operation is invalid\&. .PP 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 \fBskb_put\fR, \fBnla_put\fR or similar) will end up being within the \fBNL80211_ATTR_TESTDATA\fR 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\&. .PP When done, call \fBcfg80211_testmode_reply\fR with the skb and return its error code as the result of the \fItestmode_cmd\fR operation\&. .SH "RETURN" .PP An allocated and pre\-filled skb\&. \fBNULL\fR if any errors happen\&. .SH "AUTHOR" .PP \fBJohannes Berg\fR <\&johannes@sipsolutions.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br