1CFG80211_TESTMODE_AL(9)            Test mode           CFG80211_TESTMODE_AL(9)
2
3
4

NAME

6       cfg80211_testmode_alloc_reply_skb - allocate testmode reply
7

SYNOPSIS

9       struct sk_buff *
10                                                          cfg80211_testmode_alloc_reply_skb(struct wiphy * wiphy,
11                                                          int approxlen);
12

ARGUMENTS

14       wiphy
15           the wiphy
16
17       approxlen
18           an upper bound of the length of the data that will be put into the
19           skb
20

DESCRIPTION

22       This function allocates and pre-fills an skb for a reply to the
23       testmode command. Since it is intended for a reply, calling it outside
24       of the testmode_cmd operation is invalid.
25
26       The returned skb is pre-filled with the wiphy index and set up in a way
27       that any data that is put into the skb (with skb_put, nla_put or
28       similar) will end up being within the NL80211_ATTR_TESTDATA attribute,
29       so all that needs to be done with the skb is adding data for the
30       corresponding userspace tool which can then read that data out of the
31       testdata attribute. You must not modify the skb in any other way.
32
33       When done, call cfg80211_testmode_reply with the skb and return its
34       error code as the result of the testmode_cmd operation.
35

RETURN

37       An allocated and pre-filled skb.  NULL if any errors happen.
38

AUTHOR

40       Johannes Berg <johannes@sipsolutions.net>
41           Author.
42
44Kernel Hackers Manual 3.10         June 2019           CFG80211_TESTMODE_AL(9)
Impressum