2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
\r
3 * All rights reserved.
\r
5 * Redistribution and use in source and binary forms, with or without modification,
\r
6 * are permitted provided that the following conditions are met:
\r
8 * 1. Redistributions of source code must retain the above copyright notice,
\r
9 * this list of conditions and the following disclaimer.
\r
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
11 * this list of conditions and the following disclaimer in the documentation
\r
12 * and/or other materials provided with the distribution.
\r
13 * 3. The name of the author may not be used to endorse or promote products
\r
14 * derived from this software without specific prior written permission.
\r
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
\r
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
\r
19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
\r
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
\r
21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\r
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
\r
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
\r
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
\r
27 * This file is part of the lwIP TCP/IP stack.
\r
29 * Author: Adam Dunkels <adam@sics.se>
\r
32 #ifndef __LWIPOPTS_H__
\r
33 #define __LWIPOPTS_H__
\r
35 #define TCPIP_THREAD_NAME "tcp/ip"
\r
36 #define TCPIP_THREAD_STACKSIZE 350
\r
37 #define TCPIP_THREAD_PRIO 2
\r
39 #define DEFAULT_THREAD_STACKSIZE 200
\r
40 #define DEFAULT_THREAD_PRIO 1
\r
42 #define ETH_PAD_SIZE 2
\r
44 #define NOT_LWIP_DEBUG 0
\r
45 #define DBG_TYPES_ON 0x00
\r
46 #define LWIP_DBG_TYPES_ON LWIP_DBG_OFF
\r
48 #define ETHARP_DEBUG LWIP_DBG_OFF
\r
49 #define NETIF_DEBUG LWIP_DBG_OFF
\r
50 #define PBUF_DEBUG LWIP_DBG_OFF
\r
51 #define API_LIB_DEBUG LWIP_DBG_OFF
\r
52 #define API_MSG_DEBUG LWIP_DBG_OFF
\r
53 #define SOCKETS_DEBUG LWIP_DBG_OFF
\r
54 #define ICMP_DEBUG LWIP_DBG_OFF
\r
55 #define IGMP_DEBUG LWIP_DBG_OFF
\r
56 #define INET_DEBUG LWIP_DBG_OFF
\r
57 #define IP_DEBUG LWIP_DBG_OFF
\r
58 #define IP_REASS_DEBUG LWIP_DBG_OFF
\r
59 #define RAW_DEBUG LWIP_DBG_OFF
\r
60 #define MEM_DEBUG LWIP_DBG_OFF
\r
61 #define MEMP_DEBUG LWIP_DBG_OFF
\r
62 #define SYS_DEBUG LWIP_DBG_OFF
\r
63 #define TCP_DEBUG LWIP_DBG_OFF
\r
64 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
\r
65 #define TCP_FR_DEBUG LWIP_DBG_OFF
\r
66 #define TCP_RTO_DEBUG LWIP_DBG_OFF
\r
67 #define TCP_CWND_DEBUG LWIP_DBG_OFF
\r
68 #define TCP_WND_DEBUG LWIP_DBG_OFF
\r
69 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
\r
70 #define TCP_RST_DEBUG LWIP_DBG_OFF
\r
71 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
\r
72 #define UDP_DEBUG LWIP_DBG_OFF
\r
73 #define TCPIP_DEBUG LWIP_DBG_OFF
\r
74 #define PPP_DEBUG LWIP_DBG_OFF
\r
75 #define SLIP_DEBUG LWIP_DBG_OFF
\r
76 #define DHCP_DEBUG LWIP_DBG_OFF
\r
77 #define AUTOIP_DEBUG LWIP_DBG_OFF
\r
78 #define SNMP_MSG_DEBUG LWIP_DBG_OFF
\r
79 #define SNMP_MIB_DEBUG LWIP_DBG_OFF
\r
80 #define DNS_DEBUG LWIP_DBG_OFF
\r
81 #define LWIP_NOASSERT 0
\r
83 #define ETHARP_TRUST_IP_MAC 0
\r
87 * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
\r
88 * critical regions during buffer allocation, deallocation and memory
\r
89 * allocation and deallocation.
\r
91 #define SYS_LIGHTWEIGHT_PROT 1
\r
94 ------------------------------------
\r
95 ---------- Memory options ----------
\r
96 ------------------------------------
\r
100 * MEM_ALIGNMENT: should be set to the alignment of the CPU
\r
101 * 4 byte alignment -> #define MEM_ALIGNMENT 4
\r
102 * 2 byte alignment -> #define MEM_ALIGNMENT 2
\r
104 #define MEM_ALIGNMENT 4
\r
107 * MEM_SIZE: the size of the heap memory. If the application will send
\r
108 * a lot of data that needs to be copied, this should be set high.
\r
110 #define MEM_SIZE (8*1024)
\r
113 ------------------------------------------------
\r
114 ---------- Internal Memory Pool Sizes ----------
\r
115 ------------------------------------------------
\r
118 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
\r
119 * If the application sends a lot of data out of ROM (or other static memory),
\r
120 * this should be set high.
\r
122 #define MEMP_NUM_PBUF 20
\r
125 * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
\r
126 * (requires the LWIP_TCP option)
\r
128 #define MEMP_NUM_TCP_PCB 10
\r
131 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
\r
132 * (requires the LWIP_TCP option)
\r
134 #define MEMP_NUM_TCP_SEG 8
\r
137 * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
\r
138 * (requires NO_SYS==0)
\r
140 #define MEMP_NUM_SYS_TIMEOUT 5
\r
143 * MEMP_NUM_NETBUF: the number of struct netbufs.
\r
144 * (only needed if you use the sequential API, like api_lib.c)
\r
146 #define MEMP_NUM_NETBUF 4
\r
149 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
\r
151 #define PBUF_POOL_SIZE 4
\r
155 ----------------------------------
\r
156 ---------- Pbuf options ----------
\r
157 ----------------------------------
\r
161 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
\r
162 * designed to accomodate single full size TCP frame in one pbuf, including
\r
163 * TCP_MSS, IP header, and link header.
\r
165 #define PBUF_POOL_BUFSIZE 1500
\r
168 ---------------------------------
\r
169 ---------- TCP options ----------
\r
170 ---------------------------------
\r
173 * LWIP_TCP==1: Turn on TCP.
\r
177 /* TCP Maximum segment size. */
\r
178 #define TCP_MSS 1500
\r
180 /* TCP sender buffer space (bytes). */
\r
181 #define TCP_SND_BUF 1500
\r
184 * TCP_WND: The size of a TCP window.
\r
186 #define TCP_WND 1500
\r
189 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
\r
191 #define TCP_SYNMAXRTX 4
\r
194 ---------------------------------
\r
195 ---------- RAW options ----------
\r
196 ---------------------------------
\r
199 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
\r
205 ------------------------------------
\r
206 ---------- Socket options ----------
\r
207 ------------------------------------
\r
210 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
\r
212 #define LWIP_SOCKET 0
\r
216 ----------------------------------------
\r
217 ---------- Statistics options ----------
\r
218 ----------------------------------------
\r
221 * LWIP_STATS==1: Enable statistics collection in lwip_stats.
\r
223 #define LWIP_STATS 0
\r
226 ----------------------------------
\r
227 ---------- DHCP options ----------
\r
228 ----------------------------------
\r
231 * LWIP_DHCP==1: Enable DHCP module.
\r
233 #define LWIP_DHCP 0
\r
236 #define LWIP_PROVIDE_ERRNO 0
\r
238 #endif /* __LWIPOPTS_H__ */
\r