]> git.sur5r.net Git - freertos/blob - Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemoSource/lwIP/lwIP_Apps/lwipopts.h
Remove unnecessary files from the MicroBlaze http server file system creation directory.
[freertos] / Demo / MicroBlaze_Spartan-6_EthernetLite / SDKProjects / RTOSDemoSource / lwIP / lwIP_Apps / lwipopts.h
1 /*
2  * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3  * All rights reserved. 
4  * 
5  * Redistribution and use in source and binary forms, with or without modification, 
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  *    this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  *    this list of conditions and the following disclaimer in the documentation
12  *    and/or other materials provided with the distribution.
13  * 3. The name of the author may not be used to endorse or promote products
14  *    derived from this software without specific prior written permission. 
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
19  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
20  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
21  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
24  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
25  * OF SUCH DAMAGE.
26  *
27  * This file is part of the lwIP TCP/IP stack.
28  * 
29  * Author: Adam Dunkels <adam@sics.se>
30  *
31  */
32 #ifndef __LWIPOPTS_H__
33 #define __LWIPOPTS_H__
34
35 /* SSI options. */
36 #define TCPIP_THREAD_NAME              "tcpip"
37 #define LWIP_HTTPD_MAX_TAG_NAME_LEN 20
38 #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 1024
39 #define TCPIP_THREAD_PRIO configLWIP_TASK_PRIORITY
40 #define TCPIP_THREAD_STACKSIZE configMINIMAL_STACK_SIZE * 3
41
42 #define NO_SYS                     0
43 #define LWIP_SOCKET               (NO_SYS==0)
44 #define LWIP_NETCONN              (NO_SYS==0)
45
46 #define LWIP_IGMP                  1
47 #define LWIP_ICMP                  1
48 #define LWIP_SNMP                  1
49
50 #define LWIP_DNS                   1
51
52 #define LWIP_HAVE_LOOPIF           1
53 #define LWIP_NETIF_LOOPBACK        1
54 #define LWIP_LOOPBACK_MAX_PBUFS    10
55
56 #define TCP_LISTEN_BACKLOG         0
57
58 #define LWIP_COMPAT_SOCKETS        1
59 #define LWIP_SO_RCVTIMEO           1
60 #define LWIP_SO_RCVBUF             1
61
62 #define LWIP_TCPIP_CORE_LOCKING    0
63
64 #define LWIP_NETIF_LINK_CALLBACK   0
65 #define LWIP_NETIF_STATUS_CALLBACK 0
66
67
68 #ifdef LWIP_DEBUG
69
70 #define LWIP_DBG_MIN_LEVEL         0
71 #define PPP_DEBUG                  LWIP_DBG_OFF
72 #define MEM_DEBUG                  LWIP_DBG_OFF
73 #define MEMP_DEBUG                 LWIP_DBG_OFF
74 #define PBUF_DEBUG                 LWIP_DBG_OFF
75 #define API_LIB_DEBUG              LWIP_DBG_ON
76 #define API_MSG_DEBUG              LWIP_DBG_ON
77 #define TCPIP_DEBUG                LWIP_DBG_ON
78 #define NETIF_DEBUG                LWIP_DBG_ON
79 #define SOCKETS_DEBUG              LWIP_DBG_OFF
80 #define DNS_DEBUG                  LWIP_DBG_OFF
81 #define AUTOIP_DEBUG               LWIP_DBG_OFF
82 #define DHCP_DEBUG                 LWIP_DBG_OFF
83 #define IP_DEBUG                   LWIP_DBG_O
84 #define IP_REASS_DEBUG             LWIP_DBG_ON
85 #define ICMP_DEBUG                 LWIP_DBG_OFF
86 #define IGMP_DEBUG                 LWIP_DBG_OFF
87 #define UDP_DEBUG                  LWIP_DBG_OFF
88 #define TCP_DEBUG                  LWIP_DBG_ON
89 #define TCP_INPUT_DEBUG            LWIP_DBG_ON
90 #define TCP_OUTPUT_DEBUG           LWIP_DBG_ON
91 #define TCP_RTO_DEBUG              LWIP_DBG_ON
92 #define TCP_CWND_DEBUG             LWIP_DBG_ON
93 #define TCP_WND_DEBUG              LWIP_DBG_ON
94 #define TCP_FR_DEBUG               LWIP_DBG_ON
95 #define TCP_QLEN_DEBUG             LWIP_DBG_ON
96 #define TCP_RST_DEBUG              LWIP_DBG_ON
97 #endif
98
99 #define LWIP_DBG_TYPES_ON         (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
100
101 #define TCPIP_MBOX_SIZE             10
102
103 /* ---------- Memory options ---------- */
104 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
105    lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
106    byte alignment -> define MEM_ALIGNMENT to 2. */
107 /* MSVC port: intel processors don't need 4-byte alignment,
108    but are faster that way! */
109 #define MEM_ALIGNMENT           4
110
111 /* MEM_SIZE: the size of the heap memory. If the application will send
112 a lot of data that needs to be copied, this should be set high. */
113 #define MEM_SIZE               10240
114
115 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
116    sends a lot of data out of ROM (or other static memory), this
117    should be set high. */
118 #define MEMP_NUM_PBUF           16
119 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
120    per active RAW "connection". */
121 #define MEMP_NUM_RAW_PCB        3
122 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
123    per active UDP "connection". */
124 #define MEMP_NUM_UDP_PCB        4
125 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
126    connections. */
127 #define MEMP_NUM_TCP_PCB        5
128 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
129    connections. */
130 #define MEMP_NUM_TCP_PCB_LISTEN 8
131 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
132    segments. */
133 #define MEMP_NUM_TCP_SEG        16
134 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
135    timeouts. */
136 #define MEMP_NUM_SYS_TIMEOUT    15
137
138 /* The following four are used only with the sequential API and can be
139    set to 0 if the application only will use the raw API. */
140 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
141 #define MEMP_NUM_NETBUF         2
142 /* MEMP_NUM_NETCONN: the number of struct netconns. */
143 #define MEMP_NUM_NETCONN        10
144 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
145    for sequential API communication and incoming packets. Used in
146    src/api/tcpip.c. */
147 #define MEMP_NUM_TCPIP_MSG_API   16
148 #define MEMP_NUM_TCPIP_MSG_INPKT 16
149
150
151 /* ---------- Pbuf options ---------- */
152 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
153 #define PBUF_POOL_SIZE          100
154
155 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
156 #define PBUF_POOL_BUFSIZE       128
157
158 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
159    link level header. */
160 #define PBUF_LINK_HLEN          16
161
162 /** SYS_LIGHTWEIGHT_PROT
163  * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
164  * for certain critical regions during buffer allocation, deallocation and memory
165  * allocation and deallocation.
166  */
167 #define SYS_LIGHTWEIGHT_PROT    (NO_SYS==0)
168
169
170 /* ---------- TCP options ---------- */
171 #define LWIP_TCP                1
172 #define TCP_TTL                 255
173
174 /* Controls if TCP should queue segments that arrive out of
175    order. Define to 0 if your device is low on memory. */
176 #define TCP_QUEUE_OOSEQ         1
177
178 /* TCP Maximum segment size. */
179 #define TCP_MSS                 1024
180
181 /* TCP sender buffer space (bytes). */
182 #define TCP_SND_BUF             2048
183
184 /* TCP sender buffer space (pbufs). This must be at least = 2 *
185    TCP_SND_BUF/TCP_MSS for things to work. */
186 #define TCP_SND_QUEUELEN       (4 * TCP_SND_BUF/TCP_MSS)
187
188 /* TCP writable space (bytes). This must be less than or equal
189    to TCP_SND_BUF. It is the amount of space which must be
190    available in the tcp snd_buf for select to return writable */
191 #define TCP_SNDLOWAT           (TCP_SND_BUF/2)
192
193 /* TCP receive window. */
194 #define TCP_WND                 8096
195
196 /* Maximum number of retransmissions of data segments. */
197 #define TCP_MAXRTX              12
198
199 /* Maximum number of retransmissions of SYN segments. */
200 #define TCP_SYNMAXRTX           4
201
202
203 /* ---------- ARP options ---------- */
204 #define LWIP_ARP                1
205 #define ARP_TABLE_SIZE          10
206 #define ARP_QUEUEING            1
207
208
209 /* ---------- IP options ---------- */
210 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
211    IP packets across network interfaces. If you are going to run lwIP
212    on a device with only one network interface, define this to 0. */
213 #define IP_FORWARD              1
214
215 /* IP reassembly and segmentation.These are orthogonal even
216  * if they both deal with IP fragments */
217 #define IP_REASSEMBLY           1
218 #define IP_REASS_MAX_PBUFS      10
219 #define MEMP_NUM_REASSDATA      10
220 #define IP_FRAG                 1
221
222
223 /* ---------- ICMP options ---------- */
224 #define ICMP_TTL                255
225
226
227 /* ---------- DHCP options ---------- */
228 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
229    interfaces. */
230 #define LWIP_DHCP               0
231
232 /* 1 if you want to do an ARP check on the offered address
233    (recommended). */
234 #define DHCP_DOES_ARP_CHECK    (LWIP_DHCP)
235
236
237 /* ---------- AUTOIP options ------- */
238 #define LWIP_AUTOIP             0
239 #define LWIP_DHCP_AUTOIP_COOP  (LWIP_DHCP && LWIP_AUTOIP)
240
241
242 /* ---------- UDP options ---------- */
243 #define LWIP_UDP                1
244 #define LWIP_UDPLITE            1
245 #define UDP_TTL                 255
246
247
248 /* ---------- Statistics options ---------- */
249
250 #define LWIP_STATS              1
251 #define LWIP_STATS_DISPLAY      1
252
253 #if LWIP_STATS
254 #define LINK_STATS              1
255 #define IP_STATS                1
256 #define ICMP_STATS              1
257 #define IGMP_STATS              1
258 #define IPFRAG_STATS            1
259 #define UDP_STATS               1
260 #define TCP_STATS               1
261 #define MEM_STATS               1
262 #define MEMP_STATS              1
263 #define PBUF_STATS              1
264 #define SYS_STATS               1
265 #endif /* LWIP_STATS */
266
267
268 /* ---------- PPP options ---------- */
269
270 #define PPP_SUPPORT             0      /* Set > 0 for PPP */
271
272 #if PPP_SUPPORT
273
274 #define NUM_PPP                 1      /* Max PPP sessions. */
275
276
277 /* Select modules to enable.  Ideally these would be set in the makefile but
278  * we're limited by the command line length so you need to modify the settings
279  * in this file.
280  */
281 #define PPPOE_SUPPORT           1
282 #define PPPOS_SUPPORT           1
283
284 #define PAP_SUPPORT             1      /* Set > 0 for PAP. */
285 #define CHAP_SUPPORT            1      /* Set > 0 for CHAP. */
286 #define MSCHAP_SUPPORT          0      /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
287 #define CBCP_SUPPORT            0      /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
288 #define CCP_SUPPORT             0      /* Set > 0 for CCP (NOT FUNCTIONAL!) */
289 #define VJ_SUPPORT              1      /* Set > 0 for VJ header compression. */
290 #define MD5_SUPPORT             1      /* Set > 0 for MD5 (see also CHAP) */
291
292 #endif /* PPP_SUPPORT */
293
294 #endif /* __LWIPOPTS_H__ */