1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>uIP 1.0: Configuration options for uIP</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<!-- Generated by Doxygen 1.4.6 --> 8<div class="tabs"> 9 <ul> 10 <li><a href="main.html"><span>Main Page</span></a></li> 11 <li><a href="modules.html"><span>Modules</span></a></li> 12 <li><a href="classes.html"><span>Data Structures</span></a></li> 13 <li><a href="files.html"><span>Files</span></a></li> 14 <li><a href="examples.html"><span>Examples</span></a></li> 15 </ul></div> 16<h1>Configuration options for uIP</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 17uIP is configured using the per-project configuration file <a class="el" href="a00140.html">uipopt.h</a>. 18<p> 19This file contains all compile-time options for uIP and should be tweaked to match each specific project. The uIP distribution contains a documented example "uipopt.h" that can be copied and modified for each project.<p> 20<dl compact><dt><b>Note:</b></dt><dd>Most of the configuration options in the <a class="el" href="a00140.html">uipopt.h</a> should not be changed, but rather the per-project uip-conf.h file. </dd></dl> 21 22<p> 23<table border="0" cellpadding="0" cellspacing="0"> 24<tr><td></td></tr> 25<tr><td colspan="2"><br><h2>Files</h2></td></tr> 26<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html">uip-conf.h</a></td></tr> 27 28<tr><td class="mdescLeft"> </td><td class="mdescRight">An example uIP configuration file. <br></td></tr> 29 30<p> 31<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html">uipopt.h</a></td></tr> 32 33<tr><td class="mdescLeft"> </td><td class="mdescRight">Configuration options for uIP. <br></td></tr> 34 35<p> 36<tr><td colspan="2"><br><h2>Project-specific configuration options</h2></td></tr> 37<tr><td colspan="2">uIP has a number of configuration options that can be overridden for each project. These are kept in a project-specific uip-conf.h file and all configuration names have the prefix UIP_CONF. <br><br></td></tr> 38<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3f6f1f6f98431f2d33ed30a30d2ccc35"></a><!-- doxytag: member="uipopt::UIP_CONF_MAX_CONNECTIONS" ref="g3f6f1f6f98431f2d33ed30a30d2ccc35" args="" --> 39#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g3f6f1f6f98431f2d33ed30a30d2ccc35">UIP_CONF_MAX_CONNECTIONS</a></td></tr> 40 41<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of TCP connections. <br></td></tr> 42<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g974c9b4bbe6b07cc1d64ac4fad278030"></a><!-- doxytag: member="uipopt::UIP_CONF_MAX_LISTENPORTS" ref="g974c9b4bbe6b07cc1d64ac4fad278030" args="" --> 43#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g974c9b4bbe6b07cc1d64ac4fad278030">UIP_CONF_MAX_LISTENPORTS</a></td></tr> 44 45<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of listening TCP ports. <br></td></tr> 46<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcacc406c3bf7d0e00412e4c946252739"></a><!-- doxytag: member="uipopt::UIP_CONF_BUFFER_SIZE" ref="gcacc406c3bf7d0e00412e4c946252739" args="" --> 47#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gcacc406c3bf7d0e00412e4c946252739">UIP_CONF_BUFFER_SIZE</a></td></tr> 48 49<tr><td class="mdescLeft"> </td><td class="mdescRight">uIP buffer size. <br></td></tr> 50<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gca1240bba5dd57f8c7c27123c84a1f6d"></a><!-- doxytag: member="uipopt::UIP_CONF_BYTE_ORDER" ref="gca1240bba5dd57f8c7c27123c84a1f6d" args="" --> 51#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gca1240bba5dd57f8c7c27123c84a1f6d">UIP_CONF_BYTE_ORDER</a></td></tr> 52 53<tr><td class="mdescLeft"> </td><td class="mdescRight">CPU byte order. <br></td></tr> 54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3001114ddadc1f2ada5cc9a780e866fc"></a><!-- doxytag: member="uipopt::UIP_CONF_LOGGING" ref="g3001114ddadc1f2ada5cc9a780e866fc" args="" --> 55#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g3001114ddadc1f2ada5cc9a780e866fc">UIP_CONF_LOGGING</a></td></tr> 56 57<tr><td class="mdescLeft"> </td><td class="mdescRight">Logging on or off. <br></td></tr> 58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g763f12007aad8cc0e483bf50f8a8d9b4"></a><!-- doxytag: member="uipopt::UIP_CONF_UDP" ref="g763f12007aad8cc0e483bf50f8a8d9b4" args="" --> 59#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g763f12007aad8cc0e483bf50f8a8d9b4">UIP_CONF_UDP</a></td></tr> 60 61<tr><td class="mdescLeft"> </td><td class="mdescRight">UDP support on or off. <br></td></tr> 62<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g9dd44616d41cef74d3beb51d8be5ecec"></a><!-- doxytag: member="uipopt::UIP_CONF_UDP_CHECKSUMS" ref="g9dd44616d41cef74d3beb51d8be5ecec" args="" --> 63#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g9dd44616d41cef74d3beb51d8be5ecec">UIP_CONF_UDP_CHECKSUMS</a></td></tr> 64 65<tr><td class="mdescLeft"> </td><td class="mdescRight">UDP checksums on or off. <br></td></tr> 66<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g529648ad3b0b327a43689b0f1779ff55"></a><!-- doxytag: member="uipopt::UIP_CONF_STATISTICS" ref="g529648ad3b0b327a43689b0f1779ff55" args="" --> 67#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g529648ad3b0b327a43689b0f1779ff55">UIP_CONF_STATISTICS</a></td></tr> 68 69<tr><td class="mdescLeft"> </td><td class="mdescRight">uIP statistics on or off <br></td></tr> 70<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a></td></tr> 71 72<tr><td class="mdescLeft"> </td><td class="mdescRight">8 bit datatype <a href="#g4caecabca98b43919dd11be1c0d4cd8e"></a><br></td></tr> 73<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a></td></tr> 74 75<tr><td class="mdescLeft"> </td><td class="mdescRight">16 bit datatype <a href="#g77570ac4fcab86864fa1916e55676da2"></a><br></td></tr> 76<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g727459e5c4f777543c81ffffa3df3f0c">uip_stats_t</a></td></tr> 77 78<tr><td class="mdescLeft"> </td><td class="mdescRight">Statistics datatype. <a href="#g727459e5c4f777543c81ffffa3df3f0c"></a><br></td></tr> 79<tr><td colspan="2"><br><h2>Static configuration options</h2></td></tr> 80<tr><td colspan="2">These configuration options can be used for setting the IP address settings statically, but only if UIP_FIXEDADDR is set to 1. The configuration options for a specific node includes IP address, netmask and default router as well as the Ethernet address. The netmask, default router and Ethernet address are appliciable only if uIP should be run over Ethernet.<p> 81All of these should be changed to suit your project. <br><br></td></tr> 82<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g51195ea7cd5aa387a87f9d3b23905b62">UIP_FIXEDADDR</a></td></tr> 83 84<tr><td class="mdescLeft"> </td><td class="mdescRight">Determines if uIP should use a fixed IP address or not. <a href="#g51195ea7cd5aa387a87f9d3b23905b62"></a><br></td></tr> 85<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g9069474ea570fd78c481aa164317dbaf">UIP_PINGADDRCONF</a></td></tr> 86 87<tr><td class="mdescLeft"> </td><td class="mdescRight">Ping IP address asignment. <a href="#g9069474ea570fd78c481aa164317dbaf"></a><br></td></tr> 88<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#ge0f8cbeca9731af2171ffd37e79de893">UIP_FIXEDETHADDR</a></td></tr> 89 90<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies if the uIP ARP module should be compiled with a fixed Ethernet MAC address or not. <a href="#ge0f8cbeca9731af2171ffd37e79de893"></a><br></td></tr> 91<tr><td colspan="2"><br><h2>IP configuration options</h2></td></tr> 92<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gb61381673de27f31848c5396bf0b338e">UIP_TTL</a> 64</td></tr> 93 94<tr><td class="mdescLeft"> </td><td class="mdescRight">The IP TTL (time to live) of IP packets sent by uIP. <a href="#gb61381673de27f31848c5396bf0b338e"></a><br></td></tr> 95<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gf963fdea2b75d27ef31e92d1d01359ee">UIP_REASSEMBLY</a></td></tr> 96 97<tr><td class="mdescLeft"> </td><td class="mdescRight">Turn on support for IP packet reassembly. <a href="#gf963fdea2b75d27ef31e92d1d01359ee"></a><br></td></tr> 98<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc3882366feda1cb759ccbfe98327a7db"></a><!-- doxytag: member="uipopt::UIP_REASS_MAXAGE" ref="gc3882366feda1cb759ccbfe98327a7db" args="" --> 99#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gc3882366feda1cb759ccbfe98327a7db">UIP_REASS_MAXAGE</a> 40</td></tr> 100 101<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum time an IP fragment should wait in the reassembly buffer before it is dropped. <br></td></tr> 102<tr><td colspan="2"><br><h2>UDP configuration options</h2></td></tr> 103<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdcf372ff9748996f7c05e9822a615384"></a><!-- doxytag: member="uipopt::UIP_UDP" ref="gdcf372ff9748996f7c05e9822a615384" args="" --> 104#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gdcf372ff9748996f7c05e9822a615384">UIP_UDP</a></td></tr> 105 106<tr><td class="mdescLeft"> </td><td class="mdescRight">Toggles wether UDP support should be compiled in or not. <br></td></tr> 107<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g92f3344ec8ca46893163399c89fafed5">UIP_UDP_CHECKSUMS</a></td></tr> 108 109<tr><td class="mdescLeft"> </td><td class="mdescRight">Toggles if UDP checksums should be used or not. <a href="#g92f3344ec8ca46893163399c89fafed5"></a><br></td></tr> 110<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g196379ceb1219a99f4495e41ccc9bbfb"></a><!-- doxytag: member="uipopt::UIP_UDP_CONNS" ref="g196379ceb1219a99f4495e41ccc9bbfb" args="" --> 111#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g196379ceb1219a99f4495e41ccc9bbfb">UIP_UDP_CONNS</a></td></tr> 112 113<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum amount of concurrent UDP connections. <br></td></tr> 114<tr><td colspan="2"><br><h2>TCP configuration options</h2></td></tr> 115<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gac0de06236b02659460445de30776e00">UIP_ACTIVE_OPEN</a></td></tr> 116 117<tr><td class="mdescLeft"> </td><td class="mdescRight">Determines if support for opening connections from uIP should be compiled in. <a href="#gac0de06236b02659460445de30776e00"></a><br></td></tr> 118<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gf5fe83be78b78b9e7d9e7f1e34ab1cc5">UIP_CONNS</a></td></tr> 119 120<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum number of simultaneously open TCP connections. <a href="#gf5fe83be78b78b9e7d9e7f1e34ab1cc5"></a><br></td></tr> 121<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g8f4ebd8ef6c0ea665ed351d87fec09fd">UIP_LISTENPORTS</a></td></tr> 122 123<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum number of simultaneously listening TCP ports. <a href="#g8f4ebd8ef6c0ea665ed351d87fec09fd"></a><br></td></tr> 124<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g51c1cd531ff0afb81620151f2248cd21">UIP_URGDATA</a></td></tr> 125 126<tr><td class="mdescLeft"> </td><td class="mdescRight">Determines if support for TCP urgent data notification should be compiled in. <a href="#g51c1cd531ff0afb81620151f2248cd21"></a><br></td></tr> 127<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g15de27b044603284f68db05a378235a7">UIP_RTO</a> 3</td></tr> 128 129<tr><td class="mdescLeft"> </td><td class="mdescRight">The initial retransmission timeout counted in timer pulses. <a href="#g15de27b044603284f68db05a378235a7"></a><br></td></tr> 130<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g67cf1e0d2324c93f332c1f020c0fe8b3">UIP_MAXRTX</a> 8</td></tr> 131 132<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum number of times a segment should be retransmitted before the connection should be aborted. <a href="#g67cf1e0d2324c93f332c1f020c0fe8b3"></a><br></td></tr> 133<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g24aa5bc36939cc9a0833e1df01478a7e">UIP_MAXSYNRTX</a> 5</td></tr> 134 135<tr><td class="mdescLeft"> </td><td class="mdescRight">The maximum number of times a SYN segment should be retransmitted before a connection request should be deemed to have been unsuccessful. <a href="#g24aa5bc36939cc9a0833e1df01478a7e"></a><br></td></tr> 136<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g4910467b83a639f06739c82cd362037e">UIP_TCP_MSS</a> (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)</td></tr> 137 138<tr><td class="mdescLeft"> </td><td class="mdescRight">The TCP maximum segment size. <a href="#g4910467b83a639f06739c82cd362037e"></a><br></td></tr> 139<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g5b9dba2123705bce1ce95c3deca0bdad">UIP_RECEIVE_WINDOW</a></td></tr> 140 141<tr><td class="mdescLeft"> </td><td class="mdescRight">The size of the advertised receiver's window. <a href="#g5b9dba2123705bce1ce95c3deca0bdad"></a><br></td></tr> 142<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g2bc3b489923793759526a3181eb667fa">UIP_TIME_WAIT_TIMEOUT</a> 120</td></tr> 143 144<tr><td class="mdescLeft"> </td><td class="mdescRight">How long a connection should stay in the TIME_WAIT state. <a href="#g2bc3b489923793759526a3181eb667fa"></a><br></td></tr> 145<tr><td colspan="2"><br><h2>ARP configuration options</h2></td></tr> 146<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gb1455b27c06532a399cf06d2c1d6d08d">UIP_ARPTAB_SIZE</a></td></tr> 147 148<tr><td class="mdescLeft"> </td><td class="mdescRight">The size of the ARP table. <a href="#gb1455b27c06532a399cf06d2c1d6d08d"></a><br></td></tr> 149<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g3090117ef3ff5775b77cb1960e442d07">UIP_ARP_MAXAGE</a> 120</td></tr> 150 151<tr><td class="mdescLeft"> </td><td class="mdescRight">The maxium age of ARP table entries measured in 10ths of seconds. <a href="#g3090117ef3ff5775b77cb1960e442d07"></a><br></td></tr> 152<tr><td colspan="2"><br><h2>General configuration options</h2></td></tr> 153<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g3589822ecb9d9c4145209756396b8a6b">UIP_BUFSIZE</a></td></tr> 154 155<tr><td class="mdescLeft"> </td><td class="mdescRight">The size of the uIP packet buffer. <a href="#g3589822ecb9d9c4145209756396b8a6b"></a><br></td></tr> 156<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g5726142fec34f35fb9ea19e5a45975c6">UIP_STATISTICS</a></td></tr> 157 158<tr><td class="mdescLeft"> </td><td class="mdescRight">Determines if statistics support should be compiled in. <a href="#g5726142fec34f35fb9ea19e5a45975c6"></a><br></td></tr> 159<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g21664b7441cfa37d280228d23316d609">UIP_LOGGING</a></td></tr> 160 161<tr><td class="mdescLeft"> </td><td class="mdescRight">Determines if logging of certain events should be compiled in. <a href="#g21664b7441cfa37d280228d23316d609"></a><br></td></tr> 162<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g156dd2891a57035e4afdc4c2bc0b0ebf">UIP_BROADCAST</a></td></tr> 163 164<tr><td class="mdescLeft"> </td><td class="mdescRight">Broadcast support. <a href="#g156dd2891a57035e4afdc4c2bc0b0ebf"></a><br></td></tr> 165<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">UIP_LLH_LEN</a></td></tr> 166 167<tr><td class="mdescLeft"> </td><td class="mdescRight">The link level header length. <a href="#ge6f4a2453dbd8bc60e6a82774552366a"></a><br></td></tr> 168<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gb58e1ceb7cb73ca2bcd73146b6c1b4e7">uip_log</a> (char *msg)</td></tr> 169 170<tr><td class="mdescLeft"> </td><td class="mdescRight">Print out a uIP log message. <a href="#gb58e1ceb7cb73ca2bcd73146b6c1b4e7"></a><br></td></tr> 171<tr><td colspan="2"><br><h2>CPU architecture configuration</h2></td></tr> 172<tr><td colspan="2">The CPU architecture configuration is where the endianess of the CPU on which uIP is to be run is specified. Most CPUs today are little endian, and the most notable exception are the Motorolas which are big endian. The BYTE_ORDER macro should be changed to reflect the CPU architecture on which uIP is to be run. <br><br></td></tr> 173<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g285a80366aed9428f64282b8d13c918b">UIP_BYTE_ORDER</a></td></tr> 174 175<tr><td class="mdescLeft"> </td><td class="mdescRight">The byte order of the CPU architecture on which uIP is to be run. <a href="#g285a80366aed9428f64282b8d13c918b"></a><br></td></tr> 176<tr><td colspan="2"><br><h2>Appication specific configurations</h2></td></tr> 177<tr><td colspan="2">An uIP application is implemented using a single application function that is called by uIP whenever a TCP/IP event occurs. The name of this function must be registered with uIP at compile time using the UIP_APPCALL definition.<p> 178uIP applications can store the application state within the <a class="el" href="a00088.html">uip_conn</a> structure by specifying the type of the application structure by typedef:ing the type uip_tcp_appstate_t and uip_udp_appstate_t.<p> 179The file containing the definitions must be included in the <a class="el" href="a00140.html">uipopt.h</a> file.<p> 180The following example illustrates how this can look. <div class="fragment"><pre class="fragment"><span class="keywordtype">void</span> <a class="code" href="a00164.html#g648ddfb2dde2cc55034e4e0ea41cb6d1">httpd_appcall</a>(<span class="keywordtype">void</span>); 181<span class="preprocessor">#define UIP_APPCALL httpd_appcall</span> 182<span class="preprocessor"></span> 183<span class="keyword">struct </span><a class="code" href="a00080.html">httpd_state</a> { 184 <a class="code" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> <a class="code" href="a00080.html#94fcc9f5c47f419040d849ce58beae35">state</a>; 185 <a class="code" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> <a class="code" href="a00080.html#6df929b448ea98bc44d41f5e96237bda">count</a>; 186 <span class="keywordtype">char</span> *dataptr; 187 <span class="keywordtype">char</span> *script; 188}; 189<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00080.html">httpd_state</a> <a class="code" href="a00153.html#g69646a81a922033c5281445a71f8ffed">uip_tcp_appstate_t</a> 190</pre></div> <br><br></td></tr> 191<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g41aa744caa46913b3b3aedb2a4e78546"></a><!-- doxytag: member="uipopt::UIP_APPCALL" ref="g41aa744caa46913b3b3aedb2a4e78546" args="" --> 192#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g41aa744caa46913b3b3aedb2a4e78546">UIP_APPCALL</a> smtp_appcall</td></tr> 193 194<tr><td class="mdescLeft"> </td><td class="mdescRight">The name of the application function that uIP should call in response to TCP/IP events. <br></td></tr> 195<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="a00085.html">smtp_state</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g69646a81a922033c5281445a71f8ffed">uip_tcp_appstate_t</a></td></tr> 196 197<tr><td class="mdescLeft"> </td><td class="mdescRight">The type of the application state that is to be stored in the <a class="el" href="a00088.html">uip_conn</a> structure. <a href="#g69646a81a922033c5281445a71f8ffed"></a><br></td></tr> 198<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#ga92afb113e122f860392bfbd385f842e">uip_udp_appstate_t</a></td></tr> 199 200<tr><td class="mdescLeft"> </td><td class="mdescRight">The type of the application state that is to be stored in the <a class="el" href="a00088.html">uip_conn</a> structure. <a href="#ga92afb113e122f860392bfbd385f842e"></a><br></td></tr> 201<tr><td colspan="2"><br><h2>Defines</h2></td></tr> 202<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gb6e04358481bd2057524fb874cfa472b"></a><!-- doxytag: member="uipopt::UIP_LITTLE_ENDIAN" ref="gb6e04358481bd2057524fb874cfa472b" args="" --> 203#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#gb6e04358481bd2057524fb874cfa472b">UIP_LITTLE_ENDIAN</a> 3412</td></tr> 204 205<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6836f92f3692f3a4429eb599db40cbae"></a><!-- doxytag: member="uipopt::UIP_BIG_ENDIAN" ref="g6836f92f3692f3a4429eb599db40cbae" args="" --> 206#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#g6836f92f3692f3a4429eb599db40cbae">UIP_BIG_ENDIAN</a> 1234</td></tr> 207 208</table> 209<hr><h2>Define Documentation</h2> 210<a class="anchor" name="gac0de06236b02659460445de30776e00"></a><!-- doxytag: member="uipopt.h::UIP_ACTIVE_OPEN" ref="gac0de06236b02659460445de30776e00" args="" --><p> 211<table class="mdTable" cellpadding="2" cellspacing="0"> 212 <tr> 213 <td class="mdRow"> 214 <table cellpadding="0" cellspacing="0" border="0"> 215 <tr> 216 <td class="md" nowrap valign="top">#define UIP_ACTIVE_OPEN </td> 217 </tr> 218 </table> 219 </td> 220 </tr> 221</table> 222<table cellspacing="5" cellpadding="0" border="0"> 223 <tr> 224 <td> 225 226 </td> 227 <td> 228 229<p> 230Determines if support for opening connections from uIP should be compiled in. 231<p> 232If the applications that are running on top of uIP for this project do not need to open outgoing TCP connections, this configration option can be turned off to reduce the code size of uIP. 233<p> 234Definition at line <a class="el" href="a00206.html#l00233">233</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 235 </tr> 236</table> 237<a class="anchor" name="g3090117ef3ff5775b77cb1960e442d07"></a><!-- doxytag: member="uipopt.h::UIP_ARP_MAXAGE" ref="g3090117ef3ff5775b77cb1960e442d07" args="" --><p> 238<table class="mdTable" cellpadding="2" cellspacing="0"> 239 <tr> 240 <td class="mdRow"> 241 <table cellpadding="0" cellspacing="0" border="0"> 242 <tr> 243 <td class="md" nowrap valign="top">#define UIP_ARP_MAXAGE 120 </td> 244 </tr> 245 </table> 246 </td> 247 </tr> 248</table> 249<table cellspacing="5" cellpadding="0" border="0"> 250 <tr> 251 <td> 252 253 </td> 254 <td> 255 256<p> 257The maxium age of ARP table entries measured in 10ths of seconds. 258<p> 259An UIP_ARP_MAXAGE of 120 corresponds to 20 minutes (BSD default). 260<p> 261Definition at line <a class="el" href="a00206.html#l00358">358</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 262<p> 263Referenced by <a class="el" href="a00204.html#l00142">uip_arp_timer()</a>. </td> 264 </tr> 265</table> 266<a class="anchor" name="gb1455b27c06532a399cf06d2c1d6d08d"></a><!-- doxytag: member="uipopt.h::UIP_ARPTAB_SIZE" ref="gb1455b27c06532a399cf06d2c1d6d08d" args="" --><p> 267<table class="mdTable" cellpadding="2" cellspacing="0"> 268 <tr> 269 <td class="mdRow"> 270 <table cellpadding="0" cellspacing="0" border="0"> 271 <tr> 272 <td class="md" nowrap valign="top">#define UIP_ARPTAB_SIZE </td> 273 </tr> 274 </table> 275 </td> 276 </tr> 277</table> 278<table cellspacing="5" cellpadding="0" border="0"> 279 <tr> 280 <td> 281 282 </td> 283 <td> 284 285<p> 286The size of the ARP table. 287<p> 288This option should be set to a larger value if this uIP node will have many connections from the local network. 289<p> 290Definition at line <a class="el" href="a00206.html#l00349">349</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 291<p> 292Referenced by <a class="el" href="a00204.html#l00125">uip_arp_init()</a>, <a class="el" href="a00204.html#l00354">uip_arp_out()</a>, and <a class="el" href="a00204.html#l00142">uip_arp_timer()</a>. </td> 293 </tr> 294</table> 295<a class="anchor" name="g156dd2891a57035e4afdc4c2bc0b0ebf"></a><!-- doxytag: member="uipopt.h::UIP_BROADCAST" ref="g156dd2891a57035e4afdc4c2bc0b0ebf" args="" --><p> 296<table class="mdTable" cellpadding="2" cellspacing="0"> 297 <tr> 298 <td class="mdRow"> 299 <table cellpadding="0" cellspacing="0" border="0"> 300 <tr> 301 <td class="md" nowrap valign="top">#define UIP_BROADCAST </td> 302 </tr> 303 </table> 304 </td> 305 </tr> 306</table> 307<table cellspacing="5" cellpadding="0" border="0"> 308 <tr> 309 <td> 310 311 </td> 312 <td> 313 314<p> 315Broadcast support. 316<p> 317This flag configures IP broadcast support. This is useful only together with UDP. 318<p> 319Definition at line <a class="el" href="a00206.html#l00423">423</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 320 </tr> 321</table> 322<a class="anchor" name="g3589822ecb9d9c4145209756396b8a6b"></a><!-- doxytag: member="uipopt.h::UIP_BUFSIZE" ref="g3589822ecb9d9c4145209756396b8a6b" args="" --><p> 323<table class="mdTable" cellpadding="2" cellspacing="0"> 324 <tr> 325 <td class="mdRow"> 326 <table cellpadding="0" cellspacing="0" border="0"> 327 <tr> 328 <td class="md" nowrap valign="top">#define UIP_BUFSIZE </td> 329 </tr> 330 </table> 331 </td> 332 </tr> 333</table> 334<table cellspacing="5" cellpadding="0" border="0"> 335 <tr> 336 <td> 337 338 </td> 339 <td> 340 341<p> 342The size of the uIP packet buffer. 343<p> 344The uIP packet buffer should not be smaller than 60 bytes, and does not need to be larger than 1500 bytes. Lower size results in lower TCP throughput, larger size results in higher TCP throughput. 345<p> 346Definition at line <a class="el" href="a00206.html#l00379">379</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 347<p> 348Referenced by <a class="el" href="a00199.html#l00049">uip_split_output()</a>. </td> 349 </tr> 350</table> 351<a class="anchor" name="g285a80366aed9428f64282b8d13c918b"></a><!-- doxytag: member="uipopt.h::UIP_BYTE_ORDER" ref="g285a80366aed9428f64282b8d13c918b" args="" --><p> 352<table class="mdTable" cellpadding="2" cellspacing="0"> 353 <tr> 354 <td class="mdRow"> 355 <table cellpadding="0" cellspacing="0" border="0"> 356 <tr> 357 <td class="md" nowrap valign="top">#define UIP_BYTE_ORDER </td> 358 </tr> 359 </table> 360 </td> 361 </tr> 362</table> 363<table cellspacing="5" cellpadding="0" border="0"> 364 <tr> 365 <td> 366 367 </td> 368 <td> 369 370<p> 371The byte order of the CPU architecture on which uIP is to be run. 372<p> 373This option can be either BIG_ENDIAN (Motorola byte order) or LITTLE_ENDIAN (Intel byte order). 374<p> 375Definition at line <a class="el" href="a00206.html#l00475">475</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 376 </tr> 377</table> 378<a class="anchor" name="gf5fe83be78b78b9e7d9e7f1e34ab1cc5"></a><!-- doxytag: member="uipopt.h::UIP_CONNS" ref="gf5fe83be78b78b9e7d9e7f1e34ab1cc5" args="" --><p> 379<table class="mdTable" cellpadding="2" cellspacing="0"> 380 <tr> 381 <td class="mdRow"> 382 <table cellpadding="0" cellspacing="0" border="0"> 383 <tr> 384 <td class="md" nowrap valign="top">#define UIP_CONNS </td> 385 </tr> 386 </table> 387 </td> 388 </tr> 389</table> 390<table cellspacing="5" cellpadding="0" border="0"> 391 <tr> 392 <td> 393 394 </td> 395 <td> 396 397<p> 398The maximum number of simultaneously open TCP connections. 399<p> 400Since the TCP connections are statically allocated, turning this configuration knob down results in less RAM used. Each TCP connection requires approximatly 30 bytes of memory. <dl compact><dt><b>Examples: </b></dt><dd> 401<a class="el" href="a00042.html#a79">example-mainloop-with-arp.c</a>, and <a class="el" href="a00043.html#a96">example-mainloop-without-arp.c</a>.</dl> 402<p> 403Definition at line <a class="el" href="a00206.html#l00245">245</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 404<p> 405Referenced by <a class="el" href="a00201.html#l00407">uip_connect()</a>. </td> 406 </tr> 407</table> 408<a class="anchor" name="g51195ea7cd5aa387a87f9d3b23905b62"></a><!-- doxytag: member="uipopt.h::UIP_FIXEDADDR" ref="g51195ea7cd5aa387a87f9d3b23905b62" args="" --><p> 409<table class="mdTable" cellpadding="2" cellspacing="0"> 410 <tr> 411 <td class="mdRow"> 412 <table cellpadding="0" cellspacing="0" border="0"> 413 <tr> 414 <td class="md" nowrap valign="top">#define UIP_FIXEDADDR </td> 415 </tr> 416 </table> 417 </td> 418 </tr> 419</table> 420<table cellspacing="5" cellpadding="0" border="0"> 421 <tr> 422 <td> 423 424 </td> 425 <td> 426 427<p> 428Determines if uIP should use a fixed IP address or not. 429<p> 430If uIP should use a fixed IP address, the settings are set in the <a class="el" href="a00140.html">uipopt.h</a> file. If not, the macros <a class="el" href="a00144.html#g12b467f314489259dd718228d0827a51">uip_sethostaddr()</a>, <a class="el" href="a00144.html#g41d37ea1e3bd24f7b51e9409aceaaa80">uip_setdraddr()</a> and <a class="el" href="a00144.html#geb79c914cf137e6d27fd7583e5a66679">uip_setnetmask()</a> should be used instead. 431<p> 432Definition at line <a class="el" href="a00206.html#l00097">97</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 433 </tr> 434</table> 435<a class="anchor" name="ge0f8cbeca9731af2171ffd37e79de893"></a><!-- doxytag: member="uipopt.h::UIP_FIXEDETHADDR" ref="ge0f8cbeca9731af2171ffd37e79de893" args="" --><p> 436<table class="mdTable" cellpadding="2" cellspacing="0"> 437 <tr> 438 <td class="mdRow"> 439 <table cellpadding="0" cellspacing="0" border="0"> 440 <tr> 441 <td class="md" nowrap valign="top">#define UIP_FIXEDETHADDR </td> 442 </tr> 443 </table> 444 </td> 445 </tr> 446</table> 447<table cellspacing="5" cellpadding="0" border="0"> 448 <tr> 449 <td> 450 451 </td> 452 <td> 453 454<p> 455Specifies if the uIP ARP module should be compiled with a fixed Ethernet MAC address or not. 456<p> 457If this configuration option is 0, the macro <a class="el" href="a00144.html#g30e827f33eacff55ecb4d8fb5a11d5d1">uip_setethaddr()</a> can be used to specify the Ethernet address at run-time. 458<p> 459Definition at line <a class="el" href="a00206.html#l00127">127</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 460 </tr> 461</table> 462<a class="anchor" name="g8f4ebd8ef6c0ea665ed351d87fec09fd"></a><!-- doxytag: member="uipopt.h::UIP_LISTENPORTS" ref="g8f4ebd8ef6c0ea665ed351d87fec09fd" args="" --><p> 463<table class="mdTable" cellpadding="2" cellspacing="0"> 464 <tr> 465 <td class="mdRow"> 466 <table cellpadding="0" cellspacing="0" border="0"> 467 <tr> 468 <td class="md" nowrap valign="top">#define UIP_LISTENPORTS </td> 469 </tr> 470 </table> 471 </td> 472 </tr> 473</table> 474<table cellspacing="5" cellpadding="0" border="0"> 475 <tr> 476 <td> 477 478 </td> 479 <td> 480 481<p> 482The maximum number of simultaneously listening TCP ports. 483<p> 484Each listening TCP port requires 2 bytes of memory. 485<p> 486Definition at line <a class="el" href="a00206.html#l00259">259</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 487<p> 488Referenced by <a class="el" href="a00201.html#l00379">uip_init()</a>, <a class="el" href="a00201.html#l00529">uip_listen()</a>, and <a class="el" href="a00201.html#l00518">uip_unlisten()</a>. </td> 489 </tr> 490</table> 491<a class="anchor" name="ge6f4a2453dbd8bc60e6a82774552366a"></a><!-- doxytag: member="uipopt.h::UIP_LLH_LEN" ref="ge6f4a2453dbd8bc60e6a82774552366a" args="" --><p> 492<table class="mdTable" cellpadding="2" cellspacing="0"> 493 <tr> 494 <td class="mdRow"> 495 <table cellpadding="0" cellspacing="0" border="0"> 496 <tr> 497 <td class="md" nowrap valign="top">#define UIP_LLH_LEN </td> 498 </tr> 499 </table> 500 </td> 501 </tr> 502</table> 503<table cellspacing="5" cellpadding="0" border="0"> 504 <tr> 505 <td> 506 507 </td> 508 <td> 509 510<p> 511The link level header length. 512<p> 513This is the offset into the uip_buf where the IP header can be found. For Ethernet, this should be set to 14. For SLIP, this should be set to 0. 514<p> 515Definition at line <a class="el" href="a00206.html#l00448">448</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 516<p> 517Referenced by <a class="el" href="a00201.html#l00318">uip_ipchksum()</a>, <a class="el" href="a00201.html#l00682">uip_process()</a>, and <a class="el" href="a00199.html#l00049">uip_split_output()</a>. </td> 518 </tr> 519</table> 520<a class="anchor" name="g21664b7441cfa37d280228d23316d609"></a><!-- doxytag: member="uipopt.h::UIP_LOGGING" ref="g21664b7441cfa37d280228d23316d609" args="" --><p> 521<table class="mdTable" cellpadding="2" cellspacing="0"> 522 <tr> 523 <td class="mdRow"> 524 <table cellpadding="0" cellspacing="0" border="0"> 525 <tr> 526 <td class="md" nowrap valign="top">#define UIP_LOGGING </td> 527 </tr> 528 </table> 529 </td> 530 </tr> 531</table> 532<table cellspacing="5" cellpadding="0" border="0"> 533 <tr> 534 <td> 535 536 </td> 537 <td> 538 539<p> 540Determines if logging of certain events should be compiled in. 541<p> 542This is useful mostly for debugging. The function <a class="el" href="a00153.html#gb58e1ceb7cb73ca2bcd73146b6c1b4e7">uip_log()</a> must be implemented to suit the architecture of the project, if logging is turned on. 543<p> 544Definition at line <a class="el" href="a00206.html#l00408">408</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 545 </tr> 546</table> 547<a class="anchor" name="g67cf1e0d2324c93f332c1f020c0fe8b3"></a><!-- doxytag: member="uipopt.h::UIP_MAXRTX" ref="g67cf1e0d2324c93f332c1f020c0fe8b3" args="" --><p> 548<table class="mdTable" cellpadding="2" cellspacing="0"> 549 <tr> 550 <td class="mdRow"> 551 <table cellpadding="0" cellspacing="0" border="0"> 552 <tr> 553 <td class="md" nowrap valign="top">#define UIP_MAXRTX 8 </td> 554 </tr> 555 </table> 556 </td> 557 </tr> 558</table> 559<table cellspacing="5" cellpadding="0" border="0"> 560 <tr> 561 <td> 562 563 </td> 564 <td> 565 566<p> 567The maximum number of times a segment should be retransmitted before the connection should be aborted. 568<p> 569This should not be changed. 570<p> 571Definition at line <a class="el" href="a00206.html#l00288">288</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 572<p> 573Referenced by <a class="el" href="a00201.html#l00682">uip_process()</a>. </td> 574 </tr> 575</table> 576<a class="anchor" name="g24aa5bc36939cc9a0833e1df01478a7e"></a><!-- doxytag: member="uipopt.h::UIP_MAXSYNRTX" ref="g24aa5bc36939cc9a0833e1df01478a7e" args="" --><p> 577<table class="mdTable" cellpadding="2" cellspacing="0"> 578 <tr> 579 <td class="mdRow"> 580 <table cellpadding="0" cellspacing="0" border="0"> 581 <tr> 582 <td class="md" nowrap valign="top">#define UIP_MAXSYNRTX 5 </td> 583 </tr> 584 </table> 585 </td> 586 </tr> 587</table> 588<table cellspacing="5" cellpadding="0" border="0"> 589 <tr> 590 <td> 591 592 </td> 593 <td> 594 595<p> 596The maximum number of times a SYN segment should be retransmitted before a connection request should be deemed to have been unsuccessful. 597<p> 598This should not need to be changed. 599<p> 600Definition at line <a class="el" href="a00206.html#l00297">297</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 601<p> 602Referenced by <a class="el" href="a00201.html#l00682">uip_process()</a>. </td> 603 </tr> 604</table> 605<a class="anchor" name="g9069474ea570fd78c481aa164317dbaf"></a><!-- doxytag: member="uipopt.h::UIP_PINGADDRCONF" ref="g9069474ea570fd78c481aa164317dbaf" args="" --><p> 606<table class="mdTable" cellpadding="2" cellspacing="0"> 607 <tr> 608 <td class="mdRow"> 609 <table cellpadding="0" cellspacing="0" border="0"> 610 <tr> 611 <td class="md" nowrap valign="top">#define UIP_PINGADDRCONF </td> 612 </tr> 613 </table> 614 </td> 615 </tr> 616</table> 617<table cellspacing="5" cellpadding="0" border="0"> 618 <tr> 619 <td> 620 621 </td> 622 <td> 623 624<p> 625Ping IP address asignment. 626<p> 627uIP uses a "ping" packets for setting its own IP address if this option is set. If so, uIP will start with an empty IP address and the destination IP address of the first incoming "ping" (ICMP echo) packet will be used for setting the hosts IP address.<p> 628<dl compact><dt><b>Note:</b></dt><dd>This works only if UIP_FIXEDADDR is 0. </dd></dl> 629 630<p> 631Definition at line <a class="el" href="a00206.html#l00114">114</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 632 </tr> 633</table> 634<a class="anchor" name="gf963fdea2b75d27ef31e92d1d01359ee"></a><!-- doxytag: member="uipopt.h::UIP_REASSEMBLY" ref="gf963fdea2b75d27ef31e92d1d01359ee" args="" --><p> 635<table class="mdTable" cellpadding="2" cellspacing="0"> 636 <tr> 637 <td class="mdRow"> 638 <table cellpadding="0" cellspacing="0" border="0"> 639 <tr> 640 <td class="md" nowrap valign="top">#define UIP_REASSEMBLY </td> 641 </tr> 642 </table> 643 </td> 644 </tr> 645</table> 646<table cellspacing="5" cellpadding="0" border="0"> 647 <tr> 648 <td> 649 650 </td> 651 <td> 652 653<p> 654Turn on support for IP packet reassembly. 655<p> 656uIP supports reassembly of fragmented IP packets. This features requires an additonal amount of RAM to hold the reassembly buffer and the reassembly code size is approximately 700 bytes. The reassembly buffer is of the same size as the uip_buf buffer (configured by UIP_BUFSIZE).<p> 657<dl compact><dt><b>Note:</b></dt><dd>IP packet reassembly is not heavily tested. </dd></dl> 658 659<p> 660Definition at line <a class="el" href="a00206.html#l00156">156</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 661 </tr> 662</table> 663<a class="anchor" name="g5b9dba2123705bce1ce95c3deca0bdad"></a><!-- doxytag: member="uipopt.h::UIP_RECEIVE_WINDOW" ref="g5b9dba2123705bce1ce95c3deca0bdad" args="" --><p> 664<table class="mdTable" cellpadding="2" cellspacing="0"> 665 <tr> 666 <td class="mdRow"> 667 <table cellpadding="0" cellspacing="0" border="0"> 668 <tr> 669 <td class="md" nowrap valign="top">#define UIP_RECEIVE_WINDOW </td> 670 </tr> 671 </table> 672 </td> 673 </tr> 674</table> 675<table cellspacing="5" cellpadding="0" border="0"> 676 <tr> 677 <td> 678 679 </td> 680 <td> 681 682<p> 683The size of the advertised receiver's window. 684<p> 685Should be set low (i.e., to the size of the uip_buf buffer) is the application is slow to process incoming data, or high (32768 bytes) if the application processes data quickly. 686<p> 687Definition at line <a class="el" href="a00206.html#l00317">317</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 688 </tr> 689</table> 690<a class="anchor" name="g15de27b044603284f68db05a378235a7"></a><!-- doxytag: member="uipopt.h::UIP_RTO" ref="g15de27b044603284f68db05a378235a7" args="" --><p> 691<table class="mdTable" cellpadding="2" cellspacing="0"> 692 <tr> 693 <td class="mdRow"> 694 <table cellpadding="0" cellspacing="0" border="0"> 695 <tr> 696 <td class="md" nowrap valign="top">#define UIP_RTO 3 </td> 697 </tr> 698 </table> 699 </td> 700 </tr> 701</table> 702<table cellspacing="5" cellpadding="0" border="0"> 703 <tr> 704 <td> 705 706 </td> 707 <td> 708 709<p> 710The initial retransmission timeout counted in timer pulses. 711<p> 712This should not be changed. 713<p> 714Definition at line <a class="el" href="a00206.html#l00280">280</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 715<p> 716Referenced by <a class="el" href="a00201.html#l00682">uip_process()</a>. </td> 717 </tr> 718</table> 719<a class="anchor" name="g5726142fec34f35fb9ea19e5a45975c6"></a><!-- doxytag: member="uipopt.h::UIP_STATISTICS" ref="g5726142fec34f35fb9ea19e5a45975c6" args="" --><p> 720<table class="mdTable" cellpadding="2" cellspacing="0"> 721 <tr> 722 <td class="mdRow"> 723 <table cellpadding="0" cellspacing="0" border="0"> 724 <tr> 725 <td class="md" nowrap valign="top">#define UIP_STATISTICS </td> 726 </tr> 727 </table> 728 </td> 729 </tr> 730</table> 731<table cellspacing="5" cellpadding="0" border="0"> 732 <tr> 733 <td> 734 735 </td> 736 <td> 737 738<p> 739Determines if statistics support should be compiled in. 740<p> 741The statistics is useful for debugging and to show the user. 742<p> 743Definition at line <a class="el" href="a00206.html#l00393">393</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 744 </tr> 745</table> 746<a class="anchor" name="g4910467b83a639f06739c82cd362037e"></a><!-- doxytag: member="uipopt.h::UIP_TCP_MSS" ref="g4910467b83a639f06739c82cd362037e" args="" --><p> 747<table class="mdTable" cellpadding="2" cellspacing="0"> 748 <tr> 749 <td class="mdRow"> 750 <table cellpadding="0" cellspacing="0" border="0"> 751 <tr> 752 <td class="md" nowrap valign="top">#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) </td> 753 </tr> 754 </table> 755 </td> 756 </tr> 757</table> 758<table cellspacing="5" cellpadding="0" border="0"> 759 <tr> 760 <td> 761 762 </td> 763 <td> 764 765<p> 766The TCP maximum segment size. 767<p> 768This is should not be to set to more than UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN. 769<p> 770Definition at line <a class="el" href="a00206.html#l00305">305</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 771 </tr> 772</table> 773<a class="anchor" name="g2bc3b489923793759526a3181eb667fa"></a><!-- doxytag: member="uipopt.h::UIP_TIME_WAIT_TIMEOUT" ref="g2bc3b489923793759526a3181eb667fa" args="" --><p> 774<table class="mdTable" cellpadding="2" cellspacing="0"> 775 <tr> 776 <td class="mdRow"> 777 <table cellpadding="0" cellspacing="0" border="0"> 778 <tr> 779 <td class="md" nowrap valign="top">#define UIP_TIME_WAIT_TIMEOUT 120 </td> 780 </tr> 781 </table> 782 </td> 783 </tr> 784</table> 785<table cellspacing="5" cellpadding="0" border="0"> 786 <tr> 787 <td> 788 789 </td> 790 <td> 791 792<p> 793How long a connection should stay in the TIME_WAIT state. 794<p> 795This configiration option has no real implication, and it should be left untouched. 796<p> 797Definition at line <a class="el" href="a00206.html#l00328">328</a> of file <a class="el" href="a00206.html">uipopt.h</a>. 798<p> 799Referenced by <a class="el" href="a00201.html#l00682">uip_process()</a>. </td> 800 </tr> 801</table> 802<a class="anchor" name="gb61381673de27f31848c5396bf0b338e"></a><!-- doxytag: member="uipopt.h::UIP_TTL" ref="gb61381673de27f31848c5396bf0b338e" args="" --><p> 803<table class="mdTable" cellpadding="2" cellspacing="0"> 804 <tr> 805 <td class="mdRow"> 806 <table cellpadding="0" cellspacing="0" border="0"> 807 <tr> 808 <td class="md" nowrap valign="top">#define UIP_TTL 64 </td> 809 </tr> 810 </table> 811 </td> 812 </tr> 813</table> 814<table cellspacing="5" cellpadding="0" border="0"> 815 <tr> 816 <td> 817 818 </td> 819 <td> 820 821<p> 822The IP TTL (time to live) of IP packets sent by uIP. 823<p> 824This should normally not be changed. 825<p> 826Definition at line <a class="el" href="a00206.html#l00141">141</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 827 </tr> 828</table> 829<a class="anchor" name="g92f3344ec8ca46893163399c89fafed5"></a><!-- doxytag: member="uipopt.h::UIP_UDP_CHECKSUMS" ref="g92f3344ec8ca46893163399c89fafed5" args="" --><p> 830<table class="mdTable" cellpadding="2" cellspacing="0"> 831 <tr> 832 <td class="mdRow"> 833 <table cellpadding="0" cellspacing="0" border="0"> 834 <tr> 835 <td class="md" nowrap valign="top">#define UIP_UDP_CHECKSUMS </td> 836 </tr> 837 </table> 838 </td> 839 </tr> 840</table> 841<table cellspacing="5" cellpadding="0" border="0"> 842 <tr> 843 <td> 844 845 </td> 846 <td> 847 848<p> 849Toggles if UDP checksums should be used or not. 850<p> 851<dl compact><dt><b>Note:</b></dt><dd>Support for UDP checksums is currently not included in uIP, so this option has no function. </dd></dl> 852 853<p> 854Definition at line <a class="el" href="a00206.html#l00195">195</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 855 </tr> 856</table> 857<a class="anchor" name="g51c1cd531ff0afb81620151f2248cd21"></a><!-- doxytag: member="uipopt.h::UIP_URGDATA" ref="g51c1cd531ff0afb81620151f2248cd21" args="" --><p> 858<table class="mdTable" cellpadding="2" cellspacing="0"> 859 <tr> 860 <td class="mdRow"> 861 <table cellpadding="0" cellspacing="0" border="0"> 862 <tr> 863 <td class="md" nowrap valign="top">#define UIP_URGDATA </td> 864 </tr> 865 </table> 866 </td> 867 </tr> 868</table> 869<table cellspacing="5" cellpadding="0" border="0"> 870 <tr> 871 <td> 872 873 </td> 874 <td> 875 876<p> 877Determines if support for TCP urgent data notification should be compiled in. 878<p> 879Urgent data (out-of-band data) is a rarely used TCP feature that very seldom would be required. 880<p> 881Definition at line <a class="el" href="a00206.html#l00273">273</a> of file <a class="el" href="a00206.html">uipopt.h</a>. </td> 882 </tr> 883</table> 884<hr><h2>Typedef Documentation</h2> 885<a class="anchor" name="g77570ac4fcab86864fa1916e55676da2"></a><!-- doxytag: member="uip-conf.h::u16_t" ref="g77570ac4fcab86864fa1916e55676da2" args="" --><p> 886<table class="mdTable" cellpadding="2" cellspacing="0"> 887 <tr> 888 <td class="mdRow"> 889 <table cellpadding="0" cellspacing="0" border="0"> 890 <tr> 891 <td class="md" nowrap valign="top">typedef uint16_t <a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> </td> 892 </tr> 893 </table> 894 </td> 895 </tr> 896</table> 897<table cellspacing="5" cellpadding="0" border="0"> 898 <tr> 899 <td> 900 901 </td> 902 <td> 903 904<p> 90516 bit datatype 906<p> 907This typedef defines the 16-bit type used throughout uIP. <dl compact><dt><b>Examples: </b></dt><dd> 908<a class="el" href="a00048.html#a2">dhcpc.c</a>, <a class="el" href="a00049.html#a51">dhcpc.h</a>, <a class="el" href="a00046.html#a125">resolv.c</a>, <a class="el" href="a00047.html#a157">resolv.h</a>, <a class="el" href="a00038.html#a188">smtp.c</a>, <a class="el" href="a00039.html#a197">smtp.h</a>, <a class="el" href="a00044.html#a230">telnetd.c</a>, and <a class="el" href="a00050.html#a250">uip-conf.h</a>.</dl> 909<p> 910Definition at line <a class="el" href="a00207.html#l00076">76</a> of file <a class="el" href="a00207.html">uip-conf.h</a>. </td> 911 </tr> 912</table> 913<a class="anchor" name="g4caecabca98b43919dd11be1c0d4cd8e"></a><!-- doxytag: member="uip-conf.h::u8_t" ref="g4caecabca98b43919dd11be1c0d4cd8e" args="" --><p> 914<table class="mdTable" cellpadding="2" cellspacing="0"> 915 <tr> 916 <td class="mdRow"> 917 <table cellpadding="0" cellspacing="0" border="0"> 918 <tr> 919 <td class="md" nowrap valign="top">typedef uint8_t <a class="el" href="a00153.html#g4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> </td> 920 </tr> 921 </table> 922 </td> 923 </tr> 924</table> 925<table cellspacing="5" cellpadding="0" border="0"> 926 <tr> 927 <td> 928 929 </td> 930 <td> 931 932<p> 9338 bit datatype 934<p> 935This typedef defines the 8-bit type used throughout uIP. <dl compact><dt><b>Examples: </b></dt><dd> 936<a class="el" href="a00048.html#a1">dhcpc.c</a>, <a class="el" href="a00049.html#a53">dhcpc.h</a>, <a class="el" href="a00046.html#a126">resolv.c</a>, <a class="el" href="a00039.html#a200">smtp.h</a>, <a class="el" href="a00044.html#a227">telnetd.c</a>, <a class="el" href="a00045.html#a245">telnetd.h</a>, and <a class="el" href="a00050.html#a249">uip-conf.h</a>.</dl> 937<p> 938Definition at line <a class="el" href="a00207.html#l00067">67</a> of file <a class="el" href="a00207.html">uip-conf.h</a>. </td> 939 </tr> 940</table> 941<a class="anchor" name="g727459e5c4f777543c81ffffa3df3f0c"></a><!-- doxytag: member="uip-conf.h::uip_stats_t" ref="g727459e5c4f777543c81ffffa3df3f0c" args="" --><p> 942<table class="mdTable" cellpadding="2" cellspacing="0"> 943 <tr> 944 <td class="mdRow"> 945 <table cellpadding="0" cellspacing="0" border="0"> 946 <tr> 947 <td class="md" nowrap valign="top">typedef unsigned short <a class="el" href="a00153.html#g727459e5c4f777543c81ffffa3df3f0c">uip_stats_t</a> </td> 948 </tr> 949 </table> 950 </td> 951 </tr> 952</table> 953<table cellspacing="5" cellpadding="0" border="0"> 954 <tr> 955 <td> 956 957 </td> 958 <td> 959 960<p> 961Statistics datatype. 962<p> 963This typedef defines the dataype used for keeping statistics in uIP. 964<p> 965Definition at line <a class="el" href="a00207.html#l00086">86</a> of file <a class="el" href="a00207.html">uip-conf.h</a>. </td> 966 </tr> 967</table> 968<a class="anchor" name="g69646a81a922033c5281445a71f8ffed"></a><!-- doxytag: member="smtp.h::uip_tcp_appstate_t" ref="g69646a81a922033c5281445a71f8ffed" args="" --><p> 969<table class="mdTable" cellpadding="2" cellspacing="0"> 970 <tr> 971 <td class="mdRow"> 972 <table cellpadding="0" cellspacing="0" border="0"> 973 <tr> 974 <td class="md" nowrap valign="top">typedef <a class="el" href="a00085.html">uip_tcp_appstate_t</a> </td> 975 </tr> 976 </table> 977 </td> 978 </tr> 979</table> 980<table cellspacing="5" cellpadding="0" border="0"> 981 <tr> 982 <td> 983 984 </td> 985 <td> 986 987<p> 988The type of the application state that is to be stored in the <a class="el" href="a00088.html">uip_conn</a> structure. 989<p> 990This usually is typedef:ed to a struct holding application state information. <dl compact><dt><b>Examples: </b></dt><dd> 991<a class="el" href="a00039.html#a205">smtp.h</a>, <a class="el" href="a00045.html#a248">telnetd.h</a>, and <a class="el" href="a00041.html#a317">webclient.h</a>.</dl> 992<p> 993Definition at line <a class="el" href="a00175.html#l00098">98</a> of file <a class="el" href="a00175.html">smtp.h</a>. </td> 994 </tr> 995</table> 996<a class="anchor" name="ga92afb113e122f860392bfbd385f842e"></a><!-- doxytag: member="resolv.h::uip_udp_appstate_t" ref="ga92afb113e122f860392bfbd385f842e" args="" --><p> 997<table class="mdTable" cellpadding="2" cellspacing="0"> 998 <tr> 999 <td class="mdRow"> 1000 <table cellpadding="0" cellspacing="0" border="0"> 1001 <tr> 1002 <td class="md" nowrap valign="top">typedef <a class="el" href="a00153.html#ga92afb113e122f860392bfbd385f842e">uip_udp_appstate_t</a> </td> 1003 </tr> 1004 </table> 1005 </td> 1006 </tr> 1007</table> 1008<table cellspacing="5" cellpadding="0" border="0"> 1009 <tr> 1010 <td> 1011 1012 </td> 1013 <td> 1014 1015<p> 1016The type of the application state that is to be stored in the <a class="el" href="a00088.html">uip_conn</a> structure. 1017<p> 1018This usually is typedef:ed to a struct holding application state information. <dl compact><dt><b>Examples: </b></dt><dd> 1019<a class="el" href="a00049.html#a59">dhcpc.h</a>.</dl> 1020<p> 1021Definition at line <a class="el" href="a00173.html#l00047">47</a> of file <a class="el" href="a00173.html">resolv.h</a>. </td> 1022 </tr> 1023</table> 1024<hr><h2>Function Documentation</h2> 1025<a class="anchor" name="gb58e1ceb7cb73ca2bcd73146b6c1b4e7"></a><!-- doxytag: member="uipopt.h::uip_log" ref="gb58e1ceb7cb73ca2bcd73146b6c1b4e7" args="(char *msg)" --><p> 1026<table class="mdTable" cellpadding="2" cellspacing="0"> 1027 <tr> 1028 <td class="mdRow"> 1029 <table cellpadding="0" cellspacing="0" border="0"> 1030 <tr> 1031 <td class="md" nowrap valign="top">void uip_log </td> 1032 <td class="md" valign="top">( </td> 1033 <td class="md" nowrap valign="top">char * </td> 1034 <td class="mdname1" valign="top" nowrap> <em>msg</em> </td> 1035 <td class="md" valign="top"> ) </td> 1036 <td class="md" nowrap></td> 1037 </tr> 1038 </table> 1039 </td> 1040 </tr> 1041</table> 1042<table cellspacing="5" cellpadding="0" border="0"> 1043 <tr> 1044 <td> 1045 1046 </td> 1047 <td> 1048 1049<p> 1050Print out a uIP log message. 1051<p> 1052This function must be implemented by the module that uses uIP, and is called by uIP whenever a log message is generated. </td> 1053 </tr> 1054</table> 1055<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by 1056<a href="http://www.doxygen.org/index.html"> 1057<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> 1058</body> 1059</html> 1060