565 lines
50 KiB
HTML
565 lines
50 KiB
HTML
<!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/uipopt.h Source File</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 Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="classes.html"><span>Data Structures</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="examples.html"><span>Examples</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul></div>
|
|
<h1>uip/uipopt.h</h1><a href="a00140.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**</span>
|
|
<a name="l00002"></a>00002 <span class="comment"> * \defgroup uipopt Configuration options for uIP</span>
|
|
<a name="l00003"></a>00003 <span class="comment"> * @{</span>
|
|
<a name="l00004"></a>00004 <span class="comment"> *</span>
|
|
<a name="l00005"></a>00005 <span class="comment"> * uIP is configured using the per-project configuration file</span>
|
|
<a name="l00006"></a>00006 <span class="comment"> * uipopt.h. This file contains all compile-time options for uIP and</span>
|
|
<a name="l00007"></a>00007 <span class="comment"> * should be tweaked to match each specific project. The uIP</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> * distribution contains a documented example "uipopt.h" that can be</span>
|
|
<a name="l00009"></a>00009 <span class="comment"> * copied and modified for each project.</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> *</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> * \note Most of the configuration options in the uipopt.h should not</span>
|
|
<a name="l00012"></a>00012 <span class="comment"> * be changed, but rather the per-project uip-conf.h file.</span>
|
|
<a name="l00013"></a>00013 <span class="comment"> */</span>
|
|
<a name="l00014"></a>00014 <span class="comment"></span>
|
|
<a name="l00015"></a>00015 <span class="comment">/**</span>
|
|
<a name="l00016"></a>00016 <span class="comment"> * \file</span>
|
|
<a name="l00017"></a>00017 <span class="comment"> * Configuration options for uIP.</span>
|
|
<a name="l00018"></a>00018 <span class="comment"> * \author Adam Dunkels <adam@dunkels.com></span>
|
|
<a name="l00019"></a>00019 <span class="comment"> *</span>
|
|
<a name="l00020"></a>00020 <span class="comment"> * This file is used for tweaking various configuration options for</span>
|
|
<a name="l00021"></a>00021 <span class="comment"> * uIP. You should make a copy of this file into one of your project's</span>
|
|
<a name="l00022"></a>00022 <span class="comment"> * directories instead of editing this example "uipopt.h" file that</span>
|
|
<a name="l00023"></a>00023 <span class="comment"> * comes with the uIP distribution.</span>
|
|
<a name="l00024"></a>00024 <span class="comment"> */</span>
|
|
<a name="l00025"></a>00025
|
|
<a name="l00026"></a>00026 <span class="comment">/*</span>
|
|
<a name="l00027"></a>00027 <span class="comment"> * Copyright (c) 2001-2003, Adam Dunkels.</span>
|
|
<a name="l00028"></a>00028 <span class="comment"> * All rights reserved.</span>
|
|
<a name="l00029"></a>00029 <span class="comment"> *</span>
|
|
<a name="l00030"></a>00030 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
|
|
<a name="l00031"></a>00031 <span class="comment"> * modification, are permitted provided that the following conditions</span>
|
|
<a name="l00032"></a>00032 <span class="comment"> * are met:</span>
|
|
<a name="l00033"></a>00033 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
|
|
<a name="l00034"></a>00034 <span class="comment"> * notice, this list of conditions and the following disclaimer.</span>
|
|
<a name="l00035"></a>00035 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
|
|
<a name="l00036"></a>00036 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
|
|
<a name="l00037"></a>00037 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
|
|
<a name="l00038"></a>00038 <span class="comment"> * 3. The name of the author may not be used to endorse or promote</span>
|
|
<a name="l00039"></a>00039 <span class="comment"> * products derived from this software without specific prior</span>
|
|
<a name="l00040"></a>00040 <span class="comment"> * written permission.</span>
|
|
<a name="l00041"></a>00041 <span class="comment"> *</span>
|
|
<a name="l00042"></a>00042 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</span>
|
|
<a name="l00043"></a>00043 <span class="comment"> * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span>
|
|
<a name="l00044"></a>00044 <span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
|
|
<a name="l00045"></a>00045 <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</span>
|
|
<a name="l00046"></a>00046 <span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
|
|
<a name="l00047"></a>00047 <span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</span>
|
|
<a name="l00048"></a>00048 <span class="comment"> * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span>
|
|
<a name="l00049"></a>00049 <span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</span>
|
|
<a name="l00050"></a>00050 <span class="comment"> * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</span>
|
|
<a name="l00051"></a>00051 <span class="comment"> * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
|
|
<a name="l00052"></a>00052 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
|
|
<a name="l00053"></a>00053 <span class="comment"> *</span>
|
|
<a name="l00054"></a>00054 <span class="comment"> * This file is part of the uIP TCP/IP stack.</span>
|
|
<a name="l00055"></a>00055 <span class="comment"> *</span>
|
|
<a name="l00056"></a>00056 <span class="comment"> * $Id: uipopt.h,v 1.4 2006/06/12 08:00:31 adam Exp $</span>
|
|
<a name="l00057"></a>00057 <span class="comment"> *</span>
|
|
<a name="l00058"></a>00058 <span class="comment"> */</span>
|
|
<a name="l00059"></a>00059
|
|
<a name="l00060"></a>00060 <span class="preprocessor">#ifndef __UIPOPT_H__</span>
|
|
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define __UIPOPT_H__</span>
|
|
<a name="l00062"></a>00062 <span class="preprocessor"></span>
|
|
<a name="l00063"></a>00063 <span class="preprocessor">#ifndef UIP_LITTLE_ENDIAN</span>
|
|
<a name="l00064"></a><a class="code" href="a00153.html#gb6e04358481bd2057524fb874cfa472b">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_LITTLE_ENDIAN 3412</span>
|
|
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_LITTLE_ENDIAN */</span>
|
|
<a name="l00066"></a>00066 <span class="preprocessor">#ifndef UIP_BIG_ENDIAN</span>
|
|
<a name="l00067"></a><a class="code" href="a00153.html#g6836f92f3692f3a4429eb599db40cbae">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_BIG_ENDIAN 1234</span>
|
|
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_BIG_ENDIAN */</span>
|
|
<a name="l00069"></a>00069
|
|
<a name="l00070"></a>00070 <span class="preprocessor">#include "<a class="code" href="a00141.html">uip-conf.h</a>"</span>
|
|
<a name="l00071"></a>00071
|
|
<a name="l00072"></a>00072 <span class="comment">/*------------------------------------------------------------------------------*/</span>
|
|
<a name="l00073"></a>00073 <span class="comment"></span>
|
|
<a name="l00074"></a>00074 <span class="comment">/**</span>
|
|
<a name="l00075"></a>00075 <span class="comment"> * \name Static configuration options</span>
|
|
<a name="l00076"></a>00076 <span class="comment"> * @{</span>
|
|
<a name="l00077"></a>00077 <span class="comment"> *</span>
|
|
<a name="l00078"></a>00078 <span class="comment"> * These configuration options can be used for setting the IP address</span>
|
|
<a name="l00079"></a>00079 <span class="comment"> * settings statically, but only if UIP_FIXEDADDR is set to 1. The</span>
|
|
<a name="l00080"></a>00080 <span class="comment"> * configuration options for a specific node includes IP address,</span>
|
|
<a name="l00081"></a>00081 <span class="comment"> * netmask and default router as well as the Ethernet address. The</span>
|
|
<a name="l00082"></a>00082 <span class="comment"> * netmask, default router and Ethernet address are appliciable only</span>
|
|
<a name="l00083"></a>00083 <span class="comment"> * if uIP should be run over Ethernet.</span>
|
|
<a name="l00084"></a>00084 <span class="comment"> *</span>
|
|
<a name="l00085"></a>00085 <span class="comment"> * All of these should be changed to suit your project.</span>
|
|
<a name="l00086"></a>00086 <span class="comment">*/</span>
|
|
<a name="l00087"></a>00087 <span class="comment"></span>
|
|
<a name="l00088"></a>00088 <span class="comment">/**</span>
|
|
<a name="l00089"></a>00089 <span class="comment"> * Determines if uIP should use a fixed IP address or not.</span>
|
|
<a name="l00090"></a>00090 <span class="comment"> *</span>
|
|
<a name="l00091"></a>00091 <span class="comment"> * If uIP should use a fixed IP address, the settings are set in the</span>
|
|
<a name="l00092"></a>00092 <span class="comment"> * uipopt.h file. If not, the macros uip_sethostaddr(),</span>
|
|
<a name="l00093"></a>00093 <span class="comment"> * uip_setdraddr() and uip_setnetmask() should be used instead.</span>
|
|
<a name="l00094"></a>00094 <span class="comment"> *</span>
|
|
<a name="l00095"></a>00095 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00096"></a>00096 <span class="comment"> */</span>
|
|
<a name="l00097"></a><a class="code" href="a00153.html#g51195ea7cd5aa387a87f9d3b23905b62">00097</a> <span class="preprocessor">#define UIP_FIXEDADDR 0</span>
|
|
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00099"></a>00099 <span class="comment">/**</span>
|
|
<a name="l00100"></a>00100 <span class="comment"> * Ping IP address asignment.</span>
|
|
<a name="l00101"></a>00101 <span class="comment"> *</span>
|
|
<a name="l00102"></a>00102 <span class="comment"> * uIP uses a "ping" packets for setting its own IP address if this</span>
|
|
<a name="l00103"></a>00103 <span class="comment"> * option is set. If so, uIP will start with an empty IP address and</span>
|
|
<a name="l00104"></a>00104 <span class="comment"> * the destination IP address of the first incoming "ping" (ICMP echo)</span>
|
|
<a name="l00105"></a>00105 <span class="comment"> * packet will be used for setting the hosts IP address.</span>
|
|
<a name="l00106"></a>00106 <span class="comment"> *</span>
|
|
<a name="l00107"></a>00107 <span class="comment"> * \note This works only if UIP_FIXEDADDR is 0.</span>
|
|
<a name="l00108"></a>00108 <span class="comment"> *</span>
|
|
<a name="l00109"></a>00109 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00110"></a>00110 <span class="comment"> */</span>
|
|
<a name="l00111"></a>00111 <span class="preprocessor">#ifdef UIP_CONF_PINGADDRCONF</span>
|
|
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#define UIP_PINGADDRCONF UIP_CONF_PINGADDRCONF</span>
|
|
<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_PINGADDRCONF */</span>
|
|
<a name="l00114"></a><a class="code" href="a00153.html#g9069474ea570fd78c481aa164317dbaf">00114</a> <span class="preprocessor">#define UIP_PINGADDRCONF 0</span>
|
|
<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_PINGADDRCONF */</span>
|
|
<a name="l00116"></a>00116
|
|
<a name="l00117"></a>00117 <span class="comment"></span>
|
|
<a name="l00118"></a>00118 <span class="comment">/**</span>
|
|
<a name="l00119"></a>00119 <span class="comment"> * Specifies if the uIP ARP module should be compiled with a fixed</span>
|
|
<a name="l00120"></a>00120 <span class="comment"> * Ethernet MAC address or not.</span>
|
|
<a name="l00121"></a>00121 <span class="comment"> *</span>
|
|
<a name="l00122"></a>00122 <span class="comment"> * If this configuration option is 0, the macro uip_setethaddr() can</span>
|
|
<a name="l00123"></a>00123 <span class="comment"> * be used to specify the Ethernet address at run-time.</span>
|
|
<a name="l00124"></a>00124 <span class="comment"> *</span>
|
|
<a name="l00125"></a>00125 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00126"></a>00126 <span class="comment"> */</span>
|
|
<a name="l00127"></a><a class="code" href="a00153.html#ge0f8cbeca9731af2171ffd37e79de893">00127</a> <span class="preprocessor">#define UIP_FIXEDETHADDR 0</span>
|
|
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00129"></a>00129 <span class="comment">/** @} */</span>
|
|
<a name="l00130"></a>00130 <span class="comment">/*------------------------------------------------------------------------------*/</span><span class="comment"></span>
|
|
<a name="l00131"></a>00131 <span class="comment">/**</span>
|
|
<a name="l00132"></a>00132 <span class="comment"> * \name IP configuration options</span>
|
|
<a name="l00133"></a>00133 <span class="comment"> * @{</span>
|
|
<a name="l00134"></a>00134 <span class="comment"> *</span>
|
|
<a name="l00135"></a>00135 <span class="comment"> */</span><span class="comment"></span>
|
|
<a name="l00136"></a>00136 <span class="comment">/**</span>
|
|
<a name="l00137"></a>00137 <span class="comment"> * The IP TTL (time to live) of IP packets sent by uIP.</span>
|
|
<a name="l00138"></a>00138 <span class="comment"> *</span>
|
|
<a name="l00139"></a>00139 <span class="comment"> * This should normally not be changed.</span>
|
|
<a name="l00140"></a>00140 <span class="comment"> */</span>
|
|
<a name="l00141"></a><a class="code" href="a00153.html#gb61381673de27f31848c5396bf0b338e">00141</a> <span class="preprocessor">#define UIP_TTL 64</span>
|
|
<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00143"></a>00143 <span class="comment">/**</span>
|
|
<a name="l00144"></a>00144 <span class="comment"> * Turn on support for IP packet reassembly.</span>
|
|
<a name="l00145"></a>00145 <span class="comment"> *</span>
|
|
<a name="l00146"></a>00146 <span class="comment"> * uIP supports reassembly of fragmented IP packets. This features</span>
|
|
<a name="l00147"></a>00147 <span class="comment"> * requires an additonal amount of RAM to hold the reassembly buffer</span>
|
|
<a name="l00148"></a>00148 <span class="comment"> * and the reassembly code size is approximately 700 bytes. The</span>
|
|
<a name="l00149"></a>00149 <span class="comment"> * reassembly buffer is of the same size as the uip_buf buffer</span>
|
|
<a name="l00150"></a>00150 <span class="comment"> * (configured by UIP_BUFSIZE).</span>
|
|
<a name="l00151"></a>00151 <span class="comment"> *</span>
|
|
<a name="l00152"></a>00152 <span class="comment"> * \note IP packet reassembly is not heavily tested.</span>
|
|
<a name="l00153"></a>00153 <span class="comment"> *</span>
|
|
<a name="l00154"></a>00154 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00155"></a>00155 <span class="comment"> */</span>
|
|
<a name="l00156"></a><a class="code" href="a00153.html#gf963fdea2b75d27ef31e92d1d01359ee">00156</a> <span class="preprocessor">#define UIP_REASSEMBLY 0</span>
|
|
<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00158"></a>00158 <span class="comment">/**</span>
|
|
<a name="l00159"></a>00159 <span class="comment"> * The maximum time an IP fragment should wait in the reassembly</span>
|
|
<a name="l00160"></a>00160 <span class="comment"> * buffer before it is dropped.</span>
|
|
<a name="l00161"></a>00161 <span class="comment"> *</span>
|
|
<a name="l00162"></a>00162 <span class="comment"> */</span>
|
|
<a name="l00163"></a><a class="code" href="a00153.html#gc3882366feda1cb759ccbfe98327a7db">00163</a> <span class="preprocessor">#define UIP_REASS_MAXAGE 40</span>
|
|
<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00165"></a>00165 <span class="comment">/** @} */</span>
|
|
<a name="l00166"></a>00166
|
|
<a name="l00167"></a>00167 <span class="comment">/*------------------------------------------------------------------------------*/</span><span class="comment"></span>
|
|
<a name="l00168"></a>00168 <span class="comment">/**</span>
|
|
<a name="l00169"></a>00169 <span class="comment"> * \name UDP configuration options</span>
|
|
<a name="l00170"></a>00170 <span class="comment"> * @{</span>
|
|
<a name="l00171"></a>00171 <span class="comment"> */</span>
|
|
<a name="l00172"></a>00172 <span class="comment"></span>
|
|
<a name="l00173"></a>00173 <span class="comment">/**</span>
|
|
<a name="l00174"></a>00174 <span class="comment"> * Toggles wether UDP support should be compiled in or not.</span>
|
|
<a name="l00175"></a>00175 <span class="comment"> *</span>
|
|
<a name="l00176"></a>00176 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00177"></a>00177 <span class="comment"> */</span>
|
|
<a name="l00178"></a>00178 <span class="preprocessor">#ifdef UIP_CONF_UDP</span>
|
|
<a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">#define UIP_UDP UIP_CONF_UDP</span>
|
|
<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_UDP */</span>
|
|
<a name="l00181"></a><a class="code" href="a00153.html#gdcf372ff9748996f7c05e9822a615384">00181</a> <span class="preprocessor">#define UIP_UDP 0</span>
|
|
<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_UDP */</span>
|
|
<a name="l00183"></a>00183 <span class="comment"></span>
|
|
<a name="l00184"></a>00184 <span class="comment">/**</span>
|
|
<a name="l00185"></a>00185 <span class="comment"> * Toggles if UDP checksums should be used or not.</span>
|
|
<a name="l00186"></a>00186 <span class="comment"> *</span>
|
|
<a name="l00187"></a>00187 <span class="comment"> * \note Support for UDP checksums is currently not included in uIP,</span>
|
|
<a name="l00188"></a>00188 <span class="comment"> * so this option has no function.</span>
|
|
<a name="l00189"></a>00189 <span class="comment"> *</span>
|
|
<a name="l00190"></a>00190 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00191"></a>00191 <span class="comment"> */</span>
|
|
<a name="l00192"></a>00192 <span class="preprocessor">#ifdef UIP_CONF_UDP_CHECKSUMS</span>
|
|
<a name="l00193"></a>00193 <span class="preprocessor"></span><span class="preprocessor">#define UIP_UDP_CHECKSUMS UIP_CONF_UDP_CHECKSUMS</span>
|
|
<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
|
<a name="l00195"></a><a class="code" href="a00153.html#g92f3344ec8ca46893163399c89fafed5">00195</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_UDP_CHECKSUMS 0</span>
|
|
<a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00197"></a>00197 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00198"></a>00198 <span class="comment">/**</span>
|
|
<a name="l00199"></a>00199 <span class="comment"> * The maximum amount of concurrent UDP connections.</span>
|
|
<a name="l00200"></a>00200 <span class="comment"> *</span>
|
|
<a name="l00201"></a>00201 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00202"></a>00202 <span class="comment"> */</span>
|
|
<a name="l00203"></a>00203 <span class="preprocessor">#ifdef UIP_CONF_UDP_CONNS</span>
|
|
<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#define UIP_UDP_CONNS UIP_CONF_UDP_CONNS</span>
|
|
<a name="l00205"></a>00205 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_UDP_CONNS */</span>
|
|
<a name="l00206"></a><a class="code" href="a00153.html#g196379ceb1219a99f4495e41ccc9bbfb">00206</a> <span class="preprocessor">#define UIP_UDP_CONNS 10</span>
|
|
<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_UDP_CONNS */</span>
|
|
<a name="l00208"></a>00208 <span class="comment"></span>
|
|
<a name="l00209"></a>00209 <span class="comment">/**</span>
|
|
<a name="l00210"></a>00210 <span class="comment"> * The name of the function that should be called when UDP datagrams arrive.</span>
|
|
<a name="l00211"></a>00211 <span class="comment"> *</span>
|
|
<a name="l00212"></a>00212 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00213"></a>00213 <span class="comment"> */</span>
|
|
<a name="l00214"></a>00214
|
|
<a name="l00215"></a>00215 <span class="comment"></span>
|
|
<a name="l00216"></a>00216 <span class="comment">/** @} */</span>
|
|
<a name="l00217"></a>00217 <span class="comment">/*------------------------------------------------------------------------------*/</span><span class="comment"></span>
|
|
<a name="l00218"></a>00218 <span class="comment">/**</span>
|
|
<a name="l00219"></a>00219 <span class="comment"> * \name TCP configuration options</span>
|
|
<a name="l00220"></a>00220 <span class="comment"> * @{</span>
|
|
<a name="l00221"></a>00221 <span class="comment"> */</span>
|
|
<a name="l00222"></a>00222 <span class="comment"></span>
|
|
<a name="l00223"></a>00223 <span class="comment">/**</span>
|
|
<a name="l00224"></a>00224 <span class="comment"> * Determines if support for opening connections from uIP should be</span>
|
|
<a name="l00225"></a>00225 <span class="comment"> * compiled in.</span>
|
|
<a name="l00226"></a>00226 <span class="comment"> *</span>
|
|
<a name="l00227"></a>00227 <span class="comment"> * If the applications that are running on top of uIP for this project</span>
|
|
<a name="l00228"></a>00228 <span class="comment"> * do not need to open outgoing TCP connections, this configration</span>
|
|
<a name="l00229"></a>00229 <span class="comment"> * option can be turned off to reduce the code size of uIP.</span>
|
|
<a name="l00230"></a>00230 <span class="comment"> *</span>
|
|
<a name="l00231"></a>00231 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00232"></a>00232 <span class="comment"> */</span>
|
|
<a name="l00233"></a><a class="code" href="a00153.html#gac0de06236b02659460445de30776e00">00233</a> <span class="preprocessor">#define UIP_ACTIVE_OPEN 1</span>
|
|
<a name="l00234"></a>00234 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00235"></a>00235 <span class="comment">/**</span>
|
|
<a name="l00236"></a>00236 <span class="comment"> * The maximum number of simultaneously open TCP connections.</span>
|
|
<a name="l00237"></a>00237 <span class="comment"> *</span>
|
|
<a name="l00238"></a>00238 <span class="comment"> * Since the TCP connections are statically allocated, turning this</span>
|
|
<a name="l00239"></a>00239 <span class="comment"> * configuration knob down results in less RAM used. Each TCP</span>
|
|
<a name="l00240"></a>00240 <span class="comment"> * connection requires approximatly 30 bytes of memory.</span>
|
|
<a name="l00241"></a>00241 <span class="comment"> *</span>
|
|
<a name="l00242"></a>00242 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00243"></a>00243 <span class="comment"> */</span>
|
|
<a name="l00244"></a>00244 <span class="preprocessor">#ifndef UIP_CONF_MAX_CONNECTIONS</span>
|
|
<a name="l00245"></a><a class="code" href="a00153.html#gf5fe83be78b78b9e7d9e7f1e34ab1cc5">00245</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_CONNS 10</span>
|
|
<a name="l00246"></a>00246 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_MAX_CONNECTIONS */</span>
|
|
<a name="l00247"></a>00247 <span class="preprocessor">#define UIP_CONNS UIP_CONF_MAX_CONNECTIONS</span>
|
|
<a name="l00248"></a>00248 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_MAX_CONNECTIONS */</span>
|
|
<a name="l00249"></a>00249
|
|
<a name="l00250"></a>00250 <span class="comment"></span>
|
|
<a name="l00251"></a>00251 <span class="comment">/**</span>
|
|
<a name="l00252"></a>00252 <span class="comment"> * The maximum number of simultaneously listening TCP ports.</span>
|
|
<a name="l00253"></a>00253 <span class="comment"> *</span>
|
|
<a name="l00254"></a>00254 <span class="comment"> * Each listening TCP port requires 2 bytes of memory.</span>
|
|
<a name="l00255"></a>00255 <span class="comment"> *</span>
|
|
<a name="l00256"></a>00256 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00257"></a>00257 <span class="comment"> */</span>
|
|
<a name="l00258"></a>00258 <span class="preprocessor">#ifndef UIP_CONF_MAX_LISTENPORTS</span>
|
|
<a name="l00259"></a><a class="code" href="a00153.html#g8f4ebd8ef6c0ea665ed351d87fec09fd">00259</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_LISTENPORTS 20</span>
|
|
<a name="l00260"></a>00260 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_MAX_LISTENPORTS */</span>
|
|
<a name="l00261"></a>00261 <span class="preprocessor">#define UIP_LISTENPORTS UIP_CONF_MAX_LISTENPORTS</span>
|
|
<a name="l00262"></a>00262 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_MAX_LISTENPORTS */</span>
|
|
<a name="l00263"></a>00263 <span class="comment"></span>
|
|
<a name="l00264"></a>00264 <span class="comment">/**</span>
|
|
<a name="l00265"></a>00265 <span class="comment"> * Determines if support for TCP urgent data notification should be</span>
|
|
<a name="l00266"></a>00266 <span class="comment"> * compiled in.</span>
|
|
<a name="l00267"></a>00267 <span class="comment"> *</span>
|
|
<a name="l00268"></a>00268 <span class="comment"> * Urgent data (out-of-band data) is a rarely used TCP feature that</span>
|
|
<a name="l00269"></a>00269 <span class="comment"> * very seldom would be required.</span>
|
|
<a name="l00270"></a>00270 <span class="comment"> *</span>
|
|
<a name="l00271"></a>00271 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00272"></a>00272 <span class="comment"> */</span>
|
|
<a name="l00273"></a><a class="code" href="a00153.html#g51c1cd531ff0afb81620151f2248cd21">00273</a> <span class="preprocessor">#define UIP_URGDATA 0</span>
|
|
<a name="l00274"></a>00274 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00275"></a>00275 <span class="comment">/**</span>
|
|
<a name="l00276"></a>00276 <span class="comment"> * The initial retransmission timeout counted in timer pulses.</span>
|
|
<a name="l00277"></a>00277 <span class="comment"> *</span>
|
|
<a name="l00278"></a>00278 <span class="comment"> * This should not be changed.</span>
|
|
<a name="l00279"></a>00279 <span class="comment"> */</span>
|
|
<a name="l00280"></a><a class="code" href="a00153.html#g15de27b044603284f68db05a378235a7">00280</a> <span class="preprocessor">#define UIP_RTO 3</span>
|
|
<a name="l00281"></a>00281 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00282"></a>00282 <span class="comment">/**</span>
|
|
<a name="l00283"></a>00283 <span class="comment"> * The maximum number of times a segment should be retransmitted</span>
|
|
<a name="l00284"></a>00284 <span class="comment"> * before the connection should be aborted.</span>
|
|
<a name="l00285"></a>00285 <span class="comment"> *</span>
|
|
<a name="l00286"></a>00286 <span class="comment"> * This should not be changed.</span>
|
|
<a name="l00287"></a>00287 <span class="comment"> */</span>
|
|
<a name="l00288"></a><a class="code" href="a00153.html#g67cf1e0d2324c93f332c1f020c0fe8b3">00288</a> <span class="preprocessor">#define UIP_MAXRTX 8</span>
|
|
<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00290"></a>00290 <span class="comment">/**</span>
|
|
<a name="l00291"></a>00291 <span class="comment"> * The maximum number of times a SYN segment should be retransmitted</span>
|
|
<a name="l00292"></a>00292 <span class="comment"> * before a connection request should be deemed to have been</span>
|
|
<a name="l00293"></a>00293 <span class="comment"> * unsuccessful.</span>
|
|
<a name="l00294"></a>00294 <span class="comment"> *</span>
|
|
<a name="l00295"></a>00295 <span class="comment"> * This should not need to be changed.</span>
|
|
<a name="l00296"></a>00296 <span class="comment"> */</span>
|
|
<a name="l00297"></a><a class="code" href="a00153.html#g24aa5bc36939cc9a0833e1df01478a7e">00297</a> <span class="preprocessor">#define UIP_MAXSYNRTX 5</span>
|
|
<a name="l00298"></a>00298 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00299"></a>00299 <span class="comment">/**</span>
|
|
<a name="l00300"></a>00300 <span class="comment"> * The TCP maximum segment size.</span>
|
|
<a name="l00301"></a>00301 <span class="comment"> *</span>
|
|
<a name="l00302"></a>00302 <span class="comment"> * This is should not be to set to more than</span>
|
|
<a name="l00303"></a>00303 <span class="comment"> * UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN.</span>
|
|
<a name="l00304"></a>00304 <span class="comment"> */</span>
|
|
<a name="l00305"></a><a class="code" href="a00153.html#g4910467b83a639f06739c82cd362037e">00305</a> <span class="preprocessor">#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)</span>
|
|
<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00307"></a>00307 <span class="comment">/**</span>
|
|
<a name="l00308"></a>00308 <span class="comment"> * The size of the advertised receiver's window.</span>
|
|
<a name="l00309"></a>00309 <span class="comment"> *</span>
|
|
<a name="l00310"></a>00310 <span class="comment"> * Should be set low (i.e., to the size of the uip_buf buffer) is the</span>
|
|
<a name="l00311"></a>00311 <span class="comment"> * application is slow to process incoming data, or high (32768 bytes)</span>
|
|
<a name="l00312"></a>00312 <span class="comment"> * if the application processes data quickly.</span>
|
|
<a name="l00313"></a>00313 <span class="comment"> *</span>
|
|
<a name="l00314"></a>00314 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00315"></a>00315 <span class="comment"> */</span>
|
|
<a name="l00316"></a>00316 <span class="preprocessor">#ifndef UIP_CONF_RECEIVE_WINDOW</span>
|
|
<a name="l00317"></a><a class="code" href="a00153.html#g5b9dba2123705bce1ce95c3deca0bdad">00317</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_RECEIVE_WINDOW UIP_TCP_MSS</span>
|
|
<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
|
<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#define UIP_RECEIVE_WINDOW UIP_CONF_RECEIVE_WINDOW</span>
|
|
<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00322"></a>00322 <span class="comment">/**</span>
|
|
<a name="l00323"></a>00323 <span class="comment"> * How long a connection should stay in the TIME_WAIT state.</span>
|
|
<a name="l00324"></a>00324 <span class="comment"> *</span>
|
|
<a name="l00325"></a>00325 <span class="comment"> * This configiration option has no real implication, and it should be</span>
|
|
<a name="l00326"></a>00326 <span class="comment"> * left untouched.</span>
|
|
<a name="l00327"></a>00327 <span class="comment"> */</span>
|
|
<a name="l00328"></a><a class="code" href="a00153.html#g2bc3b489923793759526a3181eb667fa">00328</a> <span class="preprocessor">#define UIP_TIME_WAIT_TIMEOUT 120</span>
|
|
<a name="l00329"></a>00329 <span class="preprocessor"></span>
|
|
<a name="l00330"></a>00330 <span class="comment"></span>
|
|
<a name="l00331"></a>00331 <span class="comment">/** @} */</span>
|
|
<a name="l00332"></a>00332 <span class="comment">/*------------------------------------------------------------------------------*/</span><span class="comment"></span>
|
|
<a name="l00333"></a>00333 <span class="comment">/**</span>
|
|
<a name="l00334"></a>00334 <span class="comment"> * \name ARP configuration options</span>
|
|
<a name="l00335"></a>00335 <span class="comment"> * @{</span>
|
|
<a name="l00336"></a>00336 <span class="comment"> */</span>
|
|
<a name="l00337"></a>00337 <span class="comment"></span>
|
|
<a name="l00338"></a>00338 <span class="comment">/**</span>
|
|
<a name="l00339"></a>00339 <span class="comment"> * The size of the ARP table.</span>
|
|
<a name="l00340"></a>00340 <span class="comment"> *</span>
|
|
<a name="l00341"></a>00341 <span class="comment"> * This option should be set to a larger value if this uIP node will</span>
|
|
<a name="l00342"></a>00342 <span class="comment"> * have many connections from the local network.</span>
|
|
<a name="l00343"></a>00343 <span class="comment"> *</span>
|
|
<a name="l00344"></a>00344 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00345"></a>00345 <span class="comment"> */</span>
|
|
<a name="l00346"></a>00346 <span class="preprocessor">#ifdef UIP_CONF_ARPTAB_SIZE</span>
|
|
<a name="l00347"></a>00347 <span class="preprocessor"></span><span class="preprocessor">#define UIP_ARPTAB_SIZE UIP_CONF_ARPTAB_SIZE</span>
|
|
<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#else</span>
|
|
<a name="l00349"></a><a class="code" href="a00153.html#gb1455b27c06532a399cf06d2c1d6d08d">00349</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_ARPTAB_SIZE 8</span>
|
|
<a name="l00350"></a>00350 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00351"></a>00351 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00352"></a>00352 <span class="comment">/**</span>
|
|
<a name="l00353"></a>00353 <span class="comment"> * The maxium age of ARP table entries measured in 10ths of seconds.</span>
|
|
<a name="l00354"></a>00354 <span class="comment"> *</span>
|
|
<a name="l00355"></a>00355 <span class="comment"> * An UIP_ARP_MAXAGE of 120 corresponds to 20 minutes (BSD</span>
|
|
<a name="l00356"></a>00356 <span class="comment"> * default).</span>
|
|
<a name="l00357"></a>00357 <span class="comment"> */</span>
|
|
<a name="l00358"></a><a class="code" href="a00153.html#g3090117ef3ff5775b77cb1960e442d07">00358</a> <span class="preprocessor">#define UIP_ARP_MAXAGE 120</span>
|
|
<a name="l00359"></a>00359 <span class="preprocessor"></span><span class="comment"></span>
|
|
<a name="l00360"></a>00360 <span class="comment">/** @} */</span>
|
|
<a name="l00361"></a>00361
|
|
<a name="l00362"></a>00362 <span class="comment">/*------------------------------------------------------------------------------*/</span>
|
|
<a name="l00363"></a>00363 <span class="comment"></span>
|
|
<a name="l00364"></a>00364 <span class="comment">/**</span>
|
|
<a name="l00365"></a>00365 <span class="comment"> * \name General configuration options</span>
|
|
<a name="l00366"></a>00366 <span class="comment"> * @{</span>
|
|
<a name="l00367"></a>00367 <span class="comment"> */</span>
|
|
<a name="l00368"></a>00368 <span class="comment"></span>
|
|
<a name="l00369"></a>00369 <span class="comment">/**</span>
|
|
<a name="l00370"></a>00370 <span class="comment"> * The size of the uIP packet buffer.</span>
|
|
<a name="l00371"></a>00371 <span class="comment"> *</span>
|
|
<a name="l00372"></a>00372 <span class="comment"> * The uIP packet buffer should not be smaller than 60 bytes, and does</span>
|
|
<a name="l00373"></a>00373 <span class="comment"> * not need to be larger than 1500 bytes. Lower size results in lower</span>
|
|
<a name="l00374"></a>00374 <span class="comment"> * TCP throughput, larger size results in higher TCP throughput.</span>
|
|
<a name="l00375"></a>00375 <span class="comment"> *</span>
|
|
<a name="l00376"></a>00376 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00377"></a>00377 <span class="comment"> */</span>
|
|
<a name="l00378"></a>00378 <span class="preprocessor">#ifndef UIP_CONF_BUFFER_SIZE</span>
|
|
<a name="l00379"></a><a class="code" href="a00153.html#g3589822ecb9d9c4145209756396b8a6b">00379</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_BUFSIZE 400</span>
|
|
<a name="l00380"></a>00380 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_BUFFER_SIZE */</span>
|
|
<a name="l00381"></a>00381 <span class="preprocessor">#define UIP_BUFSIZE UIP_CONF_BUFFER_SIZE</span>
|
|
<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_BUFFER_SIZE */</span>
|
|
<a name="l00383"></a>00383
|
|
<a name="l00384"></a>00384 <span class="comment"></span>
|
|
<a name="l00385"></a>00385 <span class="comment">/**</span>
|
|
<a name="l00386"></a>00386 <span class="comment"> * Determines if statistics support should be compiled in.</span>
|
|
<a name="l00387"></a>00387 <span class="comment"> *</span>
|
|
<a name="l00388"></a>00388 <span class="comment"> * The statistics is useful for debugging and to show the user.</span>
|
|
<a name="l00389"></a>00389 <span class="comment"> *</span>
|
|
<a name="l00390"></a>00390 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00391"></a>00391 <span class="comment"> */</span>
|
|
<a name="l00392"></a>00392 <span class="preprocessor">#ifndef UIP_CONF_STATISTICS</span>
|
|
<a name="l00393"></a><a class="code" href="a00153.html#g5726142fec34f35fb9ea19e5a45975c6">00393</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_STATISTICS 0</span>
|
|
<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_STATISTICS */</span>
|
|
<a name="l00395"></a>00395 <span class="preprocessor">#define UIP_STATISTICS UIP_CONF_STATISTICS</span>
|
|
<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_STATISTICS */</span>
|
|
<a name="l00397"></a>00397 <span class="comment"></span>
|
|
<a name="l00398"></a>00398 <span class="comment">/**</span>
|
|
<a name="l00399"></a>00399 <span class="comment"> * Determines if logging of certain events should be compiled in.</span>
|
|
<a name="l00400"></a>00400 <span class="comment"> *</span>
|
|
<a name="l00401"></a>00401 <span class="comment"> * This is useful mostly for debugging. The function uip_log()</span>
|
|
<a name="l00402"></a>00402 <span class="comment"> * must be implemented to suit the architecture of the project, if</span>
|
|
<a name="l00403"></a>00403 <span class="comment"> * logging is turned on.</span>
|
|
<a name="l00404"></a>00404 <span class="comment"> *</span>
|
|
<a name="l00405"></a>00405 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00406"></a>00406 <span class="comment"> */</span>
|
|
<a name="l00407"></a>00407 <span class="preprocessor">#ifndef UIP_CONF_LOGGING</span>
|
|
<a name="l00408"></a><a class="code" href="a00153.html#g21664b7441cfa37d280228d23316d609">00408</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_LOGGING 0</span>
|
|
<a name="l00409"></a>00409 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_LOGGING */</span>
|
|
<a name="l00410"></a>00410 <span class="preprocessor">#define UIP_LOGGING UIP_CONF_LOGGING</span>
|
|
<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_LOGGING */</span>
|
|
<a name="l00412"></a>00412 <span class="comment"></span>
|
|
<a name="l00413"></a>00413 <span class="comment">/**</span>
|
|
<a name="l00414"></a>00414 <span class="comment"> * Broadcast support.</span>
|
|
<a name="l00415"></a>00415 <span class="comment"> *</span>
|
|
<a name="l00416"></a>00416 <span class="comment"> * This flag configures IP broadcast support. This is useful only</span>
|
|
<a name="l00417"></a>00417 <span class="comment"> * together with UDP.</span>
|
|
<a name="l00418"></a>00418 <span class="comment"> *</span>
|
|
<a name="l00419"></a>00419 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00420"></a>00420 <span class="comment"> *</span>
|
|
<a name="l00421"></a>00421 <span class="comment"> */</span>
|
|
<a name="l00422"></a>00422 <span class="preprocessor">#ifndef UIP_CONF_BROADCAST</span>
|
|
<a name="l00423"></a><a class="code" href="a00153.html#g156dd2891a57035e4afdc4c2bc0b0ebf">00423</a> <span class="preprocessor"></span><span class="preprocessor">#define UIP_BROADCAST 0</span>
|
|
<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_BROADCAST */</span>
|
|
<a name="l00425"></a>00425 <span class="preprocessor">#define UIP_BROADCAST UIP_CONF_BROADCAST</span>
|
|
<a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_BROADCAST */</span>
|
|
<a name="l00427"></a>00427 <span class="comment"></span>
|
|
<a name="l00428"></a>00428 <span class="comment">/**</span>
|
|
<a name="l00429"></a>00429 <span class="comment"> * Print out a uIP log message.</span>
|
|
<a name="l00430"></a>00430 <span class="comment"> *</span>
|
|
<a name="l00431"></a>00431 <span class="comment"> * This function must be implemented by the module that uses uIP, and</span>
|
|
<a name="l00432"></a>00432 <span class="comment"> * is called by uIP whenever a log message is generated.</span>
|
|
<a name="l00433"></a>00433 <span class="comment"> */</span>
|
|
<a name="l00434"></a>00434 <span class="keywordtype">void</span> <a class="code" href="a00153.html#gb58e1ceb7cb73ca2bcd73146b6c1b4e7">uip_log</a>(<span class="keywordtype">char</span> *msg);
|
|
<a name="l00435"></a>00435 <span class="comment"></span>
|
|
<a name="l00436"></a>00436 <span class="comment">/**</span>
|
|
<a name="l00437"></a>00437 <span class="comment"> * The link level header length.</span>
|
|
<a name="l00438"></a>00438 <span class="comment"> *</span>
|
|
<a name="l00439"></a>00439 <span class="comment"> * This is the offset into the uip_buf where the IP header can be</span>
|
|
<a name="l00440"></a>00440 <span class="comment"> * found. For Ethernet, this should be set to 14. For SLIP, this</span>
|
|
<a name="l00441"></a>00441 <span class="comment"> * should be set to 0.</span>
|
|
<a name="l00442"></a>00442 <span class="comment"> *</span>
|
|
<a name="l00443"></a>00443 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00444"></a>00444 <span class="comment"> */</span>
|
|
<a name="l00445"></a>00445 <span class="preprocessor">#ifdef UIP_CONF_LLH_LEN</span>
|
|
<a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#define UIP_LLH_LEN UIP_CONF_LLH_LEN</span>
|
|
<a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_LLH_LEN */</span>
|
|
<a name="l00448"></a><a class="code" href="a00153.html#ge6f4a2453dbd8bc60e6a82774552366a">00448</a> <span class="preprocessor">#define UIP_LLH_LEN 14</span>
|
|
<a name="l00449"></a>00449 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_LLH_LEN */</span>
|
|
<a name="l00450"></a>00450 <span class="comment"></span>
|
|
<a name="l00451"></a>00451 <span class="comment">/** @} */</span>
|
|
<a name="l00452"></a>00452 <span class="comment">/*------------------------------------------------------------------------------*/</span><span class="comment"></span>
|
|
<a name="l00453"></a>00453 <span class="comment">/**</span>
|
|
<a name="l00454"></a>00454 <span class="comment"> * \name CPU architecture configuration</span>
|
|
<a name="l00455"></a>00455 <span class="comment"> * @{</span>
|
|
<a name="l00456"></a>00456 <span class="comment"> *</span>
|
|
<a name="l00457"></a>00457 <span class="comment"> * The CPU architecture configuration is where the endianess of the</span>
|
|
<a name="l00458"></a>00458 <span class="comment"> * CPU on which uIP is to be run is specified. Most CPUs today are</span>
|
|
<a name="l00459"></a>00459 <span class="comment"> * little endian, and the most notable exception are the Motorolas</span>
|
|
<a name="l00460"></a>00460 <span class="comment"> * which are big endian. The BYTE_ORDER macro should be changed to</span>
|
|
<a name="l00461"></a>00461 <span class="comment"> * reflect the CPU architecture on which uIP is to be run.</span>
|
|
<a name="l00462"></a>00462 <span class="comment"> */</span>
|
|
<a name="l00463"></a>00463 <span class="comment"></span>
|
|
<a name="l00464"></a>00464 <span class="comment">/**</span>
|
|
<a name="l00465"></a>00465 <span class="comment"> * The byte order of the CPU architecture on which uIP is to be run.</span>
|
|
<a name="l00466"></a>00466 <span class="comment"> *</span>
|
|
<a name="l00467"></a>00467 <span class="comment"> * This option can be either BIG_ENDIAN (Motorola byte order) or</span>
|
|
<a name="l00468"></a>00468 <span class="comment"> * LITTLE_ENDIAN (Intel byte order).</span>
|
|
<a name="l00469"></a>00469 <span class="comment"> *</span>
|
|
<a name="l00470"></a>00470 <span class="comment"> * \hideinitializer</span>
|
|
<a name="l00471"></a>00471 <span class="comment"> */</span>
|
|
<a name="l00472"></a>00472 <span class="preprocessor">#ifdef UIP_CONF_BYTE_ORDER</span>
|
|
<a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define UIP_BYTE_ORDER UIP_CONF_BYTE_ORDER</span>
|
|
<a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* UIP_CONF_BYTE_ORDER */</span>
|
|
<a name="l00475"></a><a class="code" href="a00153.html#g285a80366aed9428f64282b8d13c918b">00475</a> <span class="preprocessor">#define UIP_BYTE_ORDER UIP_LITTLE_ENDIAN</span>
|
|
<a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* UIP_CONF_BYTE_ORDER */</span>
|
|
<a name="l00477"></a>00477 <span class="comment"></span>
|
|
<a name="l00478"></a>00478 <span class="comment">/** @} */</span>
|
|
<a name="l00479"></a>00479 <span class="comment">/*------------------------------------------------------------------------------*/</span>
|
|
<a name="l00480"></a>00480 <span class="comment"></span>
|
|
<a name="l00481"></a>00481 <span class="comment">/**</span>
|
|
<a name="l00482"></a>00482 <span class="comment"> * \name Appication specific configurations</span>
|
|
<a name="l00483"></a>00483 <span class="comment"> * @{</span>
|
|
<a name="l00484"></a>00484 <span class="comment"> *</span>
|
|
<a name="l00485"></a>00485 <span class="comment"> * An uIP application is implemented using a single application</span>
|
|
<a name="l00486"></a>00486 <span class="comment"> * function that is called by uIP whenever a TCP/IP event occurs. The</span>
|
|
<a name="l00487"></a>00487 <span class="comment"> * name of this function must be registered with uIP at compile time</span>
|
|
<a name="l00488"></a>00488 <span class="comment"> * using the UIP_APPCALL definition.</span>
|
|
<a name="l00489"></a>00489 <span class="comment"> *</span>
|
|
<a name="l00490"></a>00490 <span class="comment"> * uIP applications can store the application state within the</span>
|
|
<a name="l00491"></a>00491 <span class="comment"> * uip_conn structure by specifying the type of the application</span>
|
|
<a name="l00492"></a>00492 <span class="comment"> * structure by typedef:ing the type uip_tcp_appstate_t and uip_udp_appstate_t.</span>
|
|
<a name="l00493"></a>00493 <span class="comment"> *</span>
|
|
<a name="l00494"></a>00494 <span class="comment"> * The file containing the definitions must be included in the</span>
|
|
<a name="l00495"></a>00495 <span class="comment"> * uipopt.h file.</span>
|
|
<a name="l00496"></a>00496 <span class="comment"> *</span>
|
|
<a name="l00497"></a>00497 <span class="comment"> * The following example illustrates how this can look.</span>
|
|
<a name="l00498"></a>00498 <span class="comment"> \code</span>
|
|
<a name="l00499"></a>00499 <span class="comment"></span>
|
|
<a name="l00500"></a>00500 <span class="comment">void httpd_appcall(void);</span>
|
|
<a name="l00501"></a>00501 <span class="comment">#define UIP_APPCALL httpd_appcall</span>
|
|
<a name="l00502"></a>00502 <span class="comment"></span>
|
|
<a name="l00503"></a>00503 <span class="comment">struct httpd_state {</span>
|
|
<a name="l00504"></a>00504 <span class="comment"> u8_t state;</span>
|
|
<a name="l00505"></a>00505 <span class="comment"> u16_t count;</span>
|
|
<a name="l00506"></a>00506 <span class="comment"> char *dataptr;</span>
|
|
<a name="l00507"></a>00507 <span class="comment"> char *script;</span>
|
|
<a name="l00508"></a>00508 <span class="comment">};</span>
|
|
<a name="l00509"></a>00509 <span class="comment">typedef struct httpd_state uip_tcp_appstate_t</span>
|
|
<a name="l00510"></a>00510 <span class="comment"> \endcode</span>
|
|
<a name="l00511"></a>00511 <span class="comment"> */</span>
|
|
<a name="l00512"></a>00512 <span class="comment"></span>
|
|
<a name="l00513"></a>00513 <span class="comment">/**</span>
|
|
<a name="l00514"></a>00514 <span class="comment"> * \var #define UIP_APPCALL</span>
|
|
<a name="l00515"></a>00515 <span class="comment"> *</span>
|
|
<a name="l00516"></a>00516 <span class="comment"> * The name of the application function that uIP should call in</span>
|
|
<a name="l00517"></a>00517 <span class="comment"> * response to TCP/IP events.</span>
|
|
<a name="l00518"></a>00518 <span class="comment"> *</span>
|
|
<a name="l00519"></a>00519 <span class="comment"> */</span>
|
|
<a name="l00520"></a>00520 <span class="comment"></span>
|
|
<a name="l00521"></a>00521 <span class="comment">/**</span>
|
|
<a name="l00522"></a>00522 <span class="comment"> * \var typedef uip_tcp_appstate_t</span>
|
|
<a name="l00523"></a>00523 <span class="comment"> *</span>
|
|
<a name="l00524"></a>00524 <span class="comment"> * The type of the application state that is to be stored in the</span>
|
|
<a name="l00525"></a>00525 <span class="comment"> * uip_conn structure. This usually is typedef:ed to a struct holding</span>
|
|
<a name="l00526"></a>00526 <span class="comment"> * application state information.</span>
|
|
<a name="l00527"></a>00527 <span class="comment"> */</span>
|
|
<a name="l00528"></a>00528 <span class="comment"></span>
|
|
<a name="l00529"></a>00529 <span class="comment">/**</span>
|
|
<a name="l00530"></a>00530 <span class="comment"> * \var typedef uip_udp_appstate_t</span>
|
|
<a name="l00531"></a>00531 <span class="comment"> *</span>
|
|
<a name="l00532"></a>00532 <span class="comment"> * The type of the application state that is to be stored in the</span>
|
|
<a name="l00533"></a>00533 <span class="comment"> * uip_conn structure. This usually is typedef:ed to a struct holding</span>
|
|
<a name="l00534"></a>00534 <span class="comment"> * application state information.</span>
|
|
<a name="l00535"></a>00535 <span class="comment"> */</span><span class="comment"></span>
|
|
<a name="l00536"></a>00536 <span class="comment">/** @} */</span><span class="comment"></span>
|
|
<a name="l00537"></a>00537 <span class="comment">/** @} */</span>
|
|
<a name="l00538"></a>00538
|
|
<a name="l00539"></a>00539 <span class="preprocessor">#endif </span><span class="comment">/* __UIPOPT_H__ */</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:01 2006 for uIP 1.0 by
|
|
<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>
|