2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
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.
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
27 * This file is part of the lwIP TCP/IP stack.
29 * Author: Adam Dunkels <adam@sics.se>
32 #ifndef __LWIPOPTS_H__
33 #define __LWIPOPTS_H__
35 #define TCPIP_THREAD_NAME "tcp/ip"
36 #define TCPIP_THREAD_STACKSIZE 350
37 #define TCPIP_THREAD_PRIO 2
39 #define DEFAULT_THREAD_STACKSIZE 200
40 #define DEFAULT_THREAD_PRIO 1
42 #define ETH_PAD_SIZE 2
44 #define NOT_LWIP_DEBUG 0
45 #define DBG_TYPES_ON 0x00
46 #define LWIP_DBG_TYPES_ON LWIP_DBG_OFF
48 #define ETHARP_DEBUG LWIP_DBG_OFF
49 #define NETIF_DEBUG LWIP_DBG_OFF
50 #define PBUF_DEBUG LWIP_DBG_OFF
51 #define API_LIB_DEBUG LWIP_DBG_OFF
52 #define API_MSG_DEBUG LWIP_DBG_OFF
53 #define SOCKETS_DEBUG LWIP_DBG_OFF
54 #define ICMP_DEBUG LWIP_DBG_OFF
55 #define IGMP_DEBUG LWIP_DBG_OFF
56 #define INET_DEBUG LWIP_DBG_OFF
57 #define IP_DEBUG LWIP_DBG_OFF
58 #define IP_REASS_DEBUG LWIP_DBG_OFF
59 #define RAW_DEBUG LWIP_DBG_OFF
60 #define MEM_DEBUG LWIP_DBG_OFF
61 #define MEMP_DEBUG LWIP_DBG_OFF
62 #define SYS_DEBUG LWIP_DBG_OFF
63 #define TCP_DEBUG LWIP_DBG_OFF
64 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
65 #define TCP_FR_DEBUG LWIP_DBG_OFF
66 #define TCP_RTO_DEBUG LWIP_DBG_OFF
67 #define TCP_CWND_DEBUG LWIP_DBG_OFF
68 #define TCP_WND_DEBUG LWIP_DBG_OFF
69 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
70 #define TCP_RST_DEBUG LWIP_DBG_OFF
71 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
72 #define UDP_DEBUG LWIP_DBG_OFF
73 #define TCPIP_DEBUG LWIP_DBG_OFF
74 #define PPP_DEBUG LWIP_DBG_OFF
75 #define SLIP_DEBUG LWIP_DBG_OFF
76 #define DHCP_DEBUG LWIP_DBG_OFF
77 #define AUTOIP_DEBUG LWIP_DBG_OFF
78 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
79 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
80 #define DNS_DEBUG LWIP_DBG_OFF
81 #define LWIP_NOASSERT 0
83 #define ETHARP_TRUST_IP_MAC 0
87 * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
88 * critical regions during buffer allocation, deallocation and memory
89 * allocation and deallocation.
91 #define SYS_LIGHTWEIGHT_PROT 1
94 ------------------------------------
95 ---------- Memory options ----------
96 ------------------------------------
100 * MEM_ALIGNMENT: should be set to the alignment of the CPU
101 * 4 byte alignment -> #define MEM_ALIGNMENT 4
102 * 2 byte alignment -> #define MEM_ALIGNMENT 2
104 #define MEM_ALIGNMENT 4
107 * MEM_SIZE: the size of the heap memory. If the application will send
108 * a lot of data that needs to be copied, this should be set high.
110 #define MEM_SIZE (8*1024)
113 ------------------------------------------------
114 ---------- Internal Memory Pool Sizes ----------
115 ------------------------------------------------
118 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
119 * If the application sends a lot of data out of ROM (or other static memory),
120 * this should be set high.
122 #define MEMP_NUM_PBUF 20
125 * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
126 * (requires the LWIP_TCP option)
128 #define MEMP_NUM_TCP_PCB 10
131 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
132 * (requires the LWIP_TCP option)
134 #define MEMP_NUM_TCP_SEG 8
137 * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
138 * (requires NO_SYS==0)
140 #define MEMP_NUM_SYS_TIMEOUT 5
143 * MEMP_NUM_NETBUF: the number of struct netbufs.
144 * (only needed if you use the sequential API, like api_lib.c)
146 #define MEMP_NUM_NETBUF 4
149 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
151 #define PBUF_POOL_SIZE 4
155 ----------------------------------
156 ---------- Pbuf options ----------
157 ----------------------------------
161 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
162 * designed to accomodate single full size TCP frame in one pbuf, including
163 * TCP_MSS, IP header, and link header.
165 #define PBUF_POOL_BUFSIZE 1500
168 ---------------------------------
169 ---------- TCP options ----------
170 ---------------------------------
173 * LWIP_TCP==1: Turn on TCP.
177 /* TCP Maximum segment size. */
180 /* TCP sender buffer space (bytes). */
181 #define TCP_SND_BUF 1500
184 * TCP_WND: The size of a TCP window.
189 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
191 #define TCP_SYNMAXRTX 4
194 ---------------------------------
195 ---------- RAW options ----------
196 ---------------------------------
199 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
205 ------------------------------------
206 ---------- Socket options ----------
207 ------------------------------------
210 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
212 #define LWIP_SOCKET 0
216 ----------------------------------------
217 ---------- Statistics options ----------
218 ----------------------------------------
221 * LWIP_STATS==1: Enable statistics collection in lwip_stats.
226 ----------------------------------
227 ---------- DHCP options ----------
228 ----------------------------------
231 * LWIP_DHCP==1: Enable DHCP module.
236 #define LWIP_PROVIDE_ERRNO 0
238 #endif /* __LWIPOPTS_H__ */