Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
opt.h
Go to the documentation of this file.
00001 /** 00002 * @file 00003 * 00004 * lwIP Options Configuration 00005 */ 00006 00007 /* 00008 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00009 * All rights reserved. 00010 * 00011 * Redistribution and use in source and binary forms, with or without modification, 00012 * are permitted provided that the following conditions are met: 00013 * 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. The name of the author may not be used to endorse or promote products 00020 * derived from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00023 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00025 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00026 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00027 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00028 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00029 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00030 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00031 * OF SUCH DAMAGE. 00032 * 00033 * This file is part of the lwIP TCP/IP stack. 00034 * 00035 * Author: Adam Dunkels <adam@sics.se> 00036 * 00037 */ 00038 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, you have to define an initializer: 01051 * \#define DNS_LOCAL_HOSTLIST_INIT {DNS_LOCAL_HOSTLIST_ELEM("host_ip4", IPADDR4_INIT_BYTES(1,2,3,4)), \ 01052 * DNS_LOCAL_HOSTLIST_ELEM("host_ip6", IPADDR6_INIT_HOST(123, 234, 345, 456)} 01053 * 01054 * Instead, you can also use an external function: 01055 * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) 01056 * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). 01057 */ 01058 #if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ 01059 #define DNS_LOCAL_HOSTLIST 0 01060 #endif /* DNS_LOCAL_HOSTLIST */ 01061 01062 /** If this is turned on, the local host-list can be dynamically changed 01063 * at runtime. */ 01064 #if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ 01065 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 01066 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 01067 01068 /** Set this to 1 to enable querying ".local" names via mDNS 01069 * using a One-Shot Multicast DNS Query */ 01070 #if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__ 01071 #define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 01072 #endif 01073 /** 01074 * @} 01075 */ 01076 01077 /* 01078 --------------------------------- 01079 ---------- UDP options ---------- 01080 --------------------------------- 01081 */ 01082 /** 01083 * @defgroup lwip_opts_udp UDP 01084 * @ingroup lwip_opts_callback 01085 * @{ 01086 */ 01087 /** 01088 * LWIP_UDP==1: Turn on UDP. 01089 */ 01090 #if !defined LWIP_UDP || defined __DOXYGEN__ 01091 #define LWIP_UDP 1 01092 #endif 01093 01094 /** 01095 * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) 01096 */ 01097 #if !defined LWIP_UDPLITE || defined __DOXYGEN__ 01098 #define LWIP_UDPLITE 0 01099 #endif 01100 01101 /** 01102 * UDP_TTL: Default Time-To-Live value. 01103 */ 01104 #if !defined UDP_TTL || defined __DOXYGEN__ 01105 #define UDP_TTL (IP_DEFAULT_TTL) 01106 #endif 01107 01108 /** 01109 * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. 01110 */ 01111 #if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ 01112 #define LWIP_NETBUF_RECVINFO 0 01113 #endif 01114 /** 01115 * @} 01116 */ 01117 01118 /* 01119 --------------------------------- 01120 ---------- TCP options ---------- 01121 --------------------------------- 01122 */ 01123 /** 01124 * @defgroup lwip_opts_tcp TCP 01125 * @ingroup lwip_opts_callback 01126 * @{ 01127 */ 01128 /** 01129 * LWIP_TCP==1: Turn on TCP. 01130 */ 01131 #if !defined LWIP_TCP || defined __DOXYGEN__ 01132 #define LWIP_TCP 1 01133 #endif 01134 01135 /** 01136 * TCP_TTL: Default Time-To-Live value. 01137 */ 01138 #if !defined TCP_TTL || defined __DOXYGEN__ 01139 #define TCP_TTL (IP_DEFAULT_TTL) 01140 #endif 01141 01142 /** 01143 * TCP_WND: The size of a TCP window. This must be at least 01144 * (2 * TCP_MSS) for things to work well. 01145 * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size 01146 * with scaling applied. Maximum window value in the TCP header 01147 * will be TCP_WND >> TCP_RCV_SCALE 01148 */ 01149 #if !defined TCP_WND || defined __DOXYGEN__ 01150 #define TCP_WND (4 * TCP_MSS) 01151 #endif 01152 01153 /** 01154 * TCP_MAXRTX: Maximum number of retransmissions of data segments. 01155 */ 01156 #if !defined TCP_MAXRTX || defined __DOXYGEN__ 01157 #define TCP_MAXRTX 12 01158 #endif 01159 01160 /** 01161 * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. 01162 */ 01163 #if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ 01164 #define TCP_SYNMAXRTX 6 01165 #endif 01166 01167 /** 01168 * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. 01169 * Define to 0 if your device is low on memory. 01170 */ 01171 #if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ 01172 #define TCP_QUEUE_OOSEQ (LWIP_TCP) 01173 #endif 01174 01175 /** 01176 * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, 01177 * you might want to increase this.) 01178 * For the receive side, this MSS is advertised to the remote side 01179 * when opening a connection. For the transmit size, this MSS sets 01180 * an upper limit on the MSS advertised by the remote host. 01181 */ 01182 #if !defined TCP_MSS || defined __DOXYGEN__ 01183 #define TCP_MSS 536 01184 #endif 01185 01186 /** 01187 * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really 01188 * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which 01189 * reflects the available reassembly buffer size at the remote host) and the 01190 * largest size permitted by the IP layer" (RFC 1122) 01191 * Setting this to 1 enables code that checks TCP_MSS against the MTU of the 01192 * netif used for a connection and limits the MSS if it would be too big otherwise. 01193 */ 01194 #if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ 01195 #define TCP_CALCULATE_EFF_SEND_MSS 1 01196 #endif 01197 01198 01199 /** 01200 * TCP_SND_BUF: TCP sender buffer space (bytes). 01201 * To achieve good performance, this should be at least 2 * TCP_MSS. 01202 */ 01203 #if !defined TCP_SND_BUF || defined __DOXYGEN__ 01204 #define TCP_SND_BUF (2 * TCP_MSS) 01205 #endif 01206 01207 /** 01208 * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least 01209 * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. 01210 */ 01211 #if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ 01212 #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) 01213 #endif 01214 01215 /** 01216 * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than 01217 * TCP_SND_BUF. It is the amount of space which must be available in the 01218 * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). 01219 */ 01220 #if !defined TCP_SNDLOWAT || defined __DOXYGEN__ 01221 #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) 01222 #endif 01223 01224 /** 01225 * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less 01226 * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below 01227 * this number, select returns writable (combined with TCP_SNDLOWAT). 01228 */ 01229 #if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ 01230 #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) 01231 #endif 01232 01233 /** 01234 * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. 01235 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. 01236 */ 01237 #if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ 01238 #define TCP_OOSEQ_MAX_BYTES 0 01239 #endif 01240 01241 /** 01242 * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. 01243 * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. 01244 */ 01245 #if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ 01246 #define TCP_OOSEQ_MAX_PBUFS 0 01247 #endif 01248 01249 /** 01250 * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. 01251 */ 01252 #if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ 01253 #define TCP_LISTEN_BACKLOG 0 01254 #endif 01255 01256 /** 01257 * The maximum allowed backlog for TCP listen netconns. 01258 * This backlog is used unless another is explicitly specified. 01259 * 0xff is the maximum (u8_t). 01260 */ 01261 #if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ 01262 #define TCP_DEFAULT_LISTEN_BACKLOG 0xff 01263 #endif 01264 01265 /** 01266 * TCP_OVERSIZE: The maximum number of bytes that tcp_write may 01267 * allocate ahead of time in an attempt to create shorter pbuf chains 01268 * for transmission. The meaningful range is 0 to TCP_MSS. Some 01269 * suggested values are: 01270 * 01271 * 0: Disable oversized allocation. Each tcp_write() allocates a new 01272 pbuf (old behaviour). 01273 * 1: Allocate size-aligned pbufs with minimal excess. Use this if your 01274 * scatter-gather DMA requires aligned fragments. 01275 * 128: Limit the pbuf/memory overhead to 20%. 01276 * TCP_MSS: Try to create unfragmented TCP packets. 01277 * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. 01278 */ 01279 #if !defined TCP_OVERSIZE || defined __DOXYGEN__ 01280 #define TCP_OVERSIZE TCP_MSS 01281 #endif 01282 01283 /** 01284 * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. 01285 * The timestamp option is currently only used to help remote hosts, it is not 01286 * really used locally. Therefore, it is only enabled when a TS option is 01287 * received in the initial SYN packet from a remote host. 01288 */ 01289 #if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ 01290 #define LWIP_TCP_TIMESTAMPS 0 01291 #endif 01292 01293 /** 01294 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an 01295 * explicit window update 01296 */ 01297 #if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ 01298 #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) 01299 #endif 01300 01301 /** 01302 * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. 01303 * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all 01304 * events (accept, sent, etc) that happen in the system. 01305 * LWIP_CALLBACK_API==1: The PCB callback function is called directly 01306 * for the event. This is the default. 01307 */ 01308 #if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ 01309 #define LWIP_EVENT_API 0 01310 #define LWIP_CALLBACK_API 1 01311 #else 01312 #ifndef LWIP_EVENT_API 01313 #define LWIP_EVENT_API 0 01314 #endif 01315 #ifndef LWIP_CALLBACK_API 01316 #define LWIP_CALLBACK_API 0 01317 #endif 01318 #endif 01319 01320 /** 01321 * LWIP_WND_SCALE and TCP_RCV_SCALE: 01322 * Set LWIP_WND_SCALE to 1 to enable window scaling. 01323 * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the 01324 * range of [0..14]). 01325 * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large 01326 * send window while having a small receive window only. 01327 */ 01328 #if !defined LWIP_WND_SCALE || defined __DOXYGEN__ 01329 #define LWIP_WND_SCALE 0 01330 #define TCP_RCV_SCALE 0 01331 #endif 01332 /** 01333 * @} 01334 */ 01335 01336 /* 01337 ---------------------------------- 01338 ---------- Pbuf options ---------- 01339 ---------------------------------- 01340 */ 01341 /** 01342 * @defgroup lwip_opts_pbuf PBUF 01343 * @ingroup lwip_opts 01344 * @{ 01345 */ 01346 /** 01347 * PBUF_LINK_HLEN: the number of bytes that should be allocated for a 01348 * link level header. The default is 14, the standard value for 01349 * Ethernet. 01350 */ 01351 #if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ 01352 #if defined LWIP_HOOK_VLAN_SET && !defined __DOXYGEN__ 01353 #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) 01354 #else /* LWIP_HOOK_VLAN_SET */ 01355 #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) 01356 #endif /* LWIP_HOOK_VLAN_SET */ 01357 #endif 01358 01359 /** 01360 * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated 01361 * for an additional encapsulation header before ethernet headers (e.g. 802.11) 01362 */ 01363 #if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ 01364 #define PBUF_LINK_ENCAPSULATION_HLEN 0u 01365 #endif 01366 01367 /** 01368 * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is 01369 * designed to accommodate single full size TCP frame in one pbuf, including 01370 * TCP_MSS, IP header, and link header. 01371 */ 01372 #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ 01373 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) 01374 #endif 01375 /** 01376 * @} 01377 */ 01378 01379 /* 01380 ------------------------------------------------ 01381 ---------- Network Interfaces options ---------- 01382 ------------------------------------------------ 01383 */ 01384 /** 01385 * @defgroup lwip_opts_netif NETIF 01386 * @ingroup lwip_opts 01387 * @{ 01388 */ 01389 /** 01390 * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname 01391 * field. 01392 */ 01393 #if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ 01394 #define LWIP_NETIF_HOSTNAME 0 01395 #endif 01396 01397 /** 01398 * LWIP_NETIF_API==1: Support netif api (in netifapi.c) 01399 */ 01400 #if !defined LWIP_NETIF_API || defined __DOXYGEN__ 01401 #define LWIP_NETIF_API 0 01402 #endif 01403 01404 /** 01405 * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface 01406 * changes its up/down status (i.e., due to DHCP IP acquisition) 01407 */ 01408 #if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ 01409 #define LWIP_NETIF_STATUS_CALLBACK 0 01410 #endif 01411 01412 /** 01413 * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface 01414 * whenever the link changes (i.e., link down) 01415 */ 01416 #if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ 01417 #define LWIP_NETIF_LINK_CALLBACK 0 01418 #endif 01419 01420 /** 01421 * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called 01422 * when a netif has been removed 01423 */ 01424 #if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ 01425 #define LWIP_NETIF_REMOVE_CALLBACK 0 01426 #endif 01427 01428 /** 01429 * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table 01430 * indices) in struct netif. TCP and UDP can make use of this to prevent 01431 * scanning the ARP table for every sent packet. While this is faster for big 01432 * ARP tables or many concurrent connections, it might be counterproductive 01433 * if you have a tiny ARP table or if there never are concurrent connections. 01434 */ 01435 #if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ 01436 #define LWIP_NETIF_HWADDRHINT 0 01437 #endif 01438 01439 /** 01440 * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data 01441 * to be sent into one single pbuf. This is for compatibility with DMA-enabled 01442 * MACs that do not support scatter-gather. 01443 * Beware that this might involve CPU-memcpy before transmitting that would not 01444 * be needed without this flag! Use this only if you need to! 01445 * 01446 * @todo: TCP and IP-frag do not work with this, yet: 01447 */ 01448 #if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ 01449 #define LWIP_NETIF_TX_SINGLE_PBUF 0 01450 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ 01451 01452 /** 01453 * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store 01454 * data in client_data member array of struct netif. 01455 */ 01456 #if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__ 01457 #define LWIP_NUM_NETIF_CLIENT_DATA 0 01458 #endif 01459 /** 01460 * @} 01461 */ 01462 01463 /* 01464 ------------------------------------ 01465 ---------- LOOPIF options ---------- 01466 ------------------------------------ 01467 */ 01468 /** 01469 * @defgroup lwip_opts_loop Loopback interface 01470 * @ingroup lwip_opts_netif 01471 * @{ 01472 */ 01473 /** 01474 * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). 01475 * This is only needed when no real netifs are available. If at least one other 01476 * netif is available, loopback traffic uses this netif. 01477 */ 01478 #if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ 01479 #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK 01480 #endif 01481 01482 /** 01483 * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). 01484 */ 01485 #if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ 01486 #define LWIP_LOOPIF_MULTICAST 0 01487 #endif 01488 01489 /** 01490 * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP 01491 * address equal to the netif IP address, looping them back up the stack. 01492 */ 01493 #if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ 01494 #define LWIP_NETIF_LOOPBACK 0 01495 #endif 01496 01497 /** 01498 * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback 01499 * sending for each netif (0 = disabled) 01500 */ 01501 #if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ 01502 #define LWIP_LOOPBACK_MAX_PBUFS 0 01503 #endif 01504 01505 /** 01506 * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in 01507 * the system, as netifs must change how they behave depending on this setting 01508 * for the LWIP_NETIF_LOOPBACK option to work. 01509 * Setting this is needed to avoid reentering non-reentrant functions like 01510 * tcp_input(). 01511 * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a 01512 * multithreaded environment like tcpip.c. In this case, netif->input() 01513 * is called directly. 01514 * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. 01515 * The packets are put on a list and netif_poll() must be called in 01516 * the main application loop. 01517 */ 01518 #if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ 01519 #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) 01520 #endif 01521 /** 01522 * @} 01523 */ 01524 01525 /* 01526 ------------------------------------ 01527 ---------- Thread options ---------- 01528 ------------------------------------ 01529 */ 01530 /** 01531 * @defgroup lwip_opts_thread Threading 01532 * @ingroup lwip_opts_infrastructure 01533 * @{ 01534 */ 01535 /** 01536 * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. 01537 */ 01538 #if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ 01539 #define TCPIP_THREAD_NAME "tcpip_thread" 01540 #endif 01541 01542 /** 01543 * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. 01544 * The stack size value itself is platform-dependent, but is passed to 01545 * sys_thread_new() when the thread is created. 01546 */ 01547 #if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ 01548 #define TCPIP_THREAD_STACKSIZE 0 01549 #endif 01550 01551 /** 01552 * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. 01553 * The priority value itself is platform-dependent, but is passed to 01554 * sys_thread_new() when the thread is created. 01555 */ 01556 #if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ 01557 #define TCPIP_THREAD_PRIO 1 01558 #endif 01559 01560 /** 01561 * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages 01562 * The queue size value itself is platform-dependent, but is passed to 01563 * sys_mbox_new() when tcpip_init is called. 01564 */ 01565 #if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ 01566 #define TCPIP_MBOX_SIZE 0 01567 #endif 01568 01569 /** 01570 * Define this to something that triggers a watchdog. This is called from 01571 * tcpip_thread after processing a message. 01572 */ 01573 #if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ 01574 #define LWIP_TCPIP_THREAD_ALIVE() 01575 #endif 01576 01577 /** 01578 * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. 01579 */ 01580 #if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ 01581 #define SLIPIF_THREAD_NAME "slipif_loop" 01582 #endif 01583 01584 /** 01585 * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. 01586 * The stack size value itself is platform-dependent, but is passed to 01587 * sys_thread_new() when the thread is created. 01588 */ 01589 #if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ 01590 #define SLIPIF_THREAD_STACKSIZE 0 01591 #endif 01592 01593 /** 01594 * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. 01595 * The priority value itself is platform-dependent, but is passed to 01596 * sys_thread_new() when the thread is created. 01597 */ 01598 #if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ 01599 #define SLIPIF_THREAD_PRIO 1 01600 #endif 01601 01602 /** 01603 * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. 01604 */ 01605 #if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ 01606 #define DEFAULT_THREAD_NAME "lwIP" 01607 #endif 01608 01609 /** 01610 * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. 01611 * The stack size value itself is platform-dependent, but is passed to 01612 * sys_thread_new() when the thread is created. 01613 */ 01614 #if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ 01615 #define DEFAULT_THREAD_STACKSIZE 0 01616 #endif 01617 01618 /** 01619 * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. 01620 * The priority value itself is platform-dependent, but is passed to 01621 * sys_thread_new() when the thread is created. 01622 */ 01623 #if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ 01624 #define DEFAULT_THREAD_PRIO 1 01625 #endif 01626 01627 /** 01628 * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01629 * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed 01630 * to sys_mbox_new() when the recvmbox is created. 01631 */ 01632 #if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ 01633 #define DEFAULT_RAW_RECVMBOX_SIZE 0 01634 #endif 01635 01636 /** 01637 * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01638 * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed 01639 * to sys_mbox_new() when the recvmbox is created. 01640 */ 01641 #if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ 01642 #define DEFAULT_UDP_RECVMBOX_SIZE 0 01643 #endif 01644 01645 /** 01646 * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a 01647 * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed 01648 * to sys_mbox_new() when the recvmbox is created. 01649 */ 01650 #if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ 01651 #define DEFAULT_TCP_RECVMBOX_SIZE 0 01652 #endif 01653 01654 /** 01655 * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. 01656 * The queue size value itself is platform-dependent, but is passed to 01657 * sys_mbox_new() when the acceptmbox is created. 01658 */ 01659 #if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ 01660 #define DEFAULT_ACCEPTMBOX_SIZE 0 01661 #endif 01662 /** 01663 * @} 01664 */ 01665 01666 /* 01667 ---------------------------------------------- 01668 ---------- Sequential layer options ---------- 01669 ---------------------------------------------- 01670 */ 01671 /** 01672 * @defgroup lwip_opts_netconn Netconn 01673 * @ingroup lwip_opts_threadsafe_apis 01674 * @{ 01675 */ 01676 /** 01677 * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) 01678 */ 01679 #if !defined LWIP_NETCONN || defined __DOXYGEN__ 01680 #define LWIP_NETCONN 1 01681 #endif 01682 01683 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create 01684 * timers running in tcpip_thread from another thread. 01685 */ 01686 #if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ 01687 #define LWIP_TCPIP_TIMEOUT 0 01688 #endif 01689 01690 /** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per 01691 * thread calling socket/netconn functions instead of allocating one 01692 * semaphore per netconn (and per select etc.) 01693 * ATTENTION: a thread-local semaphore for API calls is needed: 01694 * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t* 01695 * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore 01696 * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore 01697 * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). 01698 * Ports may call these for threads created with sys_thread_new(). 01699 */ 01700 #if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ 01701 #define LWIP_NETCONN_SEM_PER_THREAD 0 01702 #endif 01703 01704 /** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread, 01705 * writing from a 2nd thread and closing from a 3rd thread at the same time. 01706 * ATTENTION: This is currently really alpha! Some requirements: 01707 * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from 01708 * multiple threads at once 01709 * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox 01710 * and prevent a task pending on this during/after deletion 01711 */ 01712 #if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ 01713 #define LWIP_NETCONN_FULLDUPLEX 0 01714 #endif 01715 /** 01716 * @} 01717 */ 01718 01719 /* 01720 ------------------------------------ 01721 ---------- Socket options ---------- 01722 ------------------------------------ 01723 */ 01724 /** 01725 * @defgroup lwip_opts_socket Sockets 01726 * @ingroup lwip_opts_threadsafe_apis 01727 * @{ 01728 */ 01729 /** 01730 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) 01731 */ 01732 #if !defined LWIP_SOCKET || defined __DOXYGEN__ 01733 #define LWIP_SOCKET 1 01734 #endif 01735 01736 /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete 01737 * successfully, as required by POSIX. Default is POSIX-compliant. 01738 */ 01739 #if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ 01740 #define LWIP_SOCKET_SET_ERRNO 1 01741 #endif 01742 01743 /** 01744 * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. 01745 * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. 01746 * While this helps code completion, it might conflict with existing libraries. 01747 * (only used if you use sockets.c) 01748 */ 01749 #if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ 01750 #define LWIP_COMPAT_SOCKETS 1 01751 #endif 01752 01753 /** 01754 * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. 01755 * Disable this option if you use a POSIX operating system that uses the same 01756 * names (read, write & close). (only used if you use sockets.c) 01757 */ 01758 #if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ 01759 #define LWIP_POSIX_SOCKETS_IO_NAMES 1 01760 #endif 01761 01762 /** 01763 * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. 01764 * This can be useful when there are multiple APIs which create file descriptors. 01765 * When they all start with a different offset and you won't make them overlap you can 01766 * re implement read/write/close/ioctl/fnctl to send the requested action to the right 01767 * library (sharing select will need more work though). 01768 */ 01769 #if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ 01770 #define LWIP_SOCKET_OFFSET 0 01771 #endif 01772 01773 /** 01774 * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT 01775 * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set 01776 * in seconds. (does not require sockets.c, and will affect tcp.c) 01777 */ 01778 #if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ 01779 #define LWIP_TCP_KEEPALIVE 0 01780 #endif 01781 01782 /** 01783 * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and 01784 * SO_SNDTIMEO processing. 01785 */ 01786 #if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ 01787 #define LWIP_SO_SNDTIMEO 0 01788 #endif 01789 01790 /** 01791 * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and 01792 * SO_RCVTIMEO processing. 01793 */ 01794 #if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ 01795 #define LWIP_SO_RCVTIMEO 0 01796 #endif 01797 01798 /** 01799 * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int 01800 * (milliseconds, much like winsock does) instead of a struct timeval (default). 01801 */ 01802 #if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ 01803 #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 01804 #endif 01805 01806 /** 01807 * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. 01808 */ 01809 #if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ 01810 #define LWIP_SO_RCVBUF 0 01811 #endif 01812 01813 /** 01814 * LWIP_SO_LINGER==1: Enable SO_LINGER processing. 01815 */ 01816 #if !defined LWIP_SO_LINGER || defined __DOXYGEN__ 01817 #define LWIP_SO_LINGER 0 01818 #endif 01819 01820 /** 01821 * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. 01822 */ 01823 #if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ 01824 #define RECV_BUFSIZE_DEFAULT INT_MAX 01825 #endif 01826 01827 /** 01828 * By default, TCP socket/netconn close waits 20 seconds max to send the FIN 01829 */ 01830 #if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ 01831 #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 01832 #endif 01833 01834 /** 01835 * SO_REUSE==1: Enable SO_REUSEADDR option. 01836 */ 01837 #if !defined SO_REUSE || defined __DOXYGEN__ 01838 #define SO_REUSE 0 01839 #endif 01840 01841 /** 01842 * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets 01843 * to all local matches if SO_REUSEADDR is turned on. 01844 * WARNING: Adds a memcpy for every packet if passing to more than one pcb! 01845 */ 01846 #if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ 01847 #define SO_REUSE_RXTOALL 0 01848 #endif 01849 01850 /** 01851 * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of 01852 * pending data in the network buffer. This is the way windows does it. It's 01853 * the default for lwIP since it is smaller. 01854 * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next 01855 * pending datagram in bytes. This is the way linux does it. This code is only 01856 * here for compatibility. 01857 */ 01858 #if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ 01859 #define LWIP_FIONREAD_LINUXMODE 0 01860 #endif 01861 /** 01862 * @} 01863 */ 01864 01865 /* 01866 ---------------------------------------- 01867 ---------- Statistics options ---------- 01868 ---------------------------------------- 01869 */ 01870 /** 01871 * @defgroup lwip_opts_stats Statistics 01872 * @ingroup lwip_opts_debug 01873 * @{ 01874 */ 01875 /** 01876 * LWIP_STATS==1: Enable statistics collection in lwip_stats. 01877 */ 01878 #if !defined LWIP_STATS || defined __DOXYGEN__ 01879 #define LWIP_STATS 1 01880 #endif 01881 01882 #if LWIP_STATS 01883 01884 /** 01885 * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. 01886 */ 01887 #if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ 01888 #define LWIP_STATS_DISPLAY 0 01889 #endif 01890 01891 /** 01892 * LINK_STATS==1: Enable link stats. 01893 */ 01894 #if !defined LINK_STATS || defined __DOXYGEN__ 01895 #define LINK_STATS 1 01896 #endif 01897 01898 /** 01899 * ETHARP_STATS==1: Enable etharp stats. 01900 */ 01901 #if !defined ETHARP_STATS || defined __DOXYGEN__ 01902 #define ETHARP_STATS (LWIP_ARP) 01903 #endif 01904 01905 /** 01906 * IP_STATS==1: Enable IP stats. 01907 */ 01908 #if !defined IP_STATS || defined __DOXYGEN__ 01909 #define IP_STATS 1 01910 #endif 01911 01912 /** 01913 * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is 01914 * on if using either frag or reass. 01915 */ 01916 #if !defined IPFRAG_STATS || defined __DOXYGEN__ 01917 #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) 01918 #endif 01919 01920 /** 01921 * ICMP_STATS==1: Enable ICMP stats. 01922 */ 01923 #if !defined ICMP_STATS || defined __DOXYGEN__ 01924 #define ICMP_STATS 1 01925 #endif 01926 01927 /** 01928 * IGMP_STATS==1: Enable IGMP stats. 01929 */ 01930 #if !defined IGMP_STATS || defined __DOXYGEN__ 01931 #define IGMP_STATS (LWIP_IGMP) 01932 #endif 01933 01934 /** 01935 * UDP_STATS==1: Enable UDP stats. Default is on if 01936 * UDP enabled, otherwise off. 01937 */ 01938 #if !defined UDP_STATS || defined __DOXYGEN__ 01939 #define UDP_STATS (LWIP_UDP) 01940 #endif 01941 01942 /** 01943 * TCP_STATS==1: Enable TCP stats. Default is on if TCP 01944 * enabled, otherwise off. 01945 */ 01946 #if !defined TCP_STATS || defined __DOXYGEN__ 01947 #define TCP_STATS (LWIP_TCP) 01948 #endif 01949 01950 /** 01951 * MEM_STATS==1: Enable mem.c stats. 01952 */ 01953 #if !defined MEM_STATS || defined __DOXYGEN__ 01954 #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) 01955 #endif 01956 01957 /** 01958 * MEMP_STATS==1: Enable memp.c pool stats. 01959 */ 01960 #if !defined MEMP_STATS || defined __DOXYGEN__ 01961 #define MEMP_STATS (MEMP_MEM_MALLOC == 0) 01962 #endif 01963 01964 /** 01965 * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). 01966 */ 01967 #if !defined SYS_STATS || defined __DOXYGEN__ 01968 #define SYS_STATS (NO_SYS == 0) 01969 #endif 01970 01971 /** 01972 * IP6_STATS==1: Enable IPv6 stats. 01973 */ 01974 #if !defined IP6_STATS || defined __DOXYGEN__ 01975 #define IP6_STATS (LWIP_IPV6) 01976 #endif 01977 01978 /** 01979 * ICMP6_STATS==1: Enable ICMP for IPv6 stats. 01980 */ 01981 #if !defined ICMP6_STATS || defined __DOXYGEN__ 01982 #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) 01983 #endif 01984 01985 /** 01986 * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. 01987 */ 01988 #if !defined IP6_FRAG_STATS || defined __DOXYGEN__ 01989 #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) 01990 #endif 01991 01992 /** 01993 * MLD6_STATS==1: Enable MLD for IPv6 stats. 01994 */ 01995 #if !defined MLD6_STATS || defined __DOXYGEN__ 01996 #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) 01997 #endif 01998 01999 /** 02000 * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. 02001 */ 02002 #if !defined ND6_STATS || defined __DOXYGEN__ 02003 #define ND6_STATS (LWIP_IPV6) 02004 #endif 02005 02006 /** 02007 * MIB2_STATS==1: Stats for SNMP MIB2. 02008 */ 02009 #if !defined MIB2_STATS || defined __DOXYGEN__ 02010 #define MIB2_STATS 0 02011 #endif 02012 02013 #else 02014 02015 #define LINK_STATS 0 02016 #define ETHARP_STATS 0 02017 #define IP_STATS 0 02018 #define IPFRAG_STATS 0 02019 #define ICMP_STATS 0 02020 #define IGMP_STATS 0 02021 #define UDP_STATS 0 02022 #define TCP_STATS 0 02023 #define MEM_STATS 0 02024 #define MEMP_STATS 0 02025 #define SYS_STATS 0 02026 #define LWIP_STATS_DISPLAY 0 02027 #define IP6_STATS 0 02028 #define ICMP6_STATS 0 02029 #define IP6_FRAG_STATS 0 02030 #define MLD6_STATS 0 02031 #define ND6_STATS 0 02032 #define MIB2_STATS 0 02033 02034 #endif /* LWIP_STATS */ 02035 /** 02036 * @} 02037 */ 02038 02039 /* 02040 -------------------------------------- 02041 ---------- Checksum options ---------- 02042 -------------------------------------- 02043 */ 02044 /** 02045 * @defgroup lwip_opts_checksum Checksum 02046 * @ingroup lwip_opts_infrastructure 02047 * @{ 02048 */ 02049 /** 02050 * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled 02051 * per netif. 02052 * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! 02053 */ 02054 #if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ 02055 #define LWIP_CHECKSUM_CTRL_PER_NETIF 0 02056 #endif 02057 02058 /** 02059 * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. 02060 */ 02061 #if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ 02062 #define CHECKSUM_GEN_IP 1 02063 #endif 02064 02065 /** 02066 * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. 02067 */ 02068 #if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ 02069 #define CHECKSUM_GEN_UDP 1 02070 #endif 02071 02072 /** 02073 * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. 02074 */ 02075 #if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ 02076 #define CHECKSUM_GEN_TCP 1 02077 #endif 02078 02079 /** 02080 * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. 02081 */ 02082 #if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ 02083 #define CHECKSUM_GEN_ICMP 1 02084 #endif 02085 02086 /** 02087 * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. 02088 */ 02089 #if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ 02090 #define CHECKSUM_GEN_ICMP6 1 02091 #endif 02092 02093 /** 02094 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. 02095 */ 02096 #if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ 02097 #define CHECKSUM_CHECK_IP 1 02098 #endif 02099 02100 /** 02101 * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. 02102 */ 02103 #if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ 02104 #define CHECKSUM_CHECK_UDP 1 02105 #endif 02106 02107 /** 02108 * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. 02109 */ 02110 #if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ 02111 #define CHECKSUM_CHECK_TCP 1 02112 #endif 02113 02114 /** 02115 * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. 02116 */ 02117 #if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ 02118 #define CHECKSUM_CHECK_ICMP 1 02119 #endif 02120 02121 /** 02122 * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets 02123 */ 02124 #if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ 02125 #define CHECKSUM_CHECK_ICMP6 1 02126 #endif 02127 02128 /** 02129 * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from 02130 * application buffers to pbufs. 02131 */ 02132 #if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ 02133 #define LWIP_CHECKSUM_ON_COPY 0 02134 #endif 02135 /** 02136 * @} 02137 */ 02138 02139 /* 02140 --------------------------------------- 02141 ---------- IPv6 options --------------- 02142 --------------------------------------- 02143 */ 02144 /** 02145 * @defgroup lwip_opts_ipv6 IPv6 02146 * @ingroup lwip_opts 02147 * @{ 02148 */ 02149 /** 02150 * LWIP_IPV6==1: Enable IPv6 02151 */ 02152 #if !defined LWIP_IPV6 || defined __DOXYGEN__ 02153 #define LWIP_IPV6 0 02154 #endif 02155 02156 /** 02157 * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. 02158 */ 02159 #if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ 02160 #define LWIP_IPV6_NUM_ADDRESSES 3 02161 #endif 02162 02163 /** 02164 * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs 02165 */ 02166 #if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ 02167 #define LWIP_IPV6_FORWARD 0 02168 #endif 02169 02170 /** 02171 * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. 02172 */ 02173 #if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ 02174 #define LWIP_IPV6_FRAG 0 02175 #endif 02176 02177 /** 02178 * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented 02179 */ 02180 #if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ 02181 #define LWIP_IPV6_REASS (LWIP_IPV6) 02182 #endif 02183 02184 /** 02185 * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during 02186 * network startup. 02187 */ 02188 #if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ 02189 #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 02190 #endif 02191 02192 /** 02193 * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. 02194 */ 02195 #if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ 02196 #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) 02197 #endif 02198 02199 /** 02200 * LWIP_IPV6_ADDRESS_LIFETIMES==1: Keep valid and preferred lifetimes for each 02201 * IPv6 address. Required for LWIP_IPV6_AUTOCONFIG. May still be enabled 02202 * otherwise, in which case the application may assign address lifetimes with 02203 * the appropriate macros. Addresses with no lifetime are assumed to be static. 02204 * If this option is disabled, all addresses are assumed to be static. 02205 */ 02206 #if !defined LWIP_IPV6_ADDRESS_LIFETIMES || defined __DOXYGEN__ 02207 #define LWIP_IPV6_ADDRESS_LIFETIMES (LWIP_IPV6_AUTOCONFIG) 02208 #endif 02209 02210 /** 02211 * LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts. 02212 */ 02213 #if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ 02214 #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 02215 #endif 02216 /** 02217 * @} 02218 */ 02219 02220 /** 02221 * @defgroup lwip_opts_icmp6 ICMP6 02222 * @ingroup lwip_opts_ipv6 02223 * @{ 02224 */ 02225 /** 02226 * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) 02227 */ 02228 #if !defined LWIP_ICMP6 || defined __DOXYGEN__ 02229 #define LWIP_ICMP6 (LWIP_IPV6) 02230 #endif 02231 02232 /** 02233 * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in 02234 * ICMPv6 error messages. 02235 */ 02236 #if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ 02237 #define LWIP_ICMP6_DATASIZE 8 02238 #endif 02239 02240 /** 02241 * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages 02242 */ 02243 #if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ 02244 #define LWIP_ICMP6_HL 255 02245 #endif 02246 /** 02247 * @} 02248 */ 02249 02250 /** 02251 * @defgroup lwip_opts_mld6 Multicast listener discovery 02252 * @ingroup lwip_opts_ipv6 02253 * @{ 02254 */ 02255 /** 02256 * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. 02257 * If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must 02258 * indiscriminately pass all inbound IPv6 multicast traffic to lwIP. 02259 */ 02260 #if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ 02261 #define LWIP_IPV6_MLD (LWIP_IPV6) 02262 #endif 02263 02264 /** 02265 * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined. 02266 * There must be enough groups so that each netif can join the solicited-node 02267 * multicast group for each of its local addresses, plus one for MDNS if 02268 * applicable, plus any number of groups to be joined on UDP sockets. 02269 */ 02270 #if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ 02271 #define MEMP_NUM_MLD6_GROUP 4 02272 #endif 02273 /** 02274 * @} 02275 */ 02276 02277 /** 02278 * @defgroup lwip_opts_nd6 Neighbor discovery 02279 * @ingroup lwip_opts_ipv6 02280 * @{ 02281 */ 02282 /** 02283 * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address 02284 * is being resolved. 02285 */ 02286 #if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ 02287 #define LWIP_ND6_QUEUEING (LWIP_IPV6) 02288 #endif 02289 02290 /** 02291 * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. 02292 */ 02293 #if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ 02294 #define MEMP_NUM_ND6_QUEUE 20 02295 #endif 02296 02297 /** 02298 * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache 02299 */ 02300 #if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ 02301 #define LWIP_ND6_NUM_NEIGHBORS 10 02302 #endif 02303 02304 /** 02305 * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache 02306 */ 02307 #if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ 02308 #define LWIP_ND6_NUM_DESTINATIONS 10 02309 #endif 02310 02311 /** 02312 * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache 02313 */ 02314 #if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ 02315 #define LWIP_ND6_NUM_PREFIXES 5 02316 #endif 02317 02318 /** 02319 * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache 02320 */ 02321 #if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ 02322 #define LWIP_ND6_NUM_ROUTERS 3 02323 #endif 02324 02325 /** 02326 * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send 02327 * (neighbor solicit and router solicit) 02328 */ 02329 #if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ 02330 #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 02331 #endif 02332 02333 /** 02334 * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages 02335 * to send during neighbor reachability detection. 02336 */ 02337 #if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ 02338 #define LWIP_ND6_MAX_UNICAST_SOLICIT 3 02339 #endif 02340 02341 /** 02342 * Unused: See ND RFC (time in milliseconds). 02343 */ 02344 #if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ 02345 #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 02346 #endif 02347 02348 /** 02349 * Unused: See ND RFC 02350 */ 02351 #if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ 02352 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 02353 #endif 02354 02355 /** 02356 * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). 02357 * May be updated by router advertisement messages. 02358 */ 02359 #if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ 02360 #define LWIP_ND6_REACHABLE_TIME 30000 02361 #endif 02362 02363 /** 02364 * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages 02365 */ 02366 #if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ 02367 #define LWIP_ND6_RETRANS_TIMER 1000 02368 #endif 02369 02370 /** 02371 * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation 02372 * message is sent, during neighbor reachability detection. 02373 */ 02374 #if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__ 02375 #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 02376 #endif 02377 02378 /** 02379 * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update 02380 * Reachable time and retransmission timers, and netif MTU. 02381 */ 02382 #if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ 02383 #define LWIP_ND6_ALLOW_RA_UPDATES 1 02384 #endif 02385 02386 /** 02387 * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery 02388 * with reachability hints for connected destinations. This helps avoid sending 02389 * unicast neighbor solicitation messages. 02390 */ 02391 #if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ 02392 #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 02393 #endif 02394 02395 /** 02396 * LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive 02397 * DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS 02398 * servers to the DNS module. 02399 */ 02400 #if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__ 02401 #define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0 02402 #endif 02403 /** 02404 * @} 02405 */ 02406 02407 /** 02408 * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. 02409 */ 02410 #if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ 02411 #define LWIP_IPV6_DHCP6 0 02412 #endif 02413 02414 /* 02415 --------------------------------------- 02416 ---------- Hook options --------------- 02417 --------------------------------------- 02418 */ 02419 02420 /** 02421 * @defgroup lwip_opts_hooks Hooks 02422 * @ingroup lwip_opts_infrastructure 02423 * Hooks are undefined by default, define them to a function if you need them. 02424 * @{ 02425 */ 02426 02427 /** 02428 * LWIP_HOOK_FILENAME: Custom filename to #include in files that provide hooks. 02429 * Declare your hook function prototypes in there, you may also #include all headers 02430 * providing data types that are need in this file. 02431 */ 02432 #ifdef __DOXYGEN__ 02433 #define LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h" 02434 #endif 02435 02436 /** 02437 * LWIP_HOOK_TCP_ISN: 02438 * Hook for generation of the Initial Sequence Number (ISN) for a new TCP 02439 * connection. The default lwIP ISN generation algorithm is very basic and may 02440 * allow for TCP spoofing attacks. This hook provides the means to implement 02441 * the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn), 02442 * or any other desired algorithm as a replacement. 02443 * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for 02444 * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n 02445 * 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); 02446 * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n 02447 * Arguments: 02448 * - local_ip: pointer to the local IP address of the connection 02449 * - local_port: local port number of the connection (host-byte order) 02450 * - remote_ip: pointer to the remote IP address of the connection 02451 * - remote_port: remote port number of the connection (host-byte order)\n 02452 * Return value: 02453 * - the 32-bit Initial Sequence Number to use for the new TCP connection. 02454 */ 02455 #ifdef __DOXYGEN__ 02456 #define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) 02457 #endif 02458 02459 /** 02460 * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): 02461 * - called from ip_input() (IPv4) 02462 * - pbuf: received struct pbuf passed to ip_input() 02463 * - input_netif: struct netif on which the packet has been received 02464 * Return values: 02465 * - 0: Hook has not consumed the packet, packet is processed as normal 02466 * - != 0: Hook has consumed the packet. 02467 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook 02468 * (i.e. free it when done). 02469 */ 02470 #ifdef __DOXYGEN__ 02471 #define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) 02472 #endif 02473 02474 /** 02475 * LWIP_HOOK_IP4_ROUTE(dest): 02476 * - called from ip_route() (IPv4) 02477 * - dest: destination IPv4 address 02478 * Returns the destination netif or NULL if no destination netif is found. In 02479 * that case, ip_route() continues as normal. 02480 */ 02481 #ifdef __DOXYGEN__ 02482 #define LWIP_HOOK_IP4_ROUTE() 02483 #endif 02484 02485 /** 02486 * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): 02487 * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) 02488 */ 02489 #ifdef __DOXYGEN__ 02490 #define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) 02491 #endif 02492 02493 /** 02494 * LWIP_HOOK_ETHARP_GET_GW(netif, dest): 02495 * - called from etharp_output() (IPv4) 02496 * - netif: the netif used for sending 02497 * - dest: the destination IPv4 address 02498 * Returns the IPv4 address of the gateway to handle the specified destination 02499 * IPv4 address. If NULL is returned, the netif's default gateway is used. 02500 * The returned address MUST be directly reachable on the specified netif! 02501 * This function is meant to implement advanced IPv4 routing together with 02502 * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is 02503 * not part of lwIP but can e.g. be hidden in the netif's state argument. 02504 */ 02505 #ifdef __DOXYGEN__ 02506 #define LWIP_HOOK_ETHARP_GET_GW(netif, dest) 02507 #endif 02508 02509 /** 02510 * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): 02511 * - called from ip6_input() (IPv6) 02512 * - pbuf: received struct pbuf passed to ip6_input() 02513 * - input_netif: struct netif on which the packet has been received 02514 * Return values: 02515 * - 0: Hook has not consumed the packet, packet is processed as normal 02516 * - != 0: Hook has consumed the packet. 02517 * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook 02518 * (i.e. free it when done). 02519 */ 02520 #ifdef __DOXYGEN__ 02521 #define LWIP_HOOK_IP6_INPUT(pbuf, input_netif) 02522 #endif 02523 02524 /** 02525 * LWIP_HOOK_IP6_ROUTE(src, dest): 02526 * - called from ip6_route() (IPv6) 02527 * - src: sourc IPv6 address 02528 * - dest: destination IPv6 address 02529 * Returns the destination netif or NULL if no destination netif is found. In 02530 * that case, ip6_route() continues as normal. 02531 */ 02532 #ifdef __DOXYGEN__ 02533 #define LWIP_HOOK_IP6_ROUTE(src, dest) 02534 #endif 02535 02536 /** 02537 * LWIP_HOOK_ND6_GET_GW(netif, dest): 02538 * - called from nd6_get_next_hop_entry() (IPv6) 02539 * - netif: the netif used for sending 02540 * - dest: the destination IPv6 address 02541 * Returns the IPv6 address of the next hop to handle the specified destination 02542 * IPv6 address. If NULL is returned, a NDP-discovered router is used instead. 02543 * The returned address MUST be directly reachable on the specified netif! 02544 * This function is meant to implement advanced IPv6 routing together with 02545 * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is 02546 * not part of lwIP but can e.g. be hidden in the netif's state argument. 02547 */ 02548 #ifdef __DOXYGEN__ 02549 #define LWIP_HOOK_ND6_GET_GW(netif, dest) 02550 #endif 02551 02552 /** 02553 * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): 02554 * - called from ethernet_input() if VLAN support is enabled 02555 * - netif: struct netif on which the packet has been received 02556 * - eth_hdr: struct eth_hdr of the packet 02557 * - vlan_hdr: struct eth_vlan_hdr of the packet 02558 * Return values: 02559 * - 0: Packet must be dropped. 02560 * - != 0: Packet must be accepted. 02561 */ 02562 #ifdef __DOXYGEN__ 02563 #define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) 02564 #endif 02565 02566 /** 02567 * LWIP_HOOK_VLAN_SET: 02568 * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data 02569 * on per-netif basis to implement this callback, see @ref netif_cd. 02570 * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n 02571 * 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 02572 * Arguments: 02573 * - netif: struct netif that the packet will be sent through 02574 * - p: struct pbuf packet to be sent 02575 * - src: source eth address 02576 * - dst: destination eth address 02577 * - eth_type: ethernet type to packet to be sent\n 02578 * 02579 * 02580 * Return values: 02581 * - <0: Packet shall not contain VLAN header. 02582 * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. 02583 */ 02584 #ifdef __DOXYGEN__ 02585 #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) 02586 #endif 02587 02588 /** 02589 * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): 02590 * - called from memp_free() when a memp pool was empty and an item is now available 02591 */ 02592 #ifdef __DOXYGEN__ 02593 #define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) 02594 #endif 02595 02596 /** 02597 * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): 02598 * Called from ethernet_input() when an unknown eth type is encountered. 02599 * Return ERR_OK if packet is accepted, any error code otherwise. 02600 * Payload points to ethernet header! 02601 */ 02602 #ifdef __DOXYGEN__ 02603 #define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) 02604 #endif 02605 /** 02606 * @} 02607 */ 02608 02609 /* 02610 --------------------------------------- 02611 ---------- Debugging options ---------- 02612 --------------------------------------- 02613 */ 02614 /** 02615 * @defgroup lwip_opts_debugmsg Debug messages 02616 * @ingroup lwip_opts_debug 02617 * @{ 02618 */ 02619 /** 02620 * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is 02621 * compared against this value. If it is smaller, then debugging 02622 * messages are written. 02623 * @see debugging_levels 02624 */ 02625 #if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ 02626 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL 02627 #endif 02628 02629 /** 02630 * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable 02631 * debug messages of certain types. 02632 * @see debugging_levels 02633 */ 02634 #if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ 02635 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON 02636 #endif 02637 02638 /** 02639 * ETHARP_DEBUG: Enable debugging in etharp.c. 02640 */ 02641 #if !defined ETHARP_DEBUG || defined __DOXYGEN__ 02642 #define ETHARP_DEBUG LWIP_DBG_OFF 02643 #endif 02644 02645 /** 02646 * NETIF_DEBUG: Enable debugging in netif.c. 02647 */ 02648 #if !defined NETIF_DEBUG || defined __DOXYGEN__ 02649 #define NETIF_DEBUG LWIP_DBG_OFF 02650 #endif 02651 02652 /** 02653 * PBUF_DEBUG: Enable debugging in pbuf.c. 02654 */ 02655 #if !defined PBUF_DEBUG || defined __DOXYGEN__ 02656 #define PBUF_DEBUG LWIP_DBG_OFF 02657 #endif 02658 02659 /** 02660 * API_LIB_DEBUG: Enable debugging in api_lib.c. 02661 */ 02662 #if !defined API_LIB_DEBUG || defined __DOXYGEN__ 02663 #define API_LIB_DEBUG LWIP_DBG_OFF 02664 #endif 02665 02666 /** 02667 * API_MSG_DEBUG: Enable debugging in api_msg.c. 02668 */ 02669 #if !defined API_MSG_DEBUG || defined __DOXYGEN__ 02670 #define API_MSG_DEBUG LWIP_DBG_OFF 02671 #endif 02672 02673 /** 02674 * SOCKETS_DEBUG: Enable debugging in sockets.c. 02675 */ 02676 #if !defined SOCKETS_DEBUG || defined __DOXYGEN__ 02677 #define SOCKETS_DEBUG LWIP_DBG_OFF 02678 #endif 02679 02680 /** 02681 * ICMP_DEBUG: Enable debugging in icmp.c. 02682 */ 02683 #if !defined ICMP_DEBUG || defined __DOXYGEN__ 02684 #define ICMP_DEBUG LWIP_DBG_OFF 02685 #endif 02686 02687 /** 02688 * IGMP_DEBUG: Enable debugging in igmp.c. 02689 */ 02690 #if !defined IGMP_DEBUG || defined __DOXYGEN__ 02691 #define IGMP_DEBUG LWIP_DBG_OFF 02692 #endif 02693 02694 /** 02695 * INET_DEBUG: Enable debugging in inet.c. 02696 */ 02697 #if !defined INET_DEBUG || defined __DOXYGEN__ 02698 #define INET_DEBUG LWIP_DBG_OFF 02699 #endif 02700 02701 /** 02702 * IP_DEBUG: Enable debugging for IP. 02703 */ 02704 #if !defined IP_DEBUG || defined __DOXYGEN__ 02705 #define IP_DEBUG LWIP_DBG_OFF 02706 #endif 02707 02708 /** 02709 * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. 02710 */ 02711 #if !defined IP_REASS_DEBUG || defined __DOXYGEN__ 02712 #define IP_REASS_DEBUG LWIP_DBG_OFF 02713 #endif 02714 02715 /** 02716 * RAW_DEBUG: Enable debugging in raw.c. 02717 */ 02718 #if !defined RAW_DEBUG || defined __DOXYGEN__ 02719 #define RAW_DEBUG LWIP_DBG_OFF 02720 #endif 02721 02722 /** 02723 * MEM_DEBUG: Enable debugging in mem.c. 02724 */ 02725 #if !defined MEM_DEBUG || defined __DOXYGEN__ 02726 #define MEM_DEBUG LWIP_DBG_OFF 02727 #endif 02728 02729 /** 02730 * MEMP_DEBUG: Enable debugging in memp.c. 02731 */ 02732 #if !defined MEMP_DEBUG || defined __DOXYGEN__ 02733 #define MEMP_DEBUG LWIP_DBG_OFF 02734 #endif 02735 02736 /** 02737 * SYS_DEBUG: Enable debugging in sys.c. 02738 */ 02739 #if !defined SYS_DEBUG || defined __DOXYGEN__ 02740 #define SYS_DEBUG LWIP_DBG_OFF 02741 #endif 02742 02743 /** 02744 * TIMERS_DEBUG: Enable debugging in timers.c. 02745 */ 02746 #if !defined TIMERS_DEBUG || defined __DOXYGEN__ 02747 #define TIMERS_DEBUG LWIP_DBG_OFF 02748 #endif 02749 02750 /** 02751 * TCP_DEBUG: Enable debugging for TCP. 02752 */ 02753 #if !defined TCP_DEBUG || defined __DOXYGEN__ 02754 #define TCP_DEBUG LWIP_DBG_OFF 02755 #endif 02756 02757 /** 02758 * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. 02759 */ 02760 #if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ 02761 #define TCP_INPUT_DEBUG LWIP_DBG_OFF 02762 #endif 02763 02764 /** 02765 * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. 02766 */ 02767 #if !defined TCP_FR_DEBUG || defined __DOXYGEN__ 02768 #define TCP_FR_DEBUG LWIP_DBG_OFF 02769 #endif 02770 02771 /** 02772 * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit 02773 * timeout. 02774 */ 02775 #if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ 02776 #define TCP_RTO_DEBUG LWIP_DBG_OFF 02777 #endif 02778 02779 /** 02780 * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. 02781 */ 02782 #if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ 02783 #define TCP_CWND_DEBUG LWIP_DBG_OFF 02784 #endif 02785 02786 /** 02787 * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. 02788 */ 02789 #if !defined TCP_WND_DEBUG || defined __DOXYGEN__ 02790 #define TCP_WND_DEBUG LWIP_DBG_OFF 02791 #endif 02792 02793 /** 02794 * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. 02795 */ 02796 #if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ 02797 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF 02798 #endif 02799 02800 /** 02801 * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. 02802 */ 02803 #if !defined TCP_RST_DEBUG || defined __DOXYGEN__ 02804 #define TCP_RST_DEBUG LWIP_DBG_OFF 02805 #endif 02806 02807 /** 02808 * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. 02809 */ 02810 #if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ 02811 #define TCP_QLEN_DEBUG LWIP_DBG_OFF 02812 #endif 02813 02814 /** 02815 * UDP_DEBUG: Enable debugging in UDP. 02816 */ 02817 #if !defined UDP_DEBUG || defined __DOXYGEN__ 02818 #define UDP_DEBUG LWIP_DBG_OFF 02819 #endif 02820 02821 /** 02822 * TCPIP_DEBUG: Enable debugging in tcpip.c. 02823 */ 02824 #if !defined TCPIP_DEBUG || defined __DOXYGEN__ 02825 #define TCPIP_DEBUG LWIP_DBG_OFF 02826 #endif 02827 02828 /** 02829 * SLIP_DEBUG: Enable debugging in slipif.c. 02830 */ 02831 #if !defined SLIP_DEBUG || defined __DOXYGEN__ 02832 #define SLIP_DEBUG LWIP_DBG_OFF 02833 #endif 02834 02835 /** 02836 * DHCP_DEBUG: Enable debugging in dhcp.c. 02837 */ 02838 #if !defined DHCP_DEBUG || defined __DOXYGEN__ 02839 #define DHCP_DEBUG LWIP_DBG_OFF 02840 #endif 02841 02842 /** 02843 * AUTOIP_DEBUG: Enable debugging in autoip.c. 02844 */ 02845 #if !defined AUTOIP_DEBUG || defined __DOXYGEN__ 02846 #define AUTOIP_DEBUG LWIP_DBG_OFF 02847 #endif 02848 02849 /** 02850 * DNS_DEBUG: Enable debugging for DNS. 02851 */ 02852 #if !defined DNS_DEBUG || defined __DOXYGEN__ 02853 #define DNS_DEBUG LWIP_DBG_OFF 02854 #endif 02855 02856 /** 02857 * IP6_DEBUG: Enable debugging for IPv6. 02858 */ 02859 #if !defined IP6_DEBUG || defined __DOXYGEN__ 02860 #define IP6_DEBUG LWIP_DBG_OFF 02861 #endif 02862 /** 02863 * @} 02864 */ 02865 02866 /* 02867 -------------------------------------------------- 02868 ---------- Performance tracking options ---------- 02869 -------------------------------------------------- 02870 */ 02871 /** 02872 * @defgroup lwip_opts_perf Performance 02873 * @ingroup lwip_opts_debug 02874 * @{ 02875 */ 02876 /** 02877 * LWIP_PERF: Enable performance testing for lwIP 02878 * (if enabled, arch/perf.h is included) 02879 */ 02880 #if !defined LWIP_PERF || defined __DOXYGEN__ 02881 #define LWIP_PERF 0 02882 #endif 02883 /** 02884 * @} 02885 */ 02886 02887 #endif /* LWIP_HDR_OPT_H */
Generated on Sun Jul 17 2022 08:25:29 by 1.7.2