Newer
Older
ubixos / doc / doxygen / html / lwipopts_8h-source.html
@reddawg reddawg on 18 Jun 2004 13 KB UbixOS PreRelease
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ubixos: lwipopts.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<h1>lwipopts.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment"> * Copyright (c) 2001, Swedish Institute of Computer Science.</span>
00003 <span class="comment"> * All rights reserved. </span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * Redistribution and use in source and binary forms, with or without </span>
00006 <span class="comment"> * modification, are permitted provided that the following conditions </span>
00007 <span class="comment"> * are met: </span>
00008 <span class="comment"> * 1. Redistributions of source code must retain the above copyright </span>
00009 <span class="comment"> *    notice, this list of conditions and the following disclaimer. </span>
00010 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright </span>
00011 <span class="comment"> *    notice, this list of conditions and the following disclaimer in the </span>
00012 <span class="comment"> *    documentation and/or other materials provided with the distribution. </span>
00013 <span class="comment"> * 3. Neither the name of the Institute nor the names of its contributors </span>
00014 <span class="comment"> *    may be used to endorse or promote products derived from this software </span>
00015 <span class="comment"> *    without specific prior written permission. </span>
00016 <span class="comment"> *</span>
00017 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND </span>
00018 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE </span>
00019 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE </span>
00020 <span class="comment"> * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE </span>
00021 <span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL </span>
00022 <span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS </span>
00023 <span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) </span>
00024 <span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT </span>
00025 <span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY </span>
00026 <span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF </span>
00027 <span class="comment"> * SUCH DAMAGE. </span>
00028 <span class="comment"> *</span>
00029 <span class="comment"> * This file is part of the lwIP TCP/IP stack.</span>
00030 <span class="comment"> * </span>
00031 <span class="comment"> * Author: Adam Dunkels &lt;adam@sics.se&gt;</span>
00032 <span class="comment"> *</span>
00033 <span class="comment"> * $Id$</span>
00034 <span class="comment"> */</span>
00035 <span class="preprocessor">#ifndef __LWIPOPTS_H__</span>
00036 <span class="preprocessor"></span><span class="preprocessor">#define __LWIPOPTS_H__</span>
00037 <span class="preprocessor"></span>
00038 <span class="comment">/* ---------- Memory options ---------- */</span>
00039 <span class="comment">/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which</span>
00040 <span class="comment">   lwIP is compiled. 4 byte alignment -&gt; define MEM_ALIGNMENT to 4, 2</span>
00041 <span class="comment">   byte alignment -&gt; define MEM_ALIGNMENT to 2. */</span>
00042 <span class="preprocessor">#define MEM_ALIGNMENT           2</span>
00043 <span class="preprocessor"></span>
00044 <span class="comment">/* MEM_SIZE: the size of the heap memory. If the application will send</span>
00045 <span class="comment">a lot of data that needs to be copied, this should be set high. */</span>
00046 <span class="preprocessor">#define MEM_SIZE                1000</span>
00047 <span class="preprocessor"></span>
00048 <span class="comment">/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application</span>
00049 <span class="comment">   sends a lot of data out of ROM (or other static memory), this</span>
00050 <span class="comment">   should be set high. */</span>
00051 <span class="preprocessor">#define MEMP_NUM_PBUF           8</span>
00052 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One</span>
00053 <span class="comment">   per active UDP "connection". */</span>
00054 <span class="preprocessor">#define MEMP_NUM_UDP_PCB        4</span>
00055 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP</span>
00056 <span class="comment">   connections. */</span>
00057 <span class="preprocessor">#define MEMP_NUM_TCP_PCB        5</span>
00058 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP</span>
00059 <span class="comment">   connections. */</span>
00060 <span class="preprocessor">#define MEMP_NUM_TCP_PCB_LISTEN 8</span>
00061 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP</span>
00062 <span class="comment">   segments. */</span>
00063 <span class="preprocessor">#define MEMP_NUM_TCP_SEG        8</span>
00064 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active</span>
00065 <span class="comment">   timeouts. */</span>
00066 <span class="preprocessor">#define MEMP_NUM_SYS_TIMEOUT    3</span>
00067 <span class="preprocessor"></span>
00068 
00069 <span class="comment">/* The following four are used only with the sequential API and can be</span>
00070 <span class="comment">   set to 0 if the application only will use the raw API. */</span>
00071 <span class="comment">/* MEMP_NUM_NETBUF: the number of struct netbufs. */</span>
00072 <span class="preprocessor">#define MEMP_NUM_NETBUF         2</span>
00073 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_NETCONN: the number of struct netconns. */</span>
00074 <span class="preprocessor">#define MEMP_NUM_NETCONN        4</span>
00075 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_APIMSG: the number of struct api_msg, used for</span>
00076 <span class="comment">   communication between the TCP/IP stack and the sequential</span>
00077 <span class="comment">   programs. */</span>
00078 <span class="preprocessor">#define MEMP_NUM_API_MSG        8</span>
00079 <span class="preprocessor"></span><span class="comment">/* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used</span>
00080 <span class="comment">   for sequential API communication and incoming packets. Used in</span>
00081 <span class="comment">   src/api/tcpip.c. */</span>
00082 <span class="preprocessor">#define MEMP_NUM_TCPIP_MSG      8</span>
00083 <span class="preprocessor"></span>
00084 <span class="comment">/* These two control is reclaimer functions should be compiled</span>
00085 <span class="comment">   in. Should always be turned on (1). */</span>
00086 <span class="preprocessor">#define MEM_RECLAIM             1</span>
00087 <span class="preprocessor"></span><span class="preprocessor">#define MEMP_RECLAIM            1</span>
00088 <span class="preprocessor"></span>
00089 <span class="comment">/* ---------- Pbuf options ---------- */</span>
00090 <span class="comment">/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */</span>
00091 <span class="preprocessor">#define PBUF_POOL_SIZE          6</span>
00092 <span class="preprocessor"></span>
00093 <span class="comment">/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */</span>
00094 <span class="preprocessor">#define PBUF_POOL_BUFSIZE       128</span>
00095 <span class="preprocessor"></span>
00096 <span class="comment">/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a</span>
00097 <span class="comment">   link level header. */</span>
00098 <span class="preprocessor">#define PBUF_LINK_HLEN          16</span>
00099 <span class="preprocessor"></span>
00100 <span class="comment">/* ---------- TCP options ---------- */</span>
00101 <span class="preprocessor">#define LWIP_TCP                1</span>
00102 <span class="preprocessor"></span><span class="preprocessor">#define TCP_TTL                 255</span>
00103 <span class="preprocessor"></span>
00104 <span class="comment">/* Controls if TCP should queue segments that arrive out of</span>
00105 <span class="comment">   order. Define to 0 if your device is low on memory. */</span>
00106 <span class="preprocessor">#define TCP_QUEUE_OOSEQ         1</span>
00107 <span class="preprocessor"></span>
00108 <span class="comment">/* TCP Maximum segment size. */</span>
00109 <span class="preprocessor">#define TCP_MSS                 128</span>
00110 <span class="preprocessor"></span>
00111 <span class="comment">/* TCP sender buffer space (bytes). */</span>
00112 <span class="preprocessor">#define TCP_SND_BUF             256</span>
00113 <span class="preprocessor"></span>
00114 <span class="comment">/* TCP sender buffer space (pbufs). This must be at least = 2 *</span>
00115 <span class="comment">   TCP_SND_BUF/TCP_MSS for things to work. */</span>
00116 <span class="preprocessor">#define TCP_SND_QUEUELEN        4 * TCP_SND_BUF/TCP_MSS</span>
00117 <span class="preprocessor"></span>
00118 <span class="comment">/* TCP receive window. */</span>
00119 <span class="preprocessor">#define TCP_WND                 1024</span>
00120 <span class="preprocessor"></span>
00121 <span class="comment">/* Maximum number of retransmissions of data segments. */</span>
00122 <span class="preprocessor">#define TCP_MAXRTX              12</span>
00123 <span class="preprocessor"></span>
00124 <span class="comment">/* Maximum number of retransmissions of SYN segments. */</span>
00125 <span class="preprocessor">#define TCP_SYNMAXRTX           4</span>
00126 <span class="preprocessor"></span>
00127 <span class="comment">/* ---------- ARP options ---------- */</span>
00128 <span class="preprocessor">#define ARP_TABLE_SIZE 10</span>
00129 <span class="preprocessor"></span>
00130 <span class="comment">/* ---------- IP options ---------- */</span>
00131 <span class="comment">/* Define IP_FORWARD to 1 if you wish to have the ability to forward</span>
00132 <span class="comment">   IP packets across network interfaces. If you are going to run lwIP</span>
00133 <span class="comment">   on a device with only one network interface, define this to 0. */</span>
00134 <span class="preprocessor">#define IP_FORWARD              1</span>
00135 <span class="preprocessor"></span>
00136 <span class="comment">/* If defined to 1, IP options are allowed (but not parsed). If</span>
00137 <span class="comment">   defined to 0, all packets with IP options are dropped. */</span>
00138 <span class="preprocessor">#define IP_OPTIONS              1</span>
00139 <span class="preprocessor"></span>
00140 <span class="comment">/* ---------- ICMP options ---------- */</span>
00141 <span class="preprocessor">#define ICMP_TTL                255</span>
00142 <span class="preprocessor"></span>
00143 
00144 <span class="comment">/* ---------- DHCP options ---------- */</span>
00145 <span class="comment">/* Define LWIP_DHCP to 1 if you want DHCP configuration of</span>
00146 <span class="comment">   interfaces. DHCP is not implemented in lwIP 0.5.1, however, so</span>
00147 <span class="comment">   turning this on does currently not work. */</span>
00148 <span class="preprocessor">#define LWIP_DHCP               0</span>
00149 <span class="preprocessor"></span>
00150 <span class="comment">/* 1 if you want to do an ARP check on the offered address</span>
00151 <span class="comment">   (recommended). */</span>
00152 <span class="preprocessor">#define DHCP_DOES_ARP_CHECK     1</span>
00153 <span class="preprocessor"></span>
00154 <span class="comment">/* ---------- UDP options ---------- */</span>
00155 <span class="preprocessor">#define LWIP_UDP                1</span>
00156 <span class="preprocessor"></span><span class="preprocessor">#define UDP_TTL                 255</span>
00157 <span class="preprocessor"></span>
00158 
00159 <span class="comment">/* ---------- Statistics options ---------- */</span>
00160 <span class="preprocessor">#define STATS</span>
00161 <span class="preprocessor"></span>
00162 <span class="preprocessor">#ifdef STATS</span>
00163 <span class="preprocessor"></span><span class="preprocessor">#define LINK_STATS</span>
00164 <span class="preprocessor"></span><span class="preprocessor">#define IP_STATS</span>
00165 <span class="preprocessor"></span><span class="preprocessor">#define ICMP_STATS</span>
00166 <span class="preprocessor"></span><span class="preprocessor">#define UDP_STATS</span>
00167 <span class="preprocessor"></span><span class="preprocessor">#define TCP_STATS</span>
00168 <span class="preprocessor"></span><span class="preprocessor">#define MEM_STATS</span>
00169 <span class="preprocessor"></span><span class="preprocessor">#define MEMP_STATS</span>
00170 <span class="preprocessor"></span><span class="preprocessor">#define PBUF_STATS</span>
00171 <span class="preprocessor"></span><span class="preprocessor">#define SYS_STATS</span>
00172 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* STATS */</span>
00173 
00174 <span class="preprocessor">#endif </span><span class="comment">/* __LWIPOPTS_H__ */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 28 17:49:37 2004 for Ubixos by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>