Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lwip by
opt.h
00001 /** 00002 * @file 00003 * 00004 * lwIP Options Configuration 00005 */ 00006 00007 /* 00008 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00009 * All rights reserved. 00010 * 00011 * Redistribution and use in source and binary forms, with or without modification, 00012 * are permitted provided that the following conditions are met: 00013 * 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. The name of the author may not be used to endorse or promote products 00020 * derived from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00023 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00025 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00026 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00027 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00028 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00029 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00030 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00031 * OF SUCH DAMAGE. 00032 * 00033 * This file is part of the lwIP TCP/IP stack. 00034 * 00035 * Author: Adam Dunkels <adam@sics.se> 00036 * 00037 */ 00038 #ifndef __LWIP_OPT_H__ 00039 #define __LWIP_OPT_H__ 00040 00041 /* 00042 * Include user defined options first. Anything not defined in these files 00043 * will be set to standard values. Override anything you dont like! 00044 */ 00045 #include "lwipopts.h" 00046 #include "lwip/debug.h" 00047 00048 /* 00049 ----------------------------------------------- 00050 ---------- Platform specific locking ---------- 00051 ----------------------------------------------- 00052 */ 00053 00054 /** 00055 * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain 00056 * critical regions during buffer allocation, deallocation and memory 00057 * allocation and deallocation. 00058 */ 00059 #ifndef SYS_LIGHTWEIGHT_PROT 00060 #define SYS_LIGHTWEIGHT_PROT 0 00061 #endif 00062 00063 /** 00064 * NO_SYS==1: Provides VERY minimal functionality. Otherwise, 00065 * use lwIP facilities. 00066 */ 00067 #ifndef NO_SYS 00068 #define NO_SYS 0 00069 #endif 00070 00071 /** 00072 * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1 00073 * Mainly for compatibility to old versions. 00074 */ 00075 #ifndef NO_SYS_NO_TIMERS 00076 #define NO_SYS_NO_TIMERS 0 00077 #endif 00078 00079 /** 00080 * MEMCPY: override this if you have a faster implementation at hand than the 00081 * one included in your C library 00082 */ 00083 #ifndef MEMCPY 00084 #define MEMCPY(dst,src,len) memcpy(dst,src,len) 00085 #endif 00086 00087 /** 00088 * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a 00089 * call to memcpy() if the length is known at compile time and is small. 00090 */ 00091 #ifndef SMEMCPY 00092 #define SMEMCPY(dst,src,len) memcpy(dst,src,len) 00093 #endif 00094 00095 /* 00096 ------------------------------------ 00097 ---------- Memory options ---------- 00098 ------------------------------------ 00099 */ 00100 /** 00101 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library 00102 * instead of the lwip internal allocator. Can save code size if you 00103 * already use it. 00104 */ 00105 #ifndef MEM_LIBC_MALLOC 00106 #define MEM_LIBC_MALLOC 0 00107 #endif 00108 00109 /** 00110 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. 00111 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution 00112 * speed and usage from interrupts! 00113 */ 00114 #ifndef MEMP_MEM_MALLOC 00115 #define MEMP_MEM_MALLOC 0 00116 #endif 00117 00118 /** 00119 * MEM_ALIGNMENT: should be set to the alignment of the CPU 00120 * 4 byte alignment -> #define MEM_ALIGNMENT 4 00121 * 2 byte alignment -> #define MEM_ALIGNMENT 2 00122 */ 00123 #ifndef MEM_ALIGNMENT 00124 #define MEM_ALIGNMENT 1 00125 #endif 00126 00127 /** 00128 * MEM_SIZE: the size of the heap memory. If the application will send 00129 * a lot of data that needs to be copied, this should be set high. 00130 */ 00131 #ifndef MEM_SIZE 00132 #define MEM_SIZE 1600 00133 #endif 00134 00135 /** 00136 * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array. 00137 * This can be used to individually change the location of each pool. 00138 * Default is one big array for all pools 00139 */ 00140 #ifndef MEMP_SEPARATE_POOLS 00141 #define MEMP_SEPARATE_POOLS 0 00142 #endif 00143 00144 /** 00145 * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable 00146 * amount of bytes before and after each memp element in every pool and fills 00147 * it with a prominent default value. 00148 * MEMP_OVERFLOW_CHECK == 0 no checking 00149 * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed 00150 * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time 00151 * memp_malloc() or memp_free() is called (useful but slow!) 00152 */ 00153 #ifndef MEMP_OVERFLOW_CHECK 00154 #define MEMP_OVERFLOW_CHECK 0 00155 #endif 00156 00157 /** 00158 * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make 00159 * sure that there are no cycles in the linked lists. 00160 */ 00161 #ifndef MEMP_SANITY_CHECK 00162 #define MEMP_SANITY_CHECK 0 00163 #endif 00164 00165 /** 00166 * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set 00167 * of memory pools of various sizes. When mem_malloc is called, an element of 00168 * the smallest pool that can provide the length needed is returned. 00169 * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. 00170 */ 00171 #ifndef MEM_USE_POOLS 00172 #define MEM_USE_POOLS 0 00173 #endif 00174 00175 /** 00176 * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next 00177 * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more 00178 * reliable. */ 00179 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL 00180 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 00181 #endif 00182 00183 /** 00184 * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h 00185 * that defines additional pools beyond the "standard" ones required 00186 * by lwIP. If you set this to 1, you must have lwippools.h in your 00187 * inlude path somewhere. 00188 */ 00189 #ifndef MEMP_USE_CUSTOM_POOLS 00190 #define MEMP_USE_CUSTOM_POOLS 0 00191 #endif 00192 00193 /** 00194 * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from 00195 * interrupt context (or another context that doesn't allow waiting for a 00196 * semaphore). 00197 * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, 00198 * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs 00199 * with each loop so that mem_free can run. 00200 * 00201 * ATTENTION: As you can see from the above description, this leads to dis-/ 00202 * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc 00203 * can need longer. 00204 * 00205 * If you don't want that, at least for NO_SYS=0, you can still use the following 00206 * functions to enqueue a deallocation call which then runs in the tcpip_thread 00207 * context: 00208 * - pbuf_free_callback(p); 00209 * - mem_free_callback(m); 00210 */ 00211 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 00212 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 00213 #endif 00214 00215 /* 00216 ------------------------------------------------ 00217 ---------- Internal Memory Pool Sizes ---------- 00218 ------------------------------------------------ 00219 */ 00220 /** 00221 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). 00222 * If the application sends a lot of data out of ROM (or other static memory), 00223 * this should be set high. 00224 */ 00225 #ifndef MEMP_NUM_PBUF 00226 #define MEMP_NUM_PBUF 16 00227 #endif 00228 00229 /** 00230 * MEMP_NUM_RAW_PCB: Number of raw connection PCBs 00231 * (requires the LWIP_RAW option) 00232 */ 00233 #ifndef MEMP_NUM_RAW_PCB 00234 #define MEMP_NUM_RAW_PCB 4 00235 #endif 00236 00237 /** 00238 * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One 00239 * per active UDP "connection". 00240 * (requires the LWIP_UDP option) 00241 */ 00242 #ifndef MEMP_NUM_UDP_PCB 00243 #define MEMP_NUM_UDP_PCB 4 00244 #endif 00245 00246 /** 00247 * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. 00248 * (requires the LWIP_TCP option) 00249 */ 00250 #ifndef MEMP_NUM_TCP_PCB 00251 #define MEMP_NUM_TCP_PCB 5 00252 #endif 00253 00254 /** 00255 * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. 00256 * (requires the LWIP_TCP option) 00257 */ 00258 #ifndef MEMP_NUM_TCP_PCB_LISTEN 00259 #define MEMP_NUM_TCP_PCB_LISTEN 8 00260 #endif 00261 00262 /** 00263 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. 00264 * (requires the LWIP_TCP option) 00265 */ 00266 #ifndef MEMP_NUM_TCP_SEG 00267 #define MEMP_NUM_TCP_SEG 16 00268 #endif 00269 00270 /** 00271 * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for 00272 * reassembly (whole packets, not fragments!) 00273 */ 00274 #ifndef MEMP_NUM_REASSDATA 00275 #define MEMP_NUM_REASSDATA 5 00276 #endif 00277 00278 /** 00279 * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent 00280 * (fragments, not whole packets!). 00281 * This is only used with IP_FRAG_USES_STATIC_BUF==0 and 00282 * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs 00283 * where the packet is not yet sent when netif->output returns. 00284 */ 00285 #ifndef MEMP_NUM_FRAG_PBUF 00286 #define MEMP_NUM_FRAG_PBUF 15 00287 #endif 00288 00289 /** 00290 * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing 00291 * packets (pbufs) that are waiting for an ARP request (to resolve 00292 * their destination address) to finish. 00293 * (requires the ARP_QUEUEING option) 00294 */ 00295 #ifndef MEMP_NUM_ARP_QUEUE 00296 #define MEMP_NUM_ARP_QUEUE 30 00297 #endif 00298 00299 /** 00300 * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces 00301 * can be members et the same time (one per netif - allsystems group -, plus one 00302 * per netif membership). 00303 * (requires the LWIP_IGMP option) 00304 */ 00305 #ifndef MEMP_NUM_IGMP_GROUP 00306 #define MEMP_NUM_IGMP_GROUP 8 00307 #endif 00308 00309 /** 00310 * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. 00311 * (requires NO_SYS==0) 00312 */ 00313 #ifndef MEMP_NUM_SYS_TIMEOUT 00314 #define MEMP_NUM_SYS_TIMEOUT 3 00315 #endif 00316 00317 /** 00318 * MEMP_NUM_NETBUF: the number of struct netbufs. 00319 * (only needed if you use the sequential API, like api_lib.c) 00320 */ 00321 #ifndef MEMP_NUM_NETBUF 00322 #define MEMP_NUM_NETBUF 2 00323 #endif 00324 00325 /** 00326 * MEMP_NUM_NETCONN: the number of struct netconns. 00327 * (only needed if you use the sequential API, like api_lib.c) 00328 */ 00329 #ifndef MEMP_NUM_NETCONN 00330 #define MEMP_NUM_NETCONN 4 00331 #endif 00332 00333 /** 00334 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used 00335 * for callback/timeout API communication. 00336 * (only needed if you use tcpip.c) 00337 */ 00338 #ifndef MEMP_NUM_TCPIP_MSG_API 00339 #define MEMP_NUM_TCPIP_MSG_API 8 00340 #endif 00341 00342 /** 00343 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used 00344 * for incoming packets. 00345 * (only needed if you use tcpip.c) 00346 */ 00347 #ifndef MEMP_NUM_TCPIP_MSG_INPKT 00348 #define MEMP_NUM_TCPIP_MSG_INPKT 8 00349 #endif 00350 00351 /** 00352 * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree. 00353 */ 00354 #ifndef MEMP_NUM_SNMP_NODE 00355 #define MEMP_NUM_SNMP_NODE 50 00356 #endif 00357 00358 /** 00359 * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree. 00360 * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least! 00361 */ 00362 #ifndef MEMP_NUM_SNMP_ROOTNODE 00363 #define MEMP_NUM_SNMP_ROOTNODE 30 00364 #endif 00365 00366 /** 00367 * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to 00368 * be changed normally) - 2 of these are used per request (1 for input, 00369 * 1 for output) 00370 */ 00371 #ifndef MEMP_NUM_SNMP_VARBIND 00372 #define MEMP_NUM_SNMP_VARBIND 2 00373 #endif 00374 00375 /** 00376 * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used 00377 * (does not have to be changed normally) - 3 of these are used per request 00378 * (1 for the value read and 2 for OIDs - input and output) 00379 */ 00380 #ifndef MEMP_NUM_SNMP_VALUE 00381 #define MEMP_NUM_SNMP_VALUE 3 00382 #endif 00383 00384 /** 00385 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls 00386 * (before freeing the corresponding memory using lwip_freeaddrinfo()). 00387 */ 00388 #ifndef MEMP_NUM_NETDB 00389 #define MEMP_NUM_NETDB 1 00390 #endif 00391 00392 /** 00393 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list 00394 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. 00395 */ 00396 #ifndef MEMP_NUM_LOCALHOSTLIST 00397 #define MEMP_NUM_LOCALHOSTLIST 1 00398 #endif 00399 00400 /** 00401 * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE 00402 * interfaces (only used with PPPOE_SUPPORT==1) 00403 */ 00404 #ifndef MEMP_NUM_PPPOE_INTERFACES 00405 #define MEMP_NUM_PPPOE_INTERFACES 1 00406 #endif 00407 00408 /** 00409 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. 00410 */ 00411 #ifndef PBUF_POOL_SIZE 00412 #define PBUF_POOL_SIZE 16 00413 #endif 00414 00415 /* 00416 --------------------------------- 00417 ---------- ARP options ---------- 00418 --------------------------------- 00419 */ 00420 /** 00421 * LWIP_ARP==1: Enable ARP functionality. 00422 */ 00423 #ifndef LWIP_ARP 00424 #define LWIP_ARP 1 00425 #endif 00426 00427 /** 00428 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. 00429 */ 00430 #ifndef ARP_TABLE_SIZE 00431 #define ARP_TABLE_SIZE 10 00432 #endif 00433 00434 /** 00435 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address 00436 * resolution. By default, only the most recent packet is queued per IP address. 00437 * This is sufficient for most protocols and mainly reduces TCP connection 00438 * startup time. Set this to 1 if you know your application sends more than one 00439 * packet in a row to an IP address that is not in the ARP cache. 00440 */ 00441 #ifndef ARP_QUEUEING 00442 #define ARP_QUEUEING 0 00443 #endif 00444 00445 /** 00446 * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be 00447 * updated with the source MAC and IP addresses supplied in the packet. 00448 * You may want to disable this if you do not trust LAN peers to have the 00449 * correct addresses, or as a limited approach to attempt to handle 00450 * spoofing. If disabled, lwIP will need to make a new ARP request if 00451 * the peer is not already in the ARP table, adding a little latency. 00452 * The peer *is* in the ARP table if it requested our address before. 00453 * Also notice that this slows down input processing of every IP packet! 00454 */ 00455 #ifndef ETHARP_TRUST_IP_MAC 00456 #define ETHARP_TRUST_IP_MAC 0 00457 #endif 00458 00459 /** 00460 * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header. 00461 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. 00462 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. 00463 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. 00464 */ 00465 #ifndef ETHARP_SUPPORT_VLAN 00466 #define ETHARP_SUPPORT_VLAN 0 00467 #endif 00468 00469 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP 00470 * might be disabled 00471 */ 00472 #ifndef LWIP_ETHERNET 00473 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT) 00474 #endif 00475 00476 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure 00477 * alignment of payload after that header. Since the header is 14 bytes long, 00478 * without this padding e.g. addresses in the IP header will not be aligned 00479 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. 00480 */ 00481 #ifndef ETH_PAD_SIZE 00482 #define ETH_PAD_SIZE 0 00483 #endif 00484 00485 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table 00486 * entries (using etharp_add_static_entry/etharp_remove_static_entry). 00487 */ 00488 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES 00489 #define ETHARP_SUPPORT_STATIC_ENTRIES 0 00490 #endif 00491 00492 00493 /* 00494 -------------------------------- 00495 ---------- IP options ---------- 00496 -------------------------------- 00497 */ 00498 /** 00499 * IP_FORWARD==1: Enables the ability to forward IP packets across network 00500 * interfaces. If you are going to run lwIP on a device with only one network 00501 * interface, define this to 0. 00502 */ 00503 #ifndef IP_FORWARD 00504 #define IP_FORWARD 0 00505 #endif 00506 00507 /** 00508 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. 00509 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. 00510 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). 00511 */ 00512 #ifndef IP_OPTIONS_ALLOWED 00513 #define IP_OPTIONS_ALLOWED 1 00514 #endif 00515 00516 /** 00517 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that 00518 * this option does not affect outgoing packet sizes, which can be controlled 00519 * via IP_FRAG. 00520 */ 00521 #ifndef IP_REASSEMBLY 00522 #define IP_REASSEMBLY 1 00523 #endif 00524 00525 /** 00526 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note 00527 * that this option does not affect incoming packet sizes, which can be 00528 * controlled via IP_REASSEMBLY. 00529 */ 00530 #ifndef IP_FRAG 00531 #define IP_FRAG 1 00532 #endif 00533 00534 /** 00535 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) 00536 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived 00537 * in this time, the whole packet is discarded. 00538 */ 00539 #ifndef IP_REASS_MAXAGE 00540 #define IP_REASS_MAXAGE 3 00541 #endif 00542 00543 /** 00544 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. 00545 * Since the received pbufs are enqueued, be sure to configure 00546 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive 00547 * packets even if the maximum amount of fragments is enqueued for reassembly! 00548 */ 00549 #ifndef IP_REASS_MAX_PBUFS 00550 #define IP_REASS_MAX_PBUFS 10 00551 #endif 00552 00553 /** 00554 * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP 00555 * fragmentation. Otherwise pbufs are allocated and reference the original 00556 * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1, 00557 * new PBUF_RAM pbufs are used for fragments). 00558 * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! 00559 */ 00560 #ifndef IP_FRAG_USES_STATIC_BUF 00561 #define IP_FRAG_USES_STATIC_BUF 0 00562 #endif 00563 00564 /** 00565 * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer 00566 * (requires IP_FRAG_USES_STATIC_BUF==1) 00567 */ 00568 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) 00569 #define IP_FRAG_MAX_MTU 1500 00570 #endif 00571 00572 /** 00573 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. 00574 */ 00575 #ifndef IP_DEFAULT_TTL 00576 #define IP_DEFAULT_TTL 255 00577 #endif 00578 00579 /** 00580 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast 00581 * filter per pcb on udp and raw send operations. To enable broadcast filter 00582 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. 00583 */ 00584 #ifndef IP_SOF_BROADCAST 00585 #define IP_SOF_BROADCAST 0 00586 #endif 00587 00588 /** 00589 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast 00590 * filter on recv operations. 00591 */ 00592 #ifndef IP_SOF_BROADCAST_RECV 00593 #define IP_SOF_BROADCAST_RECV 0 00594 #endif 00595 00596 /* 00597 ---------------------------------- 00598 ---------- ICMP options ---------- 00599 ---------------------------------- 00600 */ 00601 /** 00602 * LWIP_ICMP==1: Enable ICMP module inside the IP stack. 00603 * Be careful, disable that make your product non-compliant to RFC1122 00604 */ 00605 #ifndef LWIP_ICMP 00606 #define LWIP_ICMP 1 00607 #endif 00608 00609 /** 00610 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. 00611 */ 00612 #ifndef ICMP_TTL 00613 #define ICMP_TTL (IP_DEFAULT_TTL) 00614 #endif 00615 00616 /** 00617 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) 00618 */ 00619 #ifndef LWIP_BROADCAST_PING 00620 #define LWIP_BROADCAST_PING 0 00621 #endif 00622 00623 /** 00624 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) 00625 */ 00626 #ifndef LWIP_MULTICAST_PING 00627 #define LWIP_MULTICAST_PING 0 00628 #endif 00629 00630 /* 00631 --------------------------------- 00632 ---------- RAW options ---------- 00633 --------------------------------- 00634 */ 00635 /** 00636 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00637 */ 00638 #ifndef LWIP_RAW 00639 #define LWIP_RAW 1 00640 #endif 00641 00642 /** 00643 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00644 */ 00645 #ifndef RAW_TTL 00646 #define RAW_TTL (IP_DEFAULT_TTL) 00647 #endif 00648 00649 /* 00650 ---------------------------------- 00651 ---------- DHCP options ---------- 00652 ---------------------------------- 00653 */ 00654 /** 00655 * LWIP_DHCP==1: Enable DHCP module. 00656 */ 00657 #ifndef LWIP_DHCP 00658 #define LWIP_DHCP 0 00659 #endif 00660 00661 /** 00662 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. 00663 */ 00664 #ifndef DHCP_DOES_ARP_CHECK 00665 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) 00666 #endif 00667 00668 /* 00669 ------------------------------------ 00670 ---------- AUTOIP options ---------- 00671 ------------------------------------ 00672 */ 00673 /** 00674 * LWIP_AUTOIP==1: Enable AUTOIP module. 00675 */ 00676 #ifndef LWIP_AUTOIP 00677 #define LWIP_AUTOIP 0 00678 #endif 00679 00680 /** 00681 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on 00682 * the same interface at the same time. 00683 */ 00684 #ifndef LWIP_DHCP_AUTOIP_COOP 00685 #define LWIP_DHCP_AUTOIP_COOP 0 00686 #endif 00687 00688 /** 00689 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes 00690 * that should be sent before falling back on AUTOIP. This can be set 00691 * as low as 1 to get an AutoIP address very quickly, but you should 00692 * be prepared to handle a changing IP address when DHCP overrides 00693 * AutoIP. 00694 */ 00695 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES 00696 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 00697 #endif 00698 00699 /* 00700 ---------------------------------- 00701 ---------- SNMP options ---------- 00702 ---------------------------------- 00703 */ 00704 /** 00705 * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP 00706 * transport. 00707 */ 00708 #ifndef LWIP_SNMP 00709 #define LWIP_SNMP 0 00710 #endif 00711 00712 /** 00713 * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will 00714 * allow. At least one request buffer is required. 00715 * Does not have to be changed unless external MIBs answer request asynchronously 00716 */ 00717 #ifndef SNMP_CONCURRENT_REQUESTS 00718 #define SNMP_CONCURRENT_REQUESTS 1 00719 #endif 00720 00721 /** 00722 * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap 00723 * destination is required 00724 */ 00725 #ifndef SNMP_TRAP_DESTINATIONS 00726 #define SNMP_TRAP_DESTINATIONS 1 00727 #endif 00728 00729 /** 00730 * SNMP_PRIVATE_MIB: 00731 * When using a private MIB, you have to create a file 'private_mib.h' that contains 00732 * a 'struct mib_array_node mib_private' which contains your MIB. 00733 */ 00734 #ifndef SNMP_PRIVATE_MIB 00735 #define SNMP_PRIVATE_MIB 0 00736 #endif 00737 00738 /** 00739 * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not 00740 * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). 00741 * Unsafe requests are disabled by default! 00742 */ 00743 #ifndef SNMP_SAFE_REQUESTS 00744 #define SNMP_SAFE_REQUESTS 1 00745 #endif 00746 00747 /** 00748 * The maximum length of strings used. This affects the size of 00749 * MEMP_SNMP_VALUE elements. 00750 */ 00751 #ifndef SNMP_MAX_OCTET_STRING_LEN 00752 #define SNMP_MAX_OCTET_STRING_LEN 127 00753 #endif 00754 00755 /** 00756 * The maximum depth of the SNMP tree. 00757 * With private MIBs enabled, this depends on your MIB! 00758 * This affects the size of MEMP_SNMP_VALUE elements. 00759 */ 00760 #ifndef SNMP_MAX_TREE_DEPTH 00761 #define SNMP_MAX_TREE_DEPTH 15 00762 #endif 00763 00764 /** 00765 * The size of the MEMP_SNMP_VALUE elements, normally calculated from 00766 * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH. 00767 */ 00768 #ifndef SNMP_MAX_VALUE_SIZE 00769 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH)) 00770 #endif 00771 00772 /* 00773 ---------------------------------- 00774 ---------- IGMP options ---------- 00775 ---------------------------------- 00776 */ 00777 /** 00778 * LWIP_IGMP==1: Turn on IGMP module. 00779 */ 00780 #ifndef LWIP_IGMP 00781 #define LWIP_IGMP 0 00782 #endif 00783 00784 /* 00785 ---------------------------------- 00786 ---------- DNS options ----------- 00787 ---------------------------------- 00788 */ 00789 /** 00790 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS 00791 * transport. 00792 */ 00793 #ifndef LWIP_DNS 00794 #define LWIP_DNS 0 00795 #endif 00796 00797 /** DNS maximum number of entries to maintain locally. */ 00798 #ifndef DNS_TABLE_SIZE 00799 #define DNS_TABLE_SIZE 4 00800 #endif 00801 00802 /** DNS maximum host name length supported in the name table. */ 00803 #ifndef DNS_MAX_NAME_LENGTH 00804 #define DNS_MAX_NAME_LENGTH 256 00805 #endif 00806 00807 /** The maximum of DNS servers */ 00808 #ifndef DNS_MAX_SERVERS 00809 #define DNS_MAX_SERVERS 2 00810 #endif 00811 00812 /** DNS do a name checking between the query and the response. */ 00813 #ifndef DNS_DOES_NAME_CHECK 00814 #define DNS_DOES_NAME_CHECK 1 00815 #endif 00816 00817 /** DNS message max. size. Default value is RFC compliant. */ 00818 #ifndef DNS_MSG_SIZE 00819 #define DNS_MSG_SIZE 512 00820 #endif 00821 00822 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, 00823 * you have to define 00824 * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}} 00825 * (an array of structs name/address, where address is an u32_t in network 00826 * byte order). 00827 * 00828 * Instead, you can also use an external function: 00829 * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name) 00830 * that returns the IP address or INADDR_NONE if not found. 00831 */ 00832 #ifndef DNS_LOCAL_HOSTLIST 00833 #define DNS_LOCAL_HOSTLIST 0 00834 #endif /* DNS_LOCAL_HOSTLIST */ 00835 00836 /** If this is turned on, the local host-list can be dynamically changed 00837 * at runtime. */ 00838 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC 00839 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 00840 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 00841 00842 /* 00843 --------------------------------- 00844 ---------- UDP options ---------- 00845 --------------------------------- 00846 */ 00847 /** 00848 * LWIP_UDP==1: Turn on UDP. 00849 */ 00850 #ifndef LWIP_UDP 00851 #define LWIP_UDP 1 00852 #endif 00853 00854 /** 00855 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) 00856 */ 00857 #ifndef LWIP_UDPLITE 00858 #define LWIP_UDPLITE 0 00859 #endif 00860 00861 /** 00862 * UDP_TTL: Default Time-To-Live value. 00863 */ 00864 #ifndef UDP_TTL 00865 #define UDP_TTL (IP_DEFAULT_TTL) 00866 #endif 00867 00868 /** 00869 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. 00870 */ 00871 #ifndef LWIP_NETBUF_RECVINFO 00872 #define LWIP_NETBUF_RECVINFO 0 00873 #endif 00874 00875 /* 00876 --------------------------------- 00877 ---------- TCP options ---------- 00878 --------------------------------- 00879 */ 00880 /** 00881 * LWIP_TCP==1: Turn on TCP. 00882 */ 00883 #ifndef LWIP_TCP 00884 #define LWIP_TCP 1 00885 #endif 00886 00887 /** 00888 * TCP_TTL: Default Time-To-Live value. 00889 */ 00890 #ifndef TCP_TTL 00891 #define TCP_TTL (IP_DEFAULT_TTL) 00892 #endif 00893 00894 /** 00895 * TCP_WND: The size of a TCP window. This must be at least 00896 * (2 * TCP_MSS) for things to work well 00897 */ 00898 #ifndef TCP_WND 00899 #define TCP_WND (4 * TCP_MSS) 00900 #endif 00901 00902 /** 00903 * TCP_MAXRTX: Maximum number of retransmissions of data segments. 00904 */ 00905 #ifndef TCP_MAXRTX 00906 #define TCP_MAXRTX 12 00907 #endif 00908 00909 /** 00910 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. 00911 */ 00912 #ifndef TCP_SYNMAXRTX 00913 #define TCP_SYNMAXRTX 6 00914 #endif 00915 00916 /** 00917 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. 00918 * Define to 0 if your device is low on memory. 00919 */ 00920 #ifndef TCP_QUEUE_OOSEQ 00921 #define TCP_QUEUE_OOSEQ (LWIP_TCP) 00922 #endif 00923 00924 /** 00925 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, 00926 * you might want to increase this.) 00927 * For the receive side, this MSS is advertised to the remote side 00928 * when opening a connection. For the transmit size, this MSS sets 00929 * an upper limit on the MSS advertised by the remote host. 00930 */ 00931 #ifndef TCP_MSS 00932 #define TCP_MSS 536 00933 #endif 00934 00935 /** 00936 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really 00937 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which 00938 * reflects the available reassembly buffer size at the remote host) and the 00939 * largest size permitted by the IP layer" (RFC 1122) 00940 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the 00941 * netif used for a connection and limits the MSS if it would be too big otherwise. 00942 */ 00943 #ifndef TCP_CALCULATE_EFF_SEND_MSS 00944 #define TCP_CALCULATE_EFF_SEND_MSS 1 00945 #endif 00946 00947 00948 /** 00949 * TCP_SND_BUF: TCP sender buffer space (bytes). 00950 */ 00951 #ifndef TCP_SND_BUF 00952 #define TCP_SND_BUF 256 00953 #endif 00954 00955 /** 00956 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least 00957 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. 00958 */ 00959 #ifndef TCP_SND_QUEUELEN 00960 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 00961 #endif 00962 00963 /** 00964 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than 00965 * TCP_SND_BUF. It is the amount of space which must be available in the 00966 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). 00967 */ 00968 #ifndef TCP_SNDLOWAT 00969 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2) 00970 #endif 00971 00972 /** 00973 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be grater 00974 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below 00975 * this number, select returns writable (combined with TCP_SNDLOWAT). 00976 */ 00977 #ifndef TCP_SNDQUEUELOWAT 00978 #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2) 00979 #endif 00980 00981 /** 00982 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. 00983 */ 00984 #ifndef TCP_LISTEN_BACKLOG 00985 #define TCP_LISTEN_BACKLOG 0 00986 #endif 00987 00988 /** 00989 * The maximum allowed backlog for TCP listen netconns. 00990 * This backlog is used unless another is explicitly specified. 00991 * 0xff is the maximum (u8_t). 00992 */ 00993 #ifndef TCP_DEFAULT_LISTEN_BACKLOG 00994 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff 00995 #endif 00996 00997 /** 00998 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may 00999 * allocate ahead of time in an attempt to create shorter pbuf chains 01000 * for transmission. The meaningful range is 0 to TCP_MSS. Some 01001 * suggested values are: 01002 * 01003 * 0: Disable oversized allocation. Each tcp_write() allocates a new 01004 pbuf (old behaviour). 01005 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your 01006 * scatter-gather DMA requires aligned fragments. 01007 * 128: Limit the pbuf/memory overhead to 20%. 01008 * TCP_MSS: Try to create unfragmented TCP packets. 01009 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. 01010 */ 01011 #ifndef TCP_OVERSIZE 01012 #define TCP_OVERSIZE TCP_MSS 01013 #endif 01014 01015 /** 01016 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. 01017 */ 01018 #ifndef LWIP_TCP_TIMESTAMPS 01019 #define LWIP_TCP_TIMESTAMPS 0 01020 #endif 01021 01022 /** 01023 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an 01024 * explicit window update 01025 */ 01026 #ifndef TCP_WND_UPDATE_THRESHOLD 01027 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4) 01028 #endif 01029 01030 /** 01031 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. 01032 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all 01033 * events (accept, sent, etc) that happen in the system. 01034 * LWIP_CALLBACK_API==1: The PCB callback function is called directly 01035 * for the event. 01036 */ 01037 #ifndef LWIP_EVENT_API 01038 #define LWIP_EVENT_API 0 01039 #define LWIP_CALLBACK_API 1 01040 #else 01041 #define LWIP_EVENT_API 1 01042 #define LWIP_CALLBACK_API 0 01043 #endif 01044 01045 01046 /* 01047 ---------------------------------- 01048 ---------- Pbuf options ---------- 01049 ---------------------------------- 01050 */ 01051 /** 01052 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a 01053 * link level header. The default is 14, the standard value for 01054 * Ethernet. 01055 */ 01056 #ifndef PBUF_LINK_HLEN 01057 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 01058 #endif 01059 01060 /** 01061 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is 01062 * designed to accomodate single full size TCP frame in one pbuf, including 01063 * TCP_MSS, IP header, and link header. 01064 */ 01065 #ifndef PBUF_POOL_BUFSIZE 01066 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN) 01067 #endif 01068 01069 /* 01070 ------------------------------------------------ 01071 ---------- Network Interfaces options ---------- 01072 ------------------------------------------------ 01073 */ 01074 /** 01075 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname 01076 * field. 01077 */ 01078 #ifndef LWIP_NETIF_HOSTNAME 01079 #define LWIP_NETIF_HOSTNAME 0 01080 #endif 01081 01082 /** 01083 * LWIP_NETIF_API==1: Support netif api (in netifapi.c) 01084 */ 01085 #ifndef LWIP_NETIF_API 01086 #define LWIP_NETIF_API 0 01087 #endif 01088 01089 /** 01090 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface 01091 * changes its up/down status (i.e., due to DHCP IP acquistion) 01092 */ 01093 #ifndef LWIP_NETIF_STATUS_CALLBACK 01094 #define LWIP_NETIF_STATUS_CALLBACK 0 01095 #endif 01096 01097 /** 01098 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface 01099 * whenever the link changes (i.e., link down) 01100 */ 01101 #ifndef LWIP_NETIF_LINK_CALLBACK 01102 #define LWIP_NETIF_LINK_CALLBACK 0 01103 #endif 01104 01105 /** 01106 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table 01107 * indices) in struct netif. TCP and UDP can make use of this to prevent 01108 * scanning the ARP table for every sent packet. While this is faster for big 01109 * ARP tables or many concurrent connections, it might be counterproductive 01110 * if you have a tiny ARP table or if there never are concurrent connections. 01111 */ 01112 #ifndef LWIP_NETIF_HWADDRHINT 01113 #define LWIP_NETIF_HWADDRHINT 0 01114 #endif 01115 01116 /** 01117 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP 01118 * address equal to the netif IP address, looping them back up the stack. 01119 */ 01120 #ifndef LWIP_NETIF_LOOPBACK 01121 #define LWIP_NETIF_LOOPBACK 0 01122 #endif 01123 01124 /** 01125 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback 01126 * sending for each netif (0 = disabled) 01127 */ 01128 #ifndef LWIP_LOOPBACK_MAX_PBUFS 01129 #define LWIP_LOOPBACK_MAX_PBUFS 0 01130 #endif 01131 01132 /** 01133 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in 01134 * the system, as netifs must change how they behave depending on this setting 01135 * for the LWIP_NETIF_LOOPBACK option to work. 01136 * Setting this is needed to avoid reentering non-reentrant functions like 01137 * tcp_input(). 01138 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a 01139 * multithreaded environment like tcpip.c. In this case, netif->input() 01140 * is called directly. 01141 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. 01142 * The packets are put on a list and netif_poll() must be called in 01143 * the main application loop. 01144 */ 01145 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING 01146 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) 01147 #endif 01148 01149 /** 01150 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data 01151 * to be sent into one single pbuf. This is for compatibility with DMA-enabled 01152 * MACs that do not support scatter-gather. 01153 * Beware that this might involve CPU-memcpy before transmitting that would not 01154 * be needed without this flag! Use this only if you need to! 01155 * 01156 * @todo: TCP and IP-frag do not work with this, yet: 01157 */ 01158 #ifndef LWIP_NETIF_TX_SINGLE_PBUF 01159 #define LWIP_NETIF_TX_SINGLE_PBUF 0 01160 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ 01161 01162 /* 01163 ------------------------------------ 01164 ---------- LOOPIF options ---------- 01165 ------------------------------------ 01166 */ 01167 /** 01168 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c 01169 */ 01170 #ifndef LWIP_HAVE_LOOPIF 01171 #define LWIP_HAVE_LOOPIF 0 01172 #endif 01173 01174 /* 01175 ------------------------------------ 01176 ---------- SLIPIF options ---------- 01177 ------------------------------------ 01178 */ 01179 /** 01180 * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c 01181 */ 01182 #ifndef LWIP_HAVE_SLIPIF 01183 #define LWIP_HAVE_SLIPIF 0 01184 #endif 01185 01186 /* 01187 ------------------------------------ 01188 ---------- Thread options ---------- 01189 ------------------------------------ 01190 */ 01191 /** 01192 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. 01193 */ 01194 #ifndef TCPIP_THREAD_NAME 01195 #define TCPIP_THREAD_NAME "tcpip_thread" 01196 #endif 01197 01198 /** 01199 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. 01200 * The stack size value itself is platform-dependent, but is passed to 01201 * sys_thread_new() when the thread is created. 01202 */ 01203 #ifndef TCPIP_THREAD_STACKSIZE 01204 #define TCPIP_THREAD_STACKSIZE 0 01205 #endif 01206 01207 /** 01208 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. 01209 * The priority value itself is platform-dependent, but is passed to 01210 * sys_thread_new() when the thread is created. 01211 */ 01212 #ifndef TCPIP_THREAD_PRIO 01213 #define TCPIP_THREAD_PRIO 1 01214 #endif 01215 01216 /** 01217 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages 01218 * The queue size value itself is platform-dependent, but is passed to 01219 * sys_mbox_new() when tcpip_init is called. 01220 */ 01221 #ifndef TCPIP_MBOX_SIZE 01222 #define TCPIP_MBOX_SIZE 0 01223 #endif 01224 01225 /** 01226 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. 01227 */ 01228 #ifndef SLIPIF_THREAD_NAME 01229 #define SLIPIF_THREAD_NAME "slipif_loop" 01230 #endif 01231 01232 /** 01233 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. 01234 * The stack size value itself is platform-dependent, but is passed to 01235 * sys_thread_new() when the thread is created. 01236 */ 01237 #ifndef SLIPIF_THREAD_STACKSIZE 01238 #define SLIPIF_THREAD_STACKSIZE 0 01239 #endif 01240 01241 /** 01242 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. 01243 * The priority value itself is platform-dependent, but is passed to 01244 * sys_thread_new() when the thread is created. 01245 */ 01246 #ifndef SLIPIF_THREAD_PRIO 01247 #define SLIPIF_THREAD_PRIO 1 01248 #endif 01249 01250 /** 01251 * PPP_THREAD_NAME: The name assigned to the pppInputThread. 01252 */ 01253 #ifndef PPP_THREAD_NAME 01254 #define PPP_THREAD_NAME "pppInputThread" 01255 #endif 01256 01257 /** 01258 * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread. 01259 * The stack size value itself is platform-dependent, but is passed to 01260 * sys_thread_new() when the thread is created. 01261 */ 01262 #ifndef PPP_THREAD_STACKSIZE 01263 #define PPP_THREAD_STACKSIZE 0 01264 #endif 01265 01266 /** 01267 * PPP_THREAD_PRIO: The priority assigned to the pppInputThread. 01268 * The priority value itself is platform-dependent, but is passed to 01269 * sys_thread_new() when the thread is created. 01270 */ 01271 #ifndef PPP_THREAD_PRIO 01272 #define PPP_THREAD_PRIO 1 01273 #endif 01274 01275 /** 01276 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. 01277 */ 01278 #ifndef DEFAULT_THREAD_NAME 01279 #define DEFAULT_THREAD_NAME "lwIP" 01280 #endif 01281 01282 /** 01283 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. 01284 * The stack size value itself is platform-dependent, but is passed to 01285 * sys_thread_new() when the thread is created. 01286 */ 01287 #ifndef DEFAULT_THREAD_STACKSIZE 01288 #define DEFAULT_THREAD_STACKSIZE 0 01289 #endif 01290 01291 /** 01292 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. 01293 * The priority value itself is platform-dependent, but is passed to 01294 * sys_thread_new() when the thread is created. 01295 */ 01296 #ifndef DEFAULT_THREAD_PRIO 01297 #define DEFAULT_THREAD_PRIO 1 01298 #endif 01299 01300 /** 01301 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01302 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed 01303 * to sys_mbox_new() when the recvmbox is created. 01304 */ 01305 #ifndef DEFAULT_RAW_RECVMBOX_SIZE 01306 #define DEFAULT_RAW_RECVMBOX_SIZE 0 01307 #endif 01308 01309 /** 01310 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01311 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed 01312 * to sys_mbox_new() when the recvmbox is created. 01313 */ 01314 #ifndef DEFAULT_UDP_RECVMBOX_SIZE 01315 #define DEFAULT_UDP_RECVMBOX_SIZE 0 01316 #endif 01317 01318 /** 01319 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01320 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed 01321 * to sys_mbox_new() when the recvmbox is created. 01322 */ 01323 #ifndef DEFAULT_TCP_RECVMBOX_SIZE 01324 #define DEFAULT_TCP_RECVMBOX_SIZE 0 01325 #endif 01326 01327 /** 01328 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. 01329 * The queue size value itself is platform-dependent, but is passed to 01330 * sys_mbox_new() when the acceptmbox is created. 01331 */ 01332 #ifndef DEFAULT_ACCEPTMBOX_SIZE 01333 #define DEFAULT_ACCEPTMBOX_SIZE 0 01334 #endif 01335 01336 /* 01337 ---------------------------------------------- 01338 ---------- Sequential layer options ---------- 01339 ---------------------------------------------- 01340 */ 01341 /** 01342 * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!) 01343 * Don't use it if you're not an active lwIP project member 01344 */ 01345 #ifndef LWIP_TCPIP_CORE_LOCKING 01346 #define LWIP_TCPIP_CORE_LOCKING 0 01347 #endif 01348 01349 /** 01350 * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!) 01351 * Don't use it if you're not an active lwIP project member 01352 */ 01353 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT 01354 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 01355 #endif 01356 01357 /** 01358 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) 01359 */ 01360 #ifndef LWIP_NETCONN 01361 #define LWIP_NETCONN 1 01362 #endif 01363 01364 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create 01365 * timers running in tcpip_thread from another thread. 01366 */ 01367 #ifndef LWIP_TCPIP_TIMEOUT 01368 #define LWIP_TCPIP_TIMEOUT 1 01369 #endif 01370 01371 /* 01372 ------------------------------------ 01373 ---------- Socket options ---------- 01374 ------------------------------------ 01375 */ 01376 /** 01377 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) 01378 */ 01379 #ifndef LWIP_SOCKET 01380 #define LWIP_SOCKET 1 01381 #endif 01382 01383 /** 01384 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names. 01385 * (only used if you use sockets.c) 01386 */ 01387 #ifndef LWIP_COMPAT_SOCKETS 01388 #define LWIP_COMPAT_SOCKETS 1 01389 #endif 01390 01391 /** 01392 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. 01393 * Disable this option if you use a POSIX operating system that uses the same 01394 * names (read, write & close). (only used if you use sockets.c) 01395 */ 01396 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES 01397 #define LWIP_POSIX_SOCKETS_IO_NAMES 1 01398 #endif 01399 01400 /** 01401 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT 01402 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set 01403 * in seconds. (does not require sockets.c, and will affect tcp.c) 01404 */ 01405 #ifndef LWIP_TCP_KEEPALIVE 01406 #define LWIP_TCP_KEEPALIVE 0 01407 #endif 01408 01409 /** 01410 * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing. 01411 */ 01412 #ifndef LWIP_SO_RCVTIMEO 01413 #define LWIP_SO_RCVTIMEO 0 01414 #endif 01415 01416 /** 01417 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. 01418 */ 01419 #ifndef LWIP_SO_RCVBUF 01420 #define LWIP_SO_RCVBUF 0 01421 #endif 01422 01423 /** 01424 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. 01425 */ 01426 #ifndef RECV_BUFSIZE_DEFAULT 01427 #define RECV_BUFSIZE_DEFAULT INT_MAX 01428 #endif 01429 01430 /** 01431 * SO_REUSE==1: Enable SO_REUSEADDR option. 01432 */ 01433 #ifndef SO_REUSE 01434 #define SO_REUSE 0 01435 #endif 01436 01437 /** 01438 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets 01439 * to all local matches if SO_REUSEADDR is turned on. 01440 * WARNING: Adds a memcpy for every packet if passing to more than one pcb! 01441 */ 01442 #ifndef SO_REUSE_RXTOALL 01443 #define SO_REUSE_RXTOALL 0 01444 #endif 01445 01446 /* 01447 ---------------------------------------- 01448 ---------- Statistics options ---------- 01449 ---------------------------------------- 01450 */ 01451 /** 01452 * LWIP_STATS==1: Enable statistics collection in lwip_stats. 01453 */ 01454 #ifndef LWIP_STATS 01455 #define LWIP_STATS 1 01456 #endif 01457 01458 #if LWIP_STATS 01459 01460 /** 01461 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. 01462 */ 01463 #ifndef LWIP_STATS_DISPLAY 01464 #define LWIP_STATS_DISPLAY 0 01465 #endif 01466 01467 /** 01468 * LINK_STATS==1: Enable link stats. 01469 */ 01470 #ifndef LINK_STATS 01471 #define LINK_STATS 1 01472 #endif 01473 01474 /** 01475 * ETHARP_STATS==1: Enable etharp stats. 01476 */ 01477 #ifndef ETHARP_STATS 01478 #define ETHARP_STATS (LWIP_ARP) 01479 #endif 01480 01481 /** 01482 * IP_STATS==1: Enable IP stats. 01483 */ 01484 #ifndef IP_STATS 01485 #define IP_STATS 1 01486 #endif 01487 01488 /** 01489 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is 01490 * on if using either frag or reass. 01491 */ 01492 #ifndef IPFRAG_STATS 01493 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) 01494 #endif 01495 01496 /** 01497 * ICMP_STATS==1: Enable ICMP stats. 01498 */ 01499 #ifndef ICMP_STATS 01500 #define ICMP_STATS 1 01501 #endif 01502 01503 /** 01504 * IGMP_STATS==1: Enable IGMP stats. 01505 */ 01506 #ifndef IGMP_STATS 01507 #define IGMP_STATS (LWIP_IGMP) 01508 #endif 01509 01510 /** 01511 * UDP_STATS==1: Enable UDP stats. Default is on if 01512 * UDP enabled, otherwise off. 01513 */ 01514 #ifndef UDP_STATS 01515 #define UDP_STATS (LWIP_UDP) 01516 #endif 01517 01518 /** 01519 * TCP_STATS==1: Enable TCP stats. Default is on if TCP 01520 * enabled, otherwise off. 01521 */ 01522 #ifndef TCP_STATS 01523 #define TCP_STATS (LWIP_TCP) 01524 #endif 01525 01526 /** 01527 * MEM_STATS==1: Enable mem.c stats. 01528 */ 01529 #ifndef MEM_STATS 01530 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) 01531 #endif 01532 01533 /** 01534 * MEMP_STATS==1: Enable memp.c pool stats. 01535 */ 01536 #ifndef MEMP_STATS 01537 #define MEMP_STATS (MEMP_MEM_MALLOC == 0) 01538 #endif 01539 01540 /** 01541 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). 01542 */ 01543 #ifndef SYS_STATS 01544 #define SYS_STATS (NO_SYS == 0) 01545 #endif 01546 01547 #else 01548 01549 #define LINK_STATS 0 01550 #define IP_STATS 0 01551 #define IPFRAG_STATS 0 01552 #define ICMP_STATS 0 01553 #define IGMP_STATS 0 01554 #define UDP_STATS 0 01555 #define TCP_STATS 0 01556 #define MEM_STATS 0 01557 #define MEMP_STATS 0 01558 #define SYS_STATS 0 01559 #define LWIP_STATS_DISPLAY 0 01560 01561 #endif /* LWIP_STATS */ 01562 01563 /* 01564 --------------------------------- 01565 ---------- PPP options ---------- 01566 --------------------------------- 01567 */ 01568 /** 01569 * PPP_SUPPORT==1: Enable PPP. 01570 */ 01571 #ifndef PPP_SUPPORT 01572 #define PPP_SUPPORT 0 01573 #endif 01574 01575 /** 01576 * PPPOE_SUPPORT==1: Enable PPP Over Ethernet 01577 */ 01578 #ifndef PPPOE_SUPPORT 01579 #define PPPOE_SUPPORT 0 01580 #endif 01581 01582 /** 01583 * PPPOS_SUPPORT==1: Enable PPP Over Serial 01584 */ 01585 #ifndef PPPOS_SUPPORT 01586 #define PPPOS_SUPPORT PPP_SUPPORT 01587 #endif 01588 01589 #if PPP_SUPPORT 01590 01591 /** 01592 * NUM_PPP: Max PPP sessions. 01593 */ 01594 #ifndef NUM_PPP 01595 #define NUM_PPP 1 01596 #endif 01597 01598 /** 01599 * PAP_SUPPORT==1: Support PAP. 01600 */ 01601 #ifndef PAP_SUPPORT 01602 #define PAP_SUPPORT 0 01603 #endif 01604 01605 /** 01606 * CHAP_SUPPORT==1: Support CHAP. 01607 */ 01608 #ifndef CHAP_SUPPORT 01609 #define CHAP_SUPPORT 0 01610 #endif 01611 01612 /** 01613 * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01614 */ 01615 #ifndef MSCHAP_SUPPORT 01616 #define MSCHAP_SUPPORT 0 01617 #endif 01618 01619 /** 01620 * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01621 */ 01622 #ifndef CBCP_SUPPORT 01623 #define CBCP_SUPPORT 0 01624 #endif 01625 01626 /** 01627 * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01628 */ 01629 #ifndef CCP_SUPPORT 01630 #define CCP_SUPPORT 0 01631 #endif 01632 01633 /** 01634 * VJ_SUPPORT==1: Support VJ header compression. 01635 */ 01636 #ifndef VJ_SUPPORT 01637 #define VJ_SUPPORT 0 01638 #endif 01639 01640 /** 01641 * MD5_SUPPORT==1: Support MD5 (see also CHAP). 01642 */ 01643 #ifndef MD5_SUPPORT 01644 #define MD5_SUPPORT 0 01645 #endif 01646 01647 /* 01648 * Timeouts 01649 */ 01650 #ifndef FSM_DEFTIMEOUT 01651 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ 01652 #endif 01653 01654 #ifndef FSM_DEFMAXTERMREQS 01655 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ 01656 #endif 01657 01658 #ifndef FSM_DEFMAXCONFREQS 01659 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ 01660 #endif 01661 01662 #ifndef FSM_DEFMAXNAKLOOPS 01663 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ 01664 #endif 01665 01666 #ifndef UPAP_DEFTIMEOUT 01667 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ 01668 #endif 01669 01670 #ifndef UPAP_DEFREQTIME 01671 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ 01672 #endif 01673 01674 #ifndef CHAP_DEFTIMEOUT 01675 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ 01676 #endif 01677 01678 #ifndef CHAP_DEFTRANSMITS 01679 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ 01680 #endif 01681 01682 /* Interval in seconds between keepalive echo requests, 0 to disable. */ 01683 #ifndef LCP_ECHOINTERVAL 01684 #define LCP_ECHOINTERVAL 0 01685 #endif 01686 01687 /* Number of unanswered echo requests before failure. */ 01688 #ifndef LCP_MAXECHOFAILS 01689 #define LCP_MAXECHOFAILS 3 01690 #endif 01691 01692 /* Max Xmit idle time (in jiffies) before resend flag char. */ 01693 #ifndef PPP_MAXIDLEFLAG 01694 #define PPP_MAXIDLEFLAG 100 01695 #endif 01696 01697 /* 01698 * Packet sizes 01699 * 01700 * Note - lcp shouldn't be allowed to negotiate stuff outside these 01701 * limits. See lcp.h in the pppd directory. 01702 * (XXX - these constants should simply be shared by lcp.c instead 01703 * of living in lcp.h) 01704 */ 01705 #define PPP_MTU 1500 /* Default MTU (size of Info field) */ 01706 #ifndef PPP_MAXMTU 01707 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */ 01708 #define PPP_MAXMTU 1500 /* Largest MTU we allow */ 01709 #endif 01710 #define PPP_MINMTU 64 01711 #define PPP_MRU 1500 /* default MRU = max length of info field */ 01712 #define PPP_MAXMRU 1500 /* Largest MRU we allow */ 01713 #ifndef PPP_DEFMRU 01714 #define PPP_DEFMRU 296 /* Try for this */ 01715 #endif 01716 #define PPP_MINMRU 128 /* No MRUs below this */ 01717 01718 #ifndef MAXNAMELEN 01719 #define MAXNAMELEN 256 /* max length of hostname or name for auth */ 01720 #endif 01721 #ifndef MAXSECRETLEN 01722 #define MAXSECRETLEN 256 /* max length of password or secret */ 01723 #endif 01724 01725 #endif /* PPP_SUPPORT */ 01726 01727 /* 01728 -------------------------------------- 01729 ---------- Checksum options ---------- 01730 -------------------------------------- 01731 */ 01732 /** 01733 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. 01734 */ 01735 #ifndef CHECKSUM_GEN_IP 01736 #define CHECKSUM_GEN_IP 1 01737 #endif 01738 01739 /** 01740 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. 01741 */ 01742 #ifndef CHECKSUM_GEN_UDP 01743 #define CHECKSUM_GEN_UDP 1 01744 #endif 01745 01746 /** 01747 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. 01748 */ 01749 #ifndef CHECKSUM_GEN_TCP 01750 #define CHECKSUM_GEN_TCP 1 01751 #endif 01752 01753 /** 01754 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. 01755 */ 01756 #ifndef CHECKSUM_CHECK_IP 01757 #define CHECKSUM_CHECK_IP 1 01758 #endif 01759 01760 /** 01761 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. 01762 */ 01763 #ifndef CHECKSUM_CHECK_UDP 01764 #define CHECKSUM_CHECK_UDP 1 01765 #endif 01766 01767 /** 01768 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. 01769 */ 01770 #ifndef CHECKSUM_CHECK_TCP 01771 #define CHECKSUM_CHECK_TCP 1 01772 #endif 01773 01774 /** 01775 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from 01776 * application buffers to pbufs. 01777 */ 01778 #ifndef LWIP_CHECKSUM_ON_COPY 01779 #define LWIP_CHECKSUM_ON_COPY 0 01780 #endif 01781 01782 /* 01783 --------------------------------------- 01784 ---------- Debugging options ---------- 01785 --------------------------------------- 01786 */ 01787 /** 01788 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is 01789 * compared against this value. If it is smaller, then debugging 01790 * messages are written. 01791 */ 01792 #ifndef LWIP_DBG_MIN_LEVEL 01793 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL 01794 #endif 01795 01796 /** 01797 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable 01798 * debug messages of certain types. 01799 */ 01800 #ifndef LWIP_DBG_TYPES_ON 01801 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON 01802 #endif 01803 01804 /** 01805 * ETHARP_DEBUG: Enable debugging in etharp.c. 01806 */ 01807 #ifndef ETHARP_DEBUG 01808 #define ETHARP_DEBUG LWIP_DBG_OFF 01809 #endif 01810 01811 /** 01812 * NETIF_DEBUG: Enable debugging in netif.c. 01813 */ 01814 #ifndef NETIF_DEBUG 01815 #define NETIF_DEBUG LWIP_DBG_OFF 01816 #endif 01817 01818 /** 01819 * PBUF_DEBUG: Enable debugging in pbuf.c. 01820 */ 01821 #ifndef PBUF_DEBUG 01822 #define PBUF_DEBUG LWIP_DBG_OFF 01823 #endif 01824 01825 /** 01826 * API_LIB_DEBUG: Enable debugging in api_lib.c. 01827 */ 01828 #ifndef API_LIB_DEBUG 01829 #define API_LIB_DEBUG LWIP_DBG_OFF 01830 #endif 01831 01832 /** 01833 * API_MSG_DEBUG: Enable debugging in api_msg.c. 01834 */ 01835 #ifndef API_MSG_DEBUG 01836 #define API_MSG_DEBUG LWIP_DBG_OFF 01837 #endif 01838 01839 /** 01840 * SOCKETS_DEBUG: Enable debugging in sockets.c. 01841 */ 01842 #ifndef SOCKETS_DEBUG 01843 #define SOCKETS_DEBUG LWIP_DBG_OFF 01844 #endif 01845 01846 /** 01847 * ICMP_DEBUG: Enable debugging in icmp.c. 01848 */ 01849 #ifndef ICMP_DEBUG 01850 #define ICMP_DEBUG LWIP_DBG_OFF 01851 #endif 01852 01853 /** 01854 * IGMP_DEBUG: Enable debugging in igmp.c. 01855 */ 01856 #ifndef IGMP_DEBUG 01857 #define IGMP_DEBUG LWIP_DBG_OFF 01858 #endif 01859 01860 /** 01861 * INET_DEBUG: Enable debugging in inet.c. 01862 */ 01863 #ifndef INET_DEBUG 01864 #define INET_DEBUG LWIP_DBG_OFF 01865 #endif 01866 01867 /** 01868 * IP_DEBUG: Enable debugging for IP. 01869 */ 01870 #ifndef IP_DEBUG 01871 #define IP_DEBUG LWIP_DBG_OFF 01872 #endif 01873 01874 /** 01875 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. 01876 */ 01877 #ifndef IP_REASS_DEBUG 01878 #define IP_REASS_DEBUG LWIP_DBG_OFF 01879 #endif 01880 01881 /** 01882 * RAW_DEBUG: Enable debugging in raw.c. 01883 */ 01884 #ifndef RAW_DEBUG 01885 #define RAW_DEBUG LWIP_DBG_OFF 01886 #endif 01887 01888 /** 01889 * MEM_DEBUG: Enable debugging in mem.c. 01890 */ 01891 #ifndef MEM_DEBUG 01892 #define MEM_DEBUG LWIP_DBG_OFF 01893 #endif 01894 01895 /** 01896 * MEMP_DEBUG: Enable debugging in memp.c. 01897 */ 01898 #ifndef MEMP_DEBUG 01899 #define MEMP_DEBUG LWIP_DBG_OFF 01900 #endif 01901 01902 /** 01903 * SYS_DEBUG: Enable debugging in sys.c. 01904 */ 01905 #ifndef SYS_DEBUG 01906 #define SYS_DEBUG LWIP_DBG_OFF 01907 #endif 01908 01909 /** 01910 * TIMERS_DEBUG: Enable debugging in timers.c. 01911 */ 01912 #ifndef TIMERS_DEBUG 01913 #define TIMERS_DEBUG LWIP_DBG_OFF 01914 #endif 01915 01916 /** 01917 * TCP_DEBUG: Enable debugging for TCP. 01918 */ 01919 #ifndef TCP_DEBUG 01920 #define TCP_DEBUG LWIP_DBG_OFF 01921 #endif 01922 01923 /** 01924 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. 01925 */ 01926 #ifndef TCP_INPUT_DEBUG 01927 #define TCP_INPUT_DEBUG LWIP_DBG_OFF 01928 #endif 01929 01930 /** 01931 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. 01932 */ 01933 #ifndef TCP_FR_DEBUG 01934 #define TCP_FR_DEBUG LWIP_DBG_OFF 01935 #endif 01936 01937 /** 01938 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit 01939 * timeout. 01940 */ 01941 #ifndef TCP_RTO_DEBUG 01942 #define TCP_RTO_DEBUG LWIP_DBG_OFF 01943 #endif 01944 01945 /** 01946 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. 01947 */ 01948 #ifndef TCP_CWND_DEBUG 01949 #define TCP_CWND_DEBUG LWIP_DBG_OFF 01950 #endif 01951 01952 /** 01953 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. 01954 */ 01955 #ifndef TCP_WND_DEBUG 01956 #define TCP_WND_DEBUG LWIP_DBG_OFF 01957 #endif 01958 01959 /** 01960 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. 01961 */ 01962 #ifndef TCP_OUTPUT_DEBUG 01963 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF 01964 #endif 01965 01966 /** 01967 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. 01968 */ 01969 #ifndef TCP_RST_DEBUG 01970 #define TCP_RST_DEBUG LWIP_DBG_OFF 01971 #endif 01972 01973 /** 01974 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. 01975 */ 01976 #ifndef TCP_QLEN_DEBUG 01977 #define TCP_QLEN_DEBUG LWIP_DBG_OFF 01978 #endif 01979 01980 /** 01981 * UDP_DEBUG: Enable debugging in UDP. 01982 */ 01983 #ifndef UDP_DEBUG 01984 #define UDP_DEBUG LWIP_DBG_OFF 01985 #endif 01986 01987 /** 01988 * TCPIP_DEBUG: Enable debugging in tcpip.c. 01989 */ 01990 #ifndef TCPIP_DEBUG 01991 #define TCPIP_DEBUG LWIP_DBG_OFF 01992 #endif 01993 01994 /** 01995 * PPP_DEBUG: Enable debugging for PPP. 01996 */ 01997 #ifndef PPP_DEBUG 01998 #define PPP_DEBUG LWIP_DBG_OFF 01999 #endif 02000 02001 /** 02002 * SLIP_DEBUG: Enable debugging in slipif.c. 02003 */ 02004 #ifndef SLIP_DEBUG 02005 #define SLIP_DEBUG LWIP_DBG_OFF 02006 #endif 02007 02008 /** 02009 * DHCP_DEBUG: Enable debugging in dhcp.c. 02010 */ 02011 #ifndef DHCP_DEBUG 02012 #define DHCP_DEBUG LWIP_DBG_OFF 02013 #endif 02014 02015 /** 02016 * AUTOIP_DEBUG: Enable debugging in autoip.c. 02017 */ 02018 #ifndef AUTOIP_DEBUG 02019 #define AUTOIP_DEBUG LWIP_DBG_OFF 02020 #endif 02021 02022 /** 02023 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages. 02024 */ 02025 #ifndef SNMP_MSG_DEBUG 02026 #define SNMP_MSG_DEBUG LWIP_DBG_OFF 02027 #endif 02028 02029 /** 02030 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. 02031 */ 02032 #ifndef SNMP_MIB_DEBUG 02033 #define SNMP_MIB_DEBUG LWIP_DBG_OFF 02034 #endif 02035 02036 /** 02037 * DNS_DEBUG: Enable debugging for DNS. 02038 */ 02039 #ifndef DNS_DEBUG 02040 #define DNS_DEBUG LWIP_DBG_OFF 02041 #endif 02042 02043 #endif /* __LWIP_OPT_H__ */
Generated on Tue Jul 12 2022 13:44:41 by
