lwip-1.4.1 (partial)
Embed:
(wiki syntax)
Show/hide line numbers
opt.h
Go to the documentation of this file.
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 * The default number of timeouts is calculated here for all enabled modules. 00313 * The formula expects settings to be either '0' or '1'. 00314 */ 00315 #ifndef MEMP_NUM_SYS_TIMEOUT 00316 #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT) 00317 #endif 00318 00319 /** 00320 * MEMP_NUM_NETBUF: the number of struct netbufs. 00321 * (only needed if you use the sequential API, like api_lib.c) 00322 */ 00323 #ifndef MEMP_NUM_NETBUF 00324 #define MEMP_NUM_NETBUF 2 00325 #endif 00326 00327 /** 00328 * MEMP_NUM_NETCONN: the number of struct netconns. 00329 * (only needed if you use the sequential API, like api_lib.c) 00330 */ 00331 #ifndef MEMP_NUM_NETCONN 00332 #define MEMP_NUM_NETCONN 4 00333 #endif 00334 00335 /** 00336 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used 00337 * for callback/timeout API communication. 00338 * (only needed if you use tcpip.c) 00339 */ 00340 #ifndef MEMP_NUM_TCPIP_MSG_API 00341 #define MEMP_NUM_TCPIP_MSG_API 8 00342 #endif 00343 00344 /** 00345 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used 00346 * for incoming packets. 00347 * (only needed if you use tcpip.c) 00348 */ 00349 #ifndef MEMP_NUM_TCPIP_MSG_INPKT 00350 #define MEMP_NUM_TCPIP_MSG_INPKT 8 00351 #endif 00352 00353 /** 00354 * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree. 00355 */ 00356 #ifndef MEMP_NUM_SNMP_NODE 00357 #define MEMP_NUM_SNMP_NODE 50 00358 #endif 00359 00360 /** 00361 * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree. 00362 * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least! 00363 */ 00364 #ifndef MEMP_NUM_SNMP_ROOTNODE 00365 #define MEMP_NUM_SNMP_ROOTNODE 30 00366 #endif 00367 00368 /** 00369 * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to 00370 * be changed normally) - 2 of these are used per request (1 for input, 00371 * 1 for output) 00372 */ 00373 #ifndef MEMP_NUM_SNMP_VARBIND 00374 #define MEMP_NUM_SNMP_VARBIND 2 00375 #endif 00376 00377 /** 00378 * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used 00379 * (does not have to be changed normally) - 3 of these are used per request 00380 * (1 for the value read and 2 for OIDs - input and output) 00381 */ 00382 #ifndef MEMP_NUM_SNMP_VALUE 00383 #define MEMP_NUM_SNMP_VALUE 3 00384 #endif 00385 00386 /** 00387 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls 00388 * (before freeing the corresponding memory using lwip_freeaddrinfo()). 00389 */ 00390 #ifndef MEMP_NUM_NETDB 00391 #define MEMP_NUM_NETDB 1 00392 #endif 00393 00394 /** 00395 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list 00396 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. 00397 */ 00398 #ifndef MEMP_NUM_LOCALHOSTLIST 00399 #define MEMP_NUM_LOCALHOSTLIST 1 00400 #endif 00401 00402 /** 00403 * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE 00404 * interfaces (only used with PPPOE_SUPPORT==1) 00405 */ 00406 #ifndef MEMP_NUM_PPPOE_INTERFACES 00407 #define MEMP_NUM_PPPOE_INTERFACES 1 00408 #endif 00409 00410 /** 00411 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. 00412 */ 00413 #ifndef PBUF_POOL_SIZE 00414 #define PBUF_POOL_SIZE 16 00415 #endif 00416 00417 /* 00418 --------------------------------- 00419 ---------- ARP options ---------- 00420 --------------------------------- 00421 */ 00422 /** 00423 * LWIP_ARP==1: Enable ARP functionality. 00424 */ 00425 #ifndef LWIP_ARP 00426 #define LWIP_ARP 1 00427 #endif 00428 00429 /** 00430 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. 00431 */ 00432 #ifndef ARP_TABLE_SIZE 00433 #define ARP_TABLE_SIZE 10 00434 #endif 00435 00436 /** 00437 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address 00438 * resolution. By default, only the most recent packet is queued per IP address. 00439 * This is sufficient for most protocols and mainly reduces TCP connection 00440 * startup time. Set this to 1 if you know your application sends more than one 00441 * packet in a row to an IP address that is not in the ARP cache. 00442 */ 00443 #ifndef ARP_QUEUEING 00444 #define ARP_QUEUEING 0 00445 #endif 00446 00447 /** 00448 * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be 00449 * updated with the source MAC and IP addresses supplied in the packet. 00450 * You may want to disable this if you do not trust LAN peers to have the 00451 * correct addresses, or as a limited approach to attempt to handle 00452 * spoofing. If disabled, lwIP will need to make a new ARP request if 00453 * the peer is not already in the ARP table, adding a little latency. 00454 * The peer *is* in the ARP table if it requested our address before. 00455 * Also notice that this slows down input processing of every IP packet! 00456 */ 00457 #ifndef ETHARP_TRUST_IP_MAC 00458 #define ETHARP_TRUST_IP_MAC 0 00459 #endif 00460 00461 /** 00462 * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header. 00463 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. 00464 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. 00465 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. 00466 * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) 00467 * that returns 1 to accept a packet or 0 to drop a packet. 00468 */ 00469 #ifndef ETHARP_SUPPORT_VLAN 00470 #define ETHARP_SUPPORT_VLAN 0 00471 #endif 00472 00473 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP 00474 * might be disabled 00475 */ 00476 #ifndef LWIP_ETHERNET 00477 #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT) 00478 #endif 00479 00480 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure 00481 * alignment of payload after that header. Since the header is 14 bytes long, 00482 * without this padding e.g. addresses in the IP header will not be aligned 00483 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. 00484 */ 00485 #ifndef ETH_PAD_SIZE 00486 #define ETH_PAD_SIZE 0 00487 #endif 00488 00489 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table 00490 * entries (using etharp_add_static_entry/etharp_remove_static_entry). 00491 */ 00492 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES 00493 #define ETHARP_SUPPORT_STATIC_ENTRIES 0 00494 #endif 00495 00496 00497 /* 00498 -------------------------------- 00499 ---------- IP options ---------- 00500 -------------------------------- 00501 */ 00502 /** 00503 * IP_FORWARD==1: Enables the ability to forward IP packets across network 00504 * interfaces. If you are going to run lwIP on a device with only one network 00505 * interface, define this to 0. 00506 */ 00507 #ifndef IP_FORWARD 00508 #define IP_FORWARD 0 00509 #endif 00510 00511 /** 00512 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. 00513 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. 00514 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). 00515 */ 00516 #ifndef IP_OPTIONS_ALLOWED 00517 #define IP_OPTIONS_ALLOWED 1 00518 #endif 00519 00520 /** 00521 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that 00522 * this option does not affect outgoing packet sizes, which can be controlled 00523 * via IP_FRAG. 00524 */ 00525 #ifndef IP_REASSEMBLY 00526 #define IP_REASSEMBLY 1 00527 #endif 00528 00529 /** 00530 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note 00531 * that this option does not affect incoming packet sizes, which can be 00532 * controlled via IP_REASSEMBLY. 00533 */ 00534 #ifndef IP_FRAG 00535 #define IP_FRAG 1 00536 #endif 00537 00538 /** 00539 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) 00540 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived 00541 * in this time, the whole packet is discarded. 00542 */ 00543 #ifndef IP_REASS_MAXAGE 00544 #define IP_REASS_MAXAGE 3 00545 #endif 00546 00547 /** 00548 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. 00549 * Since the received pbufs are enqueued, be sure to configure 00550 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive 00551 * packets even if the maximum amount of fragments is enqueued for reassembly! 00552 */ 00553 #ifndef IP_REASS_MAX_PBUFS 00554 #define IP_REASS_MAX_PBUFS 10 00555 #endif 00556 00557 /** 00558 * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP 00559 * fragmentation. Otherwise pbufs are allocated and reference the original 00560 * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1, 00561 * new PBUF_RAM pbufs are used for fragments). 00562 * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! 00563 */ 00564 #ifndef IP_FRAG_USES_STATIC_BUF 00565 #define IP_FRAG_USES_STATIC_BUF 0 00566 #endif 00567 00568 /** 00569 * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer 00570 * (requires IP_FRAG_USES_STATIC_BUF==1) 00571 */ 00572 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) 00573 #define IP_FRAG_MAX_MTU 1500 00574 #endif 00575 00576 /** 00577 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. 00578 */ 00579 #ifndef IP_DEFAULT_TTL 00580 #define IP_DEFAULT_TTL 255 00581 #endif 00582 00583 /** 00584 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast 00585 * filter per pcb on udp and raw send operations. To enable broadcast filter 00586 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. 00587 */ 00588 #ifndef IP_SOF_BROADCAST 00589 #define IP_SOF_BROADCAST 0 00590 #endif 00591 00592 /** 00593 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast 00594 * filter on recv operations. 00595 */ 00596 #ifndef IP_SOF_BROADCAST_RECV 00597 #define IP_SOF_BROADCAST_RECV 0 00598 #endif 00599 00600 /** 00601 * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back 00602 * out on the netif where it was received. This should only be used for 00603 * wireless networks. 00604 * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming 00605 * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! 00606 */ 00607 #ifndef IP_FORWARD_ALLOW_TX_ON_RX_NETIF 00608 #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 00609 #endif 00610 00611 /** 00612 * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first 00613 * local TCP/UDP pcb (default==0). This can prevent creating predictable port 00614 * numbers after booting a device. 00615 */ 00616 #ifndef LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 00617 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 00618 #endif 00619 00620 /* 00621 ---------------------------------- 00622 ---------- ICMP options ---------- 00623 ---------------------------------- 00624 */ 00625 /** 00626 * LWIP_ICMP==1: Enable ICMP module inside the IP stack. 00627 * Be careful, disable that make your product non-compliant to RFC1122 00628 */ 00629 #ifndef LWIP_ICMP 00630 #define LWIP_ICMP 1 00631 #endif 00632 00633 /** 00634 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. 00635 */ 00636 #ifndef ICMP_TTL 00637 #define ICMP_TTL (IP_DEFAULT_TTL) 00638 #endif 00639 00640 /** 00641 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) 00642 */ 00643 #ifndef LWIP_BROADCAST_PING 00644 #define LWIP_BROADCAST_PING 0 00645 #endif 00646 00647 /** 00648 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) 00649 */ 00650 #ifndef LWIP_MULTICAST_PING 00651 #define LWIP_MULTICAST_PING 0 00652 #endif 00653 00654 /* 00655 --------------------------------- 00656 ---------- RAW options ---------- 00657 --------------------------------- 00658 */ 00659 /** 00660 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00661 */ 00662 #ifndef LWIP_RAW 00663 #define LWIP_RAW 1 00664 #endif 00665 00666 /** 00667 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00668 */ 00669 #ifndef RAW_TTL 00670 #define RAW_TTL (IP_DEFAULT_TTL) 00671 #endif 00672 00673 /* 00674 ---------------------------------- 00675 ---------- DHCP options ---------- 00676 ---------------------------------- 00677 */ 00678 /** 00679 * LWIP_DHCP==1: Enable DHCP module. 00680 */ 00681 #ifndef LWIP_DHCP 00682 #define LWIP_DHCP 0 00683 #endif 00684 00685 /** 00686 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. 00687 */ 00688 #ifndef DHCP_DOES_ARP_CHECK 00689 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) 00690 #endif 00691 00692 /* 00693 ------------------------------------ 00694 ---------- AUTOIP options ---------- 00695 ------------------------------------ 00696 */ 00697 /** 00698 * LWIP_AUTOIP==1: Enable AUTOIP module. 00699 */ 00700 #ifndef LWIP_AUTOIP 00701 #define LWIP_AUTOIP 0 00702 #endif 00703 00704 /** 00705 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on 00706 * the same interface at the same time. 00707 */ 00708 #ifndef LWIP_DHCP_AUTOIP_COOP 00709 #define LWIP_DHCP_AUTOIP_COOP 0 00710 #endif 00711 00712 /** 00713 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes 00714 * that should be sent before falling back on AUTOIP. This can be set 00715 * as low as 1 to get an AutoIP address very quickly, but you should 00716 * be prepared to handle a changing IP address when DHCP overrides 00717 * AutoIP. 00718 */ 00719 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES 00720 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 00721 #endif 00722 00723 /* 00724 ---------------------------------- 00725 ---------- SNMP options ---------- 00726 ---------------------------------- 00727 */ 00728 /** 00729 * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP 00730 * transport. 00731 */ 00732 #ifndef LWIP_SNMP 00733 #define LWIP_SNMP 0 00734 #endif 00735 00736 /** 00737 * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will 00738 * allow. At least one request buffer is required. 00739 * Does not have to be changed unless external MIBs answer request asynchronously 00740 */ 00741 #ifndef SNMP_CONCURRENT_REQUESTS 00742 #define SNMP_CONCURRENT_REQUESTS 1 00743 #endif 00744 00745 /** 00746 * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap 00747 * destination is required 00748 */ 00749 #ifndef SNMP_TRAP_DESTINATIONS 00750 #define SNMP_TRAP_DESTINATIONS 1 00751 #endif 00752 00753 /** 00754 * SNMP_PRIVATE_MIB: 00755 * When using a private MIB, you have to create a file 'private_mib.h' that contains 00756 * a 'struct mib_array_node mib_private' which contains your MIB. 00757 */ 00758 #ifndef SNMP_PRIVATE_MIB 00759 #define SNMP_PRIVATE_MIB 0 00760 #endif 00761 00762 /** 00763 * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not 00764 * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). 00765 * Unsafe requests are disabled by default! 00766 */ 00767 #ifndef SNMP_SAFE_REQUESTS 00768 #define SNMP_SAFE_REQUESTS 1 00769 #endif 00770 00771 /** 00772 * The maximum length of strings used. This affects the size of 00773 * MEMP_SNMP_VALUE elements. 00774 */ 00775 #ifndef SNMP_MAX_OCTET_STRING_LEN 00776 #define SNMP_MAX_OCTET_STRING_LEN 127 00777 #endif 00778 00779 /** 00780 * The maximum depth of the SNMP tree. 00781 * With private MIBs enabled, this depends on your MIB! 00782 * This affects the size of MEMP_SNMP_VALUE elements. 00783 */ 00784 #ifndef SNMP_MAX_TREE_DEPTH 00785 #define SNMP_MAX_TREE_DEPTH 15 00786 #endif 00787 00788 /** 00789 * The size of the MEMP_SNMP_VALUE elements, normally calculated from 00790 * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH. 00791 */ 00792 #ifndef SNMP_MAX_VALUE_SIZE 00793 #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH)) 00794 #endif 00795 00796 /* 00797 ---------------------------------- 00798 ---------- IGMP options ---------- 00799 ---------------------------------- 00800 */ 00801 /** 00802 * LWIP_IGMP==1: Turn on IGMP module. 00803 */ 00804 #ifndef LWIP_IGMP 00805 #define LWIP_IGMP 0 00806 #endif 00807 00808 /* 00809 ---------------------------------- 00810 ---------- DNS options ----------- 00811 ---------------------------------- 00812 */ 00813 /** 00814 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS 00815 * transport. 00816 */ 00817 #ifndef LWIP_DNS 00818 #define LWIP_DNS 0 00819 #endif 00820 00821 /** DNS maximum number of entries to maintain locally. */ 00822 #ifndef DNS_TABLE_SIZE 00823 #define DNS_TABLE_SIZE 4 00824 #endif 00825 00826 /** DNS maximum host name length supported in the name table. */ 00827 #ifndef DNS_MAX_NAME_LENGTH 00828 #define DNS_MAX_NAME_LENGTH 256 00829 #endif 00830 00831 /** The maximum of DNS servers */ 00832 #ifndef DNS_MAX_SERVERS 00833 #define DNS_MAX_SERVERS 2 00834 #endif 00835 00836 /** DNS do a name checking between the query and the response. */ 00837 #ifndef DNS_DOES_NAME_CHECK 00838 #define DNS_DOES_NAME_CHECK 1 00839 #endif 00840 00841 /** DNS message max. size. Default value is RFC compliant. */ 00842 #ifndef DNS_MSG_SIZE 00843 #define DNS_MSG_SIZE 512 00844 #endif 00845 00846 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, 00847 * you have to define 00848 * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}} 00849 * (an array of structs name/address, where address is an u32_t in network 00850 * byte order). 00851 * 00852 * Instead, you can also use an external function: 00853 * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name) 00854 * that returns the IP address or INADDR_NONE if not found. 00855 */ 00856 #ifndef DNS_LOCAL_HOSTLIST 00857 #define DNS_LOCAL_HOSTLIST 0 00858 #endif /* DNS_LOCAL_HOSTLIST */ 00859 00860 /** If this is turned on, the local host-list can be dynamically changed 00861 * at runtime. */ 00862 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC 00863 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 00864 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 00865 00866 /* 00867 --------------------------------- 00868 ---------- UDP options ---------- 00869 --------------------------------- 00870 */ 00871 /** 00872 * LWIP_UDP==1: Turn on UDP. 00873 */ 00874 #ifndef LWIP_UDP 00875 #define LWIP_UDP 1 00876 #endif 00877 00878 /** 00879 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) 00880 */ 00881 #ifndef LWIP_UDPLITE 00882 #define LWIP_UDPLITE 0 00883 #endif 00884 00885 /** 00886 * UDP_TTL: Default Time-To-Live value. 00887 */ 00888 #ifndef UDP_TTL 00889 #define UDP_TTL (IP_DEFAULT_TTL) 00890 #endif 00891 00892 /** 00893 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. 00894 */ 00895 #ifndef LWIP_NETBUF_RECVINFO 00896 #define LWIP_NETBUF_RECVINFO 0 00897 #endif 00898 00899 /* 00900 --------------------------------- 00901 ---------- TCP options ---------- 00902 --------------------------------- 00903 */ 00904 /** 00905 * LWIP_TCP==1: Turn on TCP. 00906 */ 00907 #ifndef LWIP_TCP 00908 #define LWIP_TCP 1 00909 #endif 00910 00911 /** 00912 * TCP_TTL: Default Time-To-Live value. 00913 */ 00914 #ifndef TCP_TTL 00915 #define TCP_TTL (IP_DEFAULT_TTL) 00916 #endif 00917 00918 /** 00919 * TCP_WND: The size of a TCP window. This must be at least 00920 * (2 * TCP_MSS) for things to work well 00921 */ 00922 #ifndef TCP_WND 00923 #define TCP_WND (4 * TCP_MSS) 00924 #endif 00925 00926 /** 00927 * TCP_MAXRTX: Maximum number of retransmissions of data segments. 00928 */ 00929 #ifndef TCP_MAXRTX 00930 #define TCP_MAXRTX 12 00931 #endif 00932 00933 /** 00934 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. 00935 */ 00936 #ifndef TCP_SYNMAXRTX 00937 #define TCP_SYNMAXRTX 6 00938 #endif 00939 00940 /** 00941 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. 00942 * Define to 0 if your device is low on memory. 00943 */ 00944 #ifndef TCP_QUEUE_OOSEQ 00945 #define TCP_QUEUE_OOSEQ (LWIP_TCP) 00946 #endif 00947 00948 /** 00949 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, 00950 * you might want to increase this.) 00951 * For the receive side, this MSS is advertised to the remote side 00952 * when opening a connection. For the transmit size, this MSS sets 00953 * an upper limit on the MSS advertised by the remote host. 00954 */ 00955 #ifndef TCP_MSS 00956 #define TCP_MSS 536 00957 #endif 00958 00959 /** 00960 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really 00961 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which 00962 * reflects the available reassembly buffer size at the remote host) and the 00963 * largest size permitted by the IP layer" (RFC 1122) 00964 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the 00965 * netif used for a connection and limits the MSS if it would be too big otherwise. 00966 */ 00967 #ifndef TCP_CALCULATE_EFF_SEND_MSS 00968 #define TCP_CALCULATE_EFF_SEND_MSS 1 00969 #endif 00970 00971 00972 /** 00973 * TCP_SND_BUF: TCP sender buffer space (bytes). 00974 * To achieve good performance, this should be at least 2 * TCP_MSS. 00975 */ 00976 #ifndef TCP_SND_BUF 00977 #define TCP_SND_BUF (2 * TCP_MSS) 00978 #endif 00979 00980 /** 00981 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least 00982 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. 00983 */ 00984 #ifndef TCP_SND_QUEUELEN 00985 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 00986 #endif 00987 00988 /** 00989 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than 00990 * TCP_SND_BUF. It is the amount of space which must be available in the 00991 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). 00992 */ 00993 #ifndef TCP_SNDLOWAT 00994 #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) 00995 #endif 00996 00997 /** 00998 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less 00999 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below 01000 * this number, select returns writable (combined with TCP_SNDLOWAT). 01001 */ 01002 #ifndef TCP_SNDQUEUELOWAT 01003 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) 01004 #endif 01005 01006 /** 01007 * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. 01008 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. 01009 */ 01010 #ifndef TCP_OOSEQ_MAX_BYTES 01011 #define TCP_OOSEQ_MAX_BYTES 0 01012 #endif 01013 01014 /** 01015 * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. 01016 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. 01017 */ 01018 #ifndef TCP_OOSEQ_MAX_PBUFS 01019 #define TCP_OOSEQ_MAX_PBUFS 0 01020 #endif 01021 01022 /** 01023 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. 01024 */ 01025 #ifndef TCP_LISTEN_BACKLOG 01026 #define TCP_LISTEN_BACKLOG 0 01027 #endif 01028 01029 /** 01030 * The maximum allowed backlog for TCP listen netconns. 01031 * This backlog is used unless another is explicitly specified. 01032 * 0xff is the maximum (u8_t). 01033 */ 01034 #ifndef TCP_DEFAULT_LISTEN_BACKLOG 01035 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff 01036 #endif 01037 01038 /** 01039 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may 01040 * allocate ahead of time in an attempt to create shorter pbuf chains 01041 * for transmission. The meaningful range is 0 to TCP_MSS. Some 01042 * suggested values are: 01043 * 01044 * 0: Disable oversized allocation. Each tcp_write() allocates a new 01045 pbuf (old behaviour). 01046 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your 01047 * scatter-gather DMA requires aligned fragments. 01048 * 128: Limit the pbuf/memory overhead to 20%. 01049 * TCP_MSS: Try to create unfragmented TCP packets. 01050 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. 01051 */ 01052 #ifndef TCP_OVERSIZE 01053 #define TCP_OVERSIZE TCP_MSS 01054 #endif 01055 01056 /** 01057 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. 01058 */ 01059 #ifndef LWIP_TCP_TIMESTAMPS 01060 #define LWIP_TCP_TIMESTAMPS 0 01061 #endif 01062 01063 /** 01064 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an 01065 * explicit window update 01066 */ 01067 #ifndef TCP_WND_UPDATE_THRESHOLD 01068 #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4) 01069 #endif 01070 01071 /** 01072 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. 01073 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all 01074 * events (accept, sent, etc) that happen in the system. 01075 * LWIP_CALLBACK_API==1: The PCB callback function is called directly 01076 * for the event. This is the default. 01077 */ 01078 #if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) 01079 #define LWIP_EVENT_API 0 01080 #define LWIP_CALLBACK_API 1 01081 #endif 01082 01083 01084 /* 01085 ---------------------------------- 01086 ---------- Pbuf options ---------- 01087 ---------------------------------- 01088 */ 01089 /** 01090 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a 01091 * link level header. The default is 14, the standard value for 01092 * Ethernet. 01093 */ 01094 #ifndef PBUF_LINK_HLEN 01095 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 01096 #endif 01097 01098 /** 01099 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is 01100 * designed to accomodate single full size TCP frame in one pbuf, including 01101 * TCP_MSS, IP header, and link header. 01102 */ 01103 #ifndef PBUF_POOL_BUFSIZE 01104 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN) 01105 #endif 01106 01107 /* 01108 ------------------------------------------------ 01109 ---------- Network Interfaces options ---------- 01110 ------------------------------------------------ 01111 */ 01112 /** 01113 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname 01114 * field. 01115 */ 01116 #ifndef LWIP_NETIF_HOSTNAME 01117 #define LWIP_NETIF_HOSTNAME 0 01118 #endif 01119 01120 /** 01121 * LWIP_NETIF_API==1: Support netif api (in netifapi.c) 01122 */ 01123 #ifndef LWIP_NETIF_API 01124 #define LWIP_NETIF_API 0 01125 #endif 01126 01127 /** 01128 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface 01129 * changes its up/down status (i.e., due to DHCP IP acquistion) 01130 */ 01131 #ifndef LWIP_NETIF_STATUS_CALLBACK 01132 #define LWIP_NETIF_STATUS_CALLBACK 0 01133 #endif 01134 01135 /** 01136 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface 01137 * whenever the link changes (i.e., link down) 01138 */ 01139 #ifndef LWIP_NETIF_LINK_CALLBACK 01140 #define LWIP_NETIF_LINK_CALLBACK 0 01141 #endif 01142 01143 /** 01144 * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called 01145 * when a netif has been removed 01146 */ 01147 #ifndef LWIP_NETIF_REMOVE_CALLBACK 01148 #define LWIP_NETIF_REMOVE_CALLBACK 0 01149 #endif 01150 01151 /** 01152 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table 01153 * indices) in struct netif. TCP and UDP can make use of this to prevent 01154 * scanning the ARP table for every sent packet. While this is faster for big 01155 * ARP tables or many concurrent connections, it might be counterproductive 01156 * if you have a tiny ARP table or if there never are concurrent connections. 01157 */ 01158 #ifndef LWIP_NETIF_HWADDRHINT 01159 #define LWIP_NETIF_HWADDRHINT 0 01160 #endif 01161 01162 /** 01163 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP 01164 * address equal to the netif IP address, looping them back up the stack. 01165 */ 01166 #ifndef LWIP_NETIF_LOOPBACK 01167 #define LWIP_NETIF_LOOPBACK 0 01168 #endif 01169 01170 /** 01171 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback 01172 * sending for each netif (0 = disabled) 01173 */ 01174 #ifndef LWIP_LOOPBACK_MAX_PBUFS 01175 #define LWIP_LOOPBACK_MAX_PBUFS 0 01176 #endif 01177 01178 /** 01179 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in 01180 * the system, as netifs must change how they behave depending on this setting 01181 * for the LWIP_NETIF_LOOPBACK option to work. 01182 * Setting this is needed to avoid reentering non-reentrant functions like 01183 * tcp_input(). 01184 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a 01185 * multithreaded environment like tcpip.c. In this case, netif->input() 01186 * is called directly. 01187 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. 01188 * The packets are put on a list and netif_poll() must be called in 01189 * the main application loop. 01190 */ 01191 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING 01192 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) 01193 #endif 01194 01195 /** 01196 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data 01197 * to be sent into one single pbuf. This is for compatibility with DMA-enabled 01198 * MACs that do not support scatter-gather. 01199 * Beware that this might involve CPU-memcpy before transmitting that would not 01200 * be needed without this flag! Use this only if you need to! 01201 * 01202 * @todo: TCP and IP-frag do not work with this, yet: 01203 */ 01204 #ifndef LWIP_NETIF_TX_SINGLE_PBUF 01205 #define LWIP_NETIF_TX_SINGLE_PBUF 0 01206 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ 01207 01208 /* 01209 ------------------------------------ 01210 ---------- LOOPIF options ---------- 01211 ------------------------------------ 01212 */ 01213 /** 01214 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c 01215 */ 01216 #ifndef LWIP_HAVE_LOOPIF 01217 #define LWIP_HAVE_LOOPIF 0 01218 #endif 01219 01220 /* 01221 ------------------------------------ 01222 ---------- SLIPIF options ---------- 01223 ------------------------------------ 01224 */ 01225 /** 01226 * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c 01227 */ 01228 #ifndef LWIP_HAVE_SLIPIF 01229 #define LWIP_HAVE_SLIPIF 0 01230 #endif 01231 01232 /* 01233 ------------------------------------ 01234 ---------- Thread options ---------- 01235 ------------------------------------ 01236 */ 01237 /** 01238 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. 01239 */ 01240 #ifndef TCPIP_THREAD_NAME 01241 #define TCPIP_THREAD_NAME "tcpip_thread" 01242 #endif 01243 01244 /** 01245 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. 01246 * The stack size value itself is platform-dependent, but is passed to 01247 * sys_thread_new() when the thread is created. 01248 */ 01249 #ifndef TCPIP_THREAD_STACKSIZE 01250 #define TCPIP_THREAD_STACKSIZE 0 01251 #endif 01252 01253 /** 01254 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. 01255 * The priority value itself is platform-dependent, but is passed to 01256 * sys_thread_new() when the thread is created. 01257 */ 01258 #ifndef TCPIP_THREAD_PRIO 01259 #define TCPIP_THREAD_PRIO 1 01260 #endif 01261 01262 /** 01263 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages 01264 * The queue size value itself is platform-dependent, but is passed to 01265 * sys_mbox_new() when tcpip_init is called. 01266 */ 01267 #ifndef TCPIP_MBOX_SIZE 01268 #define TCPIP_MBOX_SIZE 0 01269 #endif 01270 01271 /** 01272 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. 01273 */ 01274 #ifndef SLIPIF_THREAD_NAME 01275 #define SLIPIF_THREAD_NAME "slipif_loop" 01276 #endif 01277 01278 /** 01279 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. 01280 * The stack size value itself is platform-dependent, but is passed to 01281 * sys_thread_new() when the thread is created. 01282 */ 01283 #ifndef SLIPIF_THREAD_STACKSIZE 01284 #define SLIPIF_THREAD_STACKSIZE 0 01285 #endif 01286 01287 /** 01288 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. 01289 * The priority value itself is platform-dependent, but is passed to 01290 * sys_thread_new() when the thread is created. 01291 */ 01292 #ifndef SLIPIF_THREAD_PRIO 01293 #define SLIPIF_THREAD_PRIO 1 01294 #endif 01295 01296 /** 01297 * PPP_THREAD_NAME: The name assigned to the pppInputThread. 01298 */ 01299 #ifndef PPP_THREAD_NAME 01300 #define PPP_THREAD_NAME "pppInputThread" 01301 #endif 01302 01303 /** 01304 * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread. 01305 * The stack size value itself is platform-dependent, but is passed to 01306 * sys_thread_new() when the thread is created. 01307 */ 01308 #ifndef PPP_THREAD_STACKSIZE 01309 #define PPP_THREAD_STACKSIZE 0 01310 #endif 01311 01312 /** 01313 * PPP_THREAD_PRIO: The priority assigned to the pppInputThread. 01314 * The priority value itself is platform-dependent, but is passed to 01315 * sys_thread_new() when the thread is created. 01316 */ 01317 #ifndef PPP_THREAD_PRIO 01318 #define PPP_THREAD_PRIO 1 01319 #endif 01320 01321 /** 01322 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. 01323 */ 01324 #ifndef DEFAULT_THREAD_NAME 01325 #define DEFAULT_THREAD_NAME "lwIP" 01326 #endif 01327 01328 /** 01329 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. 01330 * The stack size value itself is platform-dependent, but is passed to 01331 * sys_thread_new() when the thread is created. 01332 */ 01333 #ifndef DEFAULT_THREAD_STACKSIZE 01334 #define DEFAULT_THREAD_STACKSIZE 0 01335 #endif 01336 01337 /** 01338 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. 01339 * The priority value itself is platform-dependent, but is passed to 01340 * sys_thread_new() when the thread is created. 01341 */ 01342 #ifndef DEFAULT_THREAD_PRIO 01343 #define DEFAULT_THREAD_PRIO 1 01344 #endif 01345 01346 /** 01347 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01348 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed 01349 * to sys_mbox_new() when the recvmbox is created. 01350 */ 01351 #ifndef DEFAULT_RAW_RECVMBOX_SIZE 01352 #define DEFAULT_RAW_RECVMBOX_SIZE 0 01353 #endif 01354 01355 /** 01356 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01357 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed 01358 * to sys_mbox_new() when the recvmbox is created. 01359 */ 01360 #ifndef DEFAULT_UDP_RECVMBOX_SIZE 01361 #define DEFAULT_UDP_RECVMBOX_SIZE 0 01362 #endif 01363 01364 /** 01365 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01366 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed 01367 * to sys_mbox_new() when the recvmbox is created. 01368 */ 01369 #ifndef DEFAULT_TCP_RECVMBOX_SIZE 01370 #define DEFAULT_TCP_RECVMBOX_SIZE 0 01371 #endif 01372 01373 /** 01374 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. 01375 * The queue size value itself is platform-dependent, but is passed to 01376 * sys_mbox_new() when the acceptmbox is created. 01377 */ 01378 #ifndef DEFAULT_ACCEPTMBOX_SIZE 01379 #define DEFAULT_ACCEPTMBOX_SIZE 0 01380 #endif 01381 01382 /* 01383 ---------------------------------------------- 01384 ---------- Sequential layer options ---------- 01385 ---------------------------------------------- 01386 */ 01387 /** 01388 * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!) 01389 * Don't use it if you're not an active lwIP project member 01390 */ 01391 #ifndef LWIP_TCPIP_CORE_LOCKING 01392 #define LWIP_TCPIP_CORE_LOCKING 0 01393 #endif 01394 01395 /** 01396 * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!) 01397 * Don't use it if you're not an active lwIP project member 01398 */ 01399 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT 01400 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 01401 #endif 01402 01403 /** 01404 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) 01405 */ 01406 #ifndef LWIP_NETCONN 01407 #define LWIP_NETCONN 1 01408 #endif 01409 01410 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create 01411 * timers running in tcpip_thread from another thread. 01412 */ 01413 #ifndef LWIP_TCPIP_TIMEOUT 01414 #define LWIP_TCPIP_TIMEOUT 1 01415 #endif 01416 01417 /* 01418 ------------------------------------ 01419 ---------- Socket options ---------- 01420 ------------------------------------ 01421 */ 01422 /** 01423 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) 01424 */ 01425 #ifndef LWIP_SOCKET 01426 #define LWIP_SOCKET 1 01427 #endif 01428 01429 /** 01430 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names. 01431 * (only used if you use sockets.c) 01432 */ 01433 #ifndef LWIP_COMPAT_SOCKETS 01434 #define LWIP_COMPAT_SOCKETS 1 01435 #endif 01436 01437 /** 01438 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. 01439 * Disable this option if you use a POSIX operating system that uses the same 01440 * names (read, write & close). (only used if you use sockets.c) 01441 */ 01442 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES 01443 #define LWIP_POSIX_SOCKETS_IO_NAMES 1 01444 #endif 01445 01446 /** 01447 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT 01448 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set 01449 * in seconds. (does not require sockets.c, and will affect tcp.c) 01450 */ 01451 #ifndef LWIP_TCP_KEEPALIVE 01452 #define LWIP_TCP_KEEPALIVE 0 01453 #endif 01454 01455 /** 01456 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and 01457 * SO_SNDTIMEO processing. 01458 */ 01459 #ifndef LWIP_SO_SNDTIMEO 01460 #define LWIP_SO_SNDTIMEO 0 01461 #endif 01462 01463 /** 01464 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and 01465 * SO_RCVTIMEO processing. 01466 */ 01467 #ifndef LWIP_SO_RCVTIMEO 01468 #define LWIP_SO_RCVTIMEO 0 01469 #endif 01470 01471 /** 01472 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. 01473 */ 01474 #ifndef LWIP_SO_RCVBUF 01475 #define LWIP_SO_RCVBUF 0 01476 #endif 01477 01478 /** 01479 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. 01480 */ 01481 #ifndef RECV_BUFSIZE_DEFAULT 01482 #define RECV_BUFSIZE_DEFAULT INT_MAX 01483 #endif 01484 01485 /** 01486 * SO_REUSE==1: Enable SO_REUSEADDR option. 01487 */ 01488 #ifndef SO_REUSE 01489 #define SO_REUSE 0 01490 #endif 01491 01492 /** 01493 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets 01494 * to all local matches if SO_REUSEADDR is turned on. 01495 * WARNING: Adds a memcpy for every packet if passing to more than one pcb! 01496 */ 01497 #ifndef SO_REUSE_RXTOALL 01498 #define SO_REUSE_RXTOALL 0 01499 #endif 01500 01501 /* 01502 ---------------------------------------- 01503 ---------- Statistics options ---------- 01504 ---------------------------------------- 01505 */ 01506 /** 01507 * LWIP_STATS==1: Enable statistics collection in lwip_stats. 01508 */ 01509 #ifndef LWIP_STATS 01510 #define LWIP_STATS 1 01511 #endif 01512 01513 #if LWIP_STATS 01514 01515 /** 01516 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. 01517 */ 01518 #ifndef LWIP_STATS_DISPLAY 01519 #define LWIP_STATS_DISPLAY 0 01520 #endif 01521 01522 /** 01523 * LINK_STATS==1: Enable link stats. 01524 */ 01525 #ifndef LINK_STATS 01526 #define LINK_STATS 1 01527 #endif 01528 01529 /** 01530 * ETHARP_STATS==1: Enable etharp stats. 01531 */ 01532 #ifndef ETHARP_STATS 01533 #define ETHARP_STATS (LWIP_ARP) 01534 #endif 01535 01536 /** 01537 * IP_STATS==1: Enable IP stats. 01538 */ 01539 #ifndef IP_STATS 01540 #define IP_STATS 1 01541 #endif 01542 01543 /** 01544 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is 01545 * on if using either frag or reass. 01546 */ 01547 #ifndef IPFRAG_STATS 01548 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) 01549 #endif 01550 01551 /** 01552 * ICMP_STATS==1: Enable ICMP stats. 01553 */ 01554 #ifndef ICMP_STATS 01555 #define ICMP_STATS 1 01556 #endif 01557 01558 /** 01559 * IGMP_STATS==1: Enable IGMP stats. 01560 */ 01561 #ifndef IGMP_STATS 01562 #define IGMP_STATS (LWIP_IGMP) 01563 #endif 01564 01565 /** 01566 * UDP_STATS==1: Enable UDP stats. Default is on if 01567 * UDP enabled, otherwise off. 01568 */ 01569 #ifndef UDP_STATS 01570 #define UDP_STATS (LWIP_UDP) 01571 #endif 01572 01573 /** 01574 * TCP_STATS==1: Enable TCP stats. Default is on if TCP 01575 * enabled, otherwise off. 01576 */ 01577 #ifndef TCP_STATS 01578 #define TCP_STATS (LWIP_TCP) 01579 #endif 01580 01581 /** 01582 * MEM_STATS==1: Enable mem.c stats. 01583 */ 01584 #ifndef MEM_STATS 01585 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) 01586 #endif 01587 01588 /** 01589 * MEMP_STATS==1: Enable memp.c pool stats. 01590 */ 01591 #ifndef MEMP_STATS 01592 #define MEMP_STATS (MEMP_MEM_MALLOC == 0) 01593 #endif 01594 01595 /** 01596 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). 01597 */ 01598 #ifndef SYS_STATS 01599 #define SYS_STATS (NO_SYS == 0) 01600 #endif 01601 01602 #else 01603 01604 #define LINK_STATS 0 01605 #define IP_STATS 0 01606 #define IPFRAG_STATS 0 01607 #define ICMP_STATS 0 01608 #define IGMP_STATS 0 01609 #define UDP_STATS 0 01610 #define TCP_STATS 0 01611 #define MEM_STATS 0 01612 #define MEMP_STATS 0 01613 #define SYS_STATS 0 01614 #define LWIP_STATS_DISPLAY 0 01615 01616 #endif /* LWIP_STATS */ 01617 01618 /* 01619 --------------------------------- 01620 ---------- PPP options ---------- 01621 --------------------------------- 01622 */ 01623 /** 01624 * PPP_SUPPORT==1: Enable PPP. 01625 */ 01626 #ifndef PPP_SUPPORT 01627 #define PPP_SUPPORT 0 01628 #endif 01629 01630 /** 01631 * PPPOE_SUPPORT==1: Enable PPP Over Ethernet 01632 */ 01633 #ifndef PPPOE_SUPPORT 01634 #define PPPOE_SUPPORT 0 01635 #endif 01636 01637 /** 01638 * PPPOS_SUPPORT==1: Enable PPP Over Serial 01639 */ 01640 #ifndef PPPOS_SUPPORT 01641 #define PPPOS_SUPPORT PPP_SUPPORT 01642 #endif 01643 01644 #if PPP_SUPPORT 01645 01646 /** 01647 * NUM_PPP: Max PPP sessions. 01648 */ 01649 #ifndef NUM_PPP 01650 #define NUM_PPP 1 01651 #endif 01652 01653 /** 01654 * PAP_SUPPORT==1: Support PAP. 01655 */ 01656 #ifndef PAP_SUPPORT 01657 #define PAP_SUPPORT 0 01658 #endif 01659 01660 /** 01661 * CHAP_SUPPORT==1: Support CHAP. 01662 */ 01663 #ifndef CHAP_SUPPORT 01664 #define CHAP_SUPPORT 0 01665 #endif 01666 01667 /** 01668 * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01669 */ 01670 #ifndef MSCHAP_SUPPORT 01671 #define MSCHAP_SUPPORT 0 01672 #endif 01673 01674 /** 01675 * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01676 */ 01677 #ifndef CBCP_SUPPORT 01678 #define CBCP_SUPPORT 0 01679 #endif 01680 01681 /** 01682 * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET! 01683 */ 01684 #ifndef CCP_SUPPORT 01685 #define CCP_SUPPORT 0 01686 #endif 01687 01688 /** 01689 * VJ_SUPPORT==1: Support VJ header compression. 01690 */ 01691 #ifndef VJ_SUPPORT 01692 #define VJ_SUPPORT 0 01693 #endif 01694 01695 /** 01696 * MD5_SUPPORT==1: Support MD5 (see also CHAP). 01697 */ 01698 #ifndef MD5_SUPPORT 01699 #define MD5_SUPPORT 0 01700 #endif 01701 01702 /* 01703 * Timeouts 01704 */ 01705 #ifndef FSM_DEFTIMEOUT 01706 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ 01707 #endif 01708 01709 #ifndef FSM_DEFMAXTERMREQS 01710 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ 01711 #endif 01712 01713 #ifndef FSM_DEFMAXCONFREQS 01714 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ 01715 #endif 01716 01717 #ifndef FSM_DEFMAXNAKLOOPS 01718 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ 01719 #endif 01720 01721 #ifndef UPAP_DEFTIMEOUT 01722 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ 01723 #endif 01724 01725 #ifndef UPAP_DEFREQTIME 01726 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ 01727 #endif 01728 01729 #ifndef CHAP_DEFTIMEOUT 01730 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ 01731 #endif 01732 01733 #ifndef CHAP_DEFTRANSMITS 01734 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ 01735 #endif 01736 01737 /* Interval in seconds between keepalive echo requests, 0 to disable. */ 01738 #ifndef LCP_ECHOINTERVAL 01739 #define LCP_ECHOINTERVAL 0 01740 #endif 01741 01742 /* Number of unanswered echo requests before failure. */ 01743 #ifndef LCP_MAXECHOFAILS 01744 #define LCP_MAXECHOFAILS 3 01745 #endif 01746 01747 /* Max Xmit idle time (in jiffies) before resend flag char. */ 01748 #ifndef PPP_MAXIDLEFLAG 01749 #define PPP_MAXIDLEFLAG 100 01750 #endif 01751 01752 /* 01753 * Packet sizes 01754 * 01755 * Note - lcp shouldn't be allowed to negotiate stuff outside these 01756 * limits. See lcp.h in the pppd directory. 01757 * (XXX - these constants should simply be shared by lcp.c instead 01758 * of living in lcp.h) 01759 */ 01760 #define PPP_MTU 1500 /* Default MTU (size of Info field) */ 01761 #ifndef PPP_MAXMTU 01762 /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */ 01763 #define PPP_MAXMTU 1500 /* Largest MTU we allow */ 01764 #endif 01765 #define PPP_MINMTU 64 01766 #define PPP_MRU 1500 /* default MRU = max length of info field */ 01767 #define PPP_MAXMRU 1500 /* Largest MRU we allow */ 01768 #ifndef PPP_DEFMRU 01769 #define PPP_DEFMRU 296 /* Try for this */ 01770 #endif 01771 #define PPP_MINMRU 128 /* No MRUs below this */ 01772 01773 #ifndef MAXNAMELEN 01774 #define MAXNAMELEN 256 /* max length of hostname or name for auth */ 01775 #endif 01776 #ifndef MAXSECRETLEN 01777 #define MAXSECRETLEN 256 /* max length of password or secret */ 01778 #endif 01779 01780 #endif /* PPP_SUPPORT */ 01781 01782 /* 01783 -------------------------------------- 01784 ---------- Checksum options ---------- 01785 -------------------------------------- 01786 */ 01787 /** 01788 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. 01789 */ 01790 #ifndef CHECKSUM_GEN_IP 01791 #define CHECKSUM_GEN_IP 1 01792 #endif 01793 01794 /** 01795 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. 01796 */ 01797 #ifndef CHECKSUM_GEN_UDP 01798 #define CHECKSUM_GEN_UDP 1 01799 #endif 01800 01801 /** 01802 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. 01803 */ 01804 #ifndef CHECKSUM_GEN_TCP 01805 #define CHECKSUM_GEN_TCP 1 01806 #endif 01807 01808 /** 01809 * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. 01810 */ 01811 #ifndef CHECKSUM_GEN_ICMP 01812 #define CHECKSUM_GEN_ICMP 1 01813 #endif 01814 01815 /** 01816 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. 01817 */ 01818 #ifndef CHECKSUM_CHECK_IP 01819 #define CHECKSUM_CHECK_IP 1 01820 #endif 01821 01822 /** 01823 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. 01824 */ 01825 #ifndef CHECKSUM_CHECK_UDP 01826 #define CHECKSUM_CHECK_UDP 1 01827 #endif 01828 01829 /** 01830 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. 01831 */ 01832 #ifndef CHECKSUM_CHECK_TCP 01833 #define CHECKSUM_CHECK_TCP 1 01834 #endif 01835 01836 /** 01837 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from 01838 * application buffers to pbufs. 01839 */ 01840 #ifndef LWIP_CHECKSUM_ON_COPY 01841 #define LWIP_CHECKSUM_ON_COPY 0 01842 #endif 01843 01844 /* 01845 --------------------------------------- 01846 ---------- Hook options --------------- 01847 --------------------------------------- 01848 */ 01849 01850 /* Hooks are undefined by default, define them to a function if you need them. */ 01851 01852 /** 01853 * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): 01854 * - called from ip_input() (IPv4) 01855 * - pbuf: received struct pbuf passed to ip_input() 01856 * - input_netif: struct netif on which the packet has been received 01857 * Return values: 01858 * - 0: Hook has not consumed the packet, packet is processed as normal 01859 * - != 0: Hook has consumed the packet. 01860 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook 01861 * (i.e. free it when done). 01862 */ 01863 01864 /** 01865 * LWIP_HOOK_IP4_ROUTE(dest): 01866 * - called from ip_route() (IPv4) 01867 * - dest: destination IPv4 address 01868 * Returns the destination netif or NULL if no destination netif is found. In 01869 * that case, ip_route() continues as normal. 01870 */ 01871 01872 /* 01873 --------------------------------------- 01874 ---------- Debugging options ---------- 01875 --------------------------------------- 01876 */ 01877 /** 01878 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is 01879 * compared against this value. If it is smaller, then debugging 01880 * messages are written. 01881 */ 01882 #ifndef LWIP_DBG_MIN_LEVEL 01883 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL 01884 #endif 01885 01886 /** 01887 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable 01888 * debug messages of certain types. 01889 */ 01890 #ifndef LWIP_DBG_TYPES_ON 01891 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON 01892 #endif 01893 01894 /** 01895 * ETHARP_DEBUG: Enable debugging in etharp.c. 01896 */ 01897 #ifndef ETHARP_DEBUG 01898 #define ETHARP_DEBUG LWIP_DBG_OFF 01899 #endif 01900 01901 /** 01902 * NETIF_DEBUG: Enable debugging in netif.c. 01903 */ 01904 #ifndef NETIF_DEBUG 01905 #define NETIF_DEBUG LWIP_DBG_OFF 01906 #endif 01907 01908 /** 01909 * PBUF_DEBUG: Enable debugging in pbuf.c. 01910 */ 01911 #ifndef PBUF_DEBUG 01912 #define PBUF_DEBUG LWIP_DBG_OFF 01913 #endif 01914 01915 /** 01916 * API_LIB_DEBUG: Enable debugging in api_lib.c. 01917 */ 01918 #ifndef API_LIB_DEBUG 01919 #define API_LIB_DEBUG LWIP_DBG_OFF 01920 #endif 01921 01922 /** 01923 * API_MSG_DEBUG: Enable debugging in api_msg.c. 01924 */ 01925 #ifndef API_MSG_DEBUG 01926 #define API_MSG_DEBUG LWIP_DBG_OFF 01927 #endif 01928 01929 /** 01930 * SOCKETS_DEBUG: Enable debugging in sockets.c. 01931 */ 01932 #ifndef SOCKETS_DEBUG 01933 #define SOCKETS_DEBUG LWIP_DBG_OFF 01934 #endif 01935 01936 /** 01937 * ICMP_DEBUG: Enable debugging in icmp.c. 01938 */ 01939 #ifndef ICMP_DEBUG 01940 #define ICMP_DEBUG LWIP_DBG_OFF 01941 #endif 01942 01943 /** 01944 * IGMP_DEBUG: Enable debugging in igmp.c. 01945 */ 01946 #ifndef IGMP_DEBUG 01947 #define IGMP_DEBUG LWIP_DBG_OFF 01948 #endif 01949 01950 /** 01951 * INET_DEBUG: Enable debugging in inet.c. 01952 */ 01953 #ifndef INET_DEBUG 01954 #define INET_DEBUG LWIP_DBG_OFF 01955 #endif 01956 01957 /** 01958 * IP_DEBUG: Enable debugging for IP. 01959 */ 01960 #ifndef IP_DEBUG 01961 #define IP_DEBUG LWIP_DBG_OFF 01962 #endif 01963 01964 /** 01965 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. 01966 */ 01967 #ifndef IP_REASS_DEBUG 01968 #define IP_REASS_DEBUG LWIP_DBG_OFF 01969 #endif 01970 01971 /** 01972 * RAW_DEBUG: Enable debugging in raw.c. 01973 */ 01974 #ifndef RAW_DEBUG 01975 #define RAW_DEBUG LWIP_DBG_OFF 01976 #endif 01977 01978 /** 01979 * MEM_DEBUG: Enable debugging in mem.c. 01980 */ 01981 #ifndef MEM_DEBUG 01982 #define MEM_DEBUG LWIP_DBG_OFF 01983 #endif 01984 01985 /** 01986 * MEMP_DEBUG: Enable debugging in memp.c. 01987 */ 01988 #ifndef MEMP_DEBUG 01989 #define MEMP_DEBUG LWIP_DBG_OFF 01990 #endif 01991 01992 /** 01993 * SYS_DEBUG: Enable debugging in sys.c. 01994 */ 01995 #ifndef SYS_DEBUG 01996 #define SYS_DEBUG LWIP_DBG_OFF 01997 #endif 01998 01999 /** 02000 * TIMERS_DEBUG: Enable debugging in timers.c. 02001 */ 02002 #ifndef TIMERS_DEBUG 02003 #define TIMERS_DEBUG LWIP_DBG_OFF 02004 #endif 02005 02006 /** 02007 * TCP_DEBUG: Enable debugging for TCP. 02008 */ 02009 #ifndef TCP_DEBUG 02010 #define TCP_DEBUG LWIP_DBG_OFF 02011 #endif 02012 02013 /** 02014 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. 02015 */ 02016 #ifndef TCP_INPUT_DEBUG 02017 #define TCP_INPUT_DEBUG LWIP_DBG_OFF 02018 #endif 02019 02020 /** 02021 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. 02022 */ 02023 #ifndef TCP_FR_DEBUG 02024 #define TCP_FR_DEBUG LWIP_DBG_OFF 02025 #endif 02026 02027 /** 02028 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit 02029 * timeout. 02030 */ 02031 #ifndef TCP_RTO_DEBUG 02032 #define TCP_RTO_DEBUG LWIP_DBG_OFF 02033 #endif 02034 02035 /** 02036 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. 02037 */ 02038 #ifndef TCP_CWND_DEBUG 02039 #define TCP_CWND_DEBUG LWIP_DBG_OFF 02040 #endif 02041 02042 /** 02043 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. 02044 */ 02045 #ifndef TCP_WND_DEBUG 02046 #define TCP_WND_DEBUG LWIP_DBG_OFF 02047 #endif 02048 02049 /** 02050 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. 02051 */ 02052 #ifndef TCP_OUTPUT_DEBUG 02053 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF 02054 #endif 02055 02056 /** 02057 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. 02058 */ 02059 #ifndef TCP_RST_DEBUG 02060 #define TCP_RST_DEBUG LWIP_DBG_OFF 02061 #endif 02062 02063 /** 02064 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. 02065 */ 02066 #ifndef TCP_QLEN_DEBUG 02067 #define TCP_QLEN_DEBUG LWIP_DBG_OFF 02068 #endif 02069 02070 /** 02071 * UDP_DEBUG: Enable debugging in UDP. 02072 */ 02073 #ifndef UDP_DEBUG 02074 #define UDP_DEBUG LWIP_DBG_OFF 02075 #endif 02076 02077 /** 02078 * TCPIP_DEBUG: Enable debugging in tcpip.c. 02079 */ 02080 #ifndef TCPIP_DEBUG 02081 #define TCPIP_DEBUG LWIP_DBG_OFF 02082 #endif 02083 02084 /** 02085 * PPP_DEBUG: Enable debugging for PPP. 02086 */ 02087 #ifndef PPP_DEBUG 02088 #define PPP_DEBUG LWIP_DBG_OFF 02089 #endif 02090 02091 /** 02092 * SLIP_DEBUG: Enable debugging in slipif.c. 02093 */ 02094 #ifndef SLIP_DEBUG 02095 #define SLIP_DEBUG LWIP_DBG_OFF 02096 #endif 02097 02098 /** 02099 * DHCP_DEBUG: Enable debugging in dhcp.c. 02100 */ 02101 #ifndef DHCP_DEBUG 02102 #define DHCP_DEBUG LWIP_DBG_OFF 02103 #endif 02104 02105 /** 02106 * AUTOIP_DEBUG: Enable debugging in autoip.c. 02107 */ 02108 #ifndef AUTOIP_DEBUG 02109 #define AUTOIP_DEBUG LWIP_DBG_OFF 02110 #endif 02111 02112 /** 02113 * SNMP_MSG_DEBUG: Enable debugging for SNMP messages. 02114 */ 02115 #ifndef SNMP_MSG_DEBUG 02116 #define SNMP_MSG_DEBUG LWIP_DBG_OFF 02117 #endif 02118 02119 /** 02120 * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. 02121 */ 02122 #ifndef SNMP_MIB_DEBUG 02123 #define SNMP_MIB_DEBUG LWIP_DBG_OFF 02124 #endif 02125 02126 /** 02127 * DNS_DEBUG: Enable debugging for DNS. 02128 */ 02129 #ifndef DNS_DEBUG 02130 #define DNS_DEBUG LWIP_DBG_OFF 02131 #endif 02132 02133 #endif /* __LWIP_OPT_H__ */
Generated on Wed Jul 13 2022 09:48:37 by 1.7.2