00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __LWIP_OPT_H__
00033 #define __LWIP_OPT_H__
00034
00035
00036 #include "lwipopts.h"
00037 #include "lwip/debug.h"
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifndef SYS_LIGHTWEIGHT_PROT
00049 #define SYS_LIGHTWEIGHT_PROT 0
00050 #endif
00051
00052 #ifndef NO_SYS
00053 #define NO_SYS 0
00054 #endif
00055
00056 #ifndef MEM_LIBC_MALLOC
00057 #define MEM_LIBC_MALLOC 0
00058 #endif
00059
00060
00061
00062
00063
00064 #ifndef MEM_ALIGNMENT
00065 #define MEM_ALIGNMENT 1
00066 #endif
00067
00068
00069
00070 #ifndef MEM_SIZE
00071 #define MEM_SIZE 1600
00072 #endif
00073
00074 #ifndef MEMP_SANITY_CHECK
00075 #define MEMP_SANITY_CHECK 0
00076 #endif
00077
00078
00079
00080
00081 #ifndef MEMP_NUM_PBUF
00082 #define MEMP_NUM_PBUF 16
00083 #endif
00084
00085
00086 #ifndef MEMP_NUM_RAW_PCB
00087 #define MEMP_NUM_RAW_PCB 4
00088 #endif
00089
00090
00091
00092 #ifndef MEMP_NUM_UDP_PCB
00093 #define MEMP_NUM_UDP_PCB 4
00094 #endif
00095
00096
00097 #ifndef MEMP_NUM_TCP_PCB
00098 #define MEMP_NUM_TCP_PCB 5
00099 #endif
00100
00101
00102 #ifndef MEMP_NUM_TCP_PCB_LISTEN
00103 #define MEMP_NUM_TCP_PCB_LISTEN 8
00104 #endif
00105
00106
00107 #ifndef MEMP_NUM_TCP_SEG
00108 #define MEMP_NUM_TCP_SEG 16
00109 #endif
00110
00111
00112 #ifndef MEMP_NUM_SYS_TIMEOUT
00113 #define MEMP_NUM_SYS_TIMEOUT 3
00114 #endif
00115
00116
00117
00118
00119 #ifndef MEMP_NUM_NETBUF
00120 #define MEMP_NUM_NETBUF 2
00121 #endif
00122
00123 #ifndef MEMP_NUM_NETCONN
00124 #define MEMP_NUM_NETCONN 4
00125 #endif
00126
00127
00128
00129 #ifndef MEMP_NUM_API_MSG
00130 #define MEMP_NUM_API_MSG 8
00131 #endif
00132
00133
00134
00135 #ifndef MEMP_NUM_TCPIP_MSG
00136 #define MEMP_NUM_TCPIP_MSG 8
00137 #endif
00138
00139
00140
00141
00142 #ifndef PBUF_POOL_SIZE
00143 #define PBUF_POOL_SIZE 16
00144 #endif
00145
00146
00147
00148 #ifndef PBUF_POOL_BUFSIZE
00149 #define PBUF_POOL_BUFSIZE 128
00150 #endif
00151
00152
00153
00154
00155 #ifndef PBUF_LINK_HLEN
00156 #define PBUF_LINK_HLEN 14
00157 #endif
00158
00159
00160
00161
00162
00164 #ifndef ARP_TABLE_SIZE
00165 #define ARP_TABLE_SIZE 10
00166 #endif
00167
00180 #ifndef ARP_QUEUEING
00181 #define ARP_QUEUEING 1
00182 #endif
00183
00184
00185 #ifdef ETHARP_QUEUE_FIRST
00186 #error ETHARP_QUEUE_FIRST option is deprecated. Remove it from your lwipopts.h.
00187 #endif
00188
00189
00190 #ifdef ETHARP_ALWAYS_INSERT
00191 #error ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h.
00192 #endif
00193
00194
00195
00196
00197
00198 #ifndef IP_FORWARD
00199 #define IP_FORWARD 0
00200 #endif
00201
00202
00203
00204 #ifndef IP_OPTIONS
00205 #define IP_OPTIONS 1
00206 #endif
00207
00214 #ifndef IP_REASSEMBLY
00215 #define IP_REASSEMBLY 1
00216 #endif
00217
00219 #ifndef IP_FRAG
00220 #define IP_FRAG 1
00221 #endif
00222
00223
00224 #ifndef IP_REASS_MAXAGE
00225 #define IP_REASS_MAXAGE 3
00226 #endif
00227
00228
00229 #ifndef IP_REASS_BUFSIZE
00230 #define IP_REASS_BUFSIZE 5760
00231 #endif
00232
00233
00234 #ifndef IP_FRAG_MAX_MTU
00235 #define IP_FRAG_MAX_MTU 1500
00236 #endif
00237
00239 #ifndef IP_DEFAULT_TTL
00240 #define IP_DEFAULT_TTL 255
00241 #endif
00242
00243
00244
00245 #ifndef ICMP_TTL
00246 #define ICMP_TTL (IP_DEFAULT_TTL)
00247 #endif
00248
00249
00250
00251 #ifndef LWIP_RAW
00252 #define LWIP_RAW 1
00253 #endif
00254
00255 #ifndef RAW_TTL
00256 #define RAW_TTL (IP_DEFAULT_TTL)
00257 #endif
00258
00259
00260
00261 #ifndef LWIP_DHCP
00262 #define LWIP_DHCP 0
00263 #endif
00264
00265
00266
00267 #ifndef DHCP_DOES_ARP_CHECK
00268 #define DHCP_DOES_ARP_CHECK 1
00269 #endif
00270
00271
00273 #ifndef LWIP_SNMP
00274 #define LWIP_SNMP 0
00275 #endif
00276
00278 #ifndef SNMP_CONCURRENT_REQUESTS
00279 #define SNMP_CONCURRENT_REQUESTS 1
00280 #endif
00281
00283 #ifndef SNMP_TRAP_DESTINATIONS
00284 #define SNMP_TRAP_DESTINATIONS 1
00285 #endif
00286
00287 #ifndef SNMP_PRIVATE_MIB
00288 #define SNMP_PRIVATE_MIB 0
00289 #endif
00290
00291
00292 #ifndef LWIP_UDP
00293 #define LWIP_UDP 1
00294 #endif
00295
00296 #ifndef UDP_TTL
00297 #define UDP_TTL (IP_DEFAULT_TTL)
00298 #endif
00299
00300
00301 #ifndef LWIP_TCP
00302 #define LWIP_TCP 1
00303 #endif
00304
00305 #ifndef TCP_TTL
00306 #define TCP_TTL (IP_DEFAULT_TTL)
00307 #endif
00308
00309 #ifndef TCP_WND
00310 #define TCP_WND 2048
00311 #endif
00312
00313 #ifndef TCP_MAXRTX
00314 #define TCP_MAXRTX 12
00315 #endif
00316
00317 #ifndef TCP_SYNMAXRTX
00318 #define TCP_SYNMAXRTX 6
00319 #endif
00320
00321
00322
00323
00324 #ifndef TCP_QUEUE_OOSEQ
00325 #define TCP_QUEUE_OOSEQ 1
00326 #endif
00327
00328
00329 #ifndef TCP_MSS
00330 #define TCP_MSS 128
00331 #endif
00332
00333
00334 #ifndef TCP_SND_BUF
00335 #define TCP_SND_BUF 256
00336 #endif
00337
00338
00339
00340 #ifndef TCP_SND_QUEUELEN
00341 #define TCP_SND_QUEUELEN 4 * TCP_SND_BUF/TCP_MSS
00342 #endif
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352 #ifndef TCP_SNDLOWAT
00353 #define TCP_SNDLOWAT TCP_SND_BUF/2
00354 #endif
00355
00356
00357 #ifndef LWIP_HAVE_LOOPIF
00358 #define LWIP_HAVE_LOOPIF 0
00359 #endif
00360
00361 #ifndef LWIP_EVENT_API
00362 #define LWIP_EVENT_API 0
00363 #define LWIP_CALLBACK_API 1
00364 #else
00365 #define LWIP_EVENT_API 1
00366 #define LWIP_CALLBACK_API 0
00367 #endif
00368
00369 #ifndef LWIP_COMPAT_SOCKETS
00370 #define LWIP_COMPAT_SOCKETS 1
00371 #endif
00372
00373
00374 #ifndef TCPIP_THREAD_PRIO
00375 #define TCPIP_THREAD_PRIO 1
00376 #endif
00377
00378 #ifndef SLIPIF_THREAD_PRIO
00379 #define SLIPIF_THREAD_PRIO 1
00380 #endif
00381
00382 #ifndef PPP_THREAD_PRIO
00383 #define PPP_THREAD_PRIO 1
00384 #endif
00385
00386 #ifndef DEFAULT_THREAD_PRIO
00387 #define DEFAULT_THREAD_PRIO 1
00388 #endif
00389
00390
00391
00392
00393 #ifdef SO_REUSE
00394
00395
00396 #error "SO_REUSE currently unavailable, this was a hack"
00397 #endif
00398
00399
00400
00401 #ifndef LWIP_STATS
00402 #define LWIP_STATS 1
00403 #endif
00404
00405 #if LWIP_STATS
00406
00407 #ifndef LWIP_STATS_DISPLAY
00408 #define LWIP_STATS_DISPLAY 0
00409 #endif
00410
00411 #ifndef LINK_STATS
00412 #define LINK_STATS 1
00413 #endif
00414
00415 #ifndef IP_STATS
00416 #define IP_STATS 1
00417 #endif
00418
00419 #ifndef IPFRAG_STATS
00420 #define IPFRAG_STATS 1
00421 #endif
00422
00423 #ifndef ICMP_STATS
00424 #define ICMP_STATS 1
00425 #endif
00426
00427 #ifndef UDP_STATS
00428 #define UDP_STATS 1
00429 #endif
00430
00431 #ifndef TCP_STATS
00432 #define TCP_STATS 1
00433 #endif
00434
00435 #ifndef MEM_STATS
00436 #define MEM_STATS 1
00437 #endif
00438
00439 #ifndef MEMP_STATS
00440 #define MEMP_STATS 1
00441 #endif
00442
00443 #ifndef PBUF_STATS
00444 #define PBUF_STATS 1
00445 #endif
00446
00447 #ifndef SYS_STATS
00448 #define SYS_STATS 1
00449 #endif
00450
00451 #ifndef RAW_STATS
00452 #define RAW_STATS 0
00453 #endif
00454
00455 #else
00456
00457 #define LINK_STATS 0
00458 #define IP_STATS 0
00459 #define IPFRAG_STATS 0
00460 #define ICMP_STATS 0
00461 #define UDP_STATS 0
00462 #define TCP_STATS 0
00463 #define MEM_STATS 0
00464 #define MEMP_STATS 0
00465 #define PBUF_STATS 0
00466 #define SYS_STATS 0
00467 #define RAW_STATS 0
00468 #define LWIP_STATS_DISPLAY 0
00469
00470 #endif
00471
00472
00473
00474 #ifndef PPP_SUPPORT
00475 #define PPP_SUPPORT 0
00476 #endif
00477
00478 #if PPP_SUPPORT
00479
00480 #define NUM_PPP 1
00481
00482
00483
00484 #ifndef PAP_SUPPORT
00485 #define PAP_SUPPORT 0
00486 #endif
00487
00488 #ifndef CHAP_SUPPORT
00489 #define CHAP_SUPPORT 0
00490 #endif
00491
00492 #define MSCHAP_SUPPORT 0
00493 #define CBCP_SUPPORT 0
00494 #define CCP_SUPPORT 0
00495
00496 #ifndef VJ_SUPPORT
00497 #define VJ_SUPPORT 0
00498 #endif
00499
00500 #ifndef MD5_SUPPORT
00501 #define MD5_SUPPORT 0
00502 #endif
00503
00504
00505
00506
00507
00508 #define FSM_DEFTIMEOUT 6
00509 #define FSM_DEFMAXTERMREQS 2
00510 #define FSM_DEFMAXCONFREQS 10
00511 #define FSM_DEFMAXNAKLOOPS 5
00512
00513 #define UPAP_DEFTIMEOUT 6
00514 #define UPAP_DEFREQTIME 30
00515
00516 #define CHAP_DEFTIMEOUT 6
00517 #define CHAP_DEFTRANSMITS 10
00518
00519
00520
00521 #if 1
00522 #define LCP_ECHOINTERVAL 0
00523 #else
00524 #define LCP_ECHOINTERVAL 10
00525 #endif
00526
00527
00528 #define LCP_MAXECHOFAILS 3
00529
00530
00531 #define PPP_MAXIDLEFLAG 100
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541 #define PPP_MTU 1500
00542 #if 0
00543 #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
00544 #else
00545 #define PPP_MAXMTU 1500
00546 #endif
00547 #define PPP_MINMTU 64
00548 #define PPP_MRU 1500
00549 #define PPP_MAXMRU 1500
00550 #define PPP_DEFMRU 296
00551 #define PPP_MINMRU 128
00552
00553
00554 #define MAXNAMELEN 256
00555 #define MAXSECRETLEN 256
00556
00557 #endif
00558
00559
00560
00561 #ifndef CHECKSUM_GEN_IP
00562 #define CHECKSUM_GEN_IP 1
00563 #endif
00564
00565 #ifndef CHECKSUM_GEN_UDP
00566 #define CHECKSUM_GEN_UDP 1
00567 #endif
00568
00569 #ifndef CHECKSUM_GEN_TCP
00570 #define CHECKSUM_GEN_TCP 1
00571 #endif
00572
00573 #ifndef CHECKSUM_CHECK_IP
00574 #define CHECKSUM_CHECK_IP 1
00575 #endif
00576
00577 #ifndef CHECKSUM_CHECK_UDP
00578 #define CHECKSUM_CHECK_UDP 1
00579 #endif
00580
00581 #ifndef CHECKSUM_CHECK_TCP
00582 #define CHECKSUM_CHECK_TCP 1
00583 #endif
00584
00585
00586
00587 #ifndef DBG_TYPES_ON
00588 #define DBG_TYPES_ON 0
00589 #endif
00590
00591 #ifndef ETHARP_DEBUG
00592 #define ETHARP_DEBUG DBG_OFF
00593 #endif
00594
00595 #ifndef NETIF_DEBUG
00596 #define NETIF_DEBUG DBG_OFF
00597 #endif
00598
00599 #ifndef PBUF_DEBUG
00600 #define PBUF_DEBUG DBG_OFF
00601 #endif
00602
00603 #ifndef API_LIB_DEBUG
00604 #define API_LIB_DEBUG DBG_OFF
00605 #endif
00606
00607 #ifndef API_MSG_DEBUG
00608 #define API_MSG_DEBUG DBG_OFF
00609 #endif
00610
00611 #ifndef SOCKETS_DEBUG
00612 #define SOCKETS_DEBUG DBG_OFF
00613 #endif
00614
00615 #ifndef ICMP_DEBUG
00616 #define ICMP_DEBUG DBG_OFF
00617 #endif
00618
00619 #ifndef INET_DEBUG
00620 #define INET_DEBUG DBG_OFF
00621 #endif
00622
00623 #ifndef IP_DEBUG
00624 #define IP_DEBUG DBG_OFF
00625 #endif
00626
00627 #ifndef IP_REASS_DEBUG
00628 #define IP_REASS_DEBUG DBG_OFF
00629 #endif
00630
00631 #ifndef RAW_DEBUG
00632 #define RAW_DEBUG DBG_OFF
00633 #endif
00634
00635 #ifndef MEM_DEBUG
00636 #define MEM_DEBUG DBG_OFF
00637 #endif
00638
00639 #ifndef MEMP_DEBUG
00640 #define MEMP_DEBUG DBG_OFF
00641 #endif
00642
00643 #ifndef SYS_DEBUG
00644 #define SYS_DEBUG DBG_OFF
00645 #endif
00646
00647 #ifndef TCP_DEBUG
00648 #define TCP_DEBUG DBG_OFF
00649 #endif
00650
00651 #ifndef TCP_INPUT_DEBUG
00652 #define TCP_INPUT_DEBUG DBG_OFF
00653 #endif
00654
00655 #ifndef TCP_FR_DEBUG
00656 #define TCP_FR_DEBUG DBG_OFF
00657 #endif
00658
00659 #ifndef TCP_RTO_DEBUG
00660 #define TCP_RTO_DEBUG DBG_OFF
00661 #endif
00662
00663 #ifndef TCP_REXMIT_DEBUG
00664 #define TCP_REXMIT_DEBUG DBG_OFF
00665 #endif
00666
00667 #ifndef TCP_CWND_DEBUG
00668 #define TCP_CWND_DEBUG DBG_OFF
00669 #endif
00670
00671 #ifndef TCP_WND_DEBUG
00672 #define TCP_WND_DEBUG DBG_OFF
00673 #endif
00674
00675 #ifndef TCP_OUTPUT_DEBUG
00676 #define TCP_OUTPUT_DEBUG DBG_OFF
00677 #endif
00678
00679 #ifndef TCP_RST_DEBUG
00680 #define TCP_RST_DEBUG DBG_OFF
00681 #endif
00682
00683 #ifndef TCP_QLEN_DEBUG
00684 #define TCP_QLEN_DEBUG DBG_OFF
00685 #endif
00686
00687 #ifndef UDP_DEBUG
00688 #define UDP_DEBUG DBG_OFF
00689 #endif
00690
00691 #ifndef TCPIP_DEBUG
00692 #define TCPIP_DEBUG DBG_OFF
00693 #endif
00694
00695 #ifndef PPP_DEBUG
00696 #define PPP_DEBUG DBG_OFF
00697 #endif
00698
00699 #ifndef SLIP_DEBUG
00700 #define SLIP_DEBUG DBG_OFF
00701 #endif
00702
00703 #ifndef DHCP_DEBUG
00704 #define DHCP_DEBUG DBG_OFF
00705 #endif
00706
00707 #ifndef SNMP_MSG_DEBUG
00708 #define SNMP_MSG_DEBUG DBG_OFF
00709 #endif
00710
00711 #ifndef SNMP_MIB_DEBUG
00712 #define SNMP_MIB_DEBUG DBG_OFF
00713 #endif
00714
00715 #ifndef DBG_MIN_LEVEL
00716 #define DBG_MIN_LEVEL DBG_LEVEL_OFF
00717 #endif
00718
00719 #endif
00720
00721
00722