]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blob - src/include/arch/lwipopts.h
support print for lwip statistics does not depend on LWIP_DEBUG define anymore
[pes-rpp/rpp-lwip.git] / src / include / arch / lwipopts.h
1 /**
2  * \file lwipopts.h - Configuration options for lwIP
3  *
4  * Copyright (c) 2010 Texas Instruments Incorporated
5  */
6 /*
7  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without modification,
11  * are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright notice,
14  *    this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  *    this list of conditions and the following disclaimer in the documentation
17  *    and/or other materials provided with the distribution.
18  * 3. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30  * OF SUCH DAMAGE.
31  *
32  * This file is part of the lwIP TCP/IP stack.
33  *
34  * Author: Adam Dunkels <adam@sics.se>
35  *
36  */
37 //#include "rpp/sci.h"
38
39 #ifndef __LWIPOPTS_H__
40 #define __LWIPOPTS_H__
41
42
43 /*****************************************************************************
44 **                           CONFIGURATIONS
45 *****************************************************************************/
46 /*
47 ** If Static IP address to be used, give it here. This value shall be 0 if
48 ** dynamic IP address is to be used.
49 ** For Example, for IP Address 192.168.247.1, use the corresponding hex
50 ** value 0xC0A8F701.
51 */
52 #define STATIC_IP_ADDRESS               1
53
54 /*****************************************************************************
55 **            lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
56 *****************************************************************************/
57 #define HOST_TMR_INTERVAL               0
58 #define DYNAMIC_HTTP_HEADERS
59
60 /*****************************************************************************
61 **                    Platform specific locking
62 *****************************************************************************/
63 #define SYS_LIGHTWEIGHT_PROT            1 /* critical sections */
64 #define NO_SYS                          0
65
66 /*****************************************************************************
67 **                    TCPIP thread - used when NO_SYS defined to 0
68 *****************************************************************************/
69 #define TCPIP_THREAD_PRIO               0
70 #define TCPIP_THREAD_STACKSIZE          600
71
72 /*****************************************************************************
73 **                          Memory Options
74 *****************************************************************************/
75 //#define MEM_USE_POOLS                   1
76 #define MEM_ALIGNMENT                   4 /* dflt 1 */
77 #define MEM_SIZE                        (30 * 1024) /* 30K */ /* dflt 1600 */
78 #define MEMP_NUM_PBUF                   48 /* dflt 16 */
79 #define MEMP_NUM_TCP_PCB                16 /* dflt 5 */
80 #define PBUF_POOL_SIZE                  96 /* dflt 16 */
81
82 /*****************************************************************************
83 **                           IP Options
84 *****************************************************************************/
85 #define IP_REASSEMBLY                   0
86 #define IP_FRAG                         0
87
88 /*****************************************************************************
89 **                           DHCP Options
90 *****************************************************************************/
91 #define LWIP_DHCP                       0
92 #define DHCP_DOES_ARP_CHECK             0
93
94 /*****************************************************************************
95 **                           Auto IP  Options
96 *****************************************************************************/
97 #define LWIP_AUTOIP                     0           /* default is 0 */
98 #define LWIP_DHCP_AUTOIP_COOP           ((LWIP_DHCP) && (LWIP_AUTOIP))
99                                                     /* default is 0 */
100 #define LWIP_DHCP_AUTOIP_COOP_TRIES     5           /* default is 9 */
101
102 /*****************************************************************************
103 **                           TCP  Options
104 *****************************************************************************/
105 #define TCP_WND                         4096   /* default is 2048 */
106 #define TCP_MSS                         1500        /* default is 128 */
107 #define TCP_SND_BUF                     (4 * TCP_MSS)
108
109 /*****************************************************************************
110 **                           PBUF  Options
111 *****************************************************************************/
112 #define PBUF_LINK_HLEN                  14      /* default is 14 */
113 #define PBUF_POOL_BUFSIZE               256
114                                            /* default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)*/
115 #define ETH_PAD_SIZE                    0
116 #define MEMP_NUM_NETCONN                10
117 #define LWIP_NETCONN                    !NO_SYS & 1 /*default is 1 - can be used only when NO_SYS = 0*/
118
119 /*****************************************************************************
120 **                           Socket  Options
121 *****************************************************************************/
122 #define LWIP_SOCKET                     0           /* default is 1 */
123
124 #define LWIP_SO_RCVTIMEO                1           /* enable receive timeout; default is 0 */
125
126 /*****************************************************************************
127 **                          Mbox options
128 *****************************************************************************/
129 #define TCPIP_MBOX_SIZE                 20
130 #define DEFAULT_RAW_RECVMBOX_SIZE       10
131 #define DEFAULT_UDP_RECVMBOX_SIZE       10
132 #define DEFAULT_TCP_RECVMBOX_SIZE       10
133 #define DEFAULT_ACCEPTMBOX_SIZE         10
134
135 /*****************************************************************************
136 **                          Statistics options
137 *****************************************************************************/
138 #define LWIP_STATS_DISPLAY              1
139
140 /*****************************************************************************
141 **                          Debugging options
142 *****************************************************************************/
143 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL
144 #define LWIP_DBG_TYPES_ON               (LWIP_DBG_ON | LWIP_DBG_TRACE \
145                                          |LWIP_DBG_STATE | LWIP_DBG_FRESH)
146
147 #define ALL_DBG_ON                      0
148 #define ALL_DBG_OFF                     0 /* higher priority than ALL_DBG_ON */
149
150 #ifdef LWIP_DEBUG
151 #if !ALL_DBG_OFF
152
153 /**
154  * ETHARP_DEBUG: Enable debugging in etharp.c.
155  */
156 #define ETHARP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
157
158 /**
159  * NETIF_DEBUG: Enable debugging in netif.c.
160  */
161 #define NETIF_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
162
163 /**
164  * PBUF_DEBUG: Enable debugging in pbuf.c.
165  */
166 #define PBUF_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
167
168 /**
169  * API_LIB_DEBUG: Enable debugging in api_lib.c.
170  */
171 #define API_LIB_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
172
173 /**
174  * API_MSG_DEBUG: Enable debugging in api_msg.c.
175  */
176 #define API_MSG_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
177
178 /**
179  * SOCKETS_DEBUG: Enable debugging in sockets.c.
180  */
181 #define SOCKETS_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
182
183 /**
184  * ICMP_DEBUG: Enable debugging in icmp.c.
185  */
186 #define ICMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
187
188 /**
189  * IGMP_DEBUG: Enable debugging in igmp.c.
190  */
191 #define IGMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
192
193 /**
194  * INET_DEBUG: Enable debugging in inet.c.
195  */
196 #define INET_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
197
198 /**
199  * IP_DEBUG: Enable debugging for IP.
200  */
201 #define IP_DEBUG                        LWIP_DBG_ON | ALL_DBG_ON
202
203 /**
204  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
205  */
206 #define IP_REASS_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
207
208 /**
209  * RAW_DEBUG: Enable debugging in raw.c.
210  */
211 #define RAW_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
212
213 /**
214  * MEM_DEBUG: Enable debugging in mem.c.
215  */
216 #define MEM_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
217
218 /**
219  * MEMP_DEBUG: Enable debugging in memp.c.
220  */
221 #define MEMP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
222
223 /**
224  * SYS_DEBUG: Enable debugging in sys.c.
225  */
226 #define SYS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
227
228 /**
229  * TIMERS_DEBUG: Enable debugging in timers.c.
230  */
231 #define TIMERS_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
232
233 /**
234  * TCP_DEBUG: Enable debugging for TCP.
235  */
236 #define TCP_DEBUG                       LWIP_DBG_ON | ALL_DBG_ON
237
238 /**
239  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
240  */
241 #define TCP_INPUT_DEBUG                 LWIP_DBG_ON | ALL_DBG_ON
242
243 /**
244  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
245  */
246 #define TCP_FR_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
247
248 /**
249  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
250  * timeout.
251  */
252 #define TCP_RTO_DEBUG                   LWIP_DBG_ON | ALL_DBG_ON
253
254 /**
255  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
256  */
257 #define TCP_CWND_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
258
259 /**
260  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
261  */
262 #define TCP_WND_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
263
264 /**
265  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
266  */
267 #define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF | ALL_DBG_ON
268
269 /**
270  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
271  */
272 #define TCP_RST_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
273
274 /**
275  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
276  */
277 #define TCP_QLEN_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
278
279 /**
280  * UDP_DEBUG: Enable debugging in UDP.
281  */
282 #define UDP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
283
284 /**
285  * TCPIP_DEBUG: Enable debugging in tcpip.c.
286  */
287 #define TCPIP_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
288
289 /**
290  * PPP_DEBUG: Enable debugging for PPP.
291  */
292 #define PPP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
293
294 /**
295  * SLIP_DEBUG: Enable debugging in slipif.c.
296  */
297 #define SLIP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
298
299 /**
300  * DHCP_DEBUG: Enable debugging in dhcp.c.
301  */
302 #define DHCP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
303
304 /**
305  * AUTOIP_DEBUG: Enable debugging in autoip.c.
306  */
307 #define AUTOIP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
308
309 /**
310  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
311  */
312 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
313
314 /**
315  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
316  */
317 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
318
319 /**
320  * DNS_DEBUG: Enable debugging for DNS.
321  */
322 #define DNS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
323
324 /**
325  * IP6_DEBUG: Enable debugging for IPv6.
326  */
327 #define IP6_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
328
329 #endif /* !ALL_DBG_OFF */
330 #endif /* LWIP_DEBUG */
331
332 #endif /* __LWIPOPTS_H__ */