]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/lwip_tcpip/v2_0/include/lwipopts.h
a83e6a21cb2c21dd9215357c5f51c3e4b5a9ff7f
[karo-tx-redboot.git] / packages / net / lwip_tcpip / v2_0 / include / lwipopts.h
1 /*
2  * Copyright (c) 2001, Swedish Institute of Computer Science.
3  * All rights reserved. 
4  *
5  * Redistribution and use in source and binary forms, with or without 
6  * modification, are permitted provided that the following conditions 
7  * are met: 
8  * 1. Redistributions of source code must retain the above copyright 
9  *    notice, this list of conditions and the following disclaimer. 
10  * 2. Redistributions in binary form must reproduce the above copyright 
11  *    notice, this list of conditions and the following disclaimer in the 
12  *    documentation and/or other materials provided with the distribution. 
13  * 3. Neither the name of the Institute nor the names of its contributors 
14  *    may be used to endorse or promote products derived from this software 
15  *    without specific prior written permission. 
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
27  * SUCH DAMAGE. 
28  *
29  * This file is part of the lwIP TCP/IP stack.
30  * 
31  * Author: Jani Monoses <jani@iv.ro>
32  *
33  */
34 #ifndef __LWIPOPTS_H__
35 #define __LWIPOPTS_H__
36 /*include the configuration made with configtool*/
37 #include <pkgconf/net_lwip.h>
38 /* ---------- Memory options ---------- */
39 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
40    lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
41    byte alignment -> define MEM_ALIGNMENT to 2. */
42 #define MEM_ALIGNMENT          CYGPKG_LWIP_MEM_ALIGNMENT
43
44 /* MEM_SIZE: the size of the heap memory. If the application will send
45 a lot of data that needs to be copied, this should be set high. */
46 #define MEM_SIZE               CYGPKG_LWIP_MEM_SIZE
47
48 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
49    sends a lot of data out of ROM (or other static memory), this
50    should be set high. */
51 #define MEMP_NUM_PBUF           CYGPKG_LWIP_MEMP_NUM_PBUF
52 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
53    per active UDP "connection". */
54 #define MEMP_NUM_UDP_PCB        CYGPKG_LWIP_MEMP_NUM_UDP_PCB
55 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
56    connections. */
57 #define MEMP_NUM_TCP_PCB        CYGPKG_LWIP_MEMP_NUM_TCP_PCB
58 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
59    connections. */
60 #define MEMP_NUM_TCP_PCB_LISTEN CYGPKG_LWIP_MEMP_NUM_TCP_PCB_LISTEN
61 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
62    segments. */
63 #define MEMP_NUM_TCP_SEG        CYGPKG_LWIP_MEMP_NUM_TCP_SEG
64 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
65    timeouts. */
66 #define MEMP_NUM_SYS_TIMEOUT    CYGPKG_LWIP_MEMP_NUM_SYS_TIMEOUT
67
68
69 /* The following four are used only with the sequential API and can be
70    set to 0 if the application only will use the raw API. */
71 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
72 #define MEMP_NUM_NETBUF         CYGPKG_LWIP_MEMP_NUM_NETBUF
73 /* MEMP_NUM_NETCONN: the number of struct netconns. */
74 #define MEMP_NUM_NETCONN        CYGPKG_LWIP_MEMP_NUM_NETCONN
75 /* MEMP_NUM_APIMSG: the number of struct api_msg, used for
76    communication between the TCP/IP stack and the sequential
77    programs. */
78 #define MEMP_NUM_API_MSG        CYGPKG_LWIP_MEMP_NUM_APIMSG
79 /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
80    for sequential API communication and incoming packets. Used in
81    src/api/tcpip.c. */
82 #define MEMP_NUM_TCPIP_MSG      CYGPKG_LWIP_MEMP_NUM_TCPIP_MSG
83
84 /* ---------- Pbuf options ---------- */
85 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
86 #define PBUF_POOL_SIZE          CYGPKG_LWIP_PBUF_POOL_SIZE
87
88 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
89 #define PBUF_POOL_BUFSIZE       CYGPKG_LWIP_PBUF_POOL_BUFSIZE
90
91 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
92    link level header. */
93 #define PBUF_LINK_HLEN          CYGPKG_LWIP_PBUF_LINK_HLEN
94
95 /* ---------- TCP options ---------- */
96 #define LWIP_TCP                defined (CYGPKG_LWIP_TCP)
97 #define TCP_TTL                 CYGPKG_LWIP_TCP_TTL
98
99 /* Controls if TCP should queue segments that arrive out of
100    order. Define to 0 if your device is low on memory. */
101 #define TCP_QUEUE_OOSEQ         CYGPKG_LWIP_TCP_QUEUE_OOSEQ
102
103 /* TCP Maximum segment size. */
104 #define TCP_MSS                 CYGPKG_LWIP_TCP_MSS
105
106 /* TCP sender buffer space (bytes). */
107 #define TCP_SND_BUF            CYGPKG_LWIP_TCP_SND_BUF
108 #define TCP_SNDLOWAT            TCP_SND_BUF/2
109
110 /* TCP sender buffer space (pbufs). This must be at least = 2 *
111    TCP_SND_BUF/TCP_MSS for things to work. */
112 #define TCP_SND_QUEUELEN        CYGPKG_LWIP_TCP_SND_QUEUELEN
113
114 /* TCP receive window. */
115 #define TCP_WND                 CYGPKG_LWIP_TCP_WND
116
117 /* Maximum number of retransmissions of data segments. */
118 #define TCP_MAXRTX              CYGPKG_LWIP_TCP_MAXRTX
119
120 /* Maximum number of retransmissions of SYN segments. */
121 #define TCP_SYNMAXRTX           CYGPKG_LWIP_TCP_SYNMAXRTX
122
123 /* ---------- ARP options ---------- */
124 #define ARP_TABLE_SIZE          CYGPKG_LWIP_ARP_TABLE_SIZE
125
126 /* ---------- IP options ---------- */
127 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
128    IP packets across network interfaces. If you are going to run lwIP
129    on a device with only one network interface, define this to 0. */
130 #define IP_FORWARD              CYGPKG_LWIP_IP_FORWARD
131
132 /* If defined to 1, IP options are allowed (but not parsed). If
133    defined to 0, all packets with IP options are dropped. */
134 #define IP_OPTIONS              CYGPKG_LWIP_IP_OPTIONS
135
136 /* ---------- ICMP options ---------- */
137 #define ICMP_TTL                CYGPKG_LWIP_ICMP_TTL
138
139
140 /* ---------- DHCP options ---------- */
141 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
142    interfaces.*/
143
144 #ifdef CYGPKG_LWIP_DHCP
145 #define LWIP_DHCP               CYGPKG_LWIP_DHCP
146
147 /* 1 if you want to do an ARP check on the offered address
148    (recommended). */
149 #define DHCP_DOES_ARP_CHECK     CYGPKG_LWIP_DHCP_DOES_ARP_CHECK
150 #endif
151
152 /* ---------- UDP options ---------- */
153 #define LWIP_UDP                CYGPKG_LWIP_UDP
154 #define UDP_TTL                 CYGPKG_LWIP_UDP_TTL
155
156 /* ---------- RAW socket support ---------- */
157 #define LWIP_RAW                CYGPKG_LWIP_RAW
158
159 /* ---------- SLIP options --------- */ 
160 #define LWIP_SLIP               defined(CYGPKG_LWIP_SLIP)
161 #define SLIP_DEV                CYGPKG_LWIP_SLIP_DEV
162
163 #define LWIP_HAVE_LOOPIF        defined (CYGPKG_LWIP_LOOPIF)
164 /* ---------- PPP options --------- */  
165 #define PPP_SUPPORT             defined(CYGPKG_LWIP_PPP)
166 #define PPP_DEV                 CYGPKG_LWIP_PPP_DEV
167 #define MD5_SUPPORT             1
168
169 #if defined(CYGPKG_LWIP_PPP_PAP_AUTH)
170 #define PAP_SUPPORT     1
171 #else
172 #define PAP_SUPPORT     0
173 #endif
174
175 #if defined(CYGPKG_LWIP_PPP_CHAP_AUTH)
176 #define CHAP_SUPPORT    1
177 #else
178 #define CHAP_SUPPORT    0
179 #endif
180
181 /* ------- Thread priorities ---------------*/
182 #define TCPIP_THREAD_PRIO       CYGPKG_LWIP_TCPIP_THREAD_PRIORITY
183 #define SLIPIF_THREAD_PRIO      CYGPKG_LWIP_SLIPIF_THREAD_PRIORITY
184 #define PPP_THREAD_PRIO         CYGPKG_LWIP_PPP_THREAD_PRIORITY
185 /* ---------- Statistics options ---------- */
186 #define LWIP_STATS              defined(CYGPKG_LWIP_STATS)
187
188 /* ---------- Debug options ---------- */
189 #if !defined(CYGPKG_LWIP_ASSERTS)
190 #define LWIP_NOASSERT
191 #endif
192
193 #if defined(CYGPKG_LWIP_DEBUG)
194 #define LWIP_DEBUG
195 #define MEM_DEBUG               DBG_ON
196 #define MEMP_DEBUG              DBG_ON
197 #define PBUF_DEBUG              DBG_ON
198 #define API_LIB_DEBUG   DBG_ON
199 #define API_MSG_DEBUG   DBG_ON 
200 #define TCPIP_DEBUG             DBG_ON
201 #define NETIF_DEBUG             DBG_ON
202 #define SOCKETS_DEBUG   DBG_ON
203 #define DEMO_DEBUG              DBG_ON
204 #define IP_DEBUG                DBG_ON
205 #define IP_REASS_DEBUG  DBG_ON
206 #define RAW_DEBUG               DBG_ON
207 #define ICMP_DEBUG              DBG_ON
208 #define UDP_DEBUG               DBG_ON
209 #define TCP_DEBUG               DBG_ON
210 #define TCP_INPUT_DEBUG         DBG_ON
211 #define TCP_OUTPUT_DEBUG        DBG_ON
212 #define TCP_RTO_DEBUG   DBG_ON
213 #define TCP_CWND_DEBUG  DBG_ON
214 #define TCP_WND_DEBUG   DBG_ON
215 #define TCP_FR_DEBUG    DBG_ON
216 #define TCP_QLEN_DEBUG  DBG_ON
217 #define TCP_RST_DEBUG   DBG_ON
218 #define PPP_DEBUG   DBG_ON
219
220 #define DBG_TYPES_ON    (DBG_ON|DBG_TRACE|DBG_STATE|DBG_FRESH|DBG_HALT)
221 #endif
222
223
224
225 #endif /* __LWIPOPTS_H__ */