1 /* Copyright (C) 2012 mbed.org, MIT License
3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 * and associated documentation files (the "Software"), to deal in the Software without restriction,
5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7 * furnished to do so, subject to the following conditions:
9 * The above copyright notice and this permission notice shall be included in all copies or
10 * substantial portions of the Software.
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #include "lwipopts_conf.h"
30 #define SYS_LIGHTWEIGHT_PROT 1
34 #define TCPIP_MBOX_SIZE 8
35 #define DEFAULT_TCP_RECVMBOX_SIZE 8
36 #define DEFAULT_UDP_RECVMBOX_SIZE 8
37 #define DEFAULT_RAW_RECVMBOX_SIZE 8
38 #define DEFAULT_ACCEPTMBOX_SIZE 8
40 #define TCPIP_THREAD_STACKSIZE 1024
41 #define TCPIP_THREAD_PRIO (osPriorityNormal)
43 #define DEFAULT_THREAD_STACKSIZE 512
45 #define MEMP_NUM_SYS_TIMEOUT 16
49 #define MEM_ALIGNMENT 4
51 #define PBUF_POOL_SIZE 5
52 #define MEMP_NUM_TCP_PCB_LISTEN 4
53 #define MEMP_NUM_TCP_PCB 4
54 #define MEMP_NUM_PBUF 8
56 #define TCP_QUEUE_OOSEQ 0
57 #define TCP_OVERSIZE 0
65 #define LWIP_RAND() rand()
67 #define LWIP_COMPAT_SOCKETS 0
68 #define LWIP_POSIX_SOCKETS_IO_NAMES 0
69 #define LWIP_SO_RCVTIMEO 1
70 #define LWIP_TCP_KEEPALIVE 1
74 #define UDP_LPC_EMAC LWIP_DBG_OFF
75 #define SYS_DEBUG LWIP_DBG_OFF
76 #define PPP_DEBUG LWIP_DBG_OFF
77 #define IP_DEBUG LWIP_DBG_OFF
78 #define MEM_DEBUG LWIP_DBG_OFF
79 #define MEMP_DEBUG LWIP_DBG_OFF
80 #define PBUF_DEBUG LWIP_DBG_OFF
81 #define API_LIB_DEBUG LWIP_DBG_OFF
82 #define API_MSG_DEBUG LWIP_DBG_OFF
83 #define TCPIP_DEBUG LWIP_DBG_OFF
84 #define SOCKETS_DEBUG LWIP_DBG_OFF
85 #define TCP_DEBUG LWIP_DBG_OFF
86 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
87 #define TCP_FR_DEBUG LWIP_DBG_OFF
88 #define TCP_RTO_DEBUG LWIP_DBG_OFF
89 #define TCP_CWND_DEBUG LWIP_DBG_OFF
90 #define TCP_WND_DEBUG LWIP_DBG_OFF
91 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
92 #define TCP_RST_DEBUG LWIP_DBG_OFF
93 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
94 #define ETHARP_DEBUG LWIP_DBG_OFF
95 #define NETIF_DEBUG LWIP_DBG_OFF
96 #define DHCP_DEBUG LWIP_DBG_OFF
99 #define MEMP_OVERFLOW_CHECK 1
100 #define MEMP_SANITY_CHECK 1
102 #define LWIP_NOASSERT 1
106 #define LWIP_PLATFORM_BYTESWAP 1
108 #if LWIP_TRANSPORT_ETHERNET
110 /* MSS should match the hardware packet size */
112 #define TCP_SND_BUF (2 * TCP_MSS)
113 #define TCP_WND (2 * TCP_MSS)
114 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)
117 #define IP_SOF_BROADCAST 1
118 #define IP_SOF_BROADCAST_RECV 1
120 #define LWIP_BROADCAST_PING 1
122 #define LWIP_CHECKSUM_ON_COPY 1
124 #define LWIP_NETIF_HOSTNAME 1
125 #define LWIP_NETIF_STATUS_CALLBACK 1
126 #define LWIP_NETIF_LINK_CALLBACK 1
128 #elif LWIP_TRANSPORT_PPP
130 #define TCP_SND_BUF (3 * 536)
131 #define TCP_WND (2 * 536)
135 #define PPP_SUPPORT 1
136 #define CHAP_SUPPORT 1
137 #define PAP_SUPPORT 1
138 #define PPP_THREAD_STACKSIZE 4*192
139 #define PPP_THREAD_PRIO 0
141 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
142 #define MAXSECRETLEN 64
145 #error A transport mechanism (Ethernet or PPP) must be defined
148 #endif /* LWIPOPTS_H_ */