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