2 * \file lwipopts.h - Configuration options for lwIP
4 * Copyright (c) 2010 Texas Instruments Incorporated
7 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
10 * Redistribution and use in source and binary forms, with or without modification,
11 * are permitted provided that the following conditions are met:
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.
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
32 * This file is part of the lwIP TCP/IP stack.
34 * Author: Adam Dunkels <adam@sics.se>
37 //#include "rpp/sci.h"
39 #ifndef __LWIPOPTS_H__
40 #define __LWIPOPTS_H__
43 /*****************************************************************************
45 *****************************************************************************/
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
52 #define STATIC_IP_ADDRESS 1
54 /*****************************************************************************
55 ** lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
56 *****************************************************************************/
57 #define HOST_TMR_INTERVAL 0
58 #define DYNAMIC_HTTP_HEADERS
60 /*****************************************************************************
61 ** Platform specific locking
62 *****************************************************************************/
63 #define SYS_LIGHTWEIGHT_PROT 1 /* critical sections */
66 /*****************************************************************************
67 ** TCPIP thread - used when NO_SYS defined to 0
68 *****************************************************************************/
69 #define TCPIP_THREAD_PRIO 0
70 #define TCPIP_THREAD_STACKSIZE 600
72 /*****************************************************************************
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 */
82 /*****************************************************************************
84 *****************************************************************************/
85 #define IP_REASSEMBLY 0
88 /*****************************************************************************
90 *****************************************************************************/
92 #define DHCP_DOES_ARP_CHECK 0
94 /*****************************************************************************
96 *****************************************************************************/
97 #define LWIP_AUTOIP 0 /* default is 0 */
98 #define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
100 #define LWIP_DHCP_AUTOIP_COOP_TRIES 5 /* default is 9 */
102 /*****************************************************************************
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)
109 /*****************************************************************************
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*/
119 /*****************************************************************************
121 *****************************************************************************/
122 #define LWIP_SOCKET 0 /* default is 1 */
124 #define LWIP_SO_RCVTIMEO 1 /* enable receive timeout; default is 0 */
126 /*****************************************************************************
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
135 /*****************************************************************************
136 ** Statistics options
137 *****************************************************************************/
138 #define LWIP_STATS_DISPLAY 1
140 /*****************************************************************************
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)
148 #define ALL_DBG_OFF 0 /* higher priority than ALL_DBG_ON */
154 * ETHARP_DEBUG: Enable debugging in etharp.c.
156 #define ETHARP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
159 * NETIF_DEBUG: Enable debugging in netif.c.
161 #define NETIF_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
164 * PBUF_DEBUG: Enable debugging in pbuf.c.
166 #define PBUF_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
169 * API_LIB_DEBUG: Enable debugging in api_lib.c.
171 #define API_LIB_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
174 * API_MSG_DEBUG: Enable debugging in api_msg.c.
176 #define API_MSG_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
179 * SOCKETS_DEBUG: Enable debugging in sockets.c.
181 #define SOCKETS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
184 * ICMP_DEBUG: Enable debugging in icmp.c.
186 #define ICMP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
189 * IGMP_DEBUG: Enable debugging in igmp.c.
191 #define IGMP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
194 * INET_DEBUG: Enable debugging in inet.c.
196 #define INET_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
199 * IP_DEBUG: Enable debugging for IP.
201 #define IP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
204 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
206 #define IP_REASS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
209 * RAW_DEBUG: Enable debugging in raw.c.
211 #define RAW_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
214 * MEM_DEBUG: Enable debugging in mem.c.
216 #define MEM_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
219 * MEMP_DEBUG: Enable debugging in memp.c.
221 #define MEMP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
224 * SYS_DEBUG: Enable debugging in sys.c.
226 #define SYS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
229 * TIMERS_DEBUG: Enable debugging in timers.c.
231 #define TIMERS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
234 * TCP_DEBUG: Enable debugging for TCP.
236 #define TCP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
239 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
241 #define TCP_INPUT_DEBUG LWIP_DBG_ON | ALL_DBG_ON
244 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
246 #define TCP_FR_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
249 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
252 #define TCP_RTO_DEBUG LWIP_DBG_ON | ALL_DBG_ON
255 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
257 #define TCP_CWND_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
260 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
262 #define TCP_WND_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
265 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
267 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
270 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
272 #define TCP_RST_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
275 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
277 #define TCP_QLEN_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
280 * UDP_DEBUG: Enable debugging in UDP.
282 #define UDP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
285 * TCPIP_DEBUG: Enable debugging in tcpip.c.
287 #define TCPIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
290 * PPP_DEBUG: Enable debugging for PPP.
292 #define PPP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
295 * SLIP_DEBUG: Enable debugging in slipif.c.
297 #define SLIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
300 * DHCP_DEBUG: Enable debugging in dhcp.c.
302 #define DHCP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
305 * AUTOIP_DEBUG: Enable debugging in autoip.c.
307 #define AUTOIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
310 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
312 #define SNMP_MSG_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
315 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
317 #define SNMP_MIB_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
320 * DNS_DEBUG: Enable debugging for DNS.
322 #define DNS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
325 * IP6_DEBUG: Enable debugging for IPv6.
327 #define IP6_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
329 #endif /* !ALL_DBG_OFF */
330 #endif /* LWIP_DEBUG */
332 #endif /* __LWIPOPTS_H__ */