smart-green-house/rtt-uart-nb/rt-thread/components/net/uip/doc/html/a00146.html

384 lines
23 KiB
HTML
Raw Normal View History

2023-10-28 18:00:47 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>uIP 1.0: uIP device driver functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul></div>
<h1>uIP device driver functions<br>
<small>
[<a class="el" href="a00150.html">The uIP TCP/IP stack</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
These functions are used by a network device driver for interacting with uIP.
<p>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#ga4360412ee9350fba725f98a137169fe">uip_input</a>()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Process an incoming packet. <a href="#ga4360412ee9350fba725f98a137169fe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_periodic</a>(conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Periodic processing for a connection identified by its number. <a href="#g1024f8a5fa65e82bf848b2e6590d9628"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gfd5ebb56a1bd1da9878aa886a2075e80"></a><!-- doxytag: member="uipdevfunc::uip_conn_active" ref="gfd5ebb56a1bd1da9878aa886a2075e80" args="(conn)" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#gfd5ebb56a1bd1da9878aa886a2075e80">uip_conn_active</a>(conn)&nbsp;&nbsp;&nbsp;(<a class="el" href="a00150.html#gf703683056d2bfa5c81fa157dcb20fe2">uip_conns</a>[conn].tcpstateflags != UIP_CLOSED)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#gbaf0bb2b6a4424b4eb69e45e457c2583">uip_periodic_conn</a>(conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform periodic processing for a connection identified by a pointer to its structure. <a href="#gbaf0bb2b6a4424b4eb69e45e457c2583"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#gf20aaf4292cb0d2a1b10bc0a568b51fa">uip_poll_conn</a>(conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reuqest that a particular connection should be polled. <a href="#gf20aaf4292cb0d2a1b10bc0a568b51fa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#g2c64c8c36bc84f9336f6a2184ea51883">uip_udp_periodic</a>(conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Periodic processing for a UDP connection identified by its number. <a href="#g2c64c8c36bc84f9336f6a2184ea51883"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#gf5c2ad5acf3cc23b8262e9ba6a15136b">uip_udp_periodic_conn</a>(conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Periodic processing for a UDP connection identified by a pointer to its structure. <a href="#gf5c2ad5acf3cc23b8262e9ba6a15136b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#gb81e78f890dbbee50c533a9734b74fd9">uip_buf</a> [UIP_BUFSIZE+2]</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The uIP packet buffer. <a href="#gb81e78f890dbbee50c533a9734b74fd9"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga4360412ee9350fba725f98a137169fe"></a><!-- doxytag: member="uip.h::uip_input" ref="ga4360412ee9350fba725f98a137169fe" args="()" --><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_input </td>
<td class="md" valign="top">(&nbsp;</td>
&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>
Process an incoming packet.
<p>
This function should be called when the device driver has received a packet from the network. The packet from the device driver must be present in the uip_buf buffer, and the length of the packet should be placed in the uip_len variable.<p>
When the function returns, there may be an outbound packet placed in the uip_buf packet buffer. If so, the uip_len variable is set to the length of the packet. If no packet is to be sent out, the uip_len variable is set to 0.<p>
The usual way of calling the function is presented by the source code below. <div class="fragment"><pre class="fragment"> <a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> = devicedriver_poll();
<span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &gt; 0) {
<a class="code" href="a00146.html#ga4360412ee9350fba725f98a137169fe">uip_input</a>();
<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>If you are writing a uIP device driver that needs ARP (Address Resolution Protocol), e.g., when running uIP over Ethernet, you will need to call the uIP ARP code before calling this function: <div class="fragment"><pre class="fragment"><span class="preprocessor"> #define BUF ((struct uip_eth_hdr *)&amp;uip_buf[0])</span>
<span class="preprocessor"></span> <a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> = ethernet_devicedrver_poll();
<span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &gt; 0) {
<span class="keywordflow">if</span>(<a class="code" href="a00150.html#g24f52ac52d6e714cb04a5aa01be3bdd0">BUF</a>-&gt;type == <a class="code" href="a00148.html#g69a7a4951ff21b302267532c21ee78fc">HTONS</a>(<a class="code" href="a00152.html#g03d140db75de3d3cdfbbab1c4fed8d8d">UIP_ETHTYPE_IP</a>)) {
<a class="code" href="a00152.html#g737337d6a51e31b236c8233d024138a8">uip_arp_ipin</a>();
<a class="code" href="a00146.html#ga4360412ee9350fba725f98a137169fe">uip_input</a>();
<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();
}
} <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a00150.html#g24f52ac52d6e714cb04a5aa01be3bdd0">BUF</a>-&gt;type == <a class="code" href="a00148.html#g69a7a4951ff21b302267532c21ee78fc">HTONS</a>(<a class="code" href="a00152.html#g3e1562e8a6de32268e5df92a52152f91">UIP_ETHTYPE_ARP</a>)) {
<a class="code" href="a00152.html#g902c4a360134096224bc2655f623aa5f">uip_arp_arpin</a>();
<span class="keywordflow">if</span>(<a class="code" href="a00149.html#g12a33f0c09711167bdf3dd7d7cf8c5a1">uip_len</a> &gt; 0) {
ethernet_devicedriver_send();
}
}
</pre></div> </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="a00042.html#a73">example-mainloop-with-arp.c</a>, and <a class="el" href="a00043.html#a93">example-mainloop-without-arp.c</a>.</dl>
<p>
Definition at line <a class="el" href="a00202.html#l00257">257</a> of file <a class="el" href="a00202.html">uip.h</a>. </td>
</tr>
</table>
<a class="anchor" name="g1024f8a5fa65e82bf848b2e6590d9628"></a><!-- doxytag: member="uip.h::uip_periodic" ref="g1024f8a5fa65e82bf848b2e6590d9628" 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_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 connection identified by its number.
<p>
This function does the necessary periodic processing (timers, polling) for a uIP TCP conneciton, and should be called when the periodic uIP timer goes off. It should be called for every connection, regardless of whether they are open of closed.<p>
When the function returns, it may have an outbound packet waiting for service in the uIP packet buffer, and if so the uip_len variable is set to a value larger than zero. The device driver should be called to send out the packet.<p>
The ususal way of calling the function is through a for() loop like this: <div class="fragment"><pre class="fragment"> <span class="keywordflow">for</span>(i = 0; i &lt; <a class="code" href="a00153.html#gf5fe83be78b78b9e7d9e7f1e34ab1cc5">UIP_CONNS</a>; ++i) {
<a class="code" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_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>If you are writing a uIP device driver that needs ARP (Address Resolution Protocol), e.g., when running uIP over Ethernet, you will need to call the <a class="el" href="a00152.html#g54b27e45df15e10a0eb1a3e3a91417d2">uip_arp_out()</a> function before calling the device driver: <div class="fragment"><pre class="fragment"> <span class="keywordflow">for</span>(i = 0; i &lt; UIP_CONNS; ++i) {
<a class="code" href="a00146.html#g1024f8a5fa65e82bf848b2e6590d9628">uip_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 connection which is to be periodically polled. </td></tr>
</table>
</dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="a00042.html#a80">example-mainloop-with-arp.c</a>, and <a class="el" href="a00043.html#a97">example-mainloop-without-arp.c</a>.</dl>
<p>
Definition at line <a class="el" href="a00202.html#l00301">301</a> of file <a class="el" href="a00202.html">uip.h</a>. </td>
</tr>
</table>
<a class="anchor" name="gbaf0bb2b6a4424b4eb69e45e457c2583"></a><!-- doxytag: member="uip.h::uip_periodic_conn" ref="gbaf0bb2b6a4424b4eb69e45e457c2583" 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_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>
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>