Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 3012

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>wimax_msg_alloc</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs" /><link rel="up" href="ch01s06.html" title="WiMAX" /><link rel="prev" href="ch01s06.html" title="WiMAX" /><link rel="next" href="re182.html" title="wimax_msg_data_len" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>wimax_msg_alloc</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a>&#160;</td><th width="60%" align="center">WiMAX</th><td width="20%" align="right">&#160;<a accesskey="n" href="re182.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="wimax_msg_alloc"><a id="API-wimax-msg-alloc"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>wimax_msg_alloc &#8212; 
  Create a new skb for sending a message to userspace
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">struct sk_buff * <b class="fsfunc">wimax_msg_alloc </b>(</code></td><td>struct wimax_dev * <var class="pdparam">wimax_dev</var>, </td></tr><tr><td>&#160;</td><td>const char * <var class="pdparam">pipe_name</var>, </td></tr><tr><td>&#160;</td><td>const void * <var class="pdparam">msg</var>, </td></tr><tr><td>&#160;</td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td>&#160;</td><td>gfp_t <var class="pdparam">gfp_flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2711089"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>wimax_dev</code></em></span></dt><dd><p>
     WiMAX device descriptor
    </p></dd><dt><span class="term"><em class="parameter"><code>pipe_name</code></em></span></dt><dd><p>
     "named pipe" the message will be sent to
    </p></dd><dt><span class="term"><em class="parameter"><code>msg</code></em></span></dt><dd><p>
     pointer to the message data to send
    </p></dd><dt><span class="term"><em class="parameter"><code>size</code></em></span></dt><dd><p>
     size of the message to send (in bytes), including the header.
    </p></dd><dt><span class="term"><em class="parameter"><code>gfp_flags</code></em></span></dt><dd><p>
     flags for memory allocation.
    </p></dd></dl></div></div><div class="refsect1" title="Returns"><a id="id2711185"></a><h2>Returns</h2><p>
   <code class="constant">0</code> if ok, negative errno code on error
</p></div><div class="refsect1" title="Description"><a id="id2711199"></a><h2>Description</h2><p>
   </p><p>

   Allocates an skb that will contain the message to send to user
   space over the messaging pipe and initializes it, copying the
   payload.
   </p><p>

   Once this call is done, you can deliver it with
   <code class="function">wimax_msg_send</code>.
</p></div><div class="refsect1" title="IMPORTANT"><a id="id2711223"></a><h2>IMPORTANT</h2><p>
   </p><p>

   Don't use <code class="function">skb_push</code>/<code class="function">skb_pull</code>/<code class="function">skb_reserve</code> on the skb, as
   <code class="function">wimax_msg_send</code> depends on skb-&gt;data being placed at the
   beginning of the user message.
   </p><p>

   Unlike other WiMAX stack calls, this call can be used way early,
   even before <code class="function">wimax_dev_add</code> is called, as long as the
   wimax_dev-&gt;net_dev pointer is set to point to a proper
   net_dev. This is so that drivers can use it early in case they need
   to send stuff around or communicate with user space.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s06.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re182.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">WiMAX&#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>wimax_msg_data_len</span></td></tr></table></div></body></html>