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 0
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 1000
72 /*****************************************************************************
74 *****************************************************************************/
75 #define MEM_ALIGNMENT 4 /* dflt 1 */
76 #define MEM_SIZE (30 * 1024) /* 30K */ /* dflt 1600 */
77 #define MEMP_NUM_PBUF 48 /* dflt 16 */
78 #define MEMP_NUM_TCP_PCB 16 /* dflt 5 */
79 #define PBUF_POOL_SIZE 96 /* dflt 16 */
81 /*****************************************************************************
83 *****************************************************************************/
84 #define IP_REASSEMBLY 0
87 /*****************************************************************************
89 *****************************************************************************/
91 #define DHCP_DOES_ARP_CHECK 0
93 /*****************************************************************************
95 *****************************************************************************/
96 #define LWIP_AUTOIP 0 /* default is 0 */
97 #define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
99 #define LWIP_DHCP_AUTOIP_COOP_TRIES 5 /* default is 9 */
101 /*****************************************************************************
103 *****************************************************************************/
104 #define TCP_WND 4096 /* default is 2048 */
105 #define TCP_MSS 1500 /* default is 128 */
106 #define TCP_SND_BUF (4 * TCP_MSS)
108 /*****************************************************************************
110 *****************************************************************************/
111 #define PBUF_LINK_HLEN 14 /* default is 14 */
112 #define PBUF_POOL_BUFSIZE 256
113 /* default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)*/
114 #define ETH_PAD_SIZE 0
115 #define MEMP_NUM_NETCONN 10
116 #define LWIP_NETCONN !NO_SYS & 1 /*default is 1 - can be used only when NO_SYS = 0*/
118 /*****************************************************************************
120 *****************************************************************************/
121 #define LWIP_SOCKET 0 /* default is 1 */
123 #define LWIP_SO_RCVTIMEO 1 /* enable receive timeout; default is 0 */
125 /*****************************************************************************
127 *****************************************************************************/
128 #define TCPIP_MBOX_SIZE 20
129 #define DEFAULT_RAW_RECVMBOX_SIZE 10
130 #define DEFAULT_UDP_RECVMBOX_SIZE 10
131 #define DEFAULT_TCP_RECVMBOX_SIZE 10
132 #define DEFAULT_ACCEPTMBOX_SIZE 10
134 /*****************************************************************************
136 *****************************************************************************/
137 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
138 #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON | LWIP_DBG_TRACE \
139 |LWIP_DBG_STATE | LWIP_DBG_FRESH)
145 * ETHARP_DEBUG: Enable debugging in etharp.c.
147 #define ETHARP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
150 * NETIF_DEBUG: Enable debugging in netif.c.
152 #define NETIF_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
155 * PBUF_DEBUG: Enable debugging in pbuf.c.
157 #define PBUF_DEBUG LWIP_DBG_ON | ALL_DBG_ON
160 * API_LIB_DEBUG: Enable debugging in api_lib.c.
162 #define API_LIB_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
165 * API_MSG_DEBUG: Enable debugging in api_msg.c.
167 #define API_MSG_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
170 * SOCKETS_DEBUG: Enable debugging in sockets.c.
172 #define SOCKETS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
175 * ICMP_DEBUG: Enable debugging in icmp.c.
177 #define ICMP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
180 * IGMP_DEBUG: Enable debugging in igmp.c.
182 #define IGMP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
185 * INET_DEBUG: Enable debugging in inet.c.
187 #define INET_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
190 * IP_DEBUG: Enable debugging for IP.
192 #define IP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
195 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
197 #define IP_REASS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
200 * RAW_DEBUG: Enable debugging in raw.c.
202 #define RAW_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
205 * MEM_DEBUG: Enable debugging in mem.c.
207 #define MEM_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
210 * MEMP_DEBUG: Enable debugging in memp.c.
212 #define MEMP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
215 * SYS_DEBUG: Enable debugging in sys.c.
217 #define SYS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
220 * TIMERS_DEBUG: Enable debugging in timers.c.
222 #define TIMERS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
225 * TCP_DEBUG: Enable debugging for TCP.
227 #define TCP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
230 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
232 #define TCP_INPUT_DEBUG LWIP_DBG_ON | ALL_DBG_ON
235 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
237 #define TCP_FR_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
240 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
243 #define TCP_RTO_DEBUG LWIP_DBG_ON | ALL_DBG_ON
246 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
248 #define TCP_CWND_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
251 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
253 #define TCP_WND_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
256 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
258 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
261 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
263 #define TCP_RST_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
266 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
268 #define TCP_QLEN_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
271 * UDP_DEBUG: Enable debugging in UDP.
273 #define UDP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
276 * TCPIP_DEBUG: Enable debugging in tcpip.c.
278 #define TCPIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
281 * PPP_DEBUG: Enable debugging for PPP.
283 #define PPP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
286 * SLIP_DEBUG: Enable debugging in slipif.c.
288 #define SLIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
291 * DHCP_DEBUG: Enable debugging in dhcp.c.
293 #define DHCP_DEBUG LWIP_DBG_ON | ALL_DBG_ON
296 * AUTOIP_DEBUG: Enable debugging in autoip.c.
298 #define AUTOIP_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
301 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
303 #define SNMP_MSG_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
306 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
308 #define SNMP_MIB_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
311 * DNS_DEBUG: Enable debugging for DNS.
313 #define DNS_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
316 * IP6_DEBUG: Enable debugging for IPv6.
318 #define IP6_DEBUG LWIP_DBG_OFF | ALL_DBG_ON
321 #endif /* __LWIPOPTS_H__ */