-
Notifications
You must be signed in to change notification settings - Fork 0
/
lwipopts.h
446 lines (411 loc) · 18.3 KB
/
lwipopts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
//*****************************************************************************
//
// lwipopts.h - Configuration file for lwIP
//
// Copyright (c) 2014-2015 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 2.1.0.12573 of the EK-TM4C1294XL Firmware Package.
//
//*****************************************************************************
//
// NOTE: This file has been derived from the lwIP/src/include/lwip/opt.h
// header file.
//
// For additional details, refer to the original "opt.h" file, and lwIP
// documentation.
//
//*****************************************************************************
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
//*****************************************************************************
//
// ---------- Stellaris / lwIP Port Options ----------
//
//*****************************************************************************
#define HOST_TMR_INTERVAL 40 // default is 0
//#define DHCP_EXPIRE_TIMER_MSECS (10 * 1000)
#define LWIP_HTTPD_SSI 1
#define LWIP_HTTPD_CGI 1
#define LWIP_HTTPD_MAX_CGI_PARAMETERS 20 // default is 16
#define LWIP_HTTPD_DYNAMIC_HEADERS 1
//#define HTTPD_DEBUG LWIP_DBG_ON
#define EMAC_PHY_CONFIG (EMAC_PHY_TYPE_INTERNAL | EMAC_PHY_INT_MDIX_EN | \
EMAC_PHY_AN_100B_T_FULL_DUPLEX)
#define PHY_PHYS_ADDR 0
#define NUM_TX_DESCRIPTORS 24
#define NUM_RX_DESCRIPTORS 8
//*****************************************************************************
//
// ---------- Platform specific locking ----------
//
//*****************************************************************************
#define SYS_LIGHTWEIGHT_PROT 1 // default is 0
#define NO_SYS 0 // default is 0
#if !NO_SYS
#define LWIP_COMPAT_MUTEX 1
#define RTOS_FREERTOS 1
#endif /* !NO_SYS */
//#define MEMCPY(dst,src,len) memcpy(dst,src,len)
//#define SMEMCPY(dst,src,len) memcpy(dst,src,len)
//*****************************************************************************
//
// ---------- Memory options ----------
//
//*****************************************************************************
//#define MEM_LIBC_MALLOC 0
#define MEM_ALIGNMENT 4
#define MEM_SIZE (64 * 1024)
//#define MEMP_OVERFLOW_CHECK 0
//#define MEMP_SANITY_CHECK 0
//#define MEM_USE_POOLS 0
//#define MEMP_USE_CUSTOM_POOLS 0
//*****************************************************************************
//
// ---------- Internal Memory Pool Sizes ----------
//
//*****************************************************************************
#define MEMP_NUM_PBUF 48 // Default 16
//#define MEMP_NUM_RAW_PCB 4
//#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB 16 // Default 5
//#define MEMP_NUM_TCP_PCB_LISTEN 8
//#define MEMP_NUM_TCP_SEG 16
//#define MEMP_NUM_REASSDATA 5
//#define MEMP_NUM_ARP_QUEUE 30
//#define MEMP_NUM_IGMP_GROUP 8
#define MEMP_NUM_SYS_TIMEOUT 8
//#define MEMP_NUM_NETBUF 2
//#define MEMP_NUM_NETCONN 4
//#define MEMP_NUM_TCPIP_MSG_API 8
//#define MEMP_NUM_TCPIP_MSG_INPKT 8
#define PBUF_POOL_SIZE 48 // Default 16
//*****************************************************************************
//
// ---------- ARP options ----------
//
//*****************************************************************************
//#define LWIP_ARP 1
//#define ARP_TABLE_SIZE 10
//#define ARP_QUEUEING 1
//#define ETHARP_TRUST_IP_MAC 1
//*****************************************************************************
//
// ---------- IP options ----------
//
//*****************************************************************************
//#define IP_FORWARD 0
//#define IP_OPTIONS_ALLOWED 1
#define IP_REASSEMBLY 0 // default is 1
#define IP_FRAG 0 // default is 1
//#define IP_REASS_MAXAGE 3
//#define IP_REASS_MAX_PBUFS 10
//#define IP_FRAG_USES_STATIC_BUF 1
//#define IP_FRAG_MAX_MTU 1500
//#define IP_DEFAULT_TTL 255
//*****************************************************************************
//
// ---------- ICMP options ----------
//
//*****************************************************************************
//#define LWIP_ICMP 1
//#define ICMP_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- RAW options ----------
//
//*****************************************************************************
//#define LWIP_RAW 1
//#define RAW_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- DHCP options ----------
//
//*****************************************************************************
#define LWIP_DHCP 1 // default is 0
//#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
//*****************************************************************************
//
// ---------- UPNP options ----------
//
//*****************************************************************************
//#define LWIP_UPNP 0
//*****************************************************************************
//
// ---------- PTPD options ----------
//
//*****************************************************************************
//#define LWIP_PTPD 0
//*****************************************************************************
//
// ---------- AUTOIP options ----------
//
//*****************************************************************************
#define LWIP_AUTOIP 1 // default is 0
#define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
// default is 0
#define LWIP_DHCP_AUTOIP_COOP_TRIES 5 // default is 9
//*****************************************************************************
//
// ---------- SNMP options ----------
//
//*****************************************************************************
//#define LWIP_SNMP 0
//#define SNMP_CONCURRENT_REQUESTS 1
//#define SNMP_TRAP_DESTINATIONS 1
//#define SNMP_PRIVATE_MIB 0
//#define SNMP_SAFE_REQUESTS 1
//*****************************************************************************
//
// ---------- IGMP options ----------
//
//*****************************************************************************
//#define LWIP_IGMP 0
//*****************************************************************************
//
// ---------- DNS options -----------
//
//*****************************************************************************
//#define LWIP_DNS 0
//#define DNS_TABLE_SIZE 4
//#define DNS_MAX_NAME_LENGTH 256
//#define DNS_MAX_SERVERS 2
//#define DNS_DOES_NAME_CHECK 1
//#define DNS_USES_STATIC_BUF 1
//#define DNS_MSG_SIZE 512
//*****************************************************************************
//
// ---------- UDP options ----------
//
//*****************************************************************************
//#define LWIP_UDP 1
//#define LWIP_UDPLITE 0
//#define UDP_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- TCP options ----------
//
//*****************************************************************************
#define LWIP_TCP 1
//#define TCP_TTL (IP_DEFAULT_TTL)
#define TCP_WND 4096 // default is 2048
//#define TCP_MAXRTX 12
//#define TCP_SYNMAXRTX 6
//#define TCP_QUEUE_OOSEQ 1
#define TCP_MSS 1500 // default is 536
//#define TCP_CALCULATE_EFF_SEND_MSS 1
#define TCP_SND_BUF (4 * TCP_MSS)
// default is 256, was 6 *
//#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))
//#define TCP_SNDLOWAT (TCP_SND_BUF/2)
//#define TCP_LISTEN_BACKLOG 0
//#define TCP_DEFAULT_LISTEN_BACKLOG 0xff
//*****************************************************************************
//
// ---------- API options ----------
//
//*****************************************************************************
//#define LWIP_EVENT_API 0
//#define LWIP_CALLBACK_API 1
//*****************************************************************************
//
// ---------- Pbuf options ----------
//
//*****************************************************************************
#define PBUF_LINK_HLEN 16 // default is 14
#define PBUF_POOL_BUFSIZE 512
// PBUF_POOL_BUFSIZE default is
// LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
#define ETH_PAD_SIZE 0 // default is 0
//*****************************************************************************
//
// ---------- Network Interfaces options ----------
//
//*****************************************************************************
#define LWIP_NETIF_HOSTNAME 1
//#define LWIP_NETIF_API 0
//#define LWIP_NETIF_STATUS_CALLBACK 0
//#define LWIP_NETIF_LINK_CALLBACK 0
//#define LWIP_NETIF_HWADDRHINT 0
//*****************************************************************************
//
// ---------- LOOPIF options ----------
//
//*****************************************************************************
//#define LWIP_HAVE_LOOPIF 0
//#define LWIP_LOOPIF_MULTITHREADING 1
//*****************************************************************************
//
// ---------- Thread options ----------
//
//*****************************************************************************
#define TCPIP_THREAD_NAME "tcpip_thread"
#define TCPIP_THREAD_STACKSIZE 1024
#define TCPIP_THREAD_PRIO 3
#define TCPIP_MBOX_SIZE 32
//#define SLIPIF_THREAD_NAME "slipif_loop"
//#define SLIPIF_THREAD_STACKSIZE 0
//#define SLIPIF_THREAD_PRIO 1
//#define PPP_THREAD_NAME "pppMain"
//#define PPP_THREAD_STACKSIZE 0
//#define PPP_THREAD_PRIO 1
//#define DEFAULT_THREAD_NAME "lwIP"
//#define DEFAULT_THREAD_STACKSIZE 0
//#define DEFAULT_THREAD_PRIO 1
//#define DEFAULT_RAW_RECVMBOX_SIZE 0
//#define DEFAULT_UDP_RECVMBOX_SIZE 0
//#define DEFAULT_TCP_RECVMBOX_SIZE 0
//#define DEFAULT_ACCEPTMBOX_SIZE 0
//*****************************************************************************
//
// ---------- Sequential layer options ----------
//
//*****************************************************************************
//#define LWIP_TCPIP_CORE_LOCKING 0
#define LWIP_NETCONN 0 // default is 1
//*****************************************************************************
//
// ---------- Socket Options ----------
//
//*****************************************************************************
#define LWIP_SOCKET 0 // default is 1
//#define LWIP_COMPAT_SOCKETS 1
//#define LWIP_POSIX_SOCKETS_IO_NAMES 1
//#define LWIP_TCP_KEEPALIVE 0
//#define LWIP_SO_RCVTIMEO 0
//#define LWIP_SO_RCVBUF 0
//#define SO_REUSE 0
//*****************************************************************************
//
// ---------- Statistics options ----------
//
//*****************************************************************************
//#define LWIP_STATS 1
//#define LWIP_STATS_DISPLAY 0
//#define LINK_STATS 1
//#define ETHARP_STATS (LWIP_ARP)
//#define IP_STATS 1
//#define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
//#define ICMP_STATS 1
//#define IGMP_STATS (LWIP_IGMP)
//#define UDP_STATS (LWIP_UDP)
//#define TCP_STATS (LWIP_TCP)
//#define MEM_STATS 1
//#define MEMP_STATS 1
//#define SYS_STATS 1
//*****************************************************************************
//
// ---------- PPP options ----------
//
//*****************************************************************************
//#define PPP_SUPPORT 0
//#define PPPOE_SUPPORT 0
//#define PPPOS_SUPPORT PPP_SUPPORT
#if PPP_SUPPORT
//#define NUM_PPP 1
//#define PAP_SUPPORT 0
//#define CHAP_SUPPORT 0
//#define MSCHAP_SUPPORT 0
//#define CBCP_SUPPORT 0
//#define CCP_SUPPORT 0
//#define VJ_SUPPORT 0
//#define MD5_SUPPORT 0
//#define FSM_DEFTIMEOUT 6
//#define FSM_DEFMAXTERMREQS 2
//#define FSM_DEFMAXCONFREQS 10
//#define FSM_DEFMAXNAKLOOPS 5
//#define UPAP_DEFTIMEOUT 6
//#define UPAP_DEFREQTIME 30
//#define CHAP_DEFTIMEOUT 6
//#define CHAP_DEFTRANSMITS 10
//#define LCP_ECHOINTERVAL 0
//#define LCP_MAXECHOFAILS 3
//#define PPP_MAXIDLEFLAG 100
//#define PPP_MAXMTU 1500
//#define PPP_DEFMRU 296
#endif
//*****************************************************************************
//
// ---------- checksum options ----------
//
//*****************************************************************************
#define CHECKSUM_GEN_IP 0
#define CHECKSUM_GEN_ICMP 0
#define CHECKSUM_GEN_UDP 0
#define CHECKSUM_GEN_TCP 0
#define CHECKSUM_CHECK_IP 0
#define CHECKSUM_CHECK_UDP 0
#define CHECKSUM_CHECK_TCP 0
//*****************************************************************************
//
// ---------- Debugging options ----------
//
//*****************************************************************************
#if 0
#define U8_F "c"
#define S8_F "c"
#define X8_F "x"
#define U16_F "u"
#define S16_F "d"
#define X16_F "x"
#define U32_F "u"
#define S32_F "d"
#define X32_F "x"
extern void UARTprintf(const char *pcString, ...);
#define LWIP_DEBUG
#endif
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_WARNING
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SERIOUS
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SEVERE
//#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE| \
LWIP_DBG_STATE|LWIP_DBG_FRESH)
//#define ETHARP_DEBUG LWIP_DBG_ON // default is OFF
//#define NETIF_DEBUG LWIP_DBG_ON // default is OFF
//#define PBUF_DEBUG LWIP_DBG_OFF
//#define API_LIB_DEBUG LWIP_DBG_OFF
//#define API_MSG_DEBUG LWIP_DBG_OFF
//#define SOCKETS_DEBUG LWIP_DBG_OFF
//#define ICMP_DEBUG LWIP_DBG_OFF
//#define IGMP_DEBUG LWIP_DBG_OFF
//#define INET_DEBUG LWIP_DBG_OFF
//#define IP_DEBUG LWIP_DBG_ON // default is OFF
//#define IP_REASS_DEBUG LWIP_DBG_OFF
//#define RAW_DEBUG LWIP_DBG_OFF
//#define MEM_DEBUG LWIP_DBG_OFF
//#define MEMP_DEBUG LWIP_DBG_OFF
//#define SYS_DEBUG LWIP_DBG_OFF
//#define TCP_DEBUG LWIP_DBG_OFF
//#define TCP_INPUT_DEBUG LWIP_DBG_OFF
//#define TCP_FR_DEBUG LWIP_DBG_OFF
//#define TCP_RTO_DEBUG LWIP_DBG_OFF
//#define TCP_CWND_DEBUG LWIP_DBG_OFF
//#define TCP_WND_DEBUG LWIP_DBG_OFF
//#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
//#define TCP_RST_DEBUG LWIP_DBG_OFF
//#define TCP_QLEN_DEBUG LWIP_DBG_OFF
//#define UDP_DEBUG LWIP_DBG_ON // default is OFF
//#define TCPIP_DEBUG LWIP_DBG_OFF
//#define PPP_DEBUG LWIP_DBG_OFF
//#define SLIP_DEBUG LWIP_DBG_OFF
//#define DHCP_DEBUG LWIP_DBG_ON // default is OFF
//#define AUTOIP_DEBUG LWIP_DBG_OFF
//#define SNMP_MSG_DEBUG LWIP_DBG_OFF
//#define SNMP_MIB_DEBUG LWIP_DBG_OFF
//#define DNS_DEBUG LWIP_DBG_OFF
#endif /* __LWIPOPTS_H__ */