⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a00146.html

📁 uip-1.0,give everyone who want.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<p>Perform periodic processing for a connection identified by a pointer to its structure. <p>Same as <a class="el" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_periodic()</a> but takes a pointer to the actual <a class="el" href="a00088.html">uip_conn</a> struct instead of an integer as its argument. This function can be used to force periodic processing of a specific connection.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>conn</em>&nbsp;</td><td>A pointer to the <a class="el" href="a00088.html">uip_conn</a> struct for the connection to be processed. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00202.html#l00323">323</a> of file <a class="el" href="a00202.html">uip.h</a>.    </td>  </tr></table><a class="anchor" name="gf20aaf4292cb0d2a1b10bc0a568b51fa"></a><!-- doxytag: member="uip.h::uip_poll_conn" ref="gf20aaf4292cb0d2a1b10bc0a568b51fa" args="(conn)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define uip_poll_conn          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">conn&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Reuqest that a particular connection should be polled. <p>Similar to <a class="el" href="a00146.html#gbaf0bb2b6a4424b4eb69e45e457c2583">uip_periodic_conn()</a> but does not perform any timer processing. The application is polled for new data.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>conn</em>&nbsp;</td><td>A pointer to the <a class="el" href="a00088.html">uip_conn</a> struct for the connection to be processed. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00202.html#l00337">337</a> of file <a class="el" href="a00202.html">uip.h</a>.    </td>  </tr></table><a class="anchor" name="g2c64c8c36bc84f9336f6a2184ea51883"></a><!-- doxytag: member="uip.h::uip_udp_periodic" ref="g2c64c8c36bc84f9336f6a2184ea51883" args="(conn)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define uip_udp_periodic          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">conn&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Periodic processing for a UDP connection identified by its number. <p>This function is essentially the same as <a class="el" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_periodic()</a>, but for UDP connections. It is called in a similar fashion as the <a class="el" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_periodic()</a> function: <div class="fragment"><pre class="fragment">  <span class="keywordflow">for</span>(i = 0; i &lt; <a class="code" href="a00153.html#g196379ceb1219a99f4495e41ccc9bbfb">UIP_UDP_CONNS</a>; i++) {    <a class="code" href="a00146.html#g2c64c8c36bc84f9336f6a2184ea51883">uip_udp_periodic</a>(i);    <span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &gt; 0) {      devicedriver_send();    }  }</pre></div><p><dl compact><dt><b>Note:</b></dt><dd>As for the <a class="el" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_periodic()</a> function, special care has to be taken when using uIP together with ARP and Ethernet: <div class="fragment"><pre class="fragment">  <span class="keywordflow">for</span>(i = 0; i &lt; UIP_UDP_CONNS; i++) {    <a class="code" href="a00146.html#g2c64c8c36bc84f9336f6a2184ea51883">uip_udp_periodic</a>(i);    <span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &gt; 0) {      <a class="code" href="a00152.html#g54b27e45df15e10a0eb1a3e3a91417d2">uip_arp_out</a>();      ethernet_devicedriver_send();    }  }</pre></div></dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>conn</em>&nbsp;</td><td>The number of the UDP connection to be processed. </td></tr>  </table></dl><dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="a00042.html#a82">example-mainloop-with-arp.c</a>, and <a class="el" href="a00043.html#a99">example-mainloop-without-arp.c</a>.</dl><p>Definition at line <a class="el" href="a00202.html#l00373">373</a> of file <a class="el" href="a00202.html">uip.h</a>.    </td>  </tr></table><a class="anchor" name="gf5c2ad5acf3cc23b8262e9ba6a15136b"></a><!-- doxytag: member="uip.h::uip_udp_periodic_conn" ref="gf5c2ad5acf3cc23b8262e9ba6a15136b" args="(conn)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define uip_udp_periodic_conn          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">conn&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Periodic processing for a UDP connection identified by a pointer to its structure. <p>Same as <a class="el" href="a00146.html#g2c64c8c36bc84f9336f6a2184ea51883">uip_udp_periodic()</a> but takes a pointer to the actual <a class="el" href="a00088.html">uip_conn</a> struct instead of an integer as its argument. This function can be used to force periodic processing of a specific connection.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>conn</em>&nbsp;</td><td>A pointer to the <a class="el" href="a00095.html">uip_udp_conn</a> struct for the connection to be processed. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00202.html#l00390">390</a> of file <a class="el" href="a00202.html">uip.h</a>.    </td>  </tr></table><hr><h2>Variable Documentation</h2><a class="anchor" name="gb81e78f890dbbee50c533a9734b74fd9"></a><!-- doxytag: member="uip.h::uip_buf" ref="gb81e78f890dbbee50c533a9734b74fd9" args="[UIP_BUFSIZE+2]" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> <a class="el" href="a00150.html#gb81e78f890dbbee50c533a9734b74fd9">uip_buf</a>[UIP_BUFSIZE+2]          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>The uIP packet buffer. <p>The uip_buf array is used to hold incoming and outgoing packets. The device driver should place incoming data into this buffer. When sending data, the device driver should read the link level headers and the TCP/IP headers from this buffer. The size of the link level headers is configured by the UIP_LLH_LEN define.<p><dl compact><dt><b>Note:</b></dt><dd>The application data need not be placed in this buffer, so the device driver must read it from the place pointed to by the uip_appdata pointer as illustrated by the following example: <div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> devicedriver_send(<span class="keywordtype">void</span>) {    hwsend(&amp;<a class="code" href="a00146.html#gb81e78f890dbbee50c533a9734b74fd9">uip_buf</a>[0], <a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a>);    <span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &lt;= <a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a> + <a class="code" href="a00150.html#gee37386b2ab828787c05227eb109def7">UIP_TCPIP_HLEN</a>) {      hwsend(&amp;<a class="code" href="a00146.html#gb81e78f890dbbee50c533a9734b74fd9">uip_buf</a>[<a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a>], <a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> - UIP_LLH_LEN);    } <span class="keywordflow">else</span> {      hwsend(&amp;<a class="code" href="a00146.html#gb81e78f890dbbee50c533a9734b74fd9">uip_buf</a>[<a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a>], <a class="code" href="a00150.html#gee37386b2ab828787c05227eb109def7">UIP_TCPIP_HLEN</a>);      hwsend(<a class="code" href="a00150.html#g561b8eda32e059d4e7397f776268cc63">uip_appdata</a>, <a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> - <a class="code" href="a00150.html#gee37386b2ab828787c05227eb109def7">UIP_TCPIP_HLEN</a> - <a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a>);    } }</pre></div> </dd></dl><p>Definition at line <a class="el" href="a00201.html#l00139">139</a> of file <a class="el" href="a00201.html">uip.c</a>.<p>Referenced by <a class="el" href="a00201.html#l00682">uip_process()</a>.    </td>  </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -