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.
Dependents: mbed-os-example-blinky-gr-lychee GR-Boads_Camera_sample GR-Boards_Audio_Recoder GR-Boads_Camera_DisplayApp ... more
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 00039 /* 00040 * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - 00041 * without this, doxygen does not see the actual #define 00042 */ 00043 00044 #if !defined LWIP_HDR_OPT_H 00045 #define LWIP_HDR_OPT_H 00046 00047 /* 00048 * Include user defined options first. Anything not defined in these files 00049 * will be set to standard values. Override anything you don't like! 00050 */ 00051 #include "lwipopts.h" 00052 #include "lwip/debug.h" 00053 00054 /** 00055 * @defgroup lwip_opts Options (lwipopts.h) 00056 * @ingroup lwip 00057 * 00058 * @defgroup lwip_opts_debug Debugging 00059 * @ingroup lwip_opts 00060 * 00061 * @defgroup lwip_opts_infrastructure Infrastructure 00062 * @ingroup lwip_opts 00063 * 00064 * @defgroup lwip_opts_callback Callback-style APIs 00065 * @ingroup lwip_opts 00066 * 00067 * @defgroup lwip_opts_threadsafe_apis Thread-safe APIs 00068 * @ingroup lwip_opts 00069 */ 00070 00071 /* 00072 ------------------------------------ 00073 -------------- NO SYS -------------- 00074 ------------------------------------ 00075 */ 00076 /** 00077 * @defgroup lwip_opts_nosys NO_SYS 00078 * @ingroup lwip_opts_infrastructure 00079 * @{ 00080 */ 00081 /** 00082 * NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or 00083 * mboxes). This means threaded APIs cannot be used (socket, netconn, 00084 * i.e. everything in the 'api' folder), only the callback-style raw API is 00085 * available (and you have to watch out for yourself that you don't access 00086 * lwIP functions/structures from more than one context at a time!) 00087 */ 00088 #if !defined NO_SYS || defined __DOXYGEN__ 00089 #define NO_SYS 0 00090 #endif 00091 /** 00092 * @} 00093 */ 00094 00095 /** 00096 * @defgroup lwip_opts_timers Timers 00097 * @ingroup lwip_opts_infrastructure 00098 * @{ 00099 */ 00100 /** 00101 * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. 00102 * (the array of lwip-internal cyclic timers is still provided) 00103 * (check NO_SYS_NO_TIMERS for compatibility to old versions) 00104 */ 00105 #if !defined LWIP_TIMERS || defined __DOXYGEN__ 00106 #ifdef NO_SYS_NO_TIMERS 00107 #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) 00108 #else 00109 #define LWIP_TIMERS 1 00110 #endif 00111 #endif 00112 00113 /** 00114 * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. 00115 * Function prototypes in timeouts.h and the array of lwip-internal cyclic timers 00116 * are still included, but the implementation is not. The following functions 00117 * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), 00118 * sys_timeouts_mbox_fetch() 00119 */ 00120 #if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ 00121 #define LWIP_TIMERS_CUSTOM 0 00122 #endif 00123 /** 00124 * @} 00125 */ 00126 00127 /** 00128 * @defgroup lwip_opts_memcpy memcpy 00129 * @ingroup lwip_opts_infrastructure 00130 * @{ 00131 */ 00132 /** 00133 * MEMCPY: override this if you have a faster implementation at hand than the 00134 * one included in your C library 00135 */ 00136 #if !defined MEMCPY || defined __DOXYGEN__ 00137 #define MEMCPY(dst,src,len) memcpy(dst,src,len) 00138 #endif 00139 00140 /** 00141 * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a 00142 * call to memcpy() if the length is known at compile time and is small. 00143 */ 00144 #if !defined SMEMCPY || defined __DOXYGEN__ 00145 #define SMEMCPY(dst,src,len) memcpy(dst,src,len) 00146 #endif 00147 /** 00148 * @} 00149 */ 00150 00151 /* 00152 ------------------------------------ 00153 ----------- Core locking ----------- 00154 ------------------------------------ 00155 */ 00156 /** 00157 * @defgroup lwip_opts_lock Core locking and MPU 00158 * @ingroup lwip_opts_infrastructure 00159 * @{ 00160 */ 00161 /** 00162 * LWIP_MPU_COMPATIBLE: enables special memory management mechanism 00163 * which makes lwip able to work on MPU (Memory Protection Unit) system 00164 * by not passing stack-pointers to other threads 00165 * (this decreases performance as memory is allocated from pools instead 00166 * of keeping it on the stack) 00167 */ 00168 #if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ 00169 #define LWIP_MPU_COMPATIBLE 0 00170 #endif 00171 00172 /** 00173 * LWIP_TCPIP_CORE_LOCKING 00174 * Creates a global mutex that is held during TCPIP thread operations. 00175 * Can be locked by client code to perform lwIP operations without changing 00176 * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and 00177 * UNLOCK_TCPIP_CORE(). 00178 * Your system should provide mutexes supporting priority inversion to use this. 00179 */ 00180 #if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ 00181 #define LWIP_TCPIP_CORE_LOCKING 1 00182 #endif 00183 00184 /** 00185 * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, 00186 * this lets tcpip_input() grab the mutex for input packets as well, 00187 * instead of allocating a message and passing it to tcpip_thread. 00188 * 00189 * ATTENTION: this does not work when tcpip_input() is called from 00190 * interrupt context! 00191 */ 00192 #if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ 00193 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 00194 #endif 00195 00196 /** 00197 * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt 00198 * protection) for certain critical regions during buffer allocation, deallocation 00199 * and memory allocation and deallocation. 00200 * ATTENTION: This is required when using lwIP from more than one context! If 00201 * you disable this, you must be sure what you are doing! 00202 */ 00203 #if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ 00204 #define SYS_LIGHTWEIGHT_PROT 1 00205 #endif 00206 /** 00207 * @} 00208 */ 00209 00210 /* 00211 ------------------------------------ 00212 ---------- Memory options ---------- 00213 ------------------------------------ 00214 */ 00215 /** 00216 * @defgroup lwip_opts_mem Heap and memory pools 00217 * @ingroup lwip_opts_infrastructure 00218 * @{ 00219 */ 00220 /** 00221 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library 00222 * instead of the lwip internal allocator. Can save code size if you 00223 * already use it. 00224 */ 00225 #if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ 00226 #define MEM_LIBC_MALLOC 0 00227 #endif 00228 00229 /** 00230 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. 00231 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution 00232 * speed (heap alloc can be much slower than pool alloc) and usage from interrupts 00233 * (especially if your netif driver allocates PBUF_POOL pbufs for received frames 00234 * from interrupt)! 00235 * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, 00236 * not only for internal pools defined in memp_std.h)! 00237 */ 00238 #if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ 00239 #define MEMP_MEM_MALLOC 0 00240 #endif 00241 00242 /** 00243 * MEM_ALIGNMENT: should be set to the alignment of the CPU 00244 * 4 byte alignment -> \#define MEM_ALIGNMENT 4 00245 * 2 byte alignment -> \#define MEM_ALIGNMENT 2 00246 */ 00247 #if !defined MEM_ALIGNMENT || defined __DOXYGEN__ 00248 #define MEM_ALIGNMENT 1 00249 #endif 00250 00251 /** 00252 * MEM_SIZE: the size of the heap memory. If the application will send 00253 * a lot of data that needs to be copied, this should be set high. 00254 */ 00255 #if !defined MEM_SIZE || defined __DOXYGEN__ 00256 #define MEM_SIZE 1600 00257 #endif 00258 00259 /** 00260 * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable 00261 * amount of bytes before and after each memp element in every pool and fills 00262 * it with a prominent default value. 00263 * MEMP_OVERFLOW_CHECK == 0 no checking 00264 * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed 00265 * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time 00266 * memp_malloc() or memp_free() is called (useful but slow!) 00267 */ 00268 #if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ 00269 #define MEMP_OVERFLOW_CHECK 0 00270 #endif 00271 00272 /** 00273 * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make 00274 * sure that there are no cycles in the linked lists. 00275 */ 00276 #if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ 00277 #define MEMP_SANITY_CHECK 0 00278 #endif 00279 00280 /** 00281 * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set 00282 * of memory pools of various sizes. When mem_malloc is called, an element of 00283 * the smallest pool that can provide the length needed is returned. 00284 * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. 00285 */ 00286 #if !defined MEM_USE_POOLS || defined __DOXYGEN__ 00287 #define MEM_USE_POOLS 0 00288 #endif 00289 00290 /** 00291 * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next 00292 * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more 00293 * reliable. */ 00294 #if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ 00295 #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 00296 #endif 00297 00298 /** 00299 * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h 00300 * that defines additional pools beyond the "standard" ones required 00301 * by lwIP. If you set this to 1, you must have lwippools.h in your 00302 * include path somewhere. 00303 */ 00304 #if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ 00305 #define MEMP_USE_CUSTOM_POOLS 0 00306 #endif 00307 00308 /** 00309 * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from 00310 * interrupt context (or another context that doesn't allow waiting for a 00311 * semaphore). 00312 * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, 00313 * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs 00314 * with each loop so that mem_free can run. 00315 * 00316 * ATTENTION: As you can see from the above description, this leads to dis-/ 00317 * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc 00318 * can need longer. 00319 * 00320 * If you don't want that, at least for NO_SYS=0, you can still use the following 00321 * functions to enqueue a deallocation call which then runs in the tcpip_thread 00322 * context: 00323 * - pbuf_free_callback(p); 00324 * - mem_free_callback(m); 00325 */ 00326 #if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ 00327 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 00328 #endif 00329 /** 00330 * @} 00331 */ 00332 00333 /* 00334 ------------------------------------------------ 00335 ---------- Internal Memory Pool Sizes ---------- 00336 ------------------------------------------------ 00337 */ 00338 /** 00339 * @defgroup lwip_opts_memp Internal memory pools 00340 * @ingroup lwip_opts_infrastructure 00341 * @{ 00342 */ 00343 /** 00344 * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). 00345 * If the application sends a lot of data out of ROM (or other static memory), 00346 * this should be set high. 00347 */ 00348 #if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ 00349 #define MEMP_NUM_PBUF 16 00350 #endif 00351 00352 /** 00353 * MEMP_NUM_RAW_PCB: Number of raw connection PCBs 00354 * (requires the LWIP_RAW option) 00355 */ 00356 #if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ 00357 #define MEMP_NUM_RAW_PCB 4 00358 #endif 00359 00360 /** 00361 * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One 00362 * per active UDP "connection". 00363 * (requires the LWIP_UDP option) 00364 */ 00365 #if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ 00366 #define MEMP_NUM_UDP_PCB 4 00367 #endif 00368 00369 /** 00370 * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. 00371 * (requires the LWIP_TCP option) 00372 */ 00373 #if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ 00374 #define MEMP_NUM_TCP_PCB 5 00375 #endif 00376 00377 /** 00378 * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. 00379 * (requires the LWIP_TCP option) 00380 */ 00381 #if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ 00382 #define MEMP_NUM_TCP_PCB_LISTEN 8 00383 #endif 00384 00385 /** 00386 * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. 00387 * (requires the LWIP_TCP option) 00388 */ 00389 #if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ 00390 #define MEMP_NUM_TCP_SEG 16 00391 #endif 00392 00393 /** 00394 * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for 00395 * reassembly (whole packets, not fragments!) 00396 */ 00397 #if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ 00398 #define MEMP_NUM_REASSDATA 5 00399 #endif 00400 00401 /** 00402 * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent 00403 * (fragments, not whole packets!). 00404 * This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 00405 * with DMA-enabled MACs where the packet is not yet sent when netif->output 00406 * returns. 00407 */ 00408 #if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ 00409 #define MEMP_NUM_FRAG_PBUF 15 00410 #endif 00411 00412 /** 00413 * MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing 00414 * packets (pbufs) that are waiting for an ARP request (to resolve 00415 * their destination address) to finish. 00416 * (requires the ARP_QUEUEING option) 00417 */ 00418 #if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ 00419 #define MEMP_NUM_ARP_QUEUE 30 00420 #endif 00421 00422 /** 00423 * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces 00424 * can be members at the same time (one per netif - allsystems group -, plus one 00425 * per netif membership). 00426 * (requires the LWIP_IGMP option) 00427 */ 00428 #if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ 00429 #define MEMP_NUM_IGMP_GROUP 8 00430 #endif 00431 00432 /** 00433 * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. 00434 * The default number of timeouts is calculated here for all enabled modules. 00435 * The formula expects settings to be either '0' or '1'. 00436 */ 00437 #if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ 00438 #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) 00439 #endif 00440 00441 /** 00442 * MEMP_NUM_NETBUF: the number of struct netbufs. 00443 * (only needed if you use the sequential API, like api_lib.c) 00444 */ 00445 #if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ 00446 #define MEMP_NUM_NETBUF 2 00447 #endif 00448 00449 /** 00450 * MEMP_NUM_NETCONN: the number of struct netconns. 00451 * (only needed if you use the sequential API, like api_lib.c) 00452 */ 00453 #if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ 00454 #define MEMP_NUM_NETCONN 4 00455 #endif 00456 00457 /** 00458 * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used 00459 * for callback/timeout API communication. 00460 * (only needed if you use tcpip.c) 00461 */ 00462 #if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ 00463 #define MEMP_NUM_TCPIP_MSG_API 8 00464 #endif 00465 00466 /** 00467 * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used 00468 * for incoming packets. 00469 * (only needed if you use tcpip.c) 00470 */ 00471 #if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ 00472 #define MEMP_NUM_TCPIP_MSG_INPKT 8 00473 #endif 00474 00475 /** 00476 * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls 00477 * (before freeing the corresponding memory using lwip_freeaddrinfo()). 00478 */ 00479 #if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ 00480 #define MEMP_NUM_NETDB 1 00481 #endif 00482 00483 /** 00484 * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list 00485 * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. 00486 */ 00487 #if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ 00488 #define MEMP_NUM_LOCALHOSTLIST 1 00489 #endif 00490 00491 /** 00492 * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. 00493 */ 00494 #if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ 00495 #define PBUF_POOL_SIZE 16 00496 #endif 00497 00498 /** MEMP_NUM_API_MSG: the number of concurrently active calls to various 00499 * socket, netconn, and tcpip functions 00500 */ 00501 #if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ 00502 #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API 00503 #endif 00504 00505 /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname 00506 */ 00507 #if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ 00508 #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API 00509 #endif 00510 00511 /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls 00512 * to getsockopt/setsockopt 00513 */ 00514 #if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ 00515 #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API 00516 #endif 00517 00518 /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the 00519 * netifapi functions 00520 */ 00521 #if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ 00522 #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API 00523 #endif 00524 /** 00525 * @} 00526 */ 00527 00528 /* 00529 --------------------------------- 00530 ---------- ARP options ---------- 00531 --------------------------------- 00532 */ 00533 /** 00534 * @defgroup lwip_opts_arp ARP 00535 * @ingroup lwip_opts_ipv4 00536 * @{ 00537 */ 00538 /** 00539 * LWIP_ARP==1: Enable ARP functionality. 00540 */ 00541 #if !defined LWIP_ARP || defined __DOXYGEN__ 00542 #define LWIP_ARP 1 00543 #endif 00544 00545 /** 00546 * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. 00547 */ 00548 #if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ 00549 #define ARP_TABLE_SIZE 10 00550 #endif 00551 00552 /** the time an ARP entry stays valid after its last update, 00553 * for ARP_TMR_INTERVAL = 1000, this is 00554 * (60 * 5) seconds = 5 minutes. 00555 */ 00556 #if !defined ARP_MAXAGE || defined __DOXYGEN__ 00557 #define ARP_MAXAGE 300 00558 #endif 00559 00560 /** 00561 * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address 00562 * resolution. By default, only the most recent packet is queued per IP address. 00563 * This is sufficient for most protocols and mainly reduces TCP connection 00564 * startup time. Set this to 1 if you know your application sends more than one 00565 * packet in a row to an IP address that is not in the ARP cache. 00566 */ 00567 #if !defined ARP_QUEUEING || defined __DOXYGEN__ 00568 #define ARP_QUEUEING 0 00569 #endif 00570 00571 /** The maximum number of packets which may be queued for each 00572 * unresolved address by other network layers. Defaults to 3, 0 means disabled. 00573 * Old packets are dropped, new packets are queued. 00574 */ 00575 #if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ 00576 #define ARP_QUEUE_LEN 3 00577 #endif 00578 00579 /** 00580 * ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with 00581 * VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and 00582 * LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers. 00583 * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. 00584 * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. 00585 * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. 00586 * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) 00587 * that returns 1 to accept a packet or 0 to drop a packet. 00588 */ 00589 #if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ 00590 #define ETHARP_SUPPORT_VLAN 0 00591 #endif 00592 00593 /** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled 00594 */ 00595 #if !defined LWIP_ETHERNET || defined __DOXYGEN__ 00596 #define LWIP_ETHERNET LWIP_ARP 00597 #endif 00598 00599 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure 00600 * alignment of payload after that header. Since the header is 14 bytes long, 00601 * without this padding e.g. addresses in the IP header will not be aligned 00602 * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. 00603 */ 00604 #if !defined ETH_PAD_SIZE || defined __DOXYGEN__ 00605 #define ETH_PAD_SIZE 0 00606 #endif 00607 00608 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table 00609 * entries (using etharp_add_static_entry/etharp_remove_static_entry). 00610 */ 00611 #if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ 00612 #define ETHARP_SUPPORT_STATIC_ENTRIES 0 00613 #endif 00614 00615 /** ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries. 00616 * If disabled, duplicate IP address on multiple netifs are not supported 00617 * (but this should only occur for AutoIP). 00618 */ 00619 #if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ 00620 #define ETHARP_TABLE_MATCH_NETIF 0 00621 #endif 00622 /** 00623 * @} 00624 */ 00625 00626 /* 00627 -------------------------------- 00628 ---------- IP options ---------- 00629 -------------------------------- 00630 */ 00631 /** 00632 * @defgroup lwip_opts_ipv4 IPv4 00633 * @ingroup lwip_opts 00634 * @{ 00635 */ 00636 /** 00637 * LWIP_IPV4==1: Enable IPv4 00638 */ 00639 #if !defined LWIP_IPV4 || defined __DOXYGEN__ 00640 #define LWIP_IPV4 1 00641 #endif 00642 00643 /** 00644 * IP_FORWARD==1: Enables the ability to forward IP packets across network 00645 * interfaces. If you are going to run lwIP on a device with only one network 00646 * interface, define this to 0. 00647 */ 00648 #if !defined IP_FORWARD || defined __DOXYGEN__ 00649 #define IP_FORWARD 0 00650 #endif 00651 00652 /** 00653 * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that 00654 * this option does not affect outgoing packet sizes, which can be controlled 00655 * via IP_FRAG. 00656 */ 00657 #if !defined IP_REASSEMBLY || defined __DOXYGEN__ 00658 #define IP_REASSEMBLY 1 00659 #endif 00660 00661 /** 00662 * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note 00663 * that this option does not affect incoming packet sizes, which can be 00664 * controlled via IP_REASSEMBLY. 00665 */ 00666 #if !defined IP_FRAG || defined __DOXYGEN__ 00667 #define IP_FRAG 1 00668 #endif 00669 00670 #if !LWIP_IPV4 00671 /* disable IPv4 extensions when IPv4 is disabled */ 00672 #undef IP_FORWARD 00673 #define IP_FORWARD 0 00674 #undef IP_REASSEMBLY 00675 #define IP_REASSEMBLY 0 00676 #undef IP_FRAG 00677 #define IP_FRAG 0 00678 #endif /* !LWIP_IPV4 */ 00679 00680 /** 00681 * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. 00682 * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. 00683 * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). 00684 */ 00685 #if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ 00686 #define IP_OPTIONS_ALLOWED 1 00687 #endif 00688 00689 /** 00690 * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) 00691 * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived 00692 * in this time, the whole packet is discarded. 00693 */ 00694 #if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ 00695 #define IP_REASS_MAXAGE 3 00696 #endif 00697 00698 /** 00699 * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. 00700 * Since the received pbufs are enqueued, be sure to configure 00701 * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive 00702 * packets even if the maximum amount of fragments is enqueued for reassembly! 00703 */ 00704 #if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ 00705 #define IP_REASS_MAX_PBUFS 10 00706 #endif 00707 00708 /** 00709 * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. 00710 */ 00711 #if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ 00712 #define IP_DEFAULT_TTL 255 00713 #endif 00714 00715 /** 00716 * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast 00717 * filter per pcb on udp and raw send operations. To enable broadcast filter 00718 * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. 00719 */ 00720 #if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ 00721 #define IP_SOF_BROADCAST 0 00722 #endif 00723 00724 /** 00725 * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast 00726 * filter on recv operations. 00727 */ 00728 #if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ 00729 #define IP_SOF_BROADCAST_RECV 0 00730 #endif 00731 00732 /** 00733 * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back 00734 * out on the netif where it was received. This should only be used for 00735 * wireless networks. 00736 * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming 00737 * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! 00738 */ 00739 #if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ 00740 #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 00741 #endif 00742 00743 /** 00744 * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first 00745 * local TCP/UDP pcb (default==0). This can prevent creating predictable port 00746 * numbers after booting a device. 00747 */ 00748 #if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ 00749 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 00750 #endif 00751 /** 00752 * @} 00753 */ 00754 00755 /* 00756 ---------------------------------- 00757 ---------- ICMP options ---------- 00758 ---------------------------------- 00759 */ 00760 /** 00761 * @defgroup lwip_opts_icmp ICMP 00762 * @ingroup lwip_opts_ipv4 00763 * @{ 00764 */ 00765 /** 00766 * LWIP_ICMP==1: Enable ICMP module inside the IP stack. 00767 * Be careful, disable that make your product non-compliant to RFC1122 00768 */ 00769 #if !defined LWIP_ICMP || defined __DOXYGEN__ 00770 #define LWIP_ICMP 1 00771 #endif 00772 00773 /** 00774 * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. 00775 */ 00776 #if !defined ICMP_TTL || defined __DOXYGEN__ 00777 #define ICMP_TTL (IP_DEFAULT_TTL) 00778 #endif 00779 00780 /** 00781 * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) 00782 */ 00783 #if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ 00784 #define LWIP_BROADCAST_PING 0 00785 #endif 00786 00787 /** 00788 * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) 00789 */ 00790 #if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ 00791 #define LWIP_MULTICAST_PING 0 00792 #endif 00793 /** 00794 * @} 00795 */ 00796 00797 /* 00798 --------------------------------- 00799 ---------- RAW options ---------- 00800 --------------------------------- 00801 */ 00802 /** 00803 * @defgroup lwip_opts_raw RAW 00804 * @ingroup lwip_opts_callback 00805 * @{ 00806 */ 00807 /** 00808 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00809 */ 00810 #if !defined LWIP_RAW || defined __DOXYGEN__ 00811 #define LWIP_RAW 0 00812 #endif 00813 00814 /** 00815 * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. 00816 */ 00817 #if !defined RAW_TTL || defined __DOXYGEN__ 00818 #define RAW_TTL (IP_DEFAULT_TTL) 00819 #endif 00820 /** 00821 * @} 00822 */ 00823 00824 /* 00825 ---------------------------------- 00826 ---------- DHCP options ---------- 00827 ---------------------------------- 00828 */ 00829 /** 00830 * @defgroup lwip_opts_dhcp DHCP 00831 * @ingroup lwip_opts_ipv4 00832 * @{ 00833 */ 00834 /** 00835 * LWIP_DHCP==1: Enable DHCP module. 00836 */ 00837 #if !defined LWIP_DHCP || defined __DOXYGEN__ 00838 #define LWIP_DHCP 0 00839 #endif 00840 #if !LWIP_IPV4 00841 /* disable DHCP when IPv4 is disabled */ 00842 #undef LWIP_DHCP 00843 #define LWIP_DHCP 0 00844 #endif /* !LWIP_IPV4 */ 00845 00846 /** 00847 * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. 00848 */ 00849 #if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ 00850 #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) 00851 #endif 00852 00853 /** 00854 * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has 00855 * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and 00856 * netif drivers might not set this flag, the default is off. If enabled, 00857 * netif_set_link_up() must be called to continue dhcp starting. 00858 */ 00859 #if !defined LWIP_DHCP_CHECK_LINK_UP 00860 #define LWIP_DHCP_CHECK_LINK_UP 0 00861 #endif 00862 00863 /** 00864 * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. 00865 */ 00866 #if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ 00867 #define LWIP_DHCP_BOOTP_FILE 0 00868 #endif 00869 00870 /** 00871 * LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each 00872 * response packet, an callback is called, which has to be provided by the port: 00873 * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); 00874 */ 00875 #if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ 00876 #define LWIP_DHCP_GET_NTP_SRV 0 00877 #endif 00878 00879 /** 00880 * The maximum of NTP servers requested 00881 */ 00882 #if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ 00883 #define LWIP_DHCP_MAX_NTP_SERVERS 1 00884 #endif 00885 00886 /** 00887 * LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select. 00888 * DHCP servers received in the response are passed to DNS via @ref dns_setserver() 00889 * (up to the maximum limit defined here). 00890 */ 00891 #if !defined LWIP_DHCP_MAX_DNS_SERVERS || defined __DOXYGEN__ 00892 #define LWIP_DHCP_MAX_DNS_SERVERS DNS_MAX_SERVERS 00893 #endif 00894 /** 00895 * @} 00896 */ 00897 00898 /* 00899 ------------------------------------ 00900 ---------- AUTOIP options ---------- 00901 ------------------------------------ 00902 */ 00903 /** 00904 * @defgroup lwip_opts_autoip AUTOIP 00905 * @ingroup lwip_opts_ipv4 00906 * @{ 00907 */ 00908 /** 00909 * LWIP_AUTOIP==1: Enable AUTOIP module. 00910 */ 00911 #if !defined LWIP_AUTOIP || defined __DOXYGEN__ 00912 #define LWIP_AUTOIP 0 00913 #endif 00914 #if !LWIP_IPV4 00915 /* disable AUTOIP when IPv4 is disabled */ 00916 #undef LWIP_AUTOIP 00917 #define LWIP_AUTOIP 0 00918 #endif /* !LWIP_IPV4 */ 00919 00920 /** 00921 * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on 00922 * the same interface at the same time. 00923 */ 00924 #if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ 00925 #define LWIP_DHCP_AUTOIP_COOP 0 00926 #endif 00927 00928 /** 00929 * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes 00930 * that should be sent before falling back on AUTOIP (the DHCP client keeps 00931 * running in this case). This can be set as low as 1 to get an AutoIP address 00932 * very quickly, but you should be prepared to handle a changing IP address 00933 * when DHCP overrides AutoIP. 00934 */ 00935 #if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ 00936 #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 00937 #endif 00938 /** 00939 * @} 00940 */ 00941 00942 /* 00943 ---------------------------------- 00944 ----- SNMP MIB2 support ----- 00945 ---------------------------------- 00946 */ 00947 /** 00948 * @defgroup lwip_opts_mib2 SNMP MIB2 callbacks 00949 * @ingroup lwip_opts_infrastructure 00950 * @{ 00951 */ 00952 /** 00953 * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks. 00954 * Turn this on to get callbacks needed to implement MIB2. 00955 * Usually MIB2_STATS should be enabled, too. 00956 */ 00957 #if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ 00958 #define LWIP_MIB2_CALLBACKS 0 00959 #endif 00960 /** 00961 * @} 00962 */ 00963 00964 /* 00965 ---------------------------------- 00966 ----- Multicast/IGMP options ----- 00967 ---------------------------------- 00968 */ 00969 /** 00970 * @defgroup lwip_opts_igmp IGMP 00971 * @ingroup lwip_opts_ipv4 00972 * @{ 00973 */ 00974 /** 00975 * LWIP_IGMP==1: Turn on IGMP module. 00976 */ 00977 #if !defined LWIP_IGMP || defined __DOXYGEN__ 00978 #define LWIP_IGMP 0 00979 #endif 00980 #if !LWIP_IPV4 00981 #undef LWIP_IGMP 00982 #define LWIP_IGMP 0 00983 #endif 00984 00985 /** 00986 * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options 00987 * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP 00988 */ 00989 #if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ 00990 #define LWIP_MULTICAST_TX_OPTIONS (LWIP_IGMP && LWIP_UDP) 00991 #endif 00992 /** 00993 * @} 00994 */ 00995 00996 /* 00997 ---------------------------------- 00998 ---------- DNS options ----------- 00999 ---------------------------------- 01000 */ 01001 /** 01002 * @defgroup lwip_opts_dns DNS 01003 * @ingroup lwip_opts_callback 01004 * @{ 01005 */ 01006 /** 01007 * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS 01008 * transport. 01009 */ 01010 #if !defined LWIP_DNS || defined __DOXYGEN__ 01011 #define LWIP_DNS 0 01012 #endif 01013 01014 /** DNS maximum number of entries to maintain locally. */ 01015 #if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ 01016 #define DNS_TABLE_SIZE 4 01017 #endif 01018 01019 /** DNS maximum host name length supported in the name table. */ 01020 #if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ 01021 #define DNS_MAX_NAME_LENGTH 256 01022 #endif 01023 01024 /** The maximum of DNS servers 01025 * The first server can be initialized automatically by defining 01026 * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' 01027 */ 01028 #if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ 01029 #define DNS_MAX_SERVERS 2 01030 #endif 01031 01032 /** DNS do a name checking between the query and the response. */ 01033 #if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ 01034 #define DNS_DOES_NAME_CHECK 1 01035 #endif 01036 01037 /** LWIP_DNS_SECURE: controls the security level of the DNS implementation 01038 * Use all DNS security features by default. 01039 * This is overridable but should only be needed by very small targets 01040 * or when using against non standard DNS servers. */ 01041 #if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ 01042 #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) 01043 #endif 01044 01045 /* A list of DNS security features follows */ 01046 #define LWIP_DNS_SECURE_RAND_XID 1 01047 #define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2 01048 #define LWIP_DNS_SECURE_RAND_SRC_PORT 4 01049 01050 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, 01051 * you have to define 01052 * \#define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}} 01053 * (an array of structs name/address, where address is an u32_t in network 01054 * byte order). 01055 * 01056 * Instead, you can also use an external function: 01057 * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) 01058 * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). 01059 */ 01060 #if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ 01061 #define DNS_LOCAL_HOSTLIST 0 01062 #endif /* DNS_LOCAL_HOSTLIST */ 01063 01064 /** If this is turned on, the local host-list can be dynamically changed 01065 * at runtime. */ 01066 #if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ 01067 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 01068 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 01069 01070 /** Set this to 1 to enable querying ".local" names via mDNS 01071 * using a One-Shot Multicast DNS Query */ 01072 #if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__ 01073 #define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 01074 #endif 01075 /** 01076 * @} 01077 */ 01078 01079 /* 01080 --------------------------------- 01081 ---------- UDP options ---------- 01082 --------------------------------- 01083 */ 01084 /** 01085 * @defgroup lwip_opts_udp UDP 01086 * @ingroup lwip_opts_callback 01087 * @{ 01088 */ 01089 /** 01090 * LWIP_UDP==1: Turn on UDP. 01091 */ 01092 #if !defined LWIP_UDP || defined __DOXYGEN__ 01093 #define LWIP_UDP 1 01094 #endif 01095 01096 /** 01097 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) 01098 */ 01099 #if !defined LWIP_UDPLITE || defined __DOXYGEN__ 01100 #define LWIP_UDPLITE 0 01101 #endif 01102 01103 /** 01104 * UDP_TTL: Default Time-To-Live value. 01105 */ 01106 #if !defined UDP_TTL || defined __DOXYGEN__ 01107 #define UDP_TTL (IP_DEFAULT_TTL) 01108 #endif 01109 01110 /** 01111 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. 01112 */ 01113 #if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ 01114 #define LWIP_NETBUF_RECVINFO 0 01115 #endif 01116 /** 01117 * @} 01118 */ 01119 01120 /* 01121 --------------------------------- 01122 ---------- TCP options ---------- 01123 --------------------------------- 01124 */ 01125 /** 01126 * @defgroup lwip_opts_tcp TCP 01127 * @ingroup lwip_opts_callback 01128 * @{ 01129 */ 01130 /** 01131 * LWIP_TCP==1: Turn on TCP. 01132 */ 01133 #if !defined LWIP_TCP || defined __DOXYGEN__ 01134 #define LWIP_TCP 1 01135 #endif 01136 01137 /** 01138 * TCP_TTL: Default Time-To-Live value. 01139 */ 01140 #if !defined TCP_TTL || defined __DOXYGEN__ 01141 #define TCP_TTL (IP_DEFAULT_TTL) 01142 #endif 01143 01144 /** 01145 * TCP_WND: The size of a TCP window. This must be at least 01146 * (2 * TCP_MSS) for things to work well. 01147 * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size 01148 * with scaling applied. Maximum window value in the TCP header 01149 * will be TCP_WND >> TCP_RCV_SCALE 01150 */ 01151 #if !defined TCP_WND || defined __DOXYGEN__ 01152 #define TCP_WND (4 * TCP_MSS) 01153 #endif 01154 01155 /** 01156 * TCP_MAXRTX: Maximum number of retransmissions of data segments. 01157 */ 01158 #if !defined TCP_MAXRTX || defined __DOXYGEN__ 01159 #define TCP_MAXRTX 12 01160 #endif 01161 01162 /** 01163 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. 01164 */ 01165 #if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ 01166 #define TCP_SYNMAXRTX 6 01167 #endif 01168 01169 /** 01170 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. 01171 * Define to 0 if your device is low on memory. 01172 */ 01173 #if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ 01174 #define TCP_QUEUE_OOSEQ (LWIP_TCP) 01175 #endif 01176 01177 /** 01178 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, 01179 * you might want to increase this.) 01180 * For the receive side, this MSS is advertised to the remote side 01181 * when opening a connection. For the transmit size, this MSS sets 01182 * an upper limit on the MSS advertised by the remote host. 01183 */ 01184 #if !defined TCP_MSS || defined __DOXYGEN__ 01185 #define TCP_MSS 536 01186 #endif 01187 01188 /** 01189 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really 01190 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which 01191 * reflects the available reassembly buffer size at the remote host) and the 01192 * largest size permitted by the IP layer" (RFC 1122) 01193 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the 01194 * netif used for a connection and limits the MSS if it would be too big otherwise. 01195 */ 01196 #if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ 01197 #define TCP_CALCULATE_EFF_SEND_MSS 1 01198 #endif 01199 01200 01201 /** 01202 * TCP_SND_BUF: TCP sender buffer space (bytes). 01203 * To achieve good performance, this should be at least 2 * TCP_MSS. 01204 */ 01205 #if !defined TCP_SND_BUF || defined __DOXYGEN__ 01206 #define TCP_SND_BUF (2 * TCP_MSS) 01207 #endif 01208 01209 /** 01210 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least 01211 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. 01212 */ 01213 #if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ 01214 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 01215 #endif 01216 01217 /** 01218 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than 01219 * TCP_SND_BUF. It is the amount of space which must be available in the 01220 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). 01221 */ 01222 #if !defined TCP_SNDLOWAT || defined __DOXYGEN__ 01223 #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) 01224 #endif 01225 01226 /** 01227 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less 01228 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below 01229 * this number, select returns writable (combined with TCP_SNDLOWAT). 01230 */ 01231 #if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ 01232 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) 01233 #endif 01234 01235 /** 01236 * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. 01237 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. 01238 */ 01239 #if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ 01240 #define TCP_OOSEQ_MAX_BYTES 0 01241 #endif 01242 01243 /** 01244 * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. 01245 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. 01246 */ 01247 #if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ 01248 #define TCP_OOSEQ_MAX_PBUFS 0 01249 #endif 01250 01251 /** 01252 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. 01253 */ 01254 #if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ 01255 #define TCP_LISTEN_BACKLOG 0 01256 #endif 01257 01258 /** 01259 * The maximum allowed backlog for TCP listen netconns. 01260 * This backlog is used unless another is explicitly specified. 01261 * 0xff is the maximum (u8_t). 01262 */ 01263 #if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ 01264 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff 01265 #endif 01266 01267 /** 01268 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may 01269 * allocate ahead of time in an attempt to create shorter pbuf chains 01270 * for transmission. The meaningful range is 0 to TCP_MSS. Some 01271 * suggested values are: 01272 * 01273 * 0: Disable oversized allocation. Each tcp_write() allocates a new 01274 pbuf (old behaviour). 01275 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your 01276 * scatter-gather DMA requires aligned fragments. 01277 * 128: Limit the pbuf/memory overhead to 20%. 01278 * TCP_MSS: Try to create unfragmented TCP packets. 01279 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. 01280 */ 01281 #if !defined TCP_OVERSIZE || defined __DOXYGEN__ 01282 #define TCP_OVERSIZE TCP_MSS 01283 #endif 01284 01285 /** 01286 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. 01287 * The timestamp option is currently only used to help remote hosts, it is not 01288 * really used locally. Therefore, it is only enabled when a TS option is 01289 * received in the initial SYN packet from a remote host. 01290 */ 01291 #if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ 01292 #define LWIP_TCP_TIMESTAMPS 0 01293 #endif 01294 01295 /** 01296 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an 01297 * explicit window update 01298 */ 01299 #if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ 01300 #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) 01301 #endif 01302 01303 /** 01304 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. 01305 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all 01306 * events (accept, sent, etc) that happen in the system. 01307 * LWIP_CALLBACK_API==1: The PCB callback function is called directly 01308 * for the event. This is the default. 01309 */ 01310 #if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ 01311 #define LWIP_EVENT_API 0 01312 #define LWIP_CALLBACK_API 1 01313 #else 01314 #ifndef LWIP_EVENT_API 01315 #define LWIP_EVENT_API 0 01316 #endif 01317 #ifndef LWIP_CALLBACK_API 01318 #define LWIP_CALLBACK_API 0 01319 #endif 01320 #endif 01321 01322 /** 01323 * LWIP_WND_SCALE and TCP_RCV_SCALE: 01324 * Set LWIP_WND_SCALE to 1 to enable window scaling. 01325 * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the 01326 * range of [0..14]). 01327 * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large 01328 * send window while having a small receive window only. 01329 */ 01330 #if !defined LWIP_WND_SCALE || defined __DOXYGEN__ 01331 #define LWIP_WND_SCALE 0 01332 #define TCP_RCV_SCALE 0 01333 #endif 01334 /** 01335 * @} 01336 */ 01337 01338 /* 01339 ---------------------------------- 01340 ---------- Pbuf options ---------- 01341 ---------------------------------- 01342 */ 01343 /** 01344 * @defgroup lwip_opts_pbuf PBUF 01345 * @ingroup lwip_opts 01346 * @{ 01347 */ 01348 /** 01349 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a 01350 * link level header. The default is 14, the standard value for 01351 * Ethernet. 01352 */ 01353 #if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ 01354 #if defined LWIP_HOOK_VLAN_SET && !defined __DOXYGEN__ 01355 #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) 01356 #else /* LWIP_HOOK_VLAN_SET */ 01357 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 01358 #endif /* LWIP_HOOK_VLAN_SET */ 01359 #endif 01360 01361 /** 01362 * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated 01363 * for an additional encapsulation header before ethernet headers (e.g. 802.11) 01364 */ 01365 #if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ 01366 #define PBUF_LINK_ENCAPSULATION_HLEN 0u 01367 #endif 01368 01369 /** 01370 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is 01371 * designed to accommodate single full size TCP frame in one pbuf, including 01372 * TCP_MSS, IP header, and link header. 01373 */ 01374 #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ 01375 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) 01376 #endif 01377 /** 01378 * @} 01379 */ 01380 01381 /* 01382 ------------------------------------------------ 01383 ---------- Network Interfaces options ---------- 01384 ------------------------------------------------ 01385 */ 01386 /** 01387 * @defgroup lwip_opts_netif NETIF 01388 * @ingroup lwip_opts 01389 * @{ 01390 */ 01391 /** 01392 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname 01393 * field. 01394 */ 01395 #if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ 01396 #define LWIP_NETIF_HOSTNAME 0 01397 #endif 01398 01399 /** 01400 * LWIP_NETIF_API==1: Support netif api (in netifapi.c) 01401 */ 01402 #if !defined LWIP_NETIF_API || defined __DOXYGEN__ 01403 #define LWIP_NETIF_API 0 01404 #endif 01405 01406 /** 01407 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface 01408 * changes its up/down status (i.e., due to DHCP IP acquisition) 01409 */ 01410 #if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ 01411 #define LWIP_NETIF_STATUS_CALLBACK 0 01412 #endif 01413 01414 /** 01415 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface 01416 * whenever the link changes (i.e., link down) 01417 */ 01418 #if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ 01419 #define LWIP_NETIF_LINK_CALLBACK 0 01420 #endif 01421 01422 /** 01423 * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called 01424 * when a netif has been removed 01425 */ 01426 #if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ 01427 #define LWIP_NETIF_REMOVE_CALLBACK 0 01428 #endif 01429 01430 /** 01431 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table 01432 * indices) in struct netif. TCP and UDP can make use of this to prevent 01433 * scanning the ARP table for every sent packet. While this is faster for big 01434 * ARP tables or many concurrent connections, it might be counterproductive 01435 * if you have a tiny ARP table or if there never are concurrent connections. 01436 */ 01437 #if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ 01438 #define LWIP_NETIF_HWADDRHINT 0 01439 #endif 01440 01441 /** 01442 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data 01443 * to be sent into one single pbuf. This is for compatibility with DMA-enabled 01444 * MACs that do not support scatter-gather. 01445 * Beware that this might involve CPU-memcpy before transmitting that would not 01446 * be needed without this flag! Use this only if you need to! 01447 * 01448 * @todo: TCP and IP-frag do not work with this, yet: 01449 */ 01450 #if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ 01451 #define LWIP_NETIF_TX_SINGLE_PBUF 0 01452 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ 01453 01454 /** 01455 * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store 01456 * data in client_data member array of struct netif. 01457 */ 01458 #if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__ 01459 #define LWIP_NUM_NETIF_CLIENT_DATA 0 01460 #endif 01461 /** 01462 * @} 01463 */ 01464 01465 /* 01466 ------------------------------------ 01467 ---------- LOOPIF options ---------- 01468 ------------------------------------ 01469 */ 01470 /** 01471 * @defgroup lwip_opts_loop Loopback interface 01472 * @ingroup lwip_opts_netif 01473 * @{ 01474 */ 01475 /** 01476 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). 01477 * This is only needed when no real netifs are available. If at least one other 01478 * netif is available, loopback traffic uses this netif. 01479 */ 01480 #if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ 01481 #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK 01482 #endif 01483 01484 /** 01485 * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). 01486 */ 01487 #if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ 01488 #define LWIP_LOOPIF_MULTICAST 0 01489 #endif 01490 01491 /** 01492 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP 01493 * address equal to the netif IP address, looping them back up the stack. 01494 */ 01495 #if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ 01496 #define LWIP_NETIF_LOOPBACK 0 01497 #endif 01498 01499 /** 01500 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback 01501 * sending for each netif (0 = disabled) 01502 */ 01503 #if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ 01504 #define LWIP_LOOPBACK_MAX_PBUFS 0 01505 #endif 01506 01507 /** 01508 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in 01509 * the system, as netifs must change how they behave depending on this setting 01510 * for the LWIP_NETIF_LOOPBACK option to work. 01511 * Setting this is needed to avoid reentering non-reentrant functions like 01512 * tcp_input(). 01513 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a 01514 * multithreaded environment like tcpip.c. In this case, netif->input() 01515 * is called directly. 01516 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. 01517 * The packets are put on a list and netif_poll() must be called in 01518 * the main application loop. 01519 */ 01520 #if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ 01521 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) 01522 #endif 01523 /** 01524 * @} 01525 */ 01526 01527 /* 01528 ------------------------------------ 01529 ---------- Thread options ---------- 01530 ------------------------------------ 01531 */ 01532 /** 01533 * @defgroup lwip_opts_thread Threading 01534 * @ingroup lwip_opts_infrastructure 01535 * @{ 01536 */ 01537 /** 01538 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. 01539 */ 01540 #if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ 01541 #define TCPIP_THREAD_NAME "tcpip_thread" 01542 #endif 01543 01544 /** 01545 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. 01546 * The stack size value itself is platform-dependent, but is passed to 01547 * sys_thread_new() when the thread is created. 01548 */ 01549 #if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ 01550 #define TCPIP_THREAD_STACKSIZE 0 01551 #endif 01552 01553 /** 01554 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. 01555 * The priority value itself is platform-dependent, but is passed to 01556 * sys_thread_new() when the thread is created. 01557 */ 01558 #if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ 01559 #define TCPIP_THREAD_PRIO 1 01560 #endif 01561 01562 /** 01563 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages 01564 * The queue size value itself is platform-dependent, but is passed to 01565 * sys_mbox_new() when tcpip_init is called. 01566 */ 01567 #if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ 01568 #define TCPIP_MBOX_SIZE 0 01569 #endif 01570 01571 /** 01572 * Define this to something that triggers a watchdog. This is called from 01573 * tcpip_thread after processing a message. 01574 */ 01575 #if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ 01576 #define LWIP_TCPIP_THREAD_ALIVE() 01577 #endif 01578 01579 /** 01580 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. 01581 */ 01582 #if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ 01583 #define SLIPIF_THREAD_NAME "slipif_loop" 01584 #endif 01585 01586 /** 01587 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. 01588 * The stack size value itself is platform-dependent, but is passed to 01589 * sys_thread_new() when the thread is created. 01590 */ 01591 #if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ 01592 #define SLIPIF_THREAD_STACKSIZE 0 01593 #endif 01594 01595 /** 01596 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. 01597 * The priority value itself is platform-dependent, but is passed to 01598 * sys_thread_new() when the thread is created. 01599 */ 01600 #if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ 01601 #define SLIPIF_THREAD_PRIO 1 01602 #endif 01603 01604 /** 01605 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. 01606 */ 01607 #if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ 01608 #define DEFAULT_THREAD_NAME "lwIP" 01609 #endif 01610 01611 /** 01612 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. 01613 * The stack size value itself is platform-dependent, but is passed to 01614 * sys_thread_new() when the thread is created. 01615 */ 01616 #if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ 01617 #define DEFAULT_THREAD_STACKSIZE 0 01618 #endif 01619 01620 /** 01621 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. 01622 * The priority value itself is platform-dependent, but is passed to 01623 * sys_thread_new() when the thread is created. 01624 */ 01625 #if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ 01626 #define DEFAULT_THREAD_PRIO 1 01627 #endif 01628 01629 /** 01630 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01631 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed 01632 * to sys_mbox_new() when the recvmbox is created. 01633 */ 01634 #if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ 01635 #define DEFAULT_RAW_RECVMBOX_SIZE 0 01636 #endif 01637 01638 /** 01639 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01640 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed 01641 * to sys_mbox_new() when the recvmbox is created. 01642 */ 01643 #if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ 01644 #define DEFAULT_UDP_RECVMBOX_SIZE 0 01645 #endif 01646 01647 /** 01648 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01649 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed 01650 * to sys_mbox_new() when the recvmbox is created. 01651 */ 01652 #if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ 01653 #define DEFAULT_TCP_RECVMBOX_SIZE 0 01654 #endif 01655 01656 /** 01657 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. 01658 * The queue size value itself is platform-dependent, but is passed to 01659 * sys_mbox_new() when the acceptmbox is created. 01660 */ 01661 #if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ 01662 #define DEFAULT_ACCEPTMBOX_SIZE 0 01663 #endif 01664 /** 01665 * @} 01666 */ 01667 01668 /* 01669 ---------------------------------------------- 01670 ---------- Sequential layer options ---------- 01671 ---------------------------------------------- 01672 */ 01673 /** 01674 * @defgroup lwip_opts_netconn Netconn 01675 * @ingroup lwip_opts_threadsafe_apis 01676 * @{ 01677 */ 01678 /** 01679 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) 01680 */ 01681 #if !defined LWIP_NETCONN || defined __DOXYGEN__ 01682 #define LWIP_NETCONN 1 01683 #endif 01684 01685 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create 01686 * timers running in tcpip_thread from another thread. 01687 */ 01688 #if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ 01689 #define LWIP_TCPIP_TIMEOUT 0 01690 #endif 01691 01692 /** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per 01693 * thread calling socket/netconn functions instead of allocating one 01694 * semaphore per netconn (and per select etc.) 01695 * ATTENTION: a thread-local semaphore for API calls is needed: 01696 * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t* 01697 * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore 01698 * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore 01699 * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). 01700 * Ports may call these for threads created with sys_thread_new(). 01701 */ 01702 #if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ 01703 #define LWIP_NETCONN_SEM_PER_THREAD 0 01704 #endif 01705 01706 /** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread, 01707 * writing from a 2nd thread and closing from a 3rd thread at the same time. 01708 * ATTENTION: This is currently really alpha! Some requirements: 01709 * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from 01710 * multiple threads at once 01711 * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox 01712 * and prevent a task pending on this during/after deletion 01713 */ 01714 #if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ 01715 #define LWIP_NETCONN_FULLDUPLEX 0 01716 #endif 01717 /** 01718 * @} 01719 */ 01720 01721 /* 01722 ------------------------------------ 01723 ---------- Socket options ---------- 01724 ------------------------------------ 01725 */ 01726 /** 01727 * @defgroup lwip_opts_socket Sockets 01728 * @ingroup lwip_opts_threadsafe_apis 01729 * @{ 01730 */ 01731 /** 01732 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) 01733 */ 01734 #if !defined LWIP_SOCKET || defined __DOXYGEN__ 01735 #define LWIP_SOCKET 1 01736 #endif 01737 01738 /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete 01739 * successfully, as required by POSIX. Default is POSIX-compliant. 01740 */ 01741 #if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ 01742 #define LWIP_SOCKET_SET_ERRNO 1 01743 #endif 01744 01745 /** 01746 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. 01747 * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. 01748 * While this helps code completion, it might conflict with existing libraries. 01749 * (only used if you use sockets.c) 01750 */ 01751 #if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ 01752 #define LWIP_COMPAT_SOCKETS 1 01753 #endif 01754 01755 /** 01756 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. 01757 * Disable this option if you use a POSIX operating system that uses the same 01758 * names (read, write & close). (only used if you use sockets.c) 01759 */ 01760 #if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ 01761 #define LWIP_POSIX_SOCKETS_IO_NAMES 1 01762 #endif 01763 01764 /** 01765 * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. 01766 * This can be useful when there are multiple APIs which create file descriptors. 01767 * When they all start with a different offset and you won't make them overlap you can 01768 * re implement read/write/close/ioctl/fnctl to send the requested action to the right 01769 * library (sharing select will need more work though). 01770 */ 01771 #if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ 01772 #define LWIP_SOCKET_OFFSET 0 01773 #endif 01774 01775 /** 01776 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT 01777 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set 01778 * in seconds. (does not require sockets.c, and will affect tcp.c) 01779 */ 01780 #if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ 01781 #define LWIP_TCP_KEEPALIVE 0 01782 #endif 01783 01784 /** 01785 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and 01786 * SO_SNDTIMEO processing. 01787 */ 01788 #if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ 01789 #define LWIP_SO_SNDTIMEO 0 01790 #endif 01791 01792 /** 01793 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and 01794 * SO_RCVTIMEO processing. 01795 */ 01796 #if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ 01797 #define LWIP_SO_RCVTIMEO 0 01798 #endif 01799 01800 /** 01801 * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int 01802 * (milliseconds, much like winsock does) instead of a struct timeval (default). 01803 */ 01804 #if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ 01805 #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 01806 #endif 01807 01808 /** 01809 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. 01810 */ 01811 #if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ 01812 #define LWIP_SO_RCVBUF 0 01813 #endif 01814 01815 /** 01816 * LWIP_SO_LINGER==1: Enable SO_LINGER processing. 01817 */ 01818 #if !defined LWIP_SO_LINGER || defined __DOXYGEN__ 01819 #define LWIP_SO_LINGER 0 01820 #endif 01821 01822 /** 01823 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. 01824 */ 01825 #if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ 01826 #define RECV_BUFSIZE_DEFAULT INT_MAX 01827 #endif 01828 01829 /** 01830 * By default, TCP socket/netconn close waits 20 seconds max to send the FIN 01831 */ 01832 #if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ 01833 #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 01834 #endif 01835 01836 /** 01837 * SO_REUSE==1: Enable SO_REUSEADDR option. 01838 */ 01839 #if !defined SO_REUSE || defined __DOXYGEN__ 01840 #define SO_REUSE 0 01841 #endif 01842 01843 /** 01844 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets 01845 * to all local matches if SO_REUSEADDR is turned on. 01846 * WARNING: Adds a memcpy for every packet if passing to more than one pcb! 01847 */ 01848 #if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ 01849 #define SO_REUSE_RXTOALL 0 01850 #endif 01851 01852 /** 01853 * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of 01854 * pending data in the network buffer. This is the way windows does it. It's 01855 * the default for lwIP since it is smaller. 01856 * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next 01857 * pending datagram in bytes. This is the way linux does it. This code is only 01858 * here for compatibility. 01859 */ 01860 #if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ 01861 #define LWIP_FIONREAD_LINUXMODE 0 01862 #endif 01863 /** 01864 * @} 01865 */ 01866 01867 /* 01868 ---------------------------------------- 01869 ---------- Statistics options ---------- 01870 ---------------------------------------- 01871 */ 01872 /** 01873 * @defgroup lwip_opts_stats Statistics 01874 * @ingroup lwip_opts_debug 01875 * @{ 01876 */ 01877 /** 01878 * LWIP_STATS==1: Enable statistics collection in lwip_stats. 01879 */ 01880 #if !defined LWIP_STATS || defined __DOXYGEN__ 01881 #define LWIP_STATS 1 01882 #endif 01883 01884 #if LWIP_STATS 01885 01886 /** 01887 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. 01888 */ 01889 #if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ 01890 #define LWIP_STATS_DISPLAY 0 01891 #endif 01892 01893 /** 01894 * LINK_STATS==1: Enable link stats. 01895 */ 01896 #if !defined LINK_STATS || defined __DOXYGEN__ 01897 #define LINK_STATS 1 01898 #endif 01899 01900 /** 01901 * ETHARP_STATS==1: Enable etharp stats. 01902 */ 01903 #if !defined ETHARP_STATS || defined __DOXYGEN__ 01904 #define ETHARP_STATS (LWIP_ARP) 01905 #endif 01906 01907 /** 01908 * IP_STATS==1: Enable IP stats. 01909 */ 01910 #if !defined IP_STATS || defined __DOXYGEN__ 01911 #define IP_STATS 1 01912 #endif 01913 01914 /** 01915 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is 01916 * on if using either frag or reass. 01917 */ 01918 #if !defined IPFRAG_STATS || defined __DOXYGEN__ 01919 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) 01920 #endif 01921 01922 /** 01923 * ICMP_STATS==1: Enable ICMP stats. 01924 */ 01925 #if !defined ICMP_STATS || defined __DOXYGEN__ 01926 #define ICMP_STATS 1 01927 #endif 01928 01929 /** 01930 * IGMP_STATS==1: Enable IGMP stats. 01931 */ 01932 #if !defined IGMP_STATS || defined __DOXYGEN__ 01933 #define IGMP_STATS (LWIP_IGMP) 01934 #endif 01935 01936 /** 01937 * UDP_STATS==1: Enable UDP stats. Default is on if 01938 * UDP enabled, otherwise off. 01939 */ 01940 #if !defined UDP_STATS || defined __DOXYGEN__ 01941 #define UDP_STATS (LWIP_UDP) 01942 #endif 01943 01944 /** 01945 * TCP_STATS==1: Enable TCP stats. Default is on if TCP 01946 * enabled, otherwise off. 01947 */ 01948 #if !defined TCP_STATS || defined __DOXYGEN__ 01949 #define TCP_STATS (LWIP_TCP) 01950 #endif 01951 01952 /** 01953 * MEM_STATS==1: Enable mem.c stats. 01954 */ 01955 #if !defined MEM_STATS || defined __DOXYGEN__ 01956 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) 01957 #endif 01958 01959 /** 01960 * MEMP_STATS==1: Enable memp.c pool stats. 01961 */ 01962 #if !defined MEMP_STATS || defined __DOXYGEN__ 01963 #define MEMP_STATS (MEMP_MEM_MALLOC == 0) 01964 #endif 01965 01966 /** 01967 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). 01968 */ 01969 #if !defined SYS_STATS || defined __DOXYGEN__ 01970 #define SYS_STATS (NO_SYS == 0) 01971 #endif 01972 01973 /** 01974 * IP6_STATS==1: Enable IPv6 stats. 01975 */ 01976 #if !defined IP6_STATS || defined __DOXYGEN__ 01977 #define IP6_STATS (LWIP_IPV6) 01978 #endif 01979 01980 /** 01981 * ICMP6_STATS==1: Enable ICMP for IPv6 stats. 01982 */ 01983 #if !defined ICMP6_STATS || defined __DOXYGEN__ 01984 #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) 01985 #endif 01986 01987 /** 01988 * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. 01989 */ 01990 #if !defined IP6_FRAG_STATS || defined __DOXYGEN__ 01991 #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) 01992 #endif 01993 01994 /** 01995 * MLD6_STATS==1: Enable MLD for IPv6 stats. 01996 */ 01997 #if !defined MLD6_STATS || defined __DOXYGEN__ 01998 #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) 01999 #endif 02000 02001 /** 02002 * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. 02003 */ 02004 #if !defined ND6_STATS || defined __DOXYGEN__ 02005 #define ND6_STATS (LWIP_IPV6) 02006 #endif 02007 02008 /** 02009 * MIB2_STATS==1: Stats for SNMP MIB2. 02010 */ 02011 #if !defined MIB2_STATS || defined __DOXYGEN__ 02012 #define MIB2_STATS 0 02013 #endif 02014 02015 #else 02016 02017 #define LINK_STATS 0 02018 #define ETHARP_STATS 0 02019 #define IP_STATS 0 02020 #define IPFRAG_STATS 0 02021 #define ICMP_STATS 0 02022 #define IGMP_STATS 0 02023 #define UDP_STATS 0 02024 #define TCP_STATS 0 02025 #define MEM_STATS 0 02026 #define MEMP_STATS 0 02027 #define SYS_STATS 0 02028 #define LWIP_STATS_DISPLAY 0 02029 #define IP6_STATS 0 02030 #define ICMP6_STATS 0 02031 #define IP6_FRAG_STATS 0 02032 #define MLD6_STATS 0 02033 #define ND6_STATS 0 02034 #define MIB2_STATS 0 02035 02036 #endif /* LWIP_STATS */ 02037 /** 02038 * @} 02039 */ 02040 02041 /* 02042 -------------------------------------- 02043 ---------- Checksum options ---------- 02044 -------------------------------------- 02045 */ 02046 /** 02047 * @defgroup lwip_opts_checksum Checksum 02048 * @ingroup lwip_opts_infrastructure 02049 * @{ 02050 */ 02051 /** 02052 * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled 02053 * per netif. 02054 * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! 02055 */ 02056 #if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ 02057 #define LWIP_CHECKSUM_CTRL_PER_NETIF 0 02058 #endif 02059 02060 /** 02061 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. 02062 */ 02063 #if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ 02064 #define CHECKSUM_GEN_IP 1 02065 #endif 02066 02067 /** 02068 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. 02069 */ 02070 #if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ 02071 #define CHECKSUM_GEN_UDP 1 02072 #endif 02073 02074 /** 02075 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. 02076 */ 02077 #if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ 02078 #define CHECKSUM_GEN_TCP 1 02079 #endif 02080 02081 /** 02082 * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. 02083 */ 02084 #if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ 02085 #define CHECKSUM_GEN_ICMP 1 02086 #endif 02087 02088 /** 02089 * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. 02090 */ 02091 #if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ 02092 #define CHECKSUM_GEN_ICMP6 1 02093 #endif 02094 02095 /** 02096 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. 02097 */ 02098 #if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ 02099 #define CHECKSUM_CHECK_IP 1 02100 #endif 02101 02102 /** 02103 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. 02104 */ 02105 #if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ 02106 #define CHECKSUM_CHECK_UDP 1 02107 #endif 02108 02109 /** 02110 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. 02111 */ 02112 #if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ 02113 #define CHECKSUM_CHECK_TCP 1 02114 #endif 02115 02116 /** 02117 * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. 02118 */ 02119 #if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ 02120 #define CHECKSUM_CHECK_ICMP 1 02121 #endif 02122 02123 /** 02124 * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets 02125 */ 02126 #if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ 02127 #define CHECKSUM_CHECK_ICMP6 1 02128 #endif 02129 02130 /** 02131 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from 02132 * application buffers to pbufs. 02133 */ 02134 #if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ 02135 #define LWIP_CHECKSUM_ON_COPY 0 02136 #endif 02137 /** 02138 * @} 02139 */ 02140 02141 /* 02142 --------------------------------------- 02143 ---------- IPv6 options --------------- 02144 --------------------------------------- 02145 */ 02146 /** 02147 * @defgroup lwip_opts_ipv6 IPv6 02148 * @ingroup lwip_opts 02149 * @{ 02150 */ 02151 /** 02152 * LWIP_IPV6==1: Enable IPv6 02153 */ 02154 #if !defined LWIP_IPV6 || defined __DOXYGEN__ 02155 #define LWIP_IPV6 0 02156 #endif 02157 02158 /** 02159 * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. 02160 */ 02161 #if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ 02162 #define LWIP_IPV6_NUM_ADDRESSES 3 02163 #endif 02164 02165 /** 02166 * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs 02167 */ 02168 #if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ 02169 #define LWIP_IPV6_FORWARD 0 02170 #endif 02171 02172 /** 02173 * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. 02174 */ 02175 #if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ 02176 #define LWIP_IPV6_FRAG 0 02177 #endif 02178 02179 /** 02180 * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented 02181 */ 02182 #if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ 02183 #define LWIP_IPV6_REASS (LWIP_IPV6) 02184 #endif 02185 02186 /** 02187 * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during 02188 * network startup. 02189 */ 02190 #if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ 02191 #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 02192 #endif 02193 02194 /** 02195 * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. 02196 */ 02197 #if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ 02198 #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) 02199 #endif 02200 02201 /** 02202 * LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts. 02203 */ 02204 #if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ 02205 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 02206 #endif 02207 /** 02208 * @} 02209 */ 02210 02211 /** 02212 * @defgroup lwip_opts_icmp6 ICMP6 02213 * @ingroup lwip_opts_ipv6 02214 * @{ 02215 */ 02216 /** 02217 * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) 02218 */ 02219 #if !defined LWIP_ICMP6 || defined __DOXYGEN__ 02220 #define LWIP_ICMP6 (LWIP_IPV6) 02221 #endif 02222 02223 /** 02224 * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in 02225 * ICMPv6 error messages. 02226 */ 02227 #if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ 02228 #define LWIP_ICMP6_DATASIZE 8 02229 #endif 02230 02231 /** 02232 * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages 02233 */ 02234 #if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ 02235 #define LWIP_ICMP6_HL 255 02236 #endif 02237 /** 02238 * @} 02239 */ 02240 02241 /** 02242 * @defgroup lwip_opts_mld6 Multicast listener discovery 02243 * @ingroup lwip_opts_ipv6 02244 * @{ 02245 */ 02246 /** 02247 * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. 02248 * If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must 02249 * indiscriminately pass all inbound IPv6 multicast traffic to lwIP. 02250 */ 02251 #if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ 02252 #define LWIP_IPV6_MLD (LWIP_IPV6) 02253 #endif 02254 02255 /** 02256 * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined. 02257 * There must be enough groups so that each netif can join the solicited-node 02258 * multicast group for each of its local addresses, plus one for MDNS if 02259 * applicable, plus any number of groups to be joined on UDP sockets. 02260 */ 02261 #if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ 02262 #define MEMP_NUM_MLD6_GROUP 4 02263 #endif 02264 /** 02265 * @} 02266 */ 02267 02268 /** 02269 * @defgroup lwip_opts_nd6 Neighbor discovery 02270 * @ingroup lwip_opts_ipv6 02271 * @{ 02272 */ 02273 /** 02274 * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address 02275 * is being resolved. 02276 */ 02277 #if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ 02278 #define LWIP_ND6_QUEUEING (LWIP_IPV6) 02279 #endif 02280 02281 /** 02282 * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. 02283 */ 02284 #if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ 02285 #define MEMP_NUM_ND6_QUEUE 20 02286 #endif 02287 02288 /** 02289 * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache 02290 */ 02291 #if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ 02292 #define LWIP_ND6_NUM_NEIGHBORS 10 02293 #endif 02294 02295 /** 02296 * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache 02297 */ 02298 #if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ 02299 #define LWIP_ND6_NUM_DESTINATIONS 10 02300 #endif 02301 02302 /** 02303 * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache 02304 */ 02305 #if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ 02306 #define LWIP_ND6_NUM_PREFIXES 5 02307 #endif 02308 02309 /** 02310 * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache 02311 */ 02312 #if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ 02313 #define LWIP_ND6_NUM_ROUTERS 3 02314 #endif 02315 02316 /** 02317 * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send 02318 * (neighbor solicit and router solicit) 02319 */ 02320 #if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ 02321 #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 02322 #endif 02323 02324 /** 02325 * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages 02326 * to send during neighbor reachability detection. 02327 */ 02328 #if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ 02329 #define LWIP_ND6_MAX_UNICAST_SOLICIT 3 02330 #endif 02331 02332 /** 02333 * Unused: See ND RFC (time in milliseconds). 02334 */ 02335 #if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ 02336 #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 02337 #endif 02338 02339 /** 02340 * Unused: See ND RFC 02341 */ 02342 #if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ 02343 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 02344 #endif 02345 02346 /** 02347 * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). 02348 * May be updated by router advertisement messages. 02349 */ 02350 #if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ 02351 #define LWIP_ND6_REACHABLE_TIME 30000 02352 #endif 02353 02354 /** 02355 * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages 02356 */ 02357 #if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ 02358 #define LWIP_ND6_RETRANS_TIMER 1000 02359 #endif 02360 02361 /** 02362 * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation 02363 * message is sent, during neighbor reachability detection. 02364 */ 02365 #if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__ 02366 #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 02367 #endif 02368 02369 /** 02370 * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update 02371 * Reachable time and retransmission timers, and netif MTU. 02372 */ 02373 #if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ 02374 #define LWIP_ND6_ALLOW_RA_UPDATES 1 02375 #endif 02376 02377 /** 02378 * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery 02379 * with reachability hints for connected destinations. This helps avoid sending 02380 * unicast neighbor solicitation messages. 02381 */ 02382 #if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ 02383 #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 02384 #endif 02385 02386 /** 02387 * LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive 02388 * DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS 02389 * servers to the DNS module. 02390 */ 02391 #if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__ 02392 #define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0 02393 #endif 02394 /** 02395 * @} 02396 */ 02397 02398 /** 02399 * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. 02400 */ 02401 #if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ 02402 #define LWIP_IPV6_DHCP6 0 02403 #endif 02404 02405 /* 02406 --------------------------------------- 02407 ---------- Hook options --------------- 02408 --------------------------------------- 02409 */ 02410 02411 /** 02412 * @defgroup lwip_opts_hooks Hooks 02413 * @ingroup lwip_opts_infrastructure 02414 * Hooks are undefined by default, define them to a function if you need them. 02415 * @{ 02416 */ 02417 02418 /** 02419 * LWIP_HOOK_TCP_ISN: 02420 * Hook for generation of the Initial Sequence Number (ISN) for a new TCP 02421 * connection. The default lwIP ISN generation algorithm is very basic and may 02422 * allow for TCP spoofing attacks. This hook provides the means to implement 02423 * the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn), 02424 * or any other desired algorithm as a replacement. 02425 * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for 02426 * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n 02427 * Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port); 02428 * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n 02429 * Arguments: 02430 * - local_ip: pointer to the local IP address of the connection 02431 * - local_port: local port number of the connection (host-byte order) 02432 * - remote_ip: pointer to the remote IP address of the connection 02433 * - remote_port: remote port number of the connection (host-byte order)\n 02434 * Return value: 02435 * - the 32-bit Initial Sequence Number to use for the new TCP connection. 02436 */ 02437 #ifdef __DOXYGEN__ 02438 #define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) 02439 #endif 02440 02441 /** 02442 * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): 02443 * - called from ip_input() (IPv4) 02444 * - pbuf: received struct pbuf passed to ip_input() 02445 * - input_netif: struct netif on which the packet has been received 02446 * Return values: 02447 * - 0: Hook has not consumed the packet, packet is processed as normal 02448 * - != 0: Hook has consumed the packet. 02449 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook 02450 * (i.e. free it when done). 02451 */ 02452 #ifdef __DOXYGEN__ 02453 #define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) 02454 #endif 02455 02456 /** 02457 * LWIP_HOOK_IP4_ROUTE(dest): 02458 * - called from ip_route() (IPv4) 02459 * - dest: destination IPv4 address 02460 * Returns the destination netif or NULL if no destination netif is found. In 02461 * that case, ip_route() continues as normal. 02462 */ 02463 #ifdef __DOXYGEN__ 02464 #define LWIP_HOOK_IP4_ROUTE() 02465 #endif 02466 02467 /** 02468 * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): 02469 * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) 02470 */ 02471 #ifdef __DOXYGEN__ 02472 #define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) 02473 #endif 02474 02475 /** 02476 * LWIP_HOOK_ETHARP_GET_GW(netif, dest): 02477 * - called from etharp_output() (IPv4) 02478 * - netif: the netif used for sending 02479 * - dest: the destination IPv4 address 02480 * Returns the IPv4 address of the gateway to handle the specified destination 02481 * IPv4 address. If NULL is returned, the netif's default gateway is used. 02482 * The returned address MUST be directly reachable on the specified netif! 02483 * This function is meant to implement advanced IPv4 routing together with 02484 * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is 02485 * not part of lwIP but can e.g. be hidden in the netif's state argument. 02486 */ 02487 #ifdef __DOXYGEN__ 02488 #define LWIP_HOOK_ETHARP_GET_GW(netif, dest) 02489 #endif 02490 02491 /** 02492 * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): 02493 * - called from ip6_input() (IPv6) 02494 * - pbuf: received struct pbuf passed to ip6_input() 02495 * - input_netif: struct netif on which the packet has been received 02496 * Return values: 02497 * - 0: Hook has not consumed the packet, packet is processed as normal 02498 * - != 0: Hook has consumed the packet. 02499 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook 02500 * (i.e. free it when done). 02501 */ 02502 #ifdef __DOXYGEN__ 02503 #define LWIP_HOOK_IP6_INPUT(pbuf, input_netif) 02504 #endif 02505 02506 /** 02507 * LWIP_HOOK_IP6_ROUTE(src, dest): 02508 * - called from ip6_route() (IPv6) 02509 * - src: sourc IPv6 address 02510 * - dest: destination IPv6 address 02511 * Returns the destination netif or NULL if no destination netif is found. In 02512 * that case, ip6_route() continues as normal. 02513 */ 02514 #ifdef __DOXYGEN__ 02515 #define LWIP_HOOK_IP6_ROUTE(src, dest) 02516 #endif 02517 02518 /** 02519 * LWIP_HOOK_ND6_GET_GW(netif, dest): 02520 * - called from nd6_get_next_hop_entry() (IPv6) 02521 * - netif: the netif used for sending 02522 * - dest: the destination IPv6 address 02523 * Returns the IPv6 address of the next hop to handle the specified destination 02524 * IPv6 address. If NULL is returned, a NDP-discovered router is used instead. 02525 * The returned address MUST be directly reachable on the specified netif! 02526 * This function is meant to implement advanced IPv6 routing together with 02527 * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is 02528 * not part of lwIP but can e.g. be hidden in the netif's state argument. 02529 */ 02530 #ifdef __DOXYGEN__ 02531 #define LWIP_HOOK_ND6_GET_GW(netif, dest) 02532 #endif 02533 02534 /** 02535 * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): 02536 * - called from ethernet_input() if VLAN support is enabled 02537 * - netif: struct netif on which the packet has been received 02538 * - eth_hdr: struct eth_hdr of the packet 02539 * - vlan_hdr: struct eth_vlan_hdr of the packet 02540 * Return values: 02541 * - 0: Packet must be dropped. 02542 * - != 0: Packet must be accepted. 02543 */ 02544 #ifdef __DOXYGEN__ 02545 #define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) 02546 #endif 02547 02548 /** 02549 * LWIP_HOOK_VLAN_SET: 02550 * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data 02551 * on per-netif basis to implement this callback, see @ref netif_cd. 02552 * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n 02553 * Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n 02554 * Arguments: 02555 * - netif: struct netif that the packet will be sent through 02556 * - p: struct pbuf packet to be sent 02557 * - src: source eth address 02558 * - dst: destination eth address 02559 * - eth_type: ethernet type to packet to be sent\n 02560 * 02561 * 02562 * Return values: 02563 * - <0: Packet shall not contain VLAN header. 02564 * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. 02565 */ 02566 #ifdef __DOXYGEN__ 02567 #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) 02568 #endif 02569 02570 /** 02571 * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): 02572 * - called from memp_free() when a memp pool was empty and an item is now available 02573 */ 02574 #ifdef __DOXYGEN__ 02575 #define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) 02576 #endif 02577 02578 /** 02579 * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): 02580 * Called from ethernet_input() when an unknown eth type is encountered. 02581 * Return ERR_OK if packet is accepted, any error code otherwise. 02582 * Payload points to ethernet header! 02583 */ 02584 #ifdef __DOXYGEN__ 02585 #define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) 02586 #endif 02587 /** 02588 * @} 02589 */ 02590 02591 /* 02592 --------------------------------------- 02593 ---------- Debugging options ---------- 02594 --------------------------------------- 02595 */ 02596 /** 02597 * @defgroup lwip_opts_debugmsg Debug messages 02598 * @ingroup lwip_opts_debug 02599 * @{ 02600 */ 02601 /** 02602 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is 02603 * compared against this value. If it is smaller, then debugging 02604 * messages are written. 02605 * @see debugging_levels 02606 */ 02607 #if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ 02608 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL 02609 #endif 02610 02611 /** 02612 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable 02613 * debug messages of certain types. 02614 * @see debugging_levels 02615 */ 02616 #if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ 02617 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON 02618 #endif 02619 02620 /** 02621 * ETHARP_DEBUG: Enable debugging in etharp.c. 02622 */ 02623 #if !defined ETHARP_DEBUG || defined __DOXYGEN__ 02624 #define ETHARP_DEBUG LWIP_DBG_OFF 02625 #endif 02626 02627 /** 02628 * NETIF_DEBUG: Enable debugging in netif.c. 02629 */ 02630 #if !defined NETIF_DEBUG || defined __DOXYGEN__ 02631 #define NETIF_DEBUG LWIP_DBG_OFF 02632 #endif 02633 02634 /** 02635 * PBUF_DEBUG: Enable debugging in pbuf.c. 02636 */ 02637 #if !defined PBUF_DEBUG || defined __DOXYGEN__ 02638 #define PBUF_DEBUG LWIP_DBG_OFF 02639 #endif 02640 02641 /** 02642 * API_LIB_DEBUG: Enable debugging in api_lib.c. 02643 */ 02644 #if !defined API_LIB_DEBUG || defined __DOXYGEN__ 02645 #define API_LIB_DEBUG LWIP_DBG_OFF 02646 #endif 02647 02648 /** 02649 * API_MSG_DEBUG: Enable debugging in api_msg.c. 02650 */ 02651 #if !defined API_MSG_DEBUG || defined __DOXYGEN__ 02652 #define API_MSG_DEBUG LWIP_DBG_OFF 02653 #endif 02654 02655 /** 02656 * SOCKETS_DEBUG: Enable debugging in sockets.c. 02657 */ 02658 #if !defined SOCKETS_DEBUG || defined __DOXYGEN__ 02659 #define SOCKETS_DEBUG LWIP_DBG_OFF 02660 #endif 02661 02662 /** 02663 * ICMP_DEBUG: Enable debugging in icmp.c. 02664 */ 02665 #if !defined ICMP_DEBUG || defined __DOXYGEN__ 02666 #define ICMP_DEBUG LWIP_DBG_OFF 02667 #endif 02668 02669 /** 02670 * IGMP_DEBUG: Enable debugging in igmp.c. 02671 */ 02672 #if !defined IGMP_DEBUG || defined __DOXYGEN__ 02673 #define IGMP_DEBUG LWIP_DBG_OFF 02674 #endif 02675 02676 /** 02677 * INET_DEBUG: Enable debugging in inet.c. 02678 */ 02679 #if !defined INET_DEBUG || defined __DOXYGEN__ 02680 #define INET_DEBUG LWIP_DBG_OFF 02681 #endif 02682 02683 /** 02684 * IP_DEBUG: Enable debugging for IP. 02685 */ 02686 #if !defined IP_DEBUG || defined __DOXYGEN__ 02687 #define IP_DEBUG LWIP_DBG_OFF 02688 #endif 02689 02690 /** 02691 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. 02692 */ 02693 #if !defined IP_REASS_DEBUG || defined __DOXYGEN__ 02694 #define IP_REASS_DEBUG LWIP_DBG_OFF 02695 #endif 02696 02697 /** 02698 * RAW_DEBUG: Enable debugging in raw.c. 02699 */ 02700 #if !defined RAW_DEBUG || defined __DOXYGEN__ 02701 #define RAW_DEBUG LWIP_DBG_OFF 02702 #endif 02703 02704 /** 02705 * MEM_DEBUG: Enable debugging in mem.c. 02706 */ 02707 #if !defined MEM_DEBUG || defined __DOXYGEN__ 02708 #define MEM_DEBUG LWIP_DBG_OFF 02709 #endif 02710 02711 /** 02712 * MEMP_DEBUG: Enable debugging in memp.c. 02713 */ 02714 #if !defined MEMP_DEBUG || defined __DOXYGEN__ 02715 #define MEMP_DEBUG LWIP_DBG_OFF 02716 #endif 02717 02718 /** 02719 * SYS_DEBUG: Enable debugging in sys.c. 02720 */ 02721 #if !defined SYS_DEBUG || defined __DOXYGEN__ 02722 #define SYS_DEBUG LWIP_DBG_OFF 02723 #endif 02724 02725 /** 02726 * TIMERS_DEBUG: Enable debugging in timers.c. 02727 */ 02728 #if !defined TIMERS_DEBUG || defined __DOXYGEN__ 02729 #define TIMERS_DEBUG LWIP_DBG_OFF 02730 #endif 02731 02732 /** 02733 * TCP_DEBUG: Enable debugging for TCP. 02734 */ 02735 #if !defined TCP_DEBUG || defined __DOXYGEN__ 02736 #define TCP_DEBUG LWIP_DBG_OFF 02737 #endif 02738 02739 /** 02740 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. 02741 */ 02742 #if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ 02743 #define TCP_INPUT_DEBUG LWIP_DBG_OFF 02744 #endif 02745 02746 /** 02747 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. 02748 */ 02749 #if !defined TCP_FR_DEBUG || defined __DOXYGEN__ 02750 #define TCP_FR_DEBUG LWIP_DBG_OFF 02751 #endif 02752 02753 /** 02754 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit 02755 * timeout. 02756 */ 02757 #if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ 02758 #define TCP_RTO_DEBUG LWIP_DBG_OFF 02759 #endif 02760 02761 /** 02762 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. 02763 */ 02764 #if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ 02765 #define TCP_CWND_DEBUG LWIP_DBG_OFF 02766 #endif 02767 02768 /** 02769 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. 02770 */ 02771 #if !defined TCP_WND_DEBUG || defined __DOXYGEN__ 02772 #define TCP_WND_DEBUG LWIP_DBG_OFF 02773 #endif 02774 02775 /** 02776 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. 02777 */ 02778 #if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ 02779 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF 02780 #endif 02781 02782 /** 02783 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. 02784 */ 02785 #if !defined TCP_RST_DEBUG || defined __DOXYGEN__ 02786 #define TCP_RST_DEBUG LWIP_DBG_OFF 02787 #endif 02788 02789 /** 02790 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. 02791 */ 02792 #if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ 02793 #define TCP_QLEN_DEBUG LWIP_DBG_OFF 02794 #endif 02795 02796 /** 02797 * UDP_DEBUG: Enable debugging in UDP. 02798 */ 02799 #if !defined UDP_DEBUG || defined __DOXYGEN__ 02800 #define UDP_DEBUG LWIP_DBG_OFF 02801 #endif 02802 02803 /** 02804 * TCPIP_DEBUG: Enable debugging in tcpip.c. 02805 */ 02806 #if !defined TCPIP_DEBUG || defined __DOXYGEN__ 02807 #define TCPIP_DEBUG LWIP_DBG_OFF 02808 #endif 02809 02810 /** 02811 * SLIP_DEBUG: Enable debugging in slipif.c. 02812 */ 02813 #if !defined SLIP_DEBUG || defined __DOXYGEN__ 02814 #define SLIP_DEBUG LWIP_DBG_OFF 02815 #endif 02816 02817 /** 02818 * DHCP_DEBUG: Enable debugging in dhcp.c. 02819 */ 02820 #if !defined DHCP_DEBUG || defined __DOXYGEN__ 02821 #define DHCP_DEBUG LWIP_DBG_OFF 02822 #endif 02823 02824 /** 02825 * AUTOIP_DEBUG: Enable debugging in autoip.c. 02826 */ 02827 #if !defined AUTOIP_DEBUG || defined __DOXYGEN__ 02828 #define AUTOIP_DEBUG LWIP_DBG_OFF 02829 #endif 02830 02831 /** 02832 * DNS_DEBUG: Enable debugging for DNS. 02833 */ 02834 #if !defined DNS_DEBUG || defined __DOXYGEN__ 02835 #define DNS_DEBUG LWIP_DBG_OFF 02836 #endif 02837 02838 /** 02839 * IP6_DEBUG: Enable debugging for IPv6. 02840 */ 02841 #if !defined IP6_DEBUG || defined __DOXYGEN__ 02842 #define IP6_DEBUG LWIP_DBG_OFF 02843 #endif 02844 /** 02845 * @} 02846 */ 02847 02848 /* 02849 -------------------------------------------------- 02850 ---------- Performance tracking options ---------- 02851 -------------------------------------------------- 02852 */ 02853 /** 02854 * @defgroup lwip_opts_perf Performance 02855 * @ingroup lwip_opts_debug 02856 * @{ 02857 */ 02858 /** 02859 * LWIP_PERF: Enable performance testing for lwIP 02860 * (if enabled, arch/perf.h is included) 02861 */ 02862 #if !defined LWIP_PERF || defined __DOXYGEN__ 02863 #define LWIP_PERF 0 02864 #endif 02865 /** 02866 * @} 02867 */ 02868 02869 #endif /* LWIP_HDR_OPT_H */
Generated on Tue Jul 12 2022 11:02:30 by
1.7.2