1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>cfg80211_testmode_alloc_event_skb</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The 802.11 subsystems &#8211; for kernel developers"><link rel="up" href="bk01ch08.html" title="Chapter&#160;8.&#160;Test mode"><link rel="prev" href="API-cfg80211-testmode-reply.html" title="cfg80211_testmode_reply"><link rel="next" href="API-cfg80211-testmode-event.html" title="cfg80211_testmode_event"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">cfg80211_testmode_alloc_event_skb</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-cfg80211-testmode-reply.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;8.&#160;Test mode</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-cfg80211-testmode-event.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-cfg80211-testmode-alloc-event-skb"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>cfg80211_testmode_alloc_event_skb &#8212; 
2  allocate testmode event
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct sk_buff * <b class="fsfunc">cfg80211_testmode_alloc_event_skb </b>(</code></td><td>struct wiphy * <var class="pdparam">wiphy</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">approxlen</var>, </td></tr><tr><td>&#160;</td><td>gfp_t <var class="pdparam">gfp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1113267652"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>wiphy</code></em></span></dt><dd><p>
4     the wiphy
5    </p></dd><dt><span class="term"><em class="parameter"><code>approxlen</code></em></span></dt><dd><p>
6     an upper bound of the length of the data that will
7     be put into the skb
8    </p></dd><dt><span class="term"><em class="parameter"><code>gfp</code></em></span></dt><dd><p>
9     allocation flags
10    </p></dd></dl></div></div><div class="refsect1"><a name="idp1113271340"></a><h2>Description</h2><p>
11   This function allocates and pre-fills an skb for an event on the
12   testmode multicast group.
13   </p><p>
14
15   The returned skb is set up in the same way as with
16   <code class="function">cfg80211_testmode_alloc_reply_skb</code> but prepared for an event. As
17   there, you should simply add data to it that will then end up in the
18   <code class="constant">NL80211_ATTR_TESTDATA</code> attribute. Again, you must not modify the skb
19   in any other way.
20   </p><p>
21
22   When done filling the skb, call <code class="function">cfg80211_testmode_event</code> with the
23   skb to send the event.
24</p></div><div class="refsect1"><a name="idp1113273556"></a><h2>Return</h2><p>
25   An allocated and pre-filled skb. <code class="constant">NULL</code> if any errors happen.
26</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-cfg80211-testmode-reply.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="bk01ch08.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-cfg80211-testmode-event.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">cfg80211_testmode_reply</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">cfg80211_testmode_event</span></td></tr></table></div></body></html>
27