Lorcan Smith
/
Enet_SPI
SNMP agent attached to SPI slave
lwip/include/lwip/opt.h@0:2a53a4c3238c, 2012-08-13 (annotated)
- Committer:
- lorcansmith
- Date:
- Mon Aug 13 15:07:40 2012 +0000
- Revision:
- 0:2a53a4c3238c
- Child:
- 2:25e12a7fe0aa
v1.1 release includes ioAlarm traps
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lorcansmith | 0:2a53a4c3238c | 1 | /***************************************************************************** |
lorcansmith | 0:2a53a4c3238c | 2 | * Copyright Field Electronics Ltd |
lorcansmith | 0:2a53a4c3238c | 3 | * File: opt.h |
lorcansmith | 0:2a53a4c3238c | 4 | * Reference: 3000-A3600-HDR-opt |
lorcansmith | 0:2a53a4c3238c | 5 | * Content: lwIP Options Configuration |
lorcansmith | 0:2a53a4c3238c | 6 | * Version: 0.5 |
lorcansmith | 0:2a53a4c3238c | 7 | * System: mbed gnu compiler |
lorcansmith | 0:2a53a4c3238c | 8 | * Target Hardware: mbed LPC1768 |
lorcansmith | 0:2a53a4c3238c | 9 | * Amendment Record: |
lorcansmith | 0:2a53a4c3238c | 10 | * Author: L. Smith for all versions unless otherwise specified |
lorcansmith | 0:2a53a4c3238c | 11 | * Initial release |
lorcansmith | 0:2a53a4c3238c | 12 | * 0.1 15/11/11: L. Smith |
lorcansmith | 0:2a53a4c3238c | 13 | Increase size of allocations for SNMP buffers |
lorcansmith | 0:2a53a4c3238c | 14 | * 0.2 21/11/11: L. Smith |
lorcansmith | 0:2a53a4c3238c | 15 | Set SNMP_PRIVATE_MIB to include private_mib.h |
lorcansmith | 0:2a53a4c3238c | 16 | * 0.3: 27/11/11: L. Smith |
lorcansmith | 0:2a53a4c3238c | 17 | Increase MEMP_NUM_SNMP_NODE to 100 from 50 leaf nodes |
lorcansmith | 0:2a53a4c3238c | 18 | * 0.4: 30/04/12: L. Smith |
lorcansmith | 0:2a53a4c3238c | 19 | Reset SNMP_TRAP_DESTINATIONS to 1 as only 1 needed |
lorcansmith | 0:2a53a4c3238c | 20 | * 0.5: 07/08/12: L. Smith |
lorcansmith | 0:2a53a4c3238c | 21 | Reduce MEMP_NUM_UDP_PCB to 2 & MEMP_NUM_SNMP_NODE to 50 leaf nodes to save memory |
lorcansmith | 0:2a53a4c3238c | 22 | *******************************************************************************/ |
lorcansmith | 0:2a53a4c3238c | 23 | /* |
lorcansmith | 0:2a53a4c3238c | 24 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. |
lorcansmith | 0:2a53a4c3238c | 25 | * All rights reserved. |
lorcansmith | 0:2a53a4c3238c | 26 | * |
lorcansmith | 0:2a53a4c3238c | 27 | * Redistribution and use in source and binary forms, with or without modification, |
lorcansmith | 0:2a53a4c3238c | 28 | * are permitted provided that the following conditions are met: |
lorcansmith | 0:2a53a4c3238c | 29 | * |
lorcansmith | 0:2a53a4c3238c | 30 | * 1. Redistributions of source code must retain the above copyright notice, |
lorcansmith | 0:2a53a4c3238c | 31 | * this list of conditions and the following disclaimer. |
lorcansmith | 0:2a53a4c3238c | 32 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
lorcansmith | 0:2a53a4c3238c | 33 | * this list of conditions and the following disclaimer in the documentation |
lorcansmith | 0:2a53a4c3238c | 34 | * and/or other materials provided with the distribution. |
lorcansmith | 0:2a53a4c3238c | 35 | * 3. The name of the author may not be used to endorse or promote products |
lorcansmith | 0:2a53a4c3238c | 36 | * derived from this software without specific prior written permission. |
lorcansmith | 0:2a53a4c3238c | 37 | * |
lorcansmith | 0:2a53a4c3238c | 38 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
lorcansmith | 0:2a53a4c3238c | 39 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
lorcansmith | 0:2a53a4c3238c | 40 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
lorcansmith | 0:2a53a4c3238c | 41 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
lorcansmith | 0:2a53a4c3238c | 42 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
lorcansmith | 0:2a53a4c3238c | 43 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
lorcansmith | 0:2a53a4c3238c | 44 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
lorcansmith | 0:2a53a4c3238c | 45 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
lorcansmith | 0:2a53a4c3238c | 46 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
lorcansmith | 0:2a53a4c3238c | 47 | * OF SUCH DAMAGE. |
lorcansmith | 0:2a53a4c3238c | 48 | * |
lorcansmith | 0:2a53a4c3238c | 49 | * This file is part of the lwIP TCP/IP stack. |
lorcansmith | 0:2a53a4c3238c | 50 | * |
lorcansmith | 0:2a53a4c3238c | 51 | * Author: Adam Dunkels <adam@sics.se> |
lorcansmith | 0:2a53a4c3238c | 52 | * |
lorcansmith | 0:2a53a4c3238c | 53 | */ |
lorcansmith | 0:2a53a4c3238c | 54 | #ifndef __LWIP_OPT_H__ |
lorcansmith | 0:2a53a4c3238c | 55 | #define __LWIP_OPT_H__ |
lorcansmith | 0:2a53a4c3238c | 56 | |
lorcansmith | 0:2a53a4c3238c | 57 | /* |
lorcansmith | 0:2a53a4c3238c | 58 | * Include user defined options first. Anything not defined in these files |
lorcansmith | 0:2a53a4c3238c | 59 | * will be set to standard values. Override anything you dont like! |
lorcansmith | 0:2a53a4c3238c | 60 | */ |
lorcansmith | 0:2a53a4c3238c | 61 | #include "lwipopts.h" |
lorcansmith | 0:2a53a4c3238c | 62 | #include "lwip/debug.h" |
lorcansmith | 0:2a53a4c3238c | 63 | |
lorcansmith | 0:2a53a4c3238c | 64 | /* |
lorcansmith | 0:2a53a4c3238c | 65 | ----------------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 66 | ---------- Platform specific locking ---------- |
lorcansmith | 0:2a53a4c3238c | 67 | ----------------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 68 | */ |
lorcansmith | 0:2a53a4c3238c | 69 | |
lorcansmith | 0:2a53a4c3238c | 70 | /** |
lorcansmith | 0:2a53a4c3238c | 71 | * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain |
lorcansmith | 0:2a53a4c3238c | 72 | * critical regions during buffer allocation, deallocation and memory |
lorcansmith | 0:2a53a4c3238c | 73 | * allocation and deallocation. |
lorcansmith | 0:2a53a4c3238c | 74 | */ |
lorcansmith | 0:2a53a4c3238c | 75 | #ifndef SYS_LIGHTWEIGHT_PROT |
lorcansmith | 0:2a53a4c3238c | 76 | #define SYS_LIGHTWEIGHT_PROT 0 |
lorcansmith | 0:2a53a4c3238c | 77 | #endif |
lorcansmith | 0:2a53a4c3238c | 78 | |
lorcansmith | 0:2a53a4c3238c | 79 | /** |
lorcansmith | 0:2a53a4c3238c | 80 | * NO_SYS==1: Provides VERY minimal functionality. Otherwise, |
lorcansmith | 0:2a53a4c3238c | 81 | * use lwIP facilities. |
lorcansmith | 0:2a53a4c3238c | 82 | */ |
lorcansmith | 0:2a53a4c3238c | 83 | #ifndef NO_SYS |
lorcansmith | 0:2a53a4c3238c | 84 | #define NO_SYS 0 |
lorcansmith | 0:2a53a4c3238c | 85 | #endif |
lorcansmith | 0:2a53a4c3238c | 86 | |
lorcansmith | 0:2a53a4c3238c | 87 | /** |
lorcansmith | 0:2a53a4c3238c | 88 | * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1 |
lorcansmith | 0:2a53a4c3238c | 89 | * Mainly for compatibility to old versions. |
lorcansmith | 0:2a53a4c3238c | 90 | */ |
lorcansmith | 0:2a53a4c3238c | 91 | #ifndef NO_SYS_NO_TIMERS |
lorcansmith | 0:2a53a4c3238c | 92 | #define NO_SYS_NO_TIMERS 0 |
lorcansmith | 0:2a53a4c3238c | 93 | #endif |
lorcansmith | 0:2a53a4c3238c | 94 | |
lorcansmith | 0:2a53a4c3238c | 95 | /** |
lorcansmith | 0:2a53a4c3238c | 96 | * MEMCPY: override this if you have a faster implementation at hand than the |
lorcansmith | 0:2a53a4c3238c | 97 | * one included in your C library |
lorcansmith | 0:2a53a4c3238c | 98 | */ |
lorcansmith | 0:2a53a4c3238c | 99 | #ifndef MEMCPY |
lorcansmith | 0:2a53a4c3238c | 100 | #define MEMCPY(dst,src,len) memcpy(dst,src,len) |
lorcansmith | 0:2a53a4c3238c | 101 | #endif |
lorcansmith | 0:2a53a4c3238c | 102 | |
lorcansmith | 0:2a53a4c3238c | 103 | /** |
lorcansmith | 0:2a53a4c3238c | 104 | * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a |
lorcansmith | 0:2a53a4c3238c | 105 | * call to memcpy() if the length is known at compile time and is small. |
lorcansmith | 0:2a53a4c3238c | 106 | */ |
lorcansmith | 0:2a53a4c3238c | 107 | #ifndef SMEMCPY |
lorcansmith | 0:2a53a4c3238c | 108 | #define SMEMCPY(dst,src,len) memcpy(dst,src,len) |
lorcansmith | 0:2a53a4c3238c | 109 | #endif |
lorcansmith | 0:2a53a4c3238c | 110 | |
lorcansmith | 0:2a53a4c3238c | 111 | /* |
lorcansmith | 0:2a53a4c3238c | 112 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 113 | ---------- Memory options ---------- |
lorcansmith | 0:2a53a4c3238c | 114 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 115 | */ |
lorcansmith | 0:2a53a4c3238c | 116 | /** |
lorcansmith | 0:2a53a4c3238c | 117 | * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library |
lorcansmith | 0:2a53a4c3238c | 118 | * instead of the lwip internal allocator. Can save code size if you |
lorcansmith | 0:2a53a4c3238c | 119 | * already use it. |
lorcansmith | 0:2a53a4c3238c | 120 | */ |
lorcansmith | 0:2a53a4c3238c | 121 | #ifndef MEM_LIBC_MALLOC |
lorcansmith | 0:2a53a4c3238c | 122 | #define MEM_LIBC_MALLOC 0 |
lorcansmith | 0:2a53a4c3238c | 123 | #endif |
lorcansmith | 0:2a53a4c3238c | 124 | |
lorcansmith | 0:2a53a4c3238c | 125 | /** |
lorcansmith | 0:2a53a4c3238c | 126 | * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. |
lorcansmith | 0:2a53a4c3238c | 127 | * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution |
lorcansmith | 0:2a53a4c3238c | 128 | * speed and usage from interrupts! |
lorcansmith | 0:2a53a4c3238c | 129 | */ |
lorcansmith | 0:2a53a4c3238c | 130 | #ifndef MEMP_MEM_MALLOC |
lorcansmith | 0:2a53a4c3238c | 131 | #define MEMP_MEM_MALLOC 0 |
lorcansmith | 0:2a53a4c3238c | 132 | #endif |
lorcansmith | 0:2a53a4c3238c | 133 | |
lorcansmith | 0:2a53a4c3238c | 134 | /** |
lorcansmith | 0:2a53a4c3238c | 135 | * MEM_ALIGNMENT: should be set to the alignment of the CPU |
lorcansmith | 0:2a53a4c3238c | 136 | * 4 byte alignment -> #define MEM_ALIGNMENT 4 |
lorcansmith | 0:2a53a4c3238c | 137 | * 2 byte alignment -> #define MEM_ALIGNMENT 2 |
lorcansmith | 0:2a53a4c3238c | 138 | */ |
lorcansmith | 0:2a53a4c3238c | 139 | #ifndef MEM_ALIGNMENT |
lorcansmith | 0:2a53a4c3238c | 140 | #define MEM_ALIGNMENT 1 |
lorcansmith | 0:2a53a4c3238c | 141 | #endif |
lorcansmith | 0:2a53a4c3238c | 142 | |
lorcansmith | 0:2a53a4c3238c | 143 | /** |
lorcansmith | 0:2a53a4c3238c | 144 | * MEM_SIZE: the size of the heap memory. If the application will send |
lorcansmith | 0:2a53a4c3238c | 145 | * a lot of data that needs to be copied, this should be set high. |
lorcansmith | 0:2a53a4c3238c | 146 | */ |
lorcansmith | 0:2a53a4c3238c | 147 | #ifndef MEM_SIZE |
lorcansmith | 0:2a53a4c3238c | 148 | #define MEM_SIZE 1600 |
lorcansmith | 0:2a53a4c3238c | 149 | #endif |
lorcansmith | 0:2a53a4c3238c | 150 | |
lorcansmith | 0:2a53a4c3238c | 151 | /** |
lorcansmith | 0:2a53a4c3238c | 152 | * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array. |
lorcansmith | 0:2a53a4c3238c | 153 | * This can be used to individually change the location of each pool. |
lorcansmith | 0:2a53a4c3238c | 154 | * Default is one big array for all pools |
lorcansmith | 0:2a53a4c3238c | 155 | */ |
lorcansmith | 0:2a53a4c3238c | 156 | #ifndef MEMP_SEPARATE_POOLS |
lorcansmith | 0:2a53a4c3238c | 157 | #define MEMP_SEPARATE_POOLS 0 |
lorcansmith | 0:2a53a4c3238c | 158 | #endif |
lorcansmith | 0:2a53a4c3238c | 159 | |
lorcansmith | 0:2a53a4c3238c | 160 | /** |
lorcansmith | 0:2a53a4c3238c | 161 | * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable |
lorcansmith | 0:2a53a4c3238c | 162 | * amount of bytes before and after each memp element in every pool and fills |
lorcansmith | 0:2a53a4c3238c | 163 | * it with a prominent default value. |
lorcansmith | 0:2a53a4c3238c | 164 | * MEMP_OVERFLOW_CHECK == 0 no checking |
lorcansmith | 0:2a53a4c3238c | 165 | * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed |
lorcansmith | 0:2a53a4c3238c | 166 | * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time |
lorcansmith | 0:2a53a4c3238c | 167 | * memp_malloc() or memp_free() is called (useful but slow!) |
lorcansmith | 0:2a53a4c3238c | 168 | */ |
lorcansmith | 0:2a53a4c3238c | 169 | #ifndef MEMP_OVERFLOW_CHECK |
lorcansmith | 0:2a53a4c3238c | 170 | #define MEMP_OVERFLOW_CHECK 0 |
lorcansmith | 0:2a53a4c3238c | 171 | #endif |
lorcansmith | 0:2a53a4c3238c | 172 | |
lorcansmith | 0:2a53a4c3238c | 173 | /** |
lorcansmith | 0:2a53a4c3238c | 174 | * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make |
lorcansmith | 0:2a53a4c3238c | 175 | * sure that there are no cycles in the linked lists. |
lorcansmith | 0:2a53a4c3238c | 176 | */ |
lorcansmith | 0:2a53a4c3238c | 177 | #ifndef MEMP_SANITY_CHECK |
lorcansmith | 0:2a53a4c3238c | 178 | #define MEMP_SANITY_CHECK 0 |
lorcansmith | 0:2a53a4c3238c | 179 | #endif |
lorcansmith | 0:2a53a4c3238c | 180 | |
lorcansmith | 0:2a53a4c3238c | 181 | /** |
lorcansmith | 0:2a53a4c3238c | 182 | * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set |
lorcansmith | 0:2a53a4c3238c | 183 | * of memory pools of various sizes. When mem_malloc is called, an element of |
lorcansmith | 0:2a53a4c3238c | 184 | * the smallest pool that can provide the length needed is returned. |
lorcansmith | 0:2a53a4c3238c | 185 | * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. |
lorcansmith | 0:2a53a4c3238c | 186 | */ |
lorcansmith | 0:2a53a4c3238c | 187 | #ifndef MEM_USE_POOLS |
lorcansmith | 0:2a53a4c3238c | 188 | #define MEM_USE_POOLS 0 |
lorcansmith | 0:2a53a4c3238c | 189 | #endif |
lorcansmith | 0:2a53a4c3238c | 190 | |
lorcansmith | 0:2a53a4c3238c | 191 | /** |
lorcansmith | 0:2a53a4c3238c | 192 | * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next |
lorcansmith | 0:2a53a4c3238c | 193 | * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more |
lorcansmith | 0:2a53a4c3238c | 194 | * reliable. */ |
lorcansmith | 0:2a53a4c3238c | 195 | #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL |
lorcansmith | 0:2a53a4c3238c | 196 | #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 |
lorcansmith | 0:2a53a4c3238c | 197 | #endif |
lorcansmith | 0:2a53a4c3238c | 198 | |
lorcansmith | 0:2a53a4c3238c | 199 | /** |
lorcansmith | 0:2a53a4c3238c | 200 | * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h |
lorcansmith | 0:2a53a4c3238c | 201 | * that defines additional pools beyond the "standard" ones required |
lorcansmith | 0:2a53a4c3238c | 202 | * by lwIP. If you set this to 1, you must have lwippools.h in your |
lorcansmith | 0:2a53a4c3238c | 203 | * inlude path somewhere. |
lorcansmith | 0:2a53a4c3238c | 204 | */ |
lorcansmith | 0:2a53a4c3238c | 205 | #ifndef MEMP_USE_CUSTOM_POOLS |
lorcansmith | 0:2a53a4c3238c | 206 | #define MEMP_USE_CUSTOM_POOLS 0 |
lorcansmith | 0:2a53a4c3238c | 207 | #endif |
lorcansmith | 0:2a53a4c3238c | 208 | |
lorcansmith | 0:2a53a4c3238c | 209 | /** |
lorcansmith | 0:2a53a4c3238c | 210 | * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from |
lorcansmith | 0:2a53a4c3238c | 211 | * interrupt context (or another context that doesn't allow waiting for a |
lorcansmith | 0:2a53a4c3238c | 212 | * semaphore). |
lorcansmith | 0:2a53a4c3238c | 213 | * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, |
lorcansmith | 0:2a53a4c3238c | 214 | * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs |
lorcansmith | 0:2a53a4c3238c | 215 | * with each loop so that mem_free can run. |
lorcansmith | 0:2a53a4c3238c | 216 | * |
lorcansmith | 0:2a53a4c3238c | 217 | * ATTENTION: As you can see from the above description, this leads to dis-/ |
lorcansmith | 0:2a53a4c3238c | 218 | * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc |
lorcansmith | 0:2a53a4c3238c | 219 | * can need longer. |
lorcansmith | 0:2a53a4c3238c | 220 | * |
lorcansmith | 0:2a53a4c3238c | 221 | * If you don't want that, at least for NO_SYS=0, you can still use the following |
lorcansmith | 0:2a53a4c3238c | 222 | * functions to enqueue a deallocation call which then runs in the tcpip_thread |
lorcansmith | 0:2a53a4c3238c | 223 | * context: |
lorcansmith | 0:2a53a4c3238c | 224 | * - pbuf_free_callback(p); |
lorcansmith | 0:2a53a4c3238c | 225 | * - mem_free_callback(m); |
lorcansmith | 0:2a53a4c3238c | 226 | */ |
lorcansmith | 0:2a53a4c3238c | 227 | #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT |
lorcansmith | 0:2a53a4c3238c | 228 | #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 |
lorcansmith | 0:2a53a4c3238c | 229 | #endif |
lorcansmith | 0:2a53a4c3238c | 230 | |
lorcansmith | 0:2a53a4c3238c | 231 | /* |
lorcansmith | 0:2a53a4c3238c | 232 | ------------------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 233 | ---------- Internal Memory Pool Sizes ---------- |
lorcansmith | 0:2a53a4c3238c | 234 | ------------------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 235 | */ |
lorcansmith | 0:2a53a4c3238c | 236 | /** |
lorcansmith | 0:2a53a4c3238c | 237 | * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). |
lorcansmith | 0:2a53a4c3238c | 238 | * If the application sends a lot of data out of ROM (or other static memory), |
lorcansmith | 0:2a53a4c3238c | 239 | * this should be set high. |
lorcansmith | 0:2a53a4c3238c | 240 | */ |
lorcansmith | 0:2a53a4c3238c | 241 | #ifndef MEMP_NUM_PBUF |
lorcansmith | 0:2a53a4c3238c | 242 | #define MEMP_NUM_PBUF 16 |
lorcansmith | 0:2a53a4c3238c | 243 | #endif |
lorcansmith | 0:2a53a4c3238c | 244 | |
lorcansmith | 0:2a53a4c3238c | 245 | /** |
lorcansmith | 0:2a53a4c3238c | 246 | * MEMP_NUM_RAW_PCB: Number of raw connection PCBs |
lorcansmith | 0:2a53a4c3238c | 247 | * (requires the LWIP_RAW option) |
lorcansmith | 0:2a53a4c3238c | 248 | */ |
lorcansmith | 0:2a53a4c3238c | 249 | #ifndef MEMP_NUM_RAW_PCB |
lorcansmith | 0:2a53a4c3238c | 250 | #define MEMP_NUM_RAW_PCB 4 |
lorcansmith | 0:2a53a4c3238c | 251 | #endif |
lorcansmith | 0:2a53a4c3238c | 252 | |
lorcansmith | 0:2a53a4c3238c | 253 | /** |
lorcansmith | 0:2a53a4c3238c | 254 | * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One |
lorcansmith | 0:2a53a4c3238c | 255 | * per active UDP "connection". |
lorcansmith | 0:2a53a4c3238c | 256 | * (requires the LWIP_UDP option) |
lorcansmith | 0:2a53a4c3238c | 257 | LS v0.5: Reduce to 2 from 4 |
lorcansmith | 0:2a53a4c3238c | 258 | */ |
lorcansmith | 0:2a53a4c3238c | 259 | #ifndef MEMP_NUM_UDP_PCB |
lorcansmith | 0:2a53a4c3238c | 260 | #define MEMP_NUM_UDP_PCB 2 |
lorcansmith | 0:2a53a4c3238c | 261 | #endif |
lorcansmith | 0:2a53a4c3238c | 262 | |
lorcansmith | 0:2a53a4c3238c | 263 | /** |
lorcansmith | 0:2a53a4c3238c | 264 | * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. |
lorcansmith | 0:2a53a4c3238c | 265 | * (requires the LWIP_TCP option) |
lorcansmith | 0:2a53a4c3238c | 266 | */ |
lorcansmith | 0:2a53a4c3238c | 267 | #ifndef MEMP_NUM_TCP_PCB |
lorcansmith | 0:2a53a4c3238c | 268 | #define MEMP_NUM_TCP_PCB 5 |
lorcansmith | 0:2a53a4c3238c | 269 | #endif |
lorcansmith | 0:2a53a4c3238c | 270 | |
lorcansmith | 0:2a53a4c3238c | 271 | /** |
lorcansmith | 0:2a53a4c3238c | 272 | * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. |
lorcansmith | 0:2a53a4c3238c | 273 | * (requires the LWIP_TCP option) |
lorcansmith | 0:2a53a4c3238c | 274 | */ |
lorcansmith | 0:2a53a4c3238c | 275 | #ifndef MEMP_NUM_TCP_PCB_LISTEN |
lorcansmith | 0:2a53a4c3238c | 276 | #define MEMP_NUM_TCP_PCB_LISTEN 8 |
lorcansmith | 0:2a53a4c3238c | 277 | #endif |
lorcansmith | 0:2a53a4c3238c | 278 | |
lorcansmith | 0:2a53a4c3238c | 279 | /** |
lorcansmith | 0:2a53a4c3238c | 280 | * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. |
lorcansmith | 0:2a53a4c3238c | 281 | * (requires the LWIP_TCP option) |
lorcansmith | 0:2a53a4c3238c | 282 | */ |
lorcansmith | 0:2a53a4c3238c | 283 | #ifndef MEMP_NUM_TCP_SEG |
lorcansmith | 0:2a53a4c3238c | 284 | #define MEMP_NUM_TCP_SEG 16 |
lorcansmith | 0:2a53a4c3238c | 285 | #endif |
lorcansmith | 0:2a53a4c3238c | 286 | |
lorcansmith | 0:2a53a4c3238c | 287 | /** |
lorcansmith | 0:2a53a4c3238c | 288 | * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for |
lorcansmith | 0:2a53a4c3238c | 289 | * reassembly (whole packets, not fragments!) |
lorcansmith | 0:2a53a4c3238c | 290 | */ |
lorcansmith | 0:2a53a4c3238c | 291 | #ifndef MEMP_NUM_REASSDATA |
lorcansmith | 0:2a53a4c3238c | 292 | #define MEMP_NUM_REASSDATA 5 |
lorcansmith | 0:2a53a4c3238c | 293 | #endif |
lorcansmith | 0:2a53a4c3238c | 294 | |
lorcansmith | 0:2a53a4c3238c | 295 | /** |
lorcansmith | 0:2a53a4c3238c | 296 | * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent |
lorcansmith | 0:2a53a4c3238c | 297 | * (fragments, not whole packets!). |
lorcansmith | 0:2a53a4c3238c | 298 | * This is only used with IP_FRAG_USES_STATIC_BUF==0 and |
lorcansmith | 0:2a53a4c3238c | 299 | * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs |
lorcansmith | 0:2a53a4c3238c | 300 | * where the packet is not yet sent when netif->output returns. |
lorcansmith | 0:2a53a4c3238c | 301 | */ |
lorcansmith | 0:2a53a4c3238c | 302 | #ifndef MEMP_NUM_FRAG_PBUF |
lorcansmith | 0:2a53a4c3238c | 303 | #define MEMP_NUM_FRAG_PBUF 15 |
lorcansmith | 0:2a53a4c3238c | 304 | #endif |
lorcansmith | 0:2a53a4c3238c | 305 | |
lorcansmith | 0:2a53a4c3238c | 306 | /** |
lorcansmith | 0:2a53a4c3238c | 307 | * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing |
lorcansmith | 0:2a53a4c3238c | 308 | * packets (pbufs) that are waiting for an ARP request (to resolve |
lorcansmith | 0:2a53a4c3238c | 309 | * their destination address) to finish. |
lorcansmith | 0:2a53a4c3238c | 310 | * (requires the ARP_QUEUEING option) |
lorcansmith | 0:2a53a4c3238c | 311 | */ |
lorcansmith | 0:2a53a4c3238c | 312 | #ifndef MEMP_NUM_ARP_QUEUE |
lorcansmith | 0:2a53a4c3238c | 313 | #define MEMP_NUM_ARP_QUEUE 30 |
lorcansmith | 0:2a53a4c3238c | 314 | #endif |
lorcansmith | 0:2a53a4c3238c | 315 | |
lorcansmith | 0:2a53a4c3238c | 316 | /** |
lorcansmith | 0:2a53a4c3238c | 317 | * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces |
lorcansmith | 0:2a53a4c3238c | 318 | * can be members et the same time (one per netif - allsystems group -, plus one |
lorcansmith | 0:2a53a4c3238c | 319 | * per netif membership). |
lorcansmith | 0:2a53a4c3238c | 320 | * (requires the LWIP_IGMP option) |
lorcansmith | 0:2a53a4c3238c | 321 | */ |
lorcansmith | 0:2a53a4c3238c | 322 | #ifndef MEMP_NUM_IGMP_GROUP |
lorcansmith | 0:2a53a4c3238c | 323 | #define MEMP_NUM_IGMP_GROUP 8 |
lorcansmith | 0:2a53a4c3238c | 324 | #endif |
lorcansmith | 0:2a53a4c3238c | 325 | |
lorcansmith | 0:2a53a4c3238c | 326 | /** |
lorcansmith | 0:2a53a4c3238c | 327 | * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. |
lorcansmith | 0:2a53a4c3238c | 328 | * (requires NO_SYS==0) |
lorcansmith | 0:2a53a4c3238c | 329 | */ |
lorcansmith | 0:2a53a4c3238c | 330 | #ifndef MEMP_NUM_SYS_TIMEOUT |
lorcansmith | 0:2a53a4c3238c | 331 | #define MEMP_NUM_SYS_TIMEOUT 3 |
lorcansmith | 0:2a53a4c3238c | 332 | #endif |
lorcansmith | 0:2a53a4c3238c | 333 | |
lorcansmith | 0:2a53a4c3238c | 334 | /** |
lorcansmith | 0:2a53a4c3238c | 335 | * MEMP_NUM_NETBUF: the number of struct netbufs. |
lorcansmith | 0:2a53a4c3238c | 336 | * (only needed if you use the sequential API, like api_lib.c) |
lorcansmith | 0:2a53a4c3238c | 337 | */ |
lorcansmith | 0:2a53a4c3238c | 338 | #ifndef MEMP_NUM_NETBUF |
lorcansmith | 0:2a53a4c3238c | 339 | #define MEMP_NUM_NETBUF 2 |
lorcansmith | 0:2a53a4c3238c | 340 | #endif |
lorcansmith | 0:2a53a4c3238c | 341 | |
lorcansmith | 0:2a53a4c3238c | 342 | /** |
lorcansmith | 0:2a53a4c3238c | 343 | * MEMP_NUM_NETCONN: the number of struct netconns. |
lorcansmith | 0:2a53a4c3238c | 344 | * (only needed if you use the sequential API, like api_lib.c) |
lorcansmith | 0:2a53a4c3238c | 345 | */ |
lorcansmith | 0:2a53a4c3238c | 346 | #ifndef MEMP_NUM_NETCONN |
lorcansmith | 0:2a53a4c3238c | 347 | #define MEMP_NUM_NETCONN 4 |
lorcansmith | 0:2a53a4c3238c | 348 | #endif |
lorcansmith | 0:2a53a4c3238c | 349 | |
lorcansmith | 0:2a53a4c3238c | 350 | /** |
lorcansmith | 0:2a53a4c3238c | 351 | * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used |
lorcansmith | 0:2a53a4c3238c | 352 | * for callback/timeout API communication. |
lorcansmith | 0:2a53a4c3238c | 353 | * (only needed if you use tcpip.c) |
lorcansmith | 0:2a53a4c3238c | 354 | */ |
lorcansmith | 0:2a53a4c3238c | 355 | #ifndef MEMP_NUM_TCPIP_MSG_API |
lorcansmith | 0:2a53a4c3238c | 356 | #define MEMP_NUM_TCPIP_MSG_API 8 |
lorcansmith | 0:2a53a4c3238c | 357 | #endif |
lorcansmith | 0:2a53a4c3238c | 358 | |
lorcansmith | 0:2a53a4c3238c | 359 | /** |
lorcansmith | 0:2a53a4c3238c | 360 | * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used |
lorcansmith | 0:2a53a4c3238c | 361 | * for incoming packets. |
lorcansmith | 0:2a53a4c3238c | 362 | * (only needed if you use tcpip.c) |
lorcansmith | 0:2a53a4c3238c | 363 | */ |
lorcansmith | 0:2a53a4c3238c | 364 | #ifndef MEMP_NUM_TCPIP_MSG_INPKT |
lorcansmith | 0:2a53a4c3238c | 365 | #define MEMP_NUM_TCPIP_MSG_INPKT 8 |
lorcansmith | 0:2a53a4c3238c | 366 | #endif |
lorcansmith | 0:2a53a4c3238c | 367 | |
lorcansmith | 0:2a53a4c3238c | 368 | /** v0.5 LS decrease from 100 |
lorcansmith | 0:2a53a4c3238c | 369 | * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree. |
lorcansmith | 0:2a53a4c3238c | 370 | */ |
lorcansmith | 0:2a53a4c3238c | 371 | #ifndef MEMP_NUM_SNMP_NODE |
lorcansmith | 0:2a53a4c3238c | 372 | #define MEMP_NUM_SNMP_NODE 50 |
lorcansmith | 0:2a53a4c3238c | 373 | #endif |
lorcansmith | 0:2a53a4c3238c | 374 | |
lorcansmith | 0:2a53a4c3238c | 375 | /** v0.5 LS decrease from 60 |
lorcansmith | 0:2a53a4c3238c | 376 | * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree. |
lorcansmith | 0:2a53a4c3238c | 377 | * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least! |
lorcansmith | 0:2a53a4c3238c | 378 | */ |
lorcansmith | 0:2a53a4c3238c | 379 | #ifndef MEMP_NUM_SNMP_ROOTNODE |
lorcansmith | 0:2a53a4c3238c | 380 | #define MEMP_NUM_SNMP_ROOTNODE 30 |
lorcansmith | 0:2a53a4c3238c | 381 | #endif |
lorcansmith | 0:2a53a4c3238c | 382 | |
lorcansmith | 0:2a53a4c3238c | 383 | /** v0.1 LS increase from 2 |
lorcansmith | 0:2a53a4c3238c | 384 | * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to |
lorcansmith | 0:2a53a4c3238c | 385 | * be changed normally) - 2 of these are used per request (1 for input, |
lorcansmith | 0:2a53a4c3238c | 386 | * 1 for output) |
lorcansmith | 0:2a53a4c3238c | 387 | */ |
lorcansmith | 0:2a53a4c3238c | 388 | #ifndef MEMP_NUM_SNMP_VARBIND |
lorcansmith | 0:2a53a4c3238c | 389 | #define MEMP_NUM_SNMP_VARBIND 16 |
lorcansmith | 0:2a53a4c3238c | 390 | #endif |
lorcansmith | 0:2a53a4c3238c | 391 | |
lorcansmith | 0:2a53a4c3238c | 392 | /** v0.1 LS increased from 3 |
lorcansmith | 0:2a53a4c3238c | 393 | * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used |
lorcansmith | 0:2a53a4c3238c | 394 | * (does not have to be changed normally) - 3 of these are used per request |
lorcansmith | 0:2a53a4c3238c | 395 | * (1 for the value read and 2 for OIDs - input and output) |
lorcansmith | 0:2a53a4c3238c | 396 | */ |
lorcansmith | 0:2a53a4c3238c | 397 | #ifndef MEMP_NUM_SNMP_VALUE |
lorcansmith | 0:2a53a4c3238c | 398 | #define MEMP_NUM_SNMP_VALUE 18 |
lorcansmith | 0:2a53a4c3238c | 399 | #endif |
lorcansmith | 0:2a53a4c3238c | 400 | |
lorcansmith | 0:2a53a4c3238c | 401 | /** |
lorcansmith | 0:2a53a4c3238c | 402 | * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls |
lorcansmith | 0:2a53a4c3238c | 403 | * (before freeing the corresponding memory using lwip_freeaddrinfo()). |
lorcansmith | 0:2a53a4c3238c | 404 | */ |
lorcansmith | 0:2a53a4c3238c | 405 | #ifndef MEMP_NUM_NETDB |
lorcansmith | 0:2a53a4c3238c | 406 | #define MEMP_NUM_NETDB 1 |
lorcansmith | 0:2a53a4c3238c | 407 | #endif |
lorcansmith | 0:2a53a4c3238c | 408 | |
lorcansmith | 0:2a53a4c3238c | 409 | /** |
lorcansmith | 0:2a53a4c3238c | 410 | * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list |
lorcansmith | 0:2a53a4c3238c | 411 | * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. |
lorcansmith | 0:2a53a4c3238c | 412 | */ |
lorcansmith | 0:2a53a4c3238c | 413 | #ifndef MEMP_NUM_LOCALHOSTLIST |
lorcansmith | 0:2a53a4c3238c | 414 | #define MEMP_NUM_LOCALHOSTLIST 1 |
lorcansmith | 0:2a53a4c3238c | 415 | #endif |
lorcansmith | 0:2a53a4c3238c | 416 | |
lorcansmith | 0:2a53a4c3238c | 417 | /** |
lorcansmith | 0:2a53a4c3238c | 418 | * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE |
lorcansmith | 0:2a53a4c3238c | 419 | * interfaces (only used with PPPOE_SUPPORT==1) |
lorcansmith | 0:2a53a4c3238c | 420 | */ |
lorcansmith | 0:2a53a4c3238c | 421 | #ifndef MEMP_NUM_PPPOE_INTERFACES |
lorcansmith | 0:2a53a4c3238c | 422 | #define MEMP_NUM_PPPOE_INTERFACES 1 |
lorcansmith | 0:2a53a4c3238c | 423 | #endif |
lorcansmith | 0:2a53a4c3238c | 424 | |
lorcansmith | 0:2a53a4c3238c | 425 | /** |
lorcansmith | 0:2a53a4c3238c | 426 | * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. |
lorcansmith | 0:2a53a4c3238c | 427 | */ |
lorcansmith | 0:2a53a4c3238c | 428 | #ifndef PBUF_POOL_SIZE |
lorcansmith | 0:2a53a4c3238c | 429 | #define PBUF_POOL_SIZE 16 |
lorcansmith | 0:2a53a4c3238c | 430 | #endif |
lorcansmith | 0:2a53a4c3238c | 431 | |
lorcansmith | 0:2a53a4c3238c | 432 | /* |
lorcansmith | 0:2a53a4c3238c | 433 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 434 | ---------- ARP options ---------- |
lorcansmith | 0:2a53a4c3238c | 435 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 436 | */ |
lorcansmith | 0:2a53a4c3238c | 437 | /** |
lorcansmith | 0:2a53a4c3238c | 438 | * LWIP_ARP==1: Enable ARP functionality. |
lorcansmith | 0:2a53a4c3238c | 439 | */ |
lorcansmith | 0:2a53a4c3238c | 440 | #ifndef LWIP_ARP |
lorcansmith | 0:2a53a4c3238c | 441 | #define LWIP_ARP 1 |
lorcansmith | 0:2a53a4c3238c | 442 | #endif |
lorcansmith | 0:2a53a4c3238c | 443 | |
lorcansmith | 0:2a53a4c3238c | 444 | /** |
lorcansmith | 0:2a53a4c3238c | 445 | * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. |
lorcansmith | 0:2a53a4c3238c | 446 | */ |
lorcansmith | 0:2a53a4c3238c | 447 | #ifndef ARP_TABLE_SIZE |
lorcansmith | 0:2a53a4c3238c | 448 | #define ARP_TABLE_SIZE 10 |
lorcansmith | 0:2a53a4c3238c | 449 | #endif |
lorcansmith | 0:2a53a4c3238c | 450 | |
lorcansmith | 0:2a53a4c3238c | 451 | /** |
lorcansmith | 0:2a53a4c3238c | 452 | * ARP_QUEUEING==1: Outgoing packets are queued during hardware address |
lorcansmith | 0:2a53a4c3238c | 453 | * resolution. |
lorcansmith | 0:2a53a4c3238c | 454 | */ |
lorcansmith | 0:2a53a4c3238c | 455 | #ifndef ARP_QUEUEING |
lorcansmith | 0:2a53a4c3238c | 456 | #define ARP_QUEUEING 1 |
lorcansmith | 0:2a53a4c3238c | 457 | #endif |
lorcansmith | 0:2a53a4c3238c | 458 | |
lorcansmith | 0:2a53a4c3238c | 459 | /** |
lorcansmith | 0:2a53a4c3238c | 460 | * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be |
lorcansmith | 0:2a53a4c3238c | 461 | * updated with the source MAC and IP addresses supplied in the packet. |
lorcansmith | 0:2a53a4c3238c | 462 | * You may want to disable this if you do not trust LAN peers to have the |
lorcansmith | 0:2a53a4c3238c | 463 | * correct addresses, or as a limited approach to attempt to handle |
lorcansmith | 0:2a53a4c3238c | 464 | * spoofing. If disabled, lwIP will need to make a new ARP request if |
lorcansmith | 0:2a53a4c3238c | 465 | * the peer is not already in the ARP table, adding a little latency. |
lorcansmith | 0:2a53a4c3238c | 466 | * The peer *is* in the ARP table if it requested our address before. |
lorcansmith | 0:2a53a4c3238c | 467 | * Also notice that this slows down input processing of every IP packet! |
lorcansmith | 0:2a53a4c3238c | 468 | */ |
lorcansmith | 0:2a53a4c3238c | 469 | #ifndef ETHARP_TRUST_IP_MAC |
lorcansmith | 0:2a53a4c3238c | 470 | #define ETHARP_TRUST_IP_MAC 0 |
lorcansmith | 0:2a53a4c3238c | 471 | #endif |
lorcansmith | 0:2a53a4c3238c | 472 | |
lorcansmith | 0:2a53a4c3238c | 473 | /** |
lorcansmith | 0:2a53a4c3238c | 474 | * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header. |
lorcansmith | 0:2a53a4c3238c | 475 | * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. |
lorcansmith | 0:2a53a4c3238c | 476 | * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. |
lorcansmith | 0:2a53a4c3238c | 477 | * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. |
lorcansmith | 0:2a53a4c3238c | 478 | */ |
lorcansmith | 0:2a53a4c3238c | 479 | #ifndef ETHARP_SUPPORT_VLAN |
lorcansmith | 0:2a53a4c3238c | 480 | #define ETHARP_SUPPORT_VLAN 0 |
lorcansmith | 0:2a53a4c3238c | 481 | #endif |
lorcansmith | 0:2a53a4c3238c | 482 | |
lorcansmith | 0:2a53a4c3238c | 483 | /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP |
lorcansmith | 0:2a53a4c3238c | 484 | * might be disabled |
lorcansmith | 0:2a53a4c3238c | 485 | */ |
lorcansmith | 0:2a53a4c3238c | 486 | #ifndef LWIP_ETHERNET |
lorcansmith | 0:2a53a4c3238c | 487 | #define LWIP_ETHERNET (LWIP_ARP || PPPOE_SUPPORT) |
lorcansmith | 0:2a53a4c3238c | 488 | #endif |
lorcansmith | 0:2a53a4c3238c | 489 | |
lorcansmith | 0:2a53a4c3238c | 490 | /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure |
lorcansmith | 0:2a53a4c3238c | 491 | * alignment of payload after that header. Since the header is 14 bytes long, |
lorcansmith | 0:2a53a4c3238c | 492 | * without this padding e.g. addresses in the IP header will not be aligned |
lorcansmith | 0:2a53a4c3238c | 493 | * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. |
lorcansmith | 0:2a53a4c3238c | 494 | */ |
lorcansmith | 0:2a53a4c3238c | 495 | #ifndef ETH_PAD_SIZE |
lorcansmith | 0:2a53a4c3238c | 496 | #define ETH_PAD_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 497 | #endif |
lorcansmith | 0:2a53a4c3238c | 498 | |
lorcansmith | 0:2a53a4c3238c | 499 | /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table |
lorcansmith | 0:2a53a4c3238c | 500 | * entries (using etharp_add_static_entry/etharp_remove_static_entry). |
lorcansmith | 0:2a53a4c3238c | 501 | */ |
lorcansmith | 0:2a53a4c3238c | 502 | #ifndef ETHARP_SUPPORT_STATIC_ENTRIES |
lorcansmith | 0:2a53a4c3238c | 503 | #define ETHARP_SUPPORT_STATIC_ENTRIES 0 |
lorcansmith | 0:2a53a4c3238c | 504 | #endif |
lorcansmith | 0:2a53a4c3238c | 505 | |
lorcansmith | 0:2a53a4c3238c | 506 | |
lorcansmith | 0:2a53a4c3238c | 507 | /* |
lorcansmith | 0:2a53a4c3238c | 508 | -------------------------------- |
lorcansmith | 0:2a53a4c3238c | 509 | ---------- IP options ---------- |
lorcansmith | 0:2a53a4c3238c | 510 | -------------------------------- |
lorcansmith | 0:2a53a4c3238c | 511 | */ |
lorcansmith | 0:2a53a4c3238c | 512 | /** |
lorcansmith | 0:2a53a4c3238c | 513 | * IP_FORWARD==1: Enables the ability to forward IP packets across network |
lorcansmith | 0:2a53a4c3238c | 514 | * interfaces. If you are going to run lwIP on a device with only one network |
lorcansmith | 0:2a53a4c3238c | 515 | * interface, define this to 0. |
lorcansmith | 0:2a53a4c3238c | 516 | */ |
lorcansmith | 0:2a53a4c3238c | 517 | #ifndef IP_FORWARD |
lorcansmith | 0:2a53a4c3238c | 518 | #define IP_FORWARD 0 |
lorcansmith | 0:2a53a4c3238c | 519 | #endif |
lorcansmith | 0:2a53a4c3238c | 520 | |
lorcansmith | 0:2a53a4c3238c | 521 | /** |
lorcansmith | 0:2a53a4c3238c | 522 | * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. |
lorcansmith | 0:2a53a4c3238c | 523 | * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. |
lorcansmith | 0:2a53a4c3238c | 524 | * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). |
lorcansmith | 0:2a53a4c3238c | 525 | */ |
lorcansmith | 0:2a53a4c3238c | 526 | #ifndef IP_OPTIONS_ALLOWED |
lorcansmith | 0:2a53a4c3238c | 527 | #define IP_OPTIONS_ALLOWED 1 |
lorcansmith | 0:2a53a4c3238c | 528 | #endif |
lorcansmith | 0:2a53a4c3238c | 529 | |
lorcansmith | 0:2a53a4c3238c | 530 | /** |
lorcansmith | 0:2a53a4c3238c | 531 | * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that |
lorcansmith | 0:2a53a4c3238c | 532 | * this option does not affect outgoing packet sizes, which can be controlled |
lorcansmith | 0:2a53a4c3238c | 533 | * via IP_FRAG. |
lorcansmith | 0:2a53a4c3238c | 534 | */ |
lorcansmith | 0:2a53a4c3238c | 535 | #ifndef IP_REASSEMBLY |
lorcansmith | 0:2a53a4c3238c | 536 | #define IP_REASSEMBLY 1 |
lorcansmith | 0:2a53a4c3238c | 537 | #endif |
lorcansmith | 0:2a53a4c3238c | 538 | |
lorcansmith | 0:2a53a4c3238c | 539 | /** |
lorcansmith | 0:2a53a4c3238c | 540 | * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note |
lorcansmith | 0:2a53a4c3238c | 541 | * that this option does not affect incoming packet sizes, which can be |
lorcansmith | 0:2a53a4c3238c | 542 | * controlled via IP_REASSEMBLY. |
lorcansmith | 0:2a53a4c3238c | 543 | */ |
lorcansmith | 0:2a53a4c3238c | 544 | #ifndef IP_FRAG |
lorcansmith | 0:2a53a4c3238c | 545 | #define IP_FRAG 1 |
lorcansmith | 0:2a53a4c3238c | 546 | #endif |
lorcansmith | 0:2a53a4c3238c | 547 | |
lorcansmith | 0:2a53a4c3238c | 548 | /** |
lorcansmith | 0:2a53a4c3238c | 549 | * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) |
lorcansmith | 0:2a53a4c3238c | 550 | * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived |
lorcansmith | 0:2a53a4c3238c | 551 | * in this time, the whole packet is discarded. |
lorcansmith | 0:2a53a4c3238c | 552 | */ |
lorcansmith | 0:2a53a4c3238c | 553 | #ifndef IP_REASS_MAXAGE |
lorcansmith | 0:2a53a4c3238c | 554 | #define IP_REASS_MAXAGE 3 |
lorcansmith | 0:2a53a4c3238c | 555 | #endif |
lorcansmith | 0:2a53a4c3238c | 556 | |
lorcansmith | 0:2a53a4c3238c | 557 | /** |
lorcansmith | 0:2a53a4c3238c | 558 | * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. |
lorcansmith | 0:2a53a4c3238c | 559 | * Since the received pbufs are enqueued, be sure to configure |
lorcansmith | 0:2a53a4c3238c | 560 | * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive |
lorcansmith | 0:2a53a4c3238c | 561 | * packets even if the maximum amount of fragments is enqueued for reassembly! |
lorcansmith | 0:2a53a4c3238c | 562 | */ |
lorcansmith | 0:2a53a4c3238c | 563 | #ifndef IP_REASS_MAX_PBUFS |
lorcansmith | 0:2a53a4c3238c | 564 | #define IP_REASS_MAX_PBUFS 10 |
lorcansmith | 0:2a53a4c3238c | 565 | #endif |
lorcansmith | 0:2a53a4c3238c | 566 | |
lorcansmith | 0:2a53a4c3238c | 567 | /** |
lorcansmith | 0:2a53a4c3238c | 568 | * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP |
lorcansmith | 0:2a53a4c3238c | 569 | * fragmentation. Otherwise pbufs are allocated and reference the original |
lorcansmith | 0:2a53a4c3238c | 570 | * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1, |
lorcansmith | 0:2a53a4c3238c | 571 | * new PBUF_RAM pbufs are used for fragments). |
lorcansmith | 0:2a53a4c3238c | 572 | * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! |
lorcansmith | 0:2a53a4c3238c | 573 | */ |
lorcansmith | 0:2a53a4c3238c | 574 | #ifndef IP_FRAG_USES_STATIC_BUF |
lorcansmith | 0:2a53a4c3238c | 575 | #define IP_FRAG_USES_STATIC_BUF 0 |
lorcansmith | 0:2a53a4c3238c | 576 | #endif |
lorcansmith | 0:2a53a4c3238c | 577 | |
lorcansmith | 0:2a53a4c3238c | 578 | /** |
lorcansmith | 0:2a53a4c3238c | 579 | * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer |
lorcansmith | 0:2a53a4c3238c | 580 | * (requires IP_FRAG_USES_STATIC_BUF==1) |
lorcansmith | 0:2a53a4c3238c | 581 | */ |
lorcansmith | 0:2a53a4c3238c | 582 | #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) |
lorcansmith | 0:2a53a4c3238c | 583 | #define IP_FRAG_MAX_MTU 1500 |
lorcansmith | 0:2a53a4c3238c | 584 | #endif |
lorcansmith | 0:2a53a4c3238c | 585 | |
lorcansmith | 0:2a53a4c3238c | 586 | /** |
lorcansmith | 0:2a53a4c3238c | 587 | * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. |
lorcansmith | 0:2a53a4c3238c | 588 | */ |
lorcansmith | 0:2a53a4c3238c | 589 | #ifndef IP_DEFAULT_TTL |
lorcansmith | 0:2a53a4c3238c | 590 | #define IP_DEFAULT_TTL 255 |
lorcansmith | 0:2a53a4c3238c | 591 | #endif |
lorcansmith | 0:2a53a4c3238c | 592 | |
lorcansmith | 0:2a53a4c3238c | 593 | /** |
lorcansmith | 0:2a53a4c3238c | 594 | * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast |
lorcansmith | 0:2a53a4c3238c | 595 | * filter per pcb on udp and raw send operations. To enable broadcast filter |
lorcansmith | 0:2a53a4c3238c | 596 | * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. |
lorcansmith | 0:2a53a4c3238c | 597 | */ |
lorcansmith | 0:2a53a4c3238c | 598 | #ifndef IP_SOF_BROADCAST |
lorcansmith | 0:2a53a4c3238c | 599 | #define IP_SOF_BROADCAST 0 |
lorcansmith | 0:2a53a4c3238c | 600 | #endif |
lorcansmith | 0:2a53a4c3238c | 601 | |
lorcansmith | 0:2a53a4c3238c | 602 | /** |
lorcansmith | 0:2a53a4c3238c | 603 | * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast |
lorcansmith | 0:2a53a4c3238c | 604 | * filter on recv operations. |
lorcansmith | 0:2a53a4c3238c | 605 | */ |
lorcansmith | 0:2a53a4c3238c | 606 | #ifndef IP_SOF_BROADCAST_RECV |
lorcansmith | 0:2a53a4c3238c | 607 | #define IP_SOF_BROADCAST_RECV 0 |
lorcansmith | 0:2a53a4c3238c | 608 | #endif |
lorcansmith | 0:2a53a4c3238c | 609 | |
lorcansmith | 0:2a53a4c3238c | 610 | /* |
lorcansmith | 0:2a53a4c3238c | 611 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 612 | ---------- ICMP options ---------- |
lorcansmith | 0:2a53a4c3238c | 613 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 614 | */ |
lorcansmith | 0:2a53a4c3238c | 615 | /** |
lorcansmith | 0:2a53a4c3238c | 616 | * LWIP_ICMP==1: Enable ICMP module inside the IP stack. |
lorcansmith | 0:2a53a4c3238c | 617 | * Be careful, disable that make your product non-compliant to RFC1122 |
lorcansmith | 0:2a53a4c3238c | 618 | */ |
lorcansmith | 0:2a53a4c3238c | 619 | #ifndef LWIP_ICMP |
lorcansmith | 0:2a53a4c3238c | 620 | #define LWIP_ICMP 1 |
lorcansmith | 0:2a53a4c3238c | 621 | #endif |
lorcansmith | 0:2a53a4c3238c | 622 | |
lorcansmith | 0:2a53a4c3238c | 623 | /** |
lorcansmith | 0:2a53a4c3238c | 624 | * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. |
lorcansmith | 0:2a53a4c3238c | 625 | */ |
lorcansmith | 0:2a53a4c3238c | 626 | #ifndef ICMP_TTL |
lorcansmith | 0:2a53a4c3238c | 627 | #define ICMP_TTL (IP_DEFAULT_TTL) |
lorcansmith | 0:2a53a4c3238c | 628 | #endif |
lorcansmith | 0:2a53a4c3238c | 629 | |
lorcansmith | 0:2a53a4c3238c | 630 | /** |
lorcansmith | 0:2a53a4c3238c | 631 | * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) |
lorcansmith | 0:2a53a4c3238c | 632 | */ |
lorcansmith | 0:2a53a4c3238c | 633 | #ifndef LWIP_BROADCAST_PING |
lorcansmith | 0:2a53a4c3238c | 634 | #define LWIP_BROADCAST_PING 0 |
lorcansmith | 0:2a53a4c3238c | 635 | #endif |
lorcansmith | 0:2a53a4c3238c | 636 | |
lorcansmith | 0:2a53a4c3238c | 637 | /** |
lorcansmith | 0:2a53a4c3238c | 638 | * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) |
lorcansmith | 0:2a53a4c3238c | 639 | */ |
lorcansmith | 0:2a53a4c3238c | 640 | #ifndef LWIP_MULTICAST_PING |
lorcansmith | 0:2a53a4c3238c | 641 | #define LWIP_MULTICAST_PING 0 |
lorcansmith | 0:2a53a4c3238c | 642 | #endif |
lorcansmith | 0:2a53a4c3238c | 643 | |
lorcansmith | 0:2a53a4c3238c | 644 | /* |
lorcansmith | 0:2a53a4c3238c | 645 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 646 | ---------- RAW options ---------- |
lorcansmith | 0:2a53a4c3238c | 647 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 648 | */ |
lorcansmith | 0:2a53a4c3238c | 649 | /** |
lorcansmith | 0:2a53a4c3238c | 650 | * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. |
lorcansmith | 0:2a53a4c3238c | 651 | */ |
lorcansmith | 0:2a53a4c3238c | 652 | #ifndef LWIP_RAW |
lorcansmith | 0:2a53a4c3238c | 653 | #define LWIP_RAW 1 |
lorcansmith | 0:2a53a4c3238c | 654 | #endif |
lorcansmith | 0:2a53a4c3238c | 655 | |
lorcansmith | 0:2a53a4c3238c | 656 | /** |
lorcansmith | 0:2a53a4c3238c | 657 | * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. |
lorcansmith | 0:2a53a4c3238c | 658 | */ |
lorcansmith | 0:2a53a4c3238c | 659 | #ifndef RAW_TTL |
lorcansmith | 0:2a53a4c3238c | 660 | #define RAW_TTL (IP_DEFAULT_TTL) |
lorcansmith | 0:2a53a4c3238c | 661 | #endif |
lorcansmith | 0:2a53a4c3238c | 662 | |
lorcansmith | 0:2a53a4c3238c | 663 | /* |
lorcansmith | 0:2a53a4c3238c | 664 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 665 | ---------- DHCP options ---------- |
lorcansmith | 0:2a53a4c3238c | 666 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 667 | */ |
lorcansmith | 0:2a53a4c3238c | 668 | /** |
lorcansmith | 0:2a53a4c3238c | 669 | * LWIP_DHCP==1: Enable DHCP module. |
lorcansmith | 0:2a53a4c3238c | 670 | */ |
lorcansmith | 0:2a53a4c3238c | 671 | #ifndef LWIP_DHCP |
lorcansmith | 0:2a53a4c3238c | 672 | #define LWIP_DHCP 0 |
lorcansmith | 0:2a53a4c3238c | 673 | #endif |
lorcansmith | 0:2a53a4c3238c | 674 | |
lorcansmith | 0:2a53a4c3238c | 675 | /** |
lorcansmith | 0:2a53a4c3238c | 676 | * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. |
lorcansmith | 0:2a53a4c3238c | 677 | */ |
lorcansmith | 0:2a53a4c3238c | 678 | #ifndef DHCP_DOES_ARP_CHECK |
lorcansmith | 0:2a53a4c3238c | 679 | #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) |
lorcansmith | 0:2a53a4c3238c | 680 | #endif |
lorcansmith | 0:2a53a4c3238c | 681 | |
lorcansmith | 0:2a53a4c3238c | 682 | /* |
lorcansmith | 0:2a53a4c3238c | 683 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 684 | ---------- AUTOIP options ---------- |
lorcansmith | 0:2a53a4c3238c | 685 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 686 | */ |
lorcansmith | 0:2a53a4c3238c | 687 | /** |
lorcansmith | 0:2a53a4c3238c | 688 | * LWIP_AUTOIP==1: Enable AUTOIP module. |
lorcansmith | 0:2a53a4c3238c | 689 | */ |
lorcansmith | 0:2a53a4c3238c | 690 | #ifndef LWIP_AUTOIP |
lorcansmith | 0:2a53a4c3238c | 691 | #define LWIP_AUTOIP 0 |
lorcansmith | 0:2a53a4c3238c | 692 | #endif |
lorcansmith | 0:2a53a4c3238c | 693 | |
lorcansmith | 0:2a53a4c3238c | 694 | /** |
lorcansmith | 0:2a53a4c3238c | 695 | * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on |
lorcansmith | 0:2a53a4c3238c | 696 | * the same interface at the same time. |
lorcansmith | 0:2a53a4c3238c | 697 | */ |
lorcansmith | 0:2a53a4c3238c | 698 | #ifndef LWIP_DHCP_AUTOIP_COOP |
lorcansmith | 0:2a53a4c3238c | 699 | #define LWIP_DHCP_AUTOIP_COOP 0 |
lorcansmith | 0:2a53a4c3238c | 700 | #endif |
lorcansmith | 0:2a53a4c3238c | 701 | |
lorcansmith | 0:2a53a4c3238c | 702 | /** |
lorcansmith | 0:2a53a4c3238c | 703 | * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes |
lorcansmith | 0:2a53a4c3238c | 704 | * that should be sent before falling back on AUTOIP. This can be set |
lorcansmith | 0:2a53a4c3238c | 705 | * as low as 1 to get an AutoIP address very quickly, but you should |
lorcansmith | 0:2a53a4c3238c | 706 | * be prepared to handle a changing IP address when DHCP overrides |
lorcansmith | 0:2a53a4c3238c | 707 | * AutoIP. |
lorcansmith | 0:2a53a4c3238c | 708 | */ |
lorcansmith | 0:2a53a4c3238c | 709 | #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES |
lorcansmith | 0:2a53a4c3238c | 710 | #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 |
lorcansmith | 0:2a53a4c3238c | 711 | #endif |
lorcansmith | 0:2a53a4c3238c | 712 | |
lorcansmith | 0:2a53a4c3238c | 713 | /* |
lorcansmith | 0:2a53a4c3238c | 714 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 715 | ---------- SNMP options ---------- |
lorcansmith | 0:2a53a4c3238c | 716 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 717 | */ |
lorcansmith | 0:2a53a4c3238c | 718 | /** |
lorcansmith | 0:2a53a4c3238c | 719 | * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP |
lorcansmith | 0:2a53a4c3238c | 720 | * transport. |
lorcansmith | 0:2a53a4c3238c | 721 | */ |
lorcansmith | 0:2a53a4c3238c | 722 | #ifndef LWIP_SNMP |
lorcansmith | 0:2a53a4c3238c | 723 | #define LWIP_SNMP 1 |
lorcansmith | 0:2a53a4c3238c | 724 | #endif |
lorcansmith | 0:2a53a4c3238c | 725 | |
lorcansmith | 0:2a53a4c3238c | 726 | /** v0.1 LS increased from 1 |
lorcansmith | 0:2a53a4c3238c | 727 | * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will |
lorcansmith | 0:2a53a4c3238c | 728 | * allow. At least one request buffer is required. |
lorcansmith | 0:2a53a4c3238c | 729 | * Does not have to be changed unless external MIBs answer request asynchronously |
lorcansmith | 0:2a53a4c3238c | 730 | */ |
lorcansmith | 0:2a53a4c3238c | 731 | #ifndef SNMP_CONCURRENT_REQUESTS |
lorcansmith | 0:2a53a4c3238c | 732 | #define SNMP_CONCURRENT_REQUESTS 2 |
lorcansmith | 0:2a53a4c3238c | 733 | #endif |
lorcansmith | 0:2a53a4c3238c | 734 | |
lorcansmith | 0:2a53a4c3238c | 735 | /** v0.4 LS reset to original setting (1) |
lorcansmith | 0:2a53a4c3238c | 736 | * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap |
lorcansmith | 0:2a53a4c3238c | 737 | * destination is required |
lorcansmith | 0:2a53a4c3238c | 738 | */ |
lorcansmith | 0:2a53a4c3238c | 739 | #ifndef SNMP_TRAP_DESTINATIONS |
lorcansmith | 0:2a53a4c3238c | 740 | #define SNMP_TRAP_DESTINATIONS 1 |
lorcansmith | 0:2a53a4c3238c | 741 | #endif |
lorcansmith | 0:2a53a4c3238c | 742 | |
lorcansmith | 0:2a53a4c3238c | 743 | /** v0.2: LS includes private_mib.h |
lorcansmith | 0:2a53a4c3238c | 744 | * SNMP_PRIVATE_MIB: |
lorcansmith | 0:2a53a4c3238c | 745 | * When using a private MIB, you have to create a file 'private_mib.h' that contains |
lorcansmith | 0:2a53a4c3238c | 746 | * a 'struct mib_array_node mib_private' which contains your MIB. |
lorcansmith | 0:2a53a4c3238c | 747 | */ |
lorcansmith | 0:2a53a4c3238c | 748 | #ifndef SNMP_PRIVATE_MIB |
lorcansmith | 0:2a53a4c3238c | 749 | #define SNMP_PRIVATE_MIB 1 |
lorcansmith | 0:2a53a4c3238c | 750 | #endif |
lorcansmith | 0:2a53a4c3238c | 751 | |
lorcansmith | 0:2a53a4c3238c | 752 | /** |
lorcansmith | 0:2a53a4c3238c | 753 | * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not |
lorcansmith | 0:2a53a4c3238c | 754 | * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). |
lorcansmith | 0:2a53a4c3238c | 755 | * Unsafe requests are disabled by default! |
lorcansmith | 0:2a53a4c3238c | 756 | */ |
lorcansmith | 0:2a53a4c3238c | 757 | #ifndef SNMP_SAFE_REQUESTS |
lorcansmith | 0:2a53a4c3238c | 758 | #define SNMP_SAFE_REQUESTS 1 |
lorcansmith | 0:2a53a4c3238c | 759 | #endif |
lorcansmith | 0:2a53a4c3238c | 760 | |
lorcansmith | 0:2a53a4c3238c | 761 | /** v0.1 LS increased from 127 |
lorcansmith | 0:2a53a4c3238c | 762 | * The maximum length of strings used. This affects the size of |
lorcansmith | 0:2a53a4c3238c | 763 | * MEMP_SNMP_VALUE elements. |
lorcansmith | 0:2a53a4c3238c | 764 | */ |
lorcansmith | 0:2a53a4c3238c | 765 | #ifndef SNMP_MAX_OCTET_STRING_LEN |
lorcansmith | 0:2a53a4c3238c | 766 | #define SNMP_MAX_OCTET_STRING_LEN 255 |
lorcansmith | 0:2a53a4c3238c | 767 | #endif |
lorcansmith | 0:2a53a4c3238c | 768 | |
lorcansmith | 0:2a53a4c3238c | 769 | /** |
lorcansmith | 0:2a53a4c3238c | 770 | * The maximum depth of the SNMP tree. |
lorcansmith | 0:2a53a4c3238c | 771 | * With private MIBs enabled, this depends on your MIB! |
lorcansmith | 0:2a53a4c3238c | 772 | * This affects the size of MEMP_SNMP_VALUE elements. |
lorcansmith | 0:2a53a4c3238c | 773 | */ |
lorcansmith | 0:2a53a4c3238c | 774 | #ifndef SNMP_MAX_TREE_DEPTH |
lorcansmith | 0:2a53a4c3238c | 775 | #define SNMP_MAX_TREE_DEPTH 15 |
lorcansmith | 0:2a53a4c3238c | 776 | #endif |
lorcansmith | 0:2a53a4c3238c | 777 | |
lorcansmith | 0:2a53a4c3238c | 778 | /** |
lorcansmith | 0:2a53a4c3238c | 779 | * The size of the MEMP_SNMP_VALUE elements, normally calculated from |
lorcansmith | 0:2a53a4c3238c | 780 | * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH. |
lorcansmith | 0:2a53a4c3238c | 781 | */ |
lorcansmith | 0:2a53a4c3238c | 782 | #ifndef SNMP_MAX_VALUE_SIZE |
lorcansmith | 0:2a53a4c3238c | 783 | #define SNMP_MAX_VALUE_SIZE LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH)) |
lorcansmith | 0:2a53a4c3238c | 784 | #endif |
lorcansmith | 0:2a53a4c3238c | 785 | |
lorcansmith | 0:2a53a4c3238c | 786 | /* |
lorcansmith | 0:2a53a4c3238c | 787 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 788 | ---------- IGMP options ---------- |
lorcansmith | 0:2a53a4c3238c | 789 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 790 | */ |
lorcansmith | 0:2a53a4c3238c | 791 | /** |
lorcansmith | 0:2a53a4c3238c | 792 | * LWIP_IGMP==1: Turn on IGMP module. |
lorcansmith | 0:2a53a4c3238c | 793 | */ |
lorcansmith | 0:2a53a4c3238c | 794 | #ifndef LWIP_IGMP |
lorcansmith | 0:2a53a4c3238c | 795 | #define LWIP_IGMP 0 |
lorcansmith | 0:2a53a4c3238c | 796 | #endif |
lorcansmith | 0:2a53a4c3238c | 797 | |
lorcansmith | 0:2a53a4c3238c | 798 | /* |
lorcansmith | 0:2a53a4c3238c | 799 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 800 | ---------- DNS options ----------- |
lorcansmith | 0:2a53a4c3238c | 801 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 802 | */ |
lorcansmith | 0:2a53a4c3238c | 803 | /** |
lorcansmith | 0:2a53a4c3238c | 804 | * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS |
lorcansmith | 0:2a53a4c3238c | 805 | * transport. |
lorcansmith | 0:2a53a4c3238c | 806 | */ |
lorcansmith | 0:2a53a4c3238c | 807 | #ifndef LWIP_DNS |
lorcansmith | 0:2a53a4c3238c | 808 | #define LWIP_DNS 0 |
lorcansmith | 0:2a53a4c3238c | 809 | #endif |
lorcansmith | 0:2a53a4c3238c | 810 | |
lorcansmith | 0:2a53a4c3238c | 811 | /** DNS maximum number of entries to maintain locally. */ |
lorcansmith | 0:2a53a4c3238c | 812 | #ifndef DNS_TABLE_SIZE |
lorcansmith | 0:2a53a4c3238c | 813 | #define DNS_TABLE_SIZE 4 |
lorcansmith | 0:2a53a4c3238c | 814 | #endif |
lorcansmith | 0:2a53a4c3238c | 815 | |
lorcansmith | 0:2a53a4c3238c | 816 | /** DNS maximum host name length supported in the name table. */ |
lorcansmith | 0:2a53a4c3238c | 817 | #ifndef DNS_MAX_NAME_LENGTH |
lorcansmith | 0:2a53a4c3238c | 818 | #define DNS_MAX_NAME_LENGTH 256 |
lorcansmith | 0:2a53a4c3238c | 819 | #endif |
lorcansmith | 0:2a53a4c3238c | 820 | |
lorcansmith | 0:2a53a4c3238c | 821 | /** The maximum of DNS servers */ |
lorcansmith | 0:2a53a4c3238c | 822 | #ifndef DNS_MAX_SERVERS |
lorcansmith | 0:2a53a4c3238c | 823 | #define DNS_MAX_SERVERS 2 |
lorcansmith | 0:2a53a4c3238c | 824 | #endif |
lorcansmith | 0:2a53a4c3238c | 825 | |
lorcansmith | 0:2a53a4c3238c | 826 | /** DNS do a name checking between the query and the response. */ |
lorcansmith | 0:2a53a4c3238c | 827 | #ifndef DNS_DOES_NAME_CHECK |
lorcansmith | 0:2a53a4c3238c | 828 | #define DNS_DOES_NAME_CHECK 1 |
lorcansmith | 0:2a53a4c3238c | 829 | #endif |
lorcansmith | 0:2a53a4c3238c | 830 | |
lorcansmith | 0:2a53a4c3238c | 831 | /** DNS message max. size. Default value is RFC compliant. */ |
lorcansmith | 0:2a53a4c3238c | 832 | #ifndef DNS_MSG_SIZE |
lorcansmith | 0:2a53a4c3238c | 833 | #define DNS_MSG_SIZE 512 |
lorcansmith | 0:2a53a4c3238c | 834 | #endif |
lorcansmith | 0:2a53a4c3238c | 835 | |
lorcansmith | 0:2a53a4c3238c | 836 | /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, |
lorcansmith | 0:2a53a4c3238c | 837 | * you have to define |
lorcansmith | 0:2a53a4c3238c | 838 | * #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}} |
lorcansmith | 0:2a53a4c3238c | 839 | * (an array of structs name/address, where address is an u32_t in network |
lorcansmith | 0:2a53a4c3238c | 840 | * byte order). |
lorcansmith | 0:2a53a4c3238c | 841 | * |
lorcansmith | 0:2a53a4c3238c | 842 | * Instead, you can also use an external function: |
lorcansmith | 0:2a53a4c3238c | 843 | * #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name) |
lorcansmith | 0:2a53a4c3238c | 844 | * that returns the IP address or INADDR_NONE if not found. |
lorcansmith | 0:2a53a4c3238c | 845 | */ |
lorcansmith | 0:2a53a4c3238c | 846 | #ifndef DNS_LOCAL_HOSTLIST |
lorcansmith | 0:2a53a4c3238c | 847 | #define DNS_LOCAL_HOSTLIST 0 |
lorcansmith | 0:2a53a4c3238c | 848 | #endif /* DNS_LOCAL_HOSTLIST */ |
lorcansmith | 0:2a53a4c3238c | 849 | |
lorcansmith | 0:2a53a4c3238c | 850 | /** If this is turned on, the local host-list can be dynamically changed |
lorcansmith | 0:2a53a4c3238c | 851 | * at runtime. */ |
lorcansmith | 0:2a53a4c3238c | 852 | #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC |
lorcansmith | 0:2a53a4c3238c | 853 | #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 |
lorcansmith | 0:2a53a4c3238c | 854 | #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ |
lorcansmith | 0:2a53a4c3238c | 855 | |
lorcansmith | 0:2a53a4c3238c | 856 | /* |
lorcansmith | 0:2a53a4c3238c | 857 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 858 | ---------- UDP options ---------- |
lorcansmith | 0:2a53a4c3238c | 859 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 860 | */ |
lorcansmith | 0:2a53a4c3238c | 861 | /** |
lorcansmith | 0:2a53a4c3238c | 862 | * LWIP_UDP==1: Turn on UDP. |
lorcansmith | 0:2a53a4c3238c | 863 | */ |
lorcansmith | 0:2a53a4c3238c | 864 | #ifndef LWIP_UDP |
lorcansmith | 0:2a53a4c3238c | 865 | #define LWIP_UDP 1 |
lorcansmith | 0:2a53a4c3238c | 866 | #endif |
lorcansmith | 0:2a53a4c3238c | 867 | |
lorcansmith | 0:2a53a4c3238c | 868 | /** |
lorcansmith | 0:2a53a4c3238c | 869 | * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) |
lorcansmith | 0:2a53a4c3238c | 870 | */ |
lorcansmith | 0:2a53a4c3238c | 871 | #ifndef LWIP_UDPLITE |
lorcansmith | 0:2a53a4c3238c | 872 | #define LWIP_UDPLITE 0 |
lorcansmith | 0:2a53a4c3238c | 873 | #endif |
lorcansmith | 0:2a53a4c3238c | 874 | |
lorcansmith | 0:2a53a4c3238c | 875 | /** |
lorcansmith | 0:2a53a4c3238c | 876 | * UDP_TTL: Default Time-To-Live value. |
lorcansmith | 0:2a53a4c3238c | 877 | */ |
lorcansmith | 0:2a53a4c3238c | 878 | #ifndef UDP_TTL |
lorcansmith | 0:2a53a4c3238c | 879 | #define UDP_TTL (IP_DEFAULT_TTL) |
lorcansmith | 0:2a53a4c3238c | 880 | #endif |
lorcansmith | 0:2a53a4c3238c | 881 | |
lorcansmith | 0:2a53a4c3238c | 882 | /** |
lorcansmith | 0:2a53a4c3238c | 883 | * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. |
lorcansmith | 0:2a53a4c3238c | 884 | */ |
lorcansmith | 0:2a53a4c3238c | 885 | #ifndef LWIP_NETBUF_RECVINFO |
lorcansmith | 0:2a53a4c3238c | 886 | #define LWIP_NETBUF_RECVINFO 0 |
lorcansmith | 0:2a53a4c3238c | 887 | #endif |
lorcansmith | 0:2a53a4c3238c | 888 | |
lorcansmith | 0:2a53a4c3238c | 889 | /* |
lorcansmith | 0:2a53a4c3238c | 890 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 891 | ---------- TCP options ---------- |
lorcansmith | 0:2a53a4c3238c | 892 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 893 | */ |
lorcansmith | 0:2a53a4c3238c | 894 | /** |
lorcansmith | 0:2a53a4c3238c | 895 | * LWIP_TCP==1: Turn on TCP. |
lorcansmith | 0:2a53a4c3238c | 896 | */ |
lorcansmith | 0:2a53a4c3238c | 897 | #ifndef LWIP_TCP |
lorcansmith | 0:2a53a4c3238c | 898 | #define LWIP_TCP 1 |
lorcansmith | 0:2a53a4c3238c | 899 | #endif |
lorcansmith | 0:2a53a4c3238c | 900 | |
lorcansmith | 0:2a53a4c3238c | 901 | /** |
lorcansmith | 0:2a53a4c3238c | 902 | * TCP_TTL: Default Time-To-Live value. |
lorcansmith | 0:2a53a4c3238c | 903 | */ |
lorcansmith | 0:2a53a4c3238c | 904 | #ifndef TCP_TTL |
lorcansmith | 0:2a53a4c3238c | 905 | #define TCP_TTL (IP_DEFAULT_TTL) |
lorcansmith | 0:2a53a4c3238c | 906 | #endif |
lorcansmith | 0:2a53a4c3238c | 907 | |
lorcansmith | 0:2a53a4c3238c | 908 | /** |
lorcansmith | 0:2a53a4c3238c | 909 | * TCP_WND: The size of a TCP window. This must be at least |
lorcansmith | 0:2a53a4c3238c | 910 | * (2 * TCP_MSS) for things to work well |
lorcansmith | 0:2a53a4c3238c | 911 | */ |
lorcansmith | 0:2a53a4c3238c | 912 | #ifndef TCP_WND |
lorcansmith | 0:2a53a4c3238c | 913 | #define TCP_WND (4 * TCP_MSS) |
lorcansmith | 0:2a53a4c3238c | 914 | #endif |
lorcansmith | 0:2a53a4c3238c | 915 | |
lorcansmith | 0:2a53a4c3238c | 916 | /** |
lorcansmith | 0:2a53a4c3238c | 917 | * TCP_MAXRTX: Maximum number of retransmissions of data segments. |
lorcansmith | 0:2a53a4c3238c | 918 | */ |
lorcansmith | 0:2a53a4c3238c | 919 | #ifndef TCP_MAXRTX |
lorcansmith | 0:2a53a4c3238c | 920 | #define TCP_MAXRTX 12 |
lorcansmith | 0:2a53a4c3238c | 921 | #endif |
lorcansmith | 0:2a53a4c3238c | 922 | |
lorcansmith | 0:2a53a4c3238c | 923 | /** |
lorcansmith | 0:2a53a4c3238c | 924 | * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. |
lorcansmith | 0:2a53a4c3238c | 925 | */ |
lorcansmith | 0:2a53a4c3238c | 926 | #ifndef TCP_SYNMAXRTX |
lorcansmith | 0:2a53a4c3238c | 927 | #define TCP_SYNMAXRTX 6 |
lorcansmith | 0:2a53a4c3238c | 928 | #endif |
lorcansmith | 0:2a53a4c3238c | 929 | |
lorcansmith | 0:2a53a4c3238c | 930 | /** |
lorcansmith | 0:2a53a4c3238c | 931 | * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. |
lorcansmith | 0:2a53a4c3238c | 932 | * Define to 0 if your device is low on memory. |
lorcansmith | 0:2a53a4c3238c | 933 | */ |
lorcansmith | 0:2a53a4c3238c | 934 | #ifndef TCP_QUEUE_OOSEQ |
lorcansmith | 0:2a53a4c3238c | 935 | #define TCP_QUEUE_OOSEQ (LWIP_TCP) |
lorcansmith | 0:2a53a4c3238c | 936 | #endif |
lorcansmith | 0:2a53a4c3238c | 937 | |
lorcansmith | 0:2a53a4c3238c | 938 | /** |
lorcansmith | 0:2a53a4c3238c | 939 | * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, |
lorcansmith | 0:2a53a4c3238c | 940 | * you might want to increase this.) |
lorcansmith | 0:2a53a4c3238c | 941 | * For the receive side, this MSS is advertised to the remote side |
lorcansmith | 0:2a53a4c3238c | 942 | * when opening a connection. For the transmit size, this MSS sets |
lorcansmith | 0:2a53a4c3238c | 943 | * an upper limit on the MSS advertised by the remote host. |
lorcansmith | 0:2a53a4c3238c | 944 | */ |
lorcansmith | 0:2a53a4c3238c | 945 | #ifndef TCP_MSS |
lorcansmith | 0:2a53a4c3238c | 946 | #define TCP_MSS 536 |
lorcansmith | 0:2a53a4c3238c | 947 | #endif |
lorcansmith | 0:2a53a4c3238c | 948 | |
lorcansmith | 0:2a53a4c3238c | 949 | /** |
lorcansmith | 0:2a53a4c3238c | 950 | * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really |
lorcansmith | 0:2a53a4c3238c | 951 | * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which |
lorcansmith | 0:2a53a4c3238c | 952 | * reflects the available reassembly buffer size at the remote host) and the |
lorcansmith | 0:2a53a4c3238c | 953 | * largest size permitted by the IP layer" (RFC 1122) |
lorcansmith | 0:2a53a4c3238c | 954 | * Setting this to 1 enables code that checks TCP_MSS against the MTU of the |
lorcansmith | 0:2a53a4c3238c | 955 | * netif used for a connection and limits the MSS if it would be too big otherwise. |
lorcansmith | 0:2a53a4c3238c | 956 | */ |
lorcansmith | 0:2a53a4c3238c | 957 | #ifndef TCP_CALCULATE_EFF_SEND_MSS |
lorcansmith | 0:2a53a4c3238c | 958 | #define TCP_CALCULATE_EFF_SEND_MSS 1 |
lorcansmith | 0:2a53a4c3238c | 959 | #endif |
lorcansmith | 0:2a53a4c3238c | 960 | |
lorcansmith | 0:2a53a4c3238c | 961 | |
lorcansmith | 0:2a53a4c3238c | 962 | /** |
lorcansmith | 0:2a53a4c3238c | 963 | * TCP_SND_BUF: TCP sender buffer space (bytes). |
lorcansmith | 0:2a53a4c3238c | 964 | */ |
lorcansmith | 0:2a53a4c3238c | 965 | #ifndef TCP_SND_BUF |
lorcansmith | 0:2a53a4c3238c | 966 | #define TCP_SND_BUF 256 |
lorcansmith | 0:2a53a4c3238c | 967 | #endif |
lorcansmith | 0:2a53a4c3238c | 968 | |
lorcansmith | 0:2a53a4c3238c | 969 | /** |
lorcansmith | 0:2a53a4c3238c | 970 | * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least |
lorcansmith | 0:2a53a4c3238c | 971 | * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. |
lorcansmith | 0:2a53a4c3238c | 972 | */ |
lorcansmith | 0:2a53a4c3238c | 973 | #ifndef TCP_SND_QUEUELEN |
lorcansmith | 0:2a53a4c3238c | 974 | #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS)) |
lorcansmith | 0:2a53a4c3238c | 975 | #endif |
lorcansmith | 0:2a53a4c3238c | 976 | |
lorcansmith | 0:2a53a4c3238c | 977 | /** |
lorcansmith | 0:2a53a4c3238c | 978 | * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than |
lorcansmith | 0:2a53a4c3238c | 979 | * TCP_SND_BUF. It is the amount of space which must be available in the |
lorcansmith | 0:2a53a4c3238c | 980 | * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). |
lorcansmith | 0:2a53a4c3238c | 981 | */ |
lorcansmith | 0:2a53a4c3238c | 982 | #ifndef TCP_SNDLOWAT |
lorcansmith | 0:2a53a4c3238c | 983 | #define TCP_SNDLOWAT ((TCP_SND_BUF)/2) |
lorcansmith | 0:2a53a4c3238c | 984 | #endif |
lorcansmith | 0:2a53a4c3238c | 985 | |
lorcansmith | 0:2a53a4c3238c | 986 | /** |
lorcansmith | 0:2a53a4c3238c | 987 | * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be grater |
lorcansmith | 0:2a53a4c3238c | 988 | * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below |
lorcansmith | 0:2a53a4c3238c | 989 | * this number, select returns writable (combined with TCP_SNDLOWAT). |
lorcansmith | 0:2a53a4c3238c | 990 | */ |
lorcansmith | 0:2a53a4c3238c | 991 | #ifndef TCP_SNDQUEUELOWAT |
lorcansmith | 0:2a53a4c3238c | 992 | #define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2) |
lorcansmith | 0:2a53a4c3238c | 993 | #endif |
lorcansmith | 0:2a53a4c3238c | 994 | |
lorcansmith | 0:2a53a4c3238c | 995 | /** |
lorcansmith | 0:2a53a4c3238c | 996 | * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. |
lorcansmith | 0:2a53a4c3238c | 997 | */ |
lorcansmith | 0:2a53a4c3238c | 998 | #ifndef TCP_LISTEN_BACKLOG |
lorcansmith | 0:2a53a4c3238c | 999 | #define TCP_LISTEN_BACKLOG 0 |
lorcansmith | 0:2a53a4c3238c | 1000 | #endif |
lorcansmith | 0:2a53a4c3238c | 1001 | |
lorcansmith | 0:2a53a4c3238c | 1002 | /** |
lorcansmith | 0:2a53a4c3238c | 1003 | * The maximum allowed backlog for TCP listen netconns. |
lorcansmith | 0:2a53a4c3238c | 1004 | * This backlog is used unless another is explicitly specified. |
lorcansmith | 0:2a53a4c3238c | 1005 | * 0xff is the maximum (u8_t). |
lorcansmith | 0:2a53a4c3238c | 1006 | */ |
lorcansmith | 0:2a53a4c3238c | 1007 | #ifndef TCP_DEFAULT_LISTEN_BACKLOG |
lorcansmith | 0:2a53a4c3238c | 1008 | #define TCP_DEFAULT_LISTEN_BACKLOG 0xff |
lorcansmith | 0:2a53a4c3238c | 1009 | #endif |
lorcansmith | 0:2a53a4c3238c | 1010 | |
lorcansmith | 0:2a53a4c3238c | 1011 | /** |
lorcansmith | 0:2a53a4c3238c | 1012 | * TCP_OVERSIZE: The maximum number of bytes that tcp_write may |
lorcansmith | 0:2a53a4c3238c | 1013 | * allocate ahead of time in an attempt to create shorter pbuf chains |
lorcansmith | 0:2a53a4c3238c | 1014 | * for transmission. The meaningful range is 0 to TCP_MSS. Some |
lorcansmith | 0:2a53a4c3238c | 1015 | * suggested values are: |
lorcansmith | 0:2a53a4c3238c | 1016 | * |
lorcansmith | 0:2a53a4c3238c | 1017 | * 0: Disable oversized allocation. Each tcp_write() allocates a new |
lorcansmith | 0:2a53a4c3238c | 1018 | pbuf (old behaviour). |
lorcansmith | 0:2a53a4c3238c | 1019 | * 1: Allocate size-aligned pbufs with minimal excess. Use this if your |
lorcansmith | 0:2a53a4c3238c | 1020 | * scatter-gather DMA requires aligned fragments. |
lorcansmith | 0:2a53a4c3238c | 1021 | * 128: Limit the pbuf/memory overhead to 20%. |
lorcansmith | 0:2a53a4c3238c | 1022 | * TCP_MSS: Try to create unfragmented TCP packets. |
lorcansmith | 0:2a53a4c3238c | 1023 | * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. |
lorcansmith | 0:2a53a4c3238c | 1024 | */ |
lorcansmith | 0:2a53a4c3238c | 1025 | #ifndef TCP_OVERSIZE |
lorcansmith | 0:2a53a4c3238c | 1026 | #define TCP_OVERSIZE TCP_MSS |
lorcansmith | 0:2a53a4c3238c | 1027 | #endif |
lorcansmith | 0:2a53a4c3238c | 1028 | |
lorcansmith | 0:2a53a4c3238c | 1029 | /** |
lorcansmith | 0:2a53a4c3238c | 1030 | * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. |
lorcansmith | 0:2a53a4c3238c | 1031 | */ |
lorcansmith | 0:2a53a4c3238c | 1032 | #ifndef LWIP_TCP_TIMESTAMPS |
lorcansmith | 0:2a53a4c3238c | 1033 | #define LWIP_TCP_TIMESTAMPS 0 |
lorcansmith | 0:2a53a4c3238c | 1034 | #endif |
lorcansmith | 0:2a53a4c3238c | 1035 | |
lorcansmith | 0:2a53a4c3238c | 1036 | /** |
lorcansmith | 0:2a53a4c3238c | 1037 | * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an |
lorcansmith | 0:2a53a4c3238c | 1038 | * explicit window update |
lorcansmith | 0:2a53a4c3238c | 1039 | */ |
lorcansmith | 0:2a53a4c3238c | 1040 | #ifndef TCP_WND_UPDATE_THRESHOLD |
lorcansmith | 0:2a53a4c3238c | 1041 | #define TCP_WND_UPDATE_THRESHOLD (TCP_WND / 4) |
lorcansmith | 0:2a53a4c3238c | 1042 | #endif |
lorcansmith | 0:2a53a4c3238c | 1043 | |
lorcansmith | 0:2a53a4c3238c | 1044 | /** |
lorcansmith | 0:2a53a4c3238c | 1045 | * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. |
lorcansmith | 0:2a53a4c3238c | 1046 | * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all |
lorcansmith | 0:2a53a4c3238c | 1047 | * events (accept, sent, etc) that happen in the system. |
lorcansmith | 0:2a53a4c3238c | 1048 | * LWIP_CALLBACK_API==1: The PCB callback function is called directly |
lorcansmith | 0:2a53a4c3238c | 1049 | * for the event. |
lorcansmith | 0:2a53a4c3238c | 1050 | */ |
lorcansmith | 0:2a53a4c3238c | 1051 | #ifndef LWIP_EVENT_API |
lorcansmith | 0:2a53a4c3238c | 1052 | #define LWIP_EVENT_API 0 |
lorcansmith | 0:2a53a4c3238c | 1053 | #define LWIP_CALLBACK_API 1 |
lorcansmith | 0:2a53a4c3238c | 1054 | #else |
lorcansmith | 0:2a53a4c3238c | 1055 | #define LWIP_EVENT_API 1 |
lorcansmith | 0:2a53a4c3238c | 1056 | #define LWIP_CALLBACK_API 0 |
lorcansmith | 0:2a53a4c3238c | 1057 | #endif |
lorcansmith | 0:2a53a4c3238c | 1058 | |
lorcansmith | 0:2a53a4c3238c | 1059 | |
lorcansmith | 0:2a53a4c3238c | 1060 | /* |
lorcansmith | 0:2a53a4c3238c | 1061 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1062 | ---------- Pbuf options ---------- |
lorcansmith | 0:2a53a4c3238c | 1063 | ---------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1064 | */ |
lorcansmith | 0:2a53a4c3238c | 1065 | /** |
lorcansmith | 0:2a53a4c3238c | 1066 | * PBUF_LINK_HLEN: the number of bytes that should be allocated for a |
lorcansmith | 0:2a53a4c3238c | 1067 | * link level header. The default is 14, the standard value for |
lorcansmith | 0:2a53a4c3238c | 1068 | * Ethernet. |
lorcansmith | 0:2a53a4c3238c | 1069 | */ |
lorcansmith | 0:2a53a4c3238c | 1070 | #ifndef PBUF_LINK_HLEN |
lorcansmith | 0:2a53a4c3238c | 1071 | #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) |
lorcansmith | 0:2a53a4c3238c | 1072 | #endif |
lorcansmith | 0:2a53a4c3238c | 1073 | |
lorcansmith | 0:2a53a4c3238c | 1074 | /** |
lorcansmith | 0:2a53a4c3238c | 1075 | * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is |
lorcansmith | 0:2a53a4c3238c | 1076 | * designed to accomodate single full size TCP frame in one pbuf, including |
lorcansmith | 0:2a53a4c3238c | 1077 | * TCP_MSS, IP header, and link header. |
lorcansmith | 0:2a53a4c3238c | 1078 | */ |
lorcansmith | 0:2a53a4c3238c | 1079 | #ifndef PBUF_POOL_BUFSIZE |
lorcansmith | 0:2a53a4c3238c | 1080 | #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN) |
lorcansmith | 0:2a53a4c3238c | 1081 | #endif |
lorcansmith | 0:2a53a4c3238c | 1082 | |
lorcansmith | 0:2a53a4c3238c | 1083 | /* |
lorcansmith | 0:2a53a4c3238c | 1084 | ------------------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1085 | ---------- Network Interfaces options ---------- |
lorcansmith | 0:2a53a4c3238c | 1086 | ------------------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1087 | */ |
lorcansmith | 0:2a53a4c3238c | 1088 | /** |
lorcansmith | 0:2a53a4c3238c | 1089 | * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname |
lorcansmith | 0:2a53a4c3238c | 1090 | * field. |
lorcansmith | 0:2a53a4c3238c | 1091 | */ |
lorcansmith | 0:2a53a4c3238c | 1092 | #ifndef LWIP_NETIF_HOSTNAME |
lorcansmith | 0:2a53a4c3238c | 1093 | #define LWIP_NETIF_HOSTNAME 0 |
lorcansmith | 0:2a53a4c3238c | 1094 | #endif |
lorcansmith | 0:2a53a4c3238c | 1095 | |
lorcansmith | 0:2a53a4c3238c | 1096 | /** |
lorcansmith | 0:2a53a4c3238c | 1097 | * LWIP_NETIF_API==1: Support netif api (in netifapi.c) |
lorcansmith | 0:2a53a4c3238c | 1098 | */ |
lorcansmith | 0:2a53a4c3238c | 1099 | #ifndef LWIP_NETIF_API |
lorcansmith | 0:2a53a4c3238c | 1100 | #define LWIP_NETIF_API 0 |
lorcansmith | 0:2a53a4c3238c | 1101 | #endif |
lorcansmith | 0:2a53a4c3238c | 1102 | |
lorcansmith | 0:2a53a4c3238c | 1103 | /** |
lorcansmith | 0:2a53a4c3238c | 1104 | * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface |
lorcansmith | 0:2a53a4c3238c | 1105 | * changes its up/down status (i.e., due to DHCP IP acquistion) |
lorcansmith | 0:2a53a4c3238c | 1106 | */ |
lorcansmith | 0:2a53a4c3238c | 1107 | #ifndef LWIP_NETIF_STATUS_CALLBACK |
lorcansmith | 0:2a53a4c3238c | 1108 | #define LWIP_NETIF_STATUS_CALLBACK 0 |
lorcansmith | 0:2a53a4c3238c | 1109 | #endif |
lorcansmith | 0:2a53a4c3238c | 1110 | |
lorcansmith | 0:2a53a4c3238c | 1111 | /** |
lorcansmith | 0:2a53a4c3238c | 1112 | * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface |
lorcansmith | 0:2a53a4c3238c | 1113 | * whenever the link changes (i.e., link down) |
lorcansmith | 0:2a53a4c3238c | 1114 | */ |
lorcansmith | 0:2a53a4c3238c | 1115 | #ifndef LWIP_NETIF_LINK_CALLBACK |
lorcansmith | 0:2a53a4c3238c | 1116 | #define LWIP_NETIF_LINK_CALLBACK 0 |
lorcansmith | 0:2a53a4c3238c | 1117 | #endif |
lorcansmith | 0:2a53a4c3238c | 1118 | |
lorcansmith | 0:2a53a4c3238c | 1119 | /** |
lorcansmith | 0:2a53a4c3238c | 1120 | * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table |
lorcansmith | 0:2a53a4c3238c | 1121 | * indices) in struct netif. TCP and UDP can make use of this to prevent |
lorcansmith | 0:2a53a4c3238c | 1122 | * scanning the ARP table for every sent packet. While this is faster for big |
lorcansmith | 0:2a53a4c3238c | 1123 | * ARP tables or many concurrent connections, it might be counterproductive |
lorcansmith | 0:2a53a4c3238c | 1124 | * if you have a tiny ARP table or if there never are concurrent connections. |
lorcansmith | 0:2a53a4c3238c | 1125 | */ |
lorcansmith | 0:2a53a4c3238c | 1126 | #ifndef LWIP_NETIF_HWADDRHINT |
lorcansmith | 0:2a53a4c3238c | 1127 | #define LWIP_NETIF_HWADDRHINT 0 |
lorcansmith | 0:2a53a4c3238c | 1128 | #endif |
lorcansmith | 0:2a53a4c3238c | 1129 | |
lorcansmith | 0:2a53a4c3238c | 1130 | /** |
lorcansmith | 0:2a53a4c3238c | 1131 | * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP |
lorcansmith | 0:2a53a4c3238c | 1132 | * address equal to the netif IP address, looping them back up the stack. |
lorcansmith | 0:2a53a4c3238c | 1133 | */ |
lorcansmith | 0:2a53a4c3238c | 1134 | #ifndef LWIP_NETIF_LOOPBACK |
lorcansmith | 0:2a53a4c3238c | 1135 | #define LWIP_NETIF_LOOPBACK 0 |
lorcansmith | 0:2a53a4c3238c | 1136 | #endif |
lorcansmith | 0:2a53a4c3238c | 1137 | |
lorcansmith | 0:2a53a4c3238c | 1138 | /** |
lorcansmith | 0:2a53a4c3238c | 1139 | * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback |
lorcansmith | 0:2a53a4c3238c | 1140 | * sending for each netif (0 = disabled) |
lorcansmith | 0:2a53a4c3238c | 1141 | */ |
lorcansmith | 0:2a53a4c3238c | 1142 | #ifndef LWIP_LOOPBACK_MAX_PBUFS |
lorcansmith | 0:2a53a4c3238c | 1143 | #define LWIP_LOOPBACK_MAX_PBUFS 0 |
lorcansmith | 0:2a53a4c3238c | 1144 | #endif |
lorcansmith | 0:2a53a4c3238c | 1145 | |
lorcansmith | 0:2a53a4c3238c | 1146 | /** |
lorcansmith | 0:2a53a4c3238c | 1147 | * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in |
lorcansmith | 0:2a53a4c3238c | 1148 | * the system, as netifs must change how they behave depending on this setting |
lorcansmith | 0:2a53a4c3238c | 1149 | * for the LWIP_NETIF_LOOPBACK option to work. |
lorcansmith | 0:2a53a4c3238c | 1150 | * Setting this is needed to avoid reentering non-reentrant functions like |
lorcansmith | 0:2a53a4c3238c | 1151 | * tcp_input(). |
lorcansmith | 0:2a53a4c3238c | 1152 | * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a |
lorcansmith | 0:2a53a4c3238c | 1153 | * multithreaded environment like tcpip.c. In this case, netif->input() |
lorcansmith | 0:2a53a4c3238c | 1154 | * is called directly. |
lorcansmith | 0:2a53a4c3238c | 1155 | * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. |
lorcansmith | 0:2a53a4c3238c | 1156 | * The packets are put on a list and netif_poll() must be called in |
lorcansmith | 0:2a53a4c3238c | 1157 | * the main application loop. |
lorcansmith | 0:2a53a4c3238c | 1158 | */ |
lorcansmith | 0:2a53a4c3238c | 1159 | #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING |
lorcansmith | 0:2a53a4c3238c | 1160 | #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) |
lorcansmith | 0:2a53a4c3238c | 1161 | #endif |
lorcansmith | 0:2a53a4c3238c | 1162 | |
lorcansmith | 0:2a53a4c3238c | 1163 | /** |
lorcansmith | 0:2a53a4c3238c | 1164 | * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data |
lorcansmith | 0:2a53a4c3238c | 1165 | * to be sent into one single pbuf. This is for compatibility with DMA-enabled |
lorcansmith | 0:2a53a4c3238c | 1166 | * MACs that do not support scatter-gather. |
lorcansmith | 0:2a53a4c3238c | 1167 | * Beware that this might involve CPU-memcpy before transmitting that would not |
lorcansmith | 0:2a53a4c3238c | 1168 | * be needed without this flag! Use this only if you need to! |
lorcansmith | 0:2a53a4c3238c | 1169 | * |
lorcansmith | 0:2a53a4c3238c | 1170 | * @todo: TCP and IP-frag do not work with this, yet: |
lorcansmith | 0:2a53a4c3238c | 1171 | */ |
lorcansmith | 0:2a53a4c3238c | 1172 | #ifndef LWIP_NETIF_TX_SINGLE_PBUF |
lorcansmith | 0:2a53a4c3238c | 1173 | #define LWIP_NETIF_TX_SINGLE_PBUF 0 |
lorcansmith | 0:2a53a4c3238c | 1174 | #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ |
lorcansmith | 0:2a53a4c3238c | 1175 | |
lorcansmith | 0:2a53a4c3238c | 1176 | /* |
lorcansmith | 0:2a53a4c3238c | 1177 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1178 | ---------- LOOPIF options ---------- |
lorcansmith | 0:2a53a4c3238c | 1179 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1180 | */ |
lorcansmith | 0:2a53a4c3238c | 1181 | /** |
lorcansmith | 0:2a53a4c3238c | 1182 | * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c |
lorcansmith | 0:2a53a4c3238c | 1183 | */ |
lorcansmith | 0:2a53a4c3238c | 1184 | #ifndef LWIP_HAVE_LOOPIF |
lorcansmith | 0:2a53a4c3238c | 1185 | #define LWIP_HAVE_LOOPIF 0 |
lorcansmith | 0:2a53a4c3238c | 1186 | #endif |
lorcansmith | 0:2a53a4c3238c | 1187 | |
lorcansmith | 0:2a53a4c3238c | 1188 | /* |
lorcansmith | 0:2a53a4c3238c | 1189 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1190 | ---------- SLIPIF options ---------- |
lorcansmith | 0:2a53a4c3238c | 1191 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1192 | */ |
lorcansmith | 0:2a53a4c3238c | 1193 | /** |
lorcansmith | 0:2a53a4c3238c | 1194 | * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c |
lorcansmith | 0:2a53a4c3238c | 1195 | */ |
lorcansmith | 0:2a53a4c3238c | 1196 | #ifndef LWIP_HAVE_SLIPIF |
lorcansmith | 0:2a53a4c3238c | 1197 | #define LWIP_HAVE_SLIPIF 0 |
lorcansmith | 0:2a53a4c3238c | 1198 | #endif |
lorcansmith | 0:2a53a4c3238c | 1199 | |
lorcansmith | 0:2a53a4c3238c | 1200 | /* |
lorcansmith | 0:2a53a4c3238c | 1201 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1202 | ---------- Thread options ---------- |
lorcansmith | 0:2a53a4c3238c | 1203 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1204 | */ |
lorcansmith | 0:2a53a4c3238c | 1205 | /** |
lorcansmith | 0:2a53a4c3238c | 1206 | * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. |
lorcansmith | 0:2a53a4c3238c | 1207 | */ |
lorcansmith | 0:2a53a4c3238c | 1208 | #ifndef TCPIP_THREAD_NAME |
lorcansmith | 0:2a53a4c3238c | 1209 | #define TCPIP_THREAD_NAME "tcpip_thread" |
lorcansmith | 0:2a53a4c3238c | 1210 | #endif |
lorcansmith | 0:2a53a4c3238c | 1211 | |
lorcansmith | 0:2a53a4c3238c | 1212 | /** |
lorcansmith | 0:2a53a4c3238c | 1213 | * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. |
lorcansmith | 0:2a53a4c3238c | 1214 | * The stack size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1215 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1216 | */ |
lorcansmith | 0:2a53a4c3238c | 1217 | #ifndef TCPIP_THREAD_STACKSIZE |
lorcansmith | 0:2a53a4c3238c | 1218 | #define TCPIP_THREAD_STACKSIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1219 | #endif |
lorcansmith | 0:2a53a4c3238c | 1220 | |
lorcansmith | 0:2a53a4c3238c | 1221 | /** |
lorcansmith | 0:2a53a4c3238c | 1222 | * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. |
lorcansmith | 0:2a53a4c3238c | 1223 | * The priority value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1224 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1225 | */ |
lorcansmith | 0:2a53a4c3238c | 1226 | #ifndef TCPIP_THREAD_PRIO |
lorcansmith | 0:2a53a4c3238c | 1227 | #define TCPIP_THREAD_PRIO 1 |
lorcansmith | 0:2a53a4c3238c | 1228 | #endif |
lorcansmith | 0:2a53a4c3238c | 1229 | |
lorcansmith | 0:2a53a4c3238c | 1230 | /** |
lorcansmith | 0:2a53a4c3238c | 1231 | * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages |
lorcansmith | 0:2a53a4c3238c | 1232 | * The queue size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1233 | * sys_mbox_new() when tcpip_init is called. |
lorcansmith | 0:2a53a4c3238c | 1234 | */ |
lorcansmith | 0:2a53a4c3238c | 1235 | #ifndef TCPIP_MBOX_SIZE |
lorcansmith | 0:2a53a4c3238c | 1236 | #define TCPIP_MBOX_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1237 | #endif |
lorcansmith | 0:2a53a4c3238c | 1238 | |
lorcansmith | 0:2a53a4c3238c | 1239 | /** |
lorcansmith | 0:2a53a4c3238c | 1240 | * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. |
lorcansmith | 0:2a53a4c3238c | 1241 | */ |
lorcansmith | 0:2a53a4c3238c | 1242 | #ifndef SLIPIF_THREAD_NAME |
lorcansmith | 0:2a53a4c3238c | 1243 | #define SLIPIF_THREAD_NAME "slipif_loop" |
lorcansmith | 0:2a53a4c3238c | 1244 | #endif |
lorcansmith | 0:2a53a4c3238c | 1245 | |
lorcansmith | 0:2a53a4c3238c | 1246 | /** |
lorcansmith | 0:2a53a4c3238c | 1247 | * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. |
lorcansmith | 0:2a53a4c3238c | 1248 | * The stack size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1249 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1250 | */ |
lorcansmith | 0:2a53a4c3238c | 1251 | #ifndef SLIPIF_THREAD_STACKSIZE |
lorcansmith | 0:2a53a4c3238c | 1252 | #define SLIPIF_THREAD_STACKSIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1253 | #endif |
lorcansmith | 0:2a53a4c3238c | 1254 | |
lorcansmith | 0:2a53a4c3238c | 1255 | /** |
lorcansmith | 0:2a53a4c3238c | 1256 | * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. |
lorcansmith | 0:2a53a4c3238c | 1257 | * The priority value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1258 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1259 | */ |
lorcansmith | 0:2a53a4c3238c | 1260 | #ifndef SLIPIF_THREAD_PRIO |
lorcansmith | 0:2a53a4c3238c | 1261 | #define SLIPIF_THREAD_PRIO 1 |
lorcansmith | 0:2a53a4c3238c | 1262 | #endif |
lorcansmith | 0:2a53a4c3238c | 1263 | |
lorcansmith | 0:2a53a4c3238c | 1264 | /** |
lorcansmith | 0:2a53a4c3238c | 1265 | * PPP_THREAD_NAME: The name assigned to the pppInputThread. |
lorcansmith | 0:2a53a4c3238c | 1266 | */ |
lorcansmith | 0:2a53a4c3238c | 1267 | #ifndef PPP_THREAD_NAME |
lorcansmith | 0:2a53a4c3238c | 1268 | #define PPP_THREAD_NAME "pppInputThread" |
lorcansmith | 0:2a53a4c3238c | 1269 | #endif |
lorcansmith | 0:2a53a4c3238c | 1270 | |
lorcansmith | 0:2a53a4c3238c | 1271 | /** |
lorcansmith | 0:2a53a4c3238c | 1272 | * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread. |
lorcansmith | 0:2a53a4c3238c | 1273 | * The stack size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1274 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1275 | */ |
lorcansmith | 0:2a53a4c3238c | 1276 | #ifndef PPP_THREAD_STACKSIZE |
lorcansmith | 0:2a53a4c3238c | 1277 | #define PPP_THREAD_STACKSIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1278 | #endif |
lorcansmith | 0:2a53a4c3238c | 1279 | |
lorcansmith | 0:2a53a4c3238c | 1280 | /** |
lorcansmith | 0:2a53a4c3238c | 1281 | * PPP_THREAD_PRIO: The priority assigned to the pppInputThread. |
lorcansmith | 0:2a53a4c3238c | 1282 | * The priority value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1283 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1284 | */ |
lorcansmith | 0:2a53a4c3238c | 1285 | #ifndef PPP_THREAD_PRIO |
lorcansmith | 0:2a53a4c3238c | 1286 | #define PPP_THREAD_PRIO 1 |
lorcansmith | 0:2a53a4c3238c | 1287 | #endif |
lorcansmith | 0:2a53a4c3238c | 1288 | |
lorcansmith | 0:2a53a4c3238c | 1289 | /** |
lorcansmith | 0:2a53a4c3238c | 1290 | * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. |
lorcansmith | 0:2a53a4c3238c | 1291 | */ |
lorcansmith | 0:2a53a4c3238c | 1292 | #ifndef DEFAULT_THREAD_NAME |
lorcansmith | 0:2a53a4c3238c | 1293 | #define DEFAULT_THREAD_NAME "lwIP" |
lorcansmith | 0:2a53a4c3238c | 1294 | #endif |
lorcansmith | 0:2a53a4c3238c | 1295 | |
lorcansmith | 0:2a53a4c3238c | 1296 | /** |
lorcansmith | 0:2a53a4c3238c | 1297 | * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. |
lorcansmith | 0:2a53a4c3238c | 1298 | * The stack size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1299 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1300 | */ |
lorcansmith | 0:2a53a4c3238c | 1301 | #ifndef DEFAULT_THREAD_STACKSIZE |
lorcansmith | 0:2a53a4c3238c | 1302 | #define DEFAULT_THREAD_STACKSIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1303 | #endif |
lorcansmith | 0:2a53a4c3238c | 1304 | |
lorcansmith | 0:2a53a4c3238c | 1305 | /** |
lorcansmith | 0:2a53a4c3238c | 1306 | * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. |
lorcansmith | 0:2a53a4c3238c | 1307 | * The priority value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1308 | * sys_thread_new() when the thread is created. |
lorcansmith | 0:2a53a4c3238c | 1309 | */ |
lorcansmith | 0:2a53a4c3238c | 1310 | #ifndef DEFAULT_THREAD_PRIO |
lorcansmith | 0:2a53a4c3238c | 1311 | #define DEFAULT_THREAD_PRIO 1 |
lorcansmith | 0:2a53a4c3238c | 1312 | #endif |
lorcansmith | 0:2a53a4c3238c | 1313 | |
lorcansmith | 0:2a53a4c3238c | 1314 | /** |
lorcansmith | 0:2a53a4c3238c | 1315 | * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a |
lorcansmith | 0:2a53a4c3238c | 1316 | * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed |
lorcansmith | 0:2a53a4c3238c | 1317 | * to sys_mbox_new() when the recvmbox is created. |
lorcansmith | 0:2a53a4c3238c | 1318 | */ |
lorcansmith | 0:2a53a4c3238c | 1319 | #ifndef DEFAULT_RAW_RECVMBOX_SIZE |
lorcansmith | 0:2a53a4c3238c | 1320 | #define DEFAULT_RAW_RECVMBOX_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1321 | #endif |
lorcansmith | 0:2a53a4c3238c | 1322 | |
lorcansmith | 0:2a53a4c3238c | 1323 | /** |
lorcansmith | 0:2a53a4c3238c | 1324 | * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a |
lorcansmith | 0:2a53a4c3238c | 1325 | * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed |
lorcansmith | 0:2a53a4c3238c | 1326 | * to sys_mbox_new() when the recvmbox is created. |
lorcansmith | 0:2a53a4c3238c | 1327 | */ |
lorcansmith | 0:2a53a4c3238c | 1328 | #ifndef DEFAULT_UDP_RECVMBOX_SIZE |
lorcansmith | 0:2a53a4c3238c | 1329 | #define DEFAULT_UDP_RECVMBOX_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1330 | #endif |
lorcansmith | 0:2a53a4c3238c | 1331 | |
lorcansmith | 0:2a53a4c3238c | 1332 | /** |
lorcansmith | 0:2a53a4c3238c | 1333 | * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a |
lorcansmith | 0:2a53a4c3238c | 1334 | * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed |
lorcansmith | 0:2a53a4c3238c | 1335 | * to sys_mbox_new() when the recvmbox is created. |
lorcansmith | 0:2a53a4c3238c | 1336 | */ |
lorcansmith | 0:2a53a4c3238c | 1337 | #ifndef DEFAULT_TCP_RECVMBOX_SIZE |
lorcansmith | 0:2a53a4c3238c | 1338 | #define DEFAULT_TCP_RECVMBOX_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1339 | #endif |
lorcansmith | 0:2a53a4c3238c | 1340 | |
lorcansmith | 0:2a53a4c3238c | 1341 | /** |
lorcansmith | 0:2a53a4c3238c | 1342 | * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. |
lorcansmith | 0:2a53a4c3238c | 1343 | * The queue size value itself is platform-dependent, but is passed to |
lorcansmith | 0:2a53a4c3238c | 1344 | * sys_mbox_new() when the acceptmbox is created. |
lorcansmith | 0:2a53a4c3238c | 1345 | */ |
lorcansmith | 0:2a53a4c3238c | 1346 | #ifndef DEFAULT_ACCEPTMBOX_SIZE |
lorcansmith | 0:2a53a4c3238c | 1347 | #define DEFAULT_ACCEPTMBOX_SIZE 0 |
lorcansmith | 0:2a53a4c3238c | 1348 | #endif |
lorcansmith | 0:2a53a4c3238c | 1349 | |
lorcansmith | 0:2a53a4c3238c | 1350 | /* |
lorcansmith | 0:2a53a4c3238c | 1351 | ---------------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1352 | ---------- Sequential layer options ---------- |
lorcansmith | 0:2a53a4c3238c | 1353 | ---------------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1354 | */ |
lorcansmith | 0:2a53a4c3238c | 1355 | /** |
lorcansmith | 0:2a53a4c3238c | 1356 | * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!) |
lorcansmith | 0:2a53a4c3238c | 1357 | * Don't use it if you're not an active lwIP project member |
lorcansmith | 0:2a53a4c3238c | 1358 | */ |
lorcansmith | 0:2a53a4c3238c | 1359 | #ifndef LWIP_TCPIP_CORE_LOCKING |
lorcansmith | 0:2a53a4c3238c | 1360 | #define LWIP_TCPIP_CORE_LOCKING 0 |
lorcansmith | 0:2a53a4c3238c | 1361 | #endif |
lorcansmith | 0:2a53a4c3238c | 1362 | |
lorcansmith | 0:2a53a4c3238c | 1363 | /** |
lorcansmith | 0:2a53a4c3238c | 1364 | * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!) |
lorcansmith | 0:2a53a4c3238c | 1365 | * Don't use it if you're not an active lwIP project member |
lorcansmith | 0:2a53a4c3238c | 1366 | */ |
lorcansmith | 0:2a53a4c3238c | 1367 | #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT |
lorcansmith | 0:2a53a4c3238c | 1368 | #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 |
lorcansmith | 0:2a53a4c3238c | 1369 | #endif |
lorcansmith | 0:2a53a4c3238c | 1370 | |
lorcansmith | 0:2a53a4c3238c | 1371 | /** |
lorcansmith | 0:2a53a4c3238c | 1372 | * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) |
lorcansmith | 0:2a53a4c3238c | 1373 | */ |
lorcansmith | 0:2a53a4c3238c | 1374 | #ifndef LWIP_NETCONN |
lorcansmith | 0:2a53a4c3238c | 1375 | #define LWIP_NETCONN 1 |
lorcansmith | 0:2a53a4c3238c | 1376 | #endif |
lorcansmith | 0:2a53a4c3238c | 1377 | |
lorcansmith | 0:2a53a4c3238c | 1378 | /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create |
lorcansmith | 0:2a53a4c3238c | 1379 | * timers running in tcpip_thread from another thread. |
lorcansmith | 0:2a53a4c3238c | 1380 | */ |
lorcansmith | 0:2a53a4c3238c | 1381 | #ifndef LWIP_TCPIP_TIMEOUT |
lorcansmith | 0:2a53a4c3238c | 1382 | #define LWIP_TCPIP_TIMEOUT 1 |
lorcansmith | 0:2a53a4c3238c | 1383 | #endif |
lorcansmith | 0:2a53a4c3238c | 1384 | |
lorcansmith | 0:2a53a4c3238c | 1385 | /* |
lorcansmith | 0:2a53a4c3238c | 1386 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1387 | ---------- Socket options ---------- |
lorcansmith | 0:2a53a4c3238c | 1388 | ------------------------------------ |
lorcansmith | 0:2a53a4c3238c | 1389 | */ |
lorcansmith | 0:2a53a4c3238c | 1390 | /** |
lorcansmith | 0:2a53a4c3238c | 1391 | * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) |
lorcansmith | 0:2a53a4c3238c | 1392 | */ |
lorcansmith | 0:2a53a4c3238c | 1393 | #ifndef LWIP_SOCKET |
lorcansmith | 0:2a53a4c3238c | 1394 | #define LWIP_SOCKET 1 |
lorcansmith | 0:2a53a4c3238c | 1395 | #endif |
lorcansmith | 0:2a53a4c3238c | 1396 | |
lorcansmith | 0:2a53a4c3238c | 1397 | /** |
lorcansmith | 0:2a53a4c3238c | 1398 | * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names. |
lorcansmith | 0:2a53a4c3238c | 1399 | * (only used if you use sockets.c) |
lorcansmith | 0:2a53a4c3238c | 1400 | */ |
lorcansmith | 0:2a53a4c3238c | 1401 | #ifndef LWIP_COMPAT_SOCKETS |
lorcansmith | 0:2a53a4c3238c | 1402 | #define LWIP_COMPAT_SOCKETS 1 |
lorcansmith | 0:2a53a4c3238c | 1403 | #endif |
lorcansmith | 0:2a53a4c3238c | 1404 | |
lorcansmith | 0:2a53a4c3238c | 1405 | /** |
lorcansmith | 0:2a53a4c3238c | 1406 | * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. |
lorcansmith | 0:2a53a4c3238c | 1407 | * Disable this option if you use a POSIX operating system that uses the same |
lorcansmith | 0:2a53a4c3238c | 1408 | * names (read, write & close). (only used if you use sockets.c) |
lorcansmith | 0:2a53a4c3238c | 1409 | */ |
lorcansmith | 0:2a53a4c3238c | 1410 | #ifndef LWIP_POSIX_SOCKETS_IO_NAMES |
lorcansmith | 0:2a53a4c3238c | 1411 | #define LWIP_POSIX_SOCKETS_IO_NAMES 1 |
lorcansmith | 0:2a53a4c3238c | 1412 | #endif |
lorcansmith | 0:2a53a4c3238c | 1413 | |
lorcansmith | 0:2a53a4c3238c | 1414 | /** |
lorcansmith | 0:2a53a4c3238c | 1415 | * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT |
lorcansmith | 0:2a53a4c3238c | 1416 | * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set |
lorcansmith | 0:2a53a4c3238c | 1417 | * in seconds. (does not require sockets.c, and will affect tcp.c) |
lorcansmith | 0:2a53a4c3238c | 1418 | */ |
lorcansmith | 0:2a53a4c3238c | 1419 | #ifndef LWIP_TCP_KEEPALIVE |
lorcansmith | 0:2a53a4c3238c | 1420 | #define LWIP_TCP_KEEPALIVE 0 |
lorcansmith | 0:2a53a4c3238c | 1421 | #endif |
lorcansmith | 0:2a53a4c3238c | 1422 | |
lorcansmith | 0:2a53a4c3238c | 1423 | /** |
lorcansmith | 0:2a53a4c3238c | 1424 | * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing. |
lorcansmith | 0:2a53a4c3238c | 1425 | */ |
lorcansmith | 0:2a53a4c3238c | 1426 | #ifndef LWIP_SO_RCVTIMEO |
lorcansmith | 0:2a53a4c3238c | 1427 | #define LWIP_SO_RCVTIMEO 0 |
lorcansmith | 0:2a53a4c3238c | 1428 | #endif |
lorcansmith | 0:2a53a4c3238c | 1429 | |
lorcansmith | 0:2a53a4c3238c | 1430 | /** |
lorcansmith | 0:2a53a4c3238c | 1431 | * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. |
lorcansmith | 0:2a53a4c3238c | 1432 | */ |
lorcansmith | 0:2a53a4c3238c | 1433 | #ifndef LWIP_SO_RCVBUF |
lorcansmith | 0:2a53a4c3238c | 1434 | #define LWIP_SO_RCVBUF 0 |
lorcansmith | 0:2a53a4c3238c | 1435 | #endif |
lorcansmith | 0:2a53a4c3238c | 1436 | |
lorcansmith | 0:2a53a4c3238c | 1437 | /** |
lorcansmith | 0:2a53a4c3238c | 1438 | * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. |
lorcansmith | 0:2a53a4c3238c | 1439 | */ |
lorcansmith | 0:2a53a4c3238c | 1440 | #ifndef RECV_BUFSIZE_DEFAULT |
lorcansmith | 0:2a53a4c3238c | 1441 | #define RECV_BUFSIZE_DEFAULT INT_MAX |
lorcansmith | 0:2a53a4c3238c | 1442 | #endif |
lorcansmith | 0:2a53a4c3238c | 1443 | |
lorcansmith | 0:2a53a4c3238c | 1444 | /** |
lorcansmith | 0:2a53a4c3238c | 1445 | * SO_REUSE==1: Enable SO_REUSEADDR option. |
lorcansmith | 0:2a53a4c3238c | 1446 | */ |
lorcansmith | 0:2a53a4c3238c | 1447 | #ifndef SO_REUSE |
lorcansmith | 0:2a53a4c3238c | 1448 | #define SO_REUSE 0 |
lorcansmith | 0:2a53a4c3238c | 1449 | #endif |
lorcansmith | 0:2a53a4c3238c | 1450 | |
lorcansmith | 0:2a53a4c3238c | 1451 | /** |
lorcansmith | 0:2a53a4c3238c | 1452 | * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets |
lorcansmith | 0:2a53a4c3238c | 1453 | * to all local matches if SO_REUSEADDR is turned on. |
lorcansmith | 0:2a53a4c3238c | 1454 | * WARNING: Adds a memcpy for every packet if passing to more than one pcb! |
lorcansmith | 0:2a53a4c3238c | 1455 | */ |
lorcansmith | 0:2a53a4c3238c | 1456 | #ifndef SO_REUSE_RXTOALL |
lorcansmith | 0:2a53a4c3238c | 1457 | #define SO_REUSE_RXTOALL 0 |
lorcansmith | 0:2a53a4c3238c | 1458 | #endif |
lorcansmith | 0:2a53a4c3238c | 1459 | |
lorcansmith | 0:2a53a4c3238c | 1460 | /* |
lorcansmith | 0:2a53a4c3238c | 1461 | ---------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1462 | ---------- Statistics options ---------- |
lorcansmith | 0:2a53a4c3238c | 1463 | ---------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1464 | */ |
lorcansmith | 0:2a53a4c3238c | 1465 | /** |
lorcansmith | 0:2a53a4c3238c | 1466 | * LWIP_STATS==1: Enable statistics collection in lwip_stats. |
lorcansmith | 0:2a53a4c3238c | 1467 | */ |
lorcansmith | 0:2a53a4c3238c | 1468 | #ifndef LWIP_STATS |
lorcansmith | 0:2a53a4c3238c | 1469 | #define LWIP_STATS 1 |
lorcansmith | 0:2a53a4c3238c | 1470 | #endif |
lorcansmith | 0:2a53a4c3238c | 1471 | |
lorcansmith | 0:2a53a4c3238c | 1472 | #if LWIP_STATS |
lorcansmith | 0:2a53a4c3238c | 1473 | |
lorcansmith | 0:2a53a4c3238c | 1474 | /** |
lorcansmith | 0:2a53a4c3238c | 1475 | * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. |
lorcansmith | 0:2a53a4c3238c | 1476 | */ |
lorcansmith | 0:2a53a4c3238c | 1477 | #ifndef LWIP_STATS_DISPLAY |
lorcansmith | 0:2a53a4c3238c | 1478 | #define LWIP_STATS_DISPLAY 0 |
lorcansmith | 0:2a53a4c3238c | 1479 | #endif |
lorcansmith | 0:2a53a4c3238c | 1480 | |
lorcansmith | 0:2a53a4c3238c | 1481 | /** |
lorcansmith | 0:2a53a4c3238c | 1482 | * LINK_STATS==1: Enable link stats. |
lorcansmith | 0:2a53a4c3238c | 1483 | */ |
lorcansmith | 0:2a53a4c3238c | 1484 | #ifndef LINK_STATS |
lorcansmith | 0:2a53a4c3238c | 1485 | #define LINK_STATS 1 |
lorcansmith | 0:2a53a4c3238c | 1486 | #endif |
lorcansmith | 0:2a53a4c3238c | 1487 | |
lorcansmith | 0:2a53a4c3238c | 1488 | /** |
lorcansmith | 0:2a53a4c3238c | 1489 | * ETHARP_STATS==1: Enable etharp stats. |
lorcansmith | 0:2a53a4c3238c | 1490 | */ |
lorcansmith | 0:2a53a4c3238c | 1491 | #ifndef ETHARP_STATS |
lorcansmith | 0:2a53a4c3238c | 1492 | #define ETHARP_STATS (LWIP_ARP) |
lorcansmith | 0:2a53a4c3238c | 1493 | #endif |
lorcansmith | 0:2a53a4c3238c | 1494 | |
lorcansmith | 0:2a53a4c3238c | 1495 | /** |
lorcansmith | 0:2a53a4c3238c | 1496 | * IP_STATS==1: Enable IP stats. |
lorcansmith | 0:2a53a4c3238c | 1497 | */ |
lorcansmith | 0:2a53a4c3238c | 1498 | #ifndef IP_STATS |
lorcansmith | 0:2a53a4c3238c | 1499 | #define IP_STATS 1 |
lorcansmith | 0:2a53a4c3238c | 1500 | #endif |
lorcansmith | 0:2a53a4c3238c | 1501 | |
lorcansmith | 0:2a53a4c3238c | 1502 | /** |
lorcansmith | 0:2a53a4c3238c | 1503 | * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is |
lorcansmith | 0:2a53a4c3238c | 1504 | * on if using either frag or reass. |
lorcansmith | 0:2a53a4c3238c | 1505 | */ |
lorcansmith | 0:2a53a4c3238c | 1506 | #ifndef IPFRAG_STATS |
lorcansmith | 0:2a53a4c3238c | 1507 | #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) |
lorcansmith | 0:2a53a4c3238c | 1508 | #endif |
lorcansmith | 0:2a53a4c3238c | 1509 | |
lorcansmith | 0:2a53a4c3238c | 1510 | /** |
lorcansmith | 0:2a53a4c3238c | 1511 | * ICMP_STATS==1: Enable ICMP stats. |
lorcansmith | 0:2a53a4c3238c | 1512 | */ |
lorcansmith | 0:2a53a4c3238c | 1513 | #ifndef ICMP_STATS |
lorcansmith | 0:2a53a4c3238c | 1514 | #define ICMP_STATS 1 |
lorcansmith | 0:2a53a4c3238c | 1515 | #endif |
lorcansmith | 0:2a53a4c3238c | 1516 | |
lorcansmith | 0:2a53a4c3238c | 1517 | /** |
lorcansmith | 0:2a53a4c3238c | 1518 | * IGMP_STATS==1: Enable IGMP stats. |
lorcansmith | 0:2a53a4c3238c | 1519 | */ |
lorcansmith | 0:2a53a4c3238c | 1520 | #ifndef IGMP_STATS |
lorcansmith | 0:2a53a4c3238c | 1521 | #define IGMP_STATS (LWIP_IGMP) |
lorcansmith | 0:2a53a4c3238c | 1522 | #endif |
lorcansmith | 0:2a53a4c3238c | 1523 | |
lorcansmith | 0:2a53a4c3238c | 1524 | /** |
lorcansmith | 0:2a53a4c3238c | 1525 | * UDP_STATS==1: Enable UDP stats. Default is on if |
lorcansmith | 0:2a53a4c3238c | 1526 | * UDP enabled, otherwise off. |
lorcansmith | 0:2a53a4c3238c | 1527 | */ |
lorcansmith | 0:2a53a4c3238c | 1528 | #ifndef UDP_STATS |
lorcansmith | 0:2a53a4c3238c | 1529 | #define UDP_STATS (LWIP_UDP) |
lorcansmith | 0:2a53a4c3238c | 1530 | #endif |
lorcansmith | 0:2a53a4c3238c | 1531 | |
lorcansmith | 0:2a53a4c3238c | 1532 | /** |
lorcansmith | 0:2a53a4c3238c | 1533 | * TCP_STATS==1: Enable TCP stats. Default is on if TCP |
lorcansmith | 0:2a53a4c3238c | 1534 | * enabled, otherwise off. |
lorcansmith | 0:2a53a4c3238c | 1535 | */ |
lorcansmith | 0:2a53a4c3238c | 1536 | #ifndef TCP_STATS |
lorcansmith | 0:2a53a4c3238c | 1537 | #define TCP_STATS (LWIP_TCP) |
lorcansmith | 0:2a53a4c3238c | 1538 | #endif |
lorcansmith | 0:2a53a4c3238c | 1539 | |
lorcansmith | 0:2a53a4c3238c | 1540 | /** |
lorcansmith | 0:2a53a4c3238c | 1541 | * MEM_STATS==1: Enable mem.c stats. |
lorcansmith | 0:2a53a4c3238c | 1542 | */ |
lorcansmith | 0:2a53a4c3238c | 1543 | #ifndef MEM_STATS |
lorcansmith | 0:2a53a4c3238c | 1544 | #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) |
lorcansmith | 0:2a53a4c3238c | 1545 | #endif |
lorcansmith | 0:2a53a4c3238c | 1546 | |
lorcansmith | 0:2a53a4c3238c | 1547 | /** |
lorcansmith | 0:2a53a4c3238c | 1548 | * MEMP_STATS==1: Enable memp.c pool stats. |
lorcansmith | 0:2a53a4c3238c | 1549 | */ |
lorcansmith | 0:2a53a4c3238c | 1550 | #ifndef MEMP_STATS |
lorcansmith | 0:2a53a4c3238c | 1551 | #define MEMP_STATS (MEMP_MEM_MALLOC == 0) |
lorcansmith | 0:2a53a4c3238c | 1552 | #endif |
lorcansmith | 0:2a53a4c3238c | 1553 | |
lorcansmith | 0:2a53a4c3238c | 1554 | /** |
lorcansmith | 0:2a53a4c3238c | 1555 | * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). |
lorcansmith | 0:2a53a4c3238c | 1556 | */ |
lorcansmith | 0:2a53a4c3238c | 1557 | #ifndef SYS_STATS |
lorcansmith | 0:2a53a4c3238c | 1558 | #define SYS_STATS (NO_SYS == 0) |
lorcansmith | 0:2a53a4c3238c | 1559 | #endif |
lorcansmith | 0:2a53a4c3238c | 1560 | |
lorcansmith | 0:2a53a4c3238c | 1561 | #else |
lorcansmith | 0:2a53a4c3238c | 1562 | |
lorcansmith | 0:2a53a4c3238c | 1563 | #define LINK_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1564 | #define IP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1565 | #define IPFRAG_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1566 | #define ICMP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1567 | #define IGMP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1568 | #define UDP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1569 | #define TCP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1570 | #define MEM_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1571 | #define MEMP_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1572 | #define SYS_STATS 0 |
lorcansmith | 0:2a53a4c3238c | 1573 | #define LWIP_STATS_DISPLAY 0 |
lorcansmith | 0:2a53a4c3238c | 1574 | |
lorcansmith | 0:2a53a4c3238c | 1575 | #endif /* LWIP_STATS */ |
lorcansmith | 0:2a53a4c3238c | 1576 | |
lorcansmith | 0:2a53a4c3238c | 1577 | /* |
lorcansmith | 0:2a53a4c3238c | 1578 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1579 | ---------- PPP options ---------- |
lorcansmith | 0:2a53a4c3238c | 1580 | --------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1581 | */ |
lorcansmith | 0:2a53a4c3238c | 1582 | /** |
lorcansmith | 0:2a53a4c3238c | 1583 | * PPP_SUPPORT==1: Enable PPP. |
lorcansmith | 0:2a53a4c3238c | 1584 | */ |
lorcansmith | 0:2a53a4c3238c | 1585 | #ifndef PPP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1586 | #define PPP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1587 | #endif |
lorcansmith | 0:2a53a4c3238c | 1588 | |
lorcansmith | 0:2a53a4c3238c | 1589 | /** |
lorcansmith | 0:2a53a4c3238c | 1590 | * PPPOE_SUPPORT==1: Enable PPP Over Ethernet |
lorcansmith | 0:2a53a4c3238c | 1591 | */ |
lorcansmith | 0:2a53a4c3238c | 1592 | #ifndef PPPOE_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1593 | #define PPPOE_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1594 | #endif |
lorcansmith | 0:2a53a4c3238c | 1595 | |
lorcansmith | 0:2a53a4c3238c | 1596 | /** |
lorcansmith | 0:2a53a4c3238c | 1597 | * PPPOS_SUPPORT==1: Enable PPP Over Serial |
lorcansmith | 0:2a53a4c3238c | 1598 | */ |
lorcansmith | 0:2a53a4c3238c | 1599 | #ifndef PPPOS_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1600 | #define PPPOS_SUPPORT PPP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1601 | #endif |
lorcansmith | 0:2a53a4c3238c | 1602 | |
lorcansmith | 0:2a53a4c3238c | 1603 | #if PPP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1604 | |
lorcansmith | 0:2a53a4c3238c | 1605 | /** |
lorcansmith | 0:2a53a4c3238c | 1606 | * NUM_PPP: Max PPP sessions. |
lorcansmith | 0:2a53a4c3238c | 1607 | */ |
lorcansmith | 0:2a53a4c3238c | 1608 | #ifndef NUM_PPP |
lorcansmith | 0:2a53a4c3238c | 1609 | #define NUM_PPP 1 |
lorcansmith | 0:2a53a4c3238c | 1610 | #endif |
lorcansmith | 0:2a53a4c3238c | 1611 | |
lorcansmith | 0:2a53a4c3238c | 1612 | /** |
lorcansmith | 0:2a53a4c3238c | 1613 | * PAP_SUPPORT==1: Support PAP. |
lorcansmith | 0:2a53a4c3238c | 1614 | */ |
lorcansmith | 0:2a53a4c3238c | 1615 | #ifndef PAP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1616 | #define PAP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1617 | #endif |
lorcansmith | 0:2a53a4c3238c | 1618 | |
lorcansmith | 0:2a53a4c3238c | 1619 | /** |
lorcansmith | 0:2a53a4c3238c | 1620 | * CHAP_SUPPORT==1: Support CHAP. |
lorcansmith | 0:2a53a4c3238c | 1621 | */ |
lorcansmith | 0:2a53a4c3238c | 1622 | #ifndef CHAP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1623 | #define CHAP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1624 | #endif |
lorcansmith | 0:2a53a4c3238c | 1625 | |
lorcansmith | 0:2a53a4c3238c | 1626 | /** |
lorcansmith | 0:2a53a4c3238c | 1627 | * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET! |
lorcansmith | 0:2a53a4c3238c | 1628 | */ |
lorcansmith | 0:2a53a4c3238c | 1629 | #ifndef MSCHAP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1630 | #define MSCHAP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1631 | #endif |
lorcansmith | 0:2a53a4c3238c | 1632 | |
lorcansmith | 0:2a53a4c3238c | 1633 | /** |
lorcansmith | 0:2a53a4c3238c | 1634 | * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! |
lorcansmith | 0:2a53a4c3238c | 1635 | */ |
lorcansmith | 0:2a53a4c3238c | 1636 | #ifndef CBCP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1637 | #define CBCP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1638 | #endif |
lorcansmith | 0:2a53a4c3238c | 1639 | |
lorcansmith | 0:2a53a4c3238c | 1640 | /** |
lorcansmith | 0:2a53a4c3238c | 1641 | * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET! |
lorcansmith | 0:2a53a4c3238c | 1642 | */ |
lorcansmith | 0:2a53a4c3238c | 1643 | #ifndef CCP_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1644 | #define CCP_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1645 | #endif |
lorcansmith | 0:2a53a4c3238c | 1646 | |
lorcansmith | 0:2a53a4c3238c | 1647 | /** |
lorcansmith | 0:2a53a4c3238c | 1648 | * VJ_SUPPORT==1: Support VJ header compression. |
lorcansmith | 0:2a53a4c3238c | 1649 | */ |
lorcansmith | 0:2a53a4c3238c | 1650 | #ifndef VJ_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1651 | #define VJ_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1652 | #endif |
lorcansmith | 0:2a53a4c3238c | 1653 | |
lorcansmith | 0:2a53a4c3238c | 1654 | /** |
lorcansmith | 0:2a53a4c3238c | 1655 | * MD5_SUPPORT==1: Support MD5 (see also CHAP). |
lorcansmith | 0:2a53a4c3238c | 1656 | */ |
lorcansmith | 0:2a53a4c3238c | 1657 | #ifndef MD5_SUPPORT |
lorcansmith | 0:2a53a4c3238c | 1658 | #define MD5_SUPPORT 0 |
lorcansmith | 0:2a53a4c3238c | 1659 | #endif |
lorcansmith | 0:2a53a4c3238c | 1660 | |
lorcansmith | 0:2a53a4c3238c | 1661 | /* |
lorcansmith | 0:2a53a4c3238c | 1662 | * Timeouts |
lorcansmith | 0:2a53a4c3238c | 1663 | */ |
lorcansmith | 0:2a53a4c3238c | 1664 | #ifndef FSM_DEFTIMEOUT |
lorcansmith | 0:2a53a4c3238c | 1665 | #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ |
lorcansmith | 0:2a53a4c3238c | 1666 | #endif |
lorcansmith | 0:2a53a4c3238c | 1667 | |
lorcansmith | 0:2a53a4c3238c | 1668 | #ifndef FSM_DEFMAXTERMREQS |
lorcansmith | 0:2a53a4c3238c | 1669 | #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ |
lorcansmith | 0:2a53a4c3238c | 1670 | #endif |
lorcansmith | 0:2a53a4c3238c | 1671 | |
lorcansmith | 0:2a53a4c3238c | 1672 | #ifndef FSM_DEFMAXCONFREQS |
lorcansmith | 0:2a53a4c3238c | 1673 | #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ |
lorcansmith | 0:2a53a4c3238c | 1674 | #endif |
lorcansmith | 0:2a53a4c3238c | 1675 | |
lorcansmith | 0:2a53a4c3238c | 1676 | #ifndef FSM_DEFMAXNAKLOOPS |
lorcansmith | 0:2a53a4c3238c | 1677 | #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ |
lorcansmith | 0:2a53a4c3238c | 1678 | #endif |
lorcansmith | 0:2a53a4c3238c | 1679 | |
lorcansmith | 0:2a53a4c3238c | 1680 | #ifndef UPAP_DEFTIMEOUT |
lorcansmith | 0:2a53a4c3238c | 1681 | #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ |
lorcansmith | 0:2a53a4c3238c | 1682 | #endif |
lorcansmith | 0:2a53a4c3238c | 1683 | |
lorcansmith | 0:2a53a4c3238c | 1684 | #ifndef UPAP_DEFREQTIME |
lorcansmith | 0:2a53a4c3238c | 1685 | #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ |
lorcansmith | 0:2a53a4c3238c | 1686 | #endif |
lorcansmith | 0:2a53a4c3238c | 1687 | |
lorcansmith | 0:2a53a4c3238c | 1688 | #ifndef CHAP_DEFTIMEOUT |
lorcansmith | 0:2a53a4c3238c | 1689 | #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ |
lorcansmith | 0:2a53a4c3238c | 1690 | #endif |
lorcansmith | 0:2a53a4c3238c | 1691 | |
lorcansmith | 0:2a53a4c3238c | 1692 | #ifndef CHAP_DEFTRANSMITS |
lorcansmith | 0:2a53a4c3238c | 1693 | #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ |
lorcansmith | 0:2a53a4c3238c | 1694 | #endif |
lorcansmith | 0:2a53a4c3238c | 1695 | |
lorcansmith | 0:2a53a4c3238c | 1696 | /* Interval in seconds between keepalive echo requests, 0 to disable. */ |
lorcansmith | 0:2a53a4c3238c | 1697 | #ifndef LCP_ECHOINTERVAL |
lorcansmith | 0:2a53a4c3238c | 1698 | #define LCP_ECHOINTERVAL 0 |
lorcansmith | 0:2a53a4c3238c | 1699 | #endif |
lorcansmith | 0:2a53a4c3238c | 1700 | |
lorcansmith | 0:2a53a4c3238c | 1701 | /* Number of unanswered echo requests before failure. */ |
lorcansmith | 0:2a53a4c3238c | 1702 | #ifndef LCP_MAXECHOFAILS |
lorcansmith | 0:2a53a4c3238c | 1703 | #define LCP_MAXECHOFAILS 3 |
lorcansmith | 0:2a53a4c3238c | 1704 | #endif |
lorcansmith | 0:2a53a4c3238c | 1705 | |
lorcansmith | 0:2a53a4c3238c | 1706 | /* Max Xmit idle time (in jiffies) before resend flag char. */ |
lorcansmith | 0:2a53a4c3238c | 1707 | #ifndef PPP_MAXIDLEFLAG |
lorcansmith | 0:2a53a4c3238c | 1708 | #define PPP_MAXIDLEFLAG 100 |
lorcansmith | 0:2a53a4c3238c | 1709 | #endif |
lorcansmith | 0:2a53a4c3238c | 1710 | |
lorcansmith | 0:2a53a4c3238c | 1711 | /* |
lorcansmith | 0:2a53a4c3238c | 1712 | * Packet sizes |
lorcansmith | 0:2a53a4c3238c | 1713 | * |
lorcansmith | 0:2a53a4c3238c | 1714 | * Note - lcp shouldn't be allowed to negotiate stuff outside these |
lorcansmith | 0:2a53a4c3238c | 1715 | * limits. See lcp.h in the pppd directory. |
lorcansmith | 0:2a53a4c3238c | 1716 | * (XXX - these constants should simply be shared by lcp.c instead |
lorcansmith | 0:2a53a4c3238c | 1717 | * of living in lcp.h) |
lorcansmith | 0:2a53a4c3238c | 1718 | */ |
lorcansmith | 0:2a53a4c3238c | 1719 | #define PPP_MTU 1500 /* Default MTU (size of Info field) */ |
lorcansmith | 0:2a53a4c3238c | 1720 | #ifndef PPP_MAXMTU |
lorcansmith | 0:2a53a4c3238c | 1721 | /* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */ |
lorcansmith | 0:2a53a4c3238c | 1722 | #define PPP_MAXMTU 1500 /* Largest MTU we allow */ |
lorcansmith | 0:2a53a4c3238c | 1723 | #endif |
lorcansmith | 0:2a53a4c3238c | 1724 | #define PPP_MINMTU 64 |
lorcansmith | 0:2a53a4c3238c | 1725 | #define PPP_MRU 1500 /* default MRU = max length of info field */ |
lorcansmith | 0:2a53a4c3238c | 1726 | #define PPP_MAXMRU 1500 /* Largest MRU we allow */ |
lorcansmith | 0:2a53a4c3238c | 1727 | #ifndef PPP_DEFMRU |
lorcansmith | 0:2a53a4c3238c | 1728 | #define PPP_DEFMRU 296 /* Try for this */ |
lorcansmith | 0:2a53a4c3238c | 1729 | #endif |
lorcansmith | 0:2a53a4c3238c | 1730 | #define PPP_MINMRU 128 /* No MRUs below this */ |
lorcansmith | 0:2a53a4c3238c | 1731 | |
lorcansmith | 0:2a53a4c3238c | 1732 | #ifndef MAXNAMELEN |
lorcansmith | 0:2a53a4c3238c | 1733 | #define MAXNAMELEN 256 /* max length of hostname or name for auth */ |
lorcansmith | 0:2a53a4c3238c | 1734 | #endif |
lorcansmith | 0:2a53a4c3238c | 1735 | #ifndef MAXSECRETLEN |
lorcansmith | 0:2a53a4c3238c | 1736 | #define MAXSECRETLEN 256 /* max length of password or secret */ |
lorcansmith | 0:2a53a4c3238c | 1737 | #endif |
lorcansmith | 0:2a53a4c3238c | 1738 | |
lorcansmith | 0:2a53a4c3238c | 1739 | #endif /* PPP_SUPPORT */ |
lorcansmith | 0:2a53a4c3238c | 1740 | |
lorcansmith | 0:2a53a4c3238c | 1741 | /* |
lorcansmith | 0:2a53a4c3238c | 1742 | -------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1743 | ---------- Checksum options ---------- |
lorcansmith | 0:2a53a4c3238c | 1744 | -------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1745 | */ |
lorcansmith | 0:2a53a4c3238c | 1746 | /** |
lorcansmith | 0:2a53a4c3238c | 1747 | * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. |
lorcansmith | 0:2a53a4c3238c | 1748 | */ |
lorcansmith | 0:2a53a4c3238c | 1749 | #ifndef CHECKSUM_GEN_IP |
lorcansmith | 0:2a53a4c3238c | 1750 | #define CHECKSUM_GEN_IP 1 |
lorcansmith | 0:2a53a4c3238c | 1751 | #endif |
lorcansmith | 0:2a53a4c3238c | 1752 | |
lorcansmith | 0:2a53a4c3238c | 1753 | /** |
lorcansmith | 0:2a53a4c3238c | 1754 | * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. |
lorcansmith | 0:2a53a4c3238c | 1755 | */ |
lorcansmith | 0:2a53a4c3238c | 1756 | #ifndef CHECKSUM_GEN_UDP |
lorcansmith | 0:2a53a4c3238c | 1757 | #define CHECKSUM_GEN_UDP 1 |
lorcansmith | 0:2a53a4c3238c | 1758 | #endif |
lorcansmith | 0:2a53a4c3238c | 1759 | |
lorcansmith | 0:2a53a4c3238c | 1760 | /** |
lorcansmith | 0:2a53a4c3238c | 1761 | * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. |
lorcansmith | 0:2a53a4c3238c | 1762 | */ |
lorcansmith | 0:2a53a4c3238c | 1763 | #ifndef CHECKSUM_GEN_TCP |
lorcansmith | 0:2a53a4c3238c | 1764 | #define CHECKSUM_GEN_TCP 1 |
lorcansmith | 0:2a53a4c3238c | 1765 | #endif |
lorcansmith | 0:2a53a4c3238c | 1766 | |
lorcansmith | 0:2a53a4c3238c | 1767 | /** |
lorcansmith | 0:2a53a4c3238c | 1768 | * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. |
lorcansmith | 0:2a53a4c3238c | 1769 | */ |
lorcansmith | 0:2a53a4c3238c | 1770 | #ifndef CHECKSUM_CHECK_IP |
lorcansmith | 0:2a53a4c3238c | 1771 | #define CHECKSUM_CHECK_IP 1 |
lorcansmith | 0:2a53a4c3238c | 1772 | #endif |
lorcansmith | 0:2a53a4c3238c | 1773 | |
lorcansmith | 0:2a53a4c3238c | 1774 | /** |
lorcansmith | 0:2a53a4c3238c | 1775 | * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. |
lorcansmith | 0:2a53a4c3238c | 1776 | */ |
lorcansmith | 0:2a53a4c3238c | 1777 | #ifndef CHECKSUM_CHECK_UDP |
lorcansmith | 0:2a53a4c3238c | 1778 | #define CHECKSUM_CHECK_UDP 1 |
lorcansmith | 0:2a53a4c3238c | 1779 | #endif |
lorcansmith | 0:2a53a4c3238c | 1780 | |
lorcansmith | 0:2a53a4c3238c | 1781 | /** |
lorcansmith | 0:2a53a4c3238c | 1782 | * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. |
lorcansmith | 0:2a53a4c3238c | 1783 | */ |
lorcansmith | 0:2a53a4c3238c | 1784 | #ifndef CHECKSUM_CHECK_TCP |
lorcansmith | 0:2a53a4c3238c | 1785 | #define CHECKSUM_CHECK_TCP 1 |
lorcansmith | 0:2a53a4c3238c | 1786 | #endif |
lorcansmith | 0:2a53a4c3238c | 1787 | |
lorcansmith | 0:2a53a4c3238c | 1788 | /** |
lorcansmith | 0:2a53a4c3238c | 1789 | * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from |
lorcansmith | 0:2a53a4c3238c | 1790 | * application buffers to pbufs. |
lorcansmith | 0:2a53a4c3238c | 1791 | */ |
lorcansmith | 0:2a53a4c3238c | 1792 | #ifndef LWIP_CHECKSUM_ON_COPY |
lorcansmith | 0:2a53a4c3238c | 1793 | #define LWIP_CHECKSUM_ON_COPY 0 |
lorcansmith | 0:2a53a4c3238c | 1794 | #endif |
lorcansmith | 0:2a53a4c3238c | 1795 | |
lorcansmith | 0:2a53a4c3238c | 1796 | /* |
lorcansmith | 0:2a53a4c3238c | 1797 | --------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1798 | ---------- Debugging options ---------- |
lorcansmith | 0:2a53a4c3238c | 1799 | --------------------------------------- |
lorcansmith | 0:2a53a4c3238c | 1800 | */ |
lorcansmith | 0:2a53a4c3238c | 1801 | /** |
lorcansmith | 0:2a53a4c3238c | 1802 | * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is |
lorcansmith | 0:2a53a4c3238c | 1803 | * compared against this value. If it is smaller, then debugging |
lorcansmith | 0:2a53a4c3238c | 1804 | * messages are written. |
lorcansmith | 0:2a53a4c3238c | 1805 | */ |
lorcansmith | 0:2a53a4c3238c | 1806 | #ifndef LWIP_DBG_MIN_LEVEL |
lorcansmith | 0:2a53a4c3238c | 1807 | #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL |
lorcansmith | 0:2a53a4c3238c | 1808 | #endif |
lorcansmith | 0:2a53a4c3238c | 1809 | |
lorcansmith | 0:2a53a4c3238c | 1810 | /** |
lorcansmith | 0:2a53a4c3238c | 1811 | * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable |
lorcansmith | 0:2a53a4c3238c | 1812 | * debug messages of certain types. |
lorcansmith | 0:2a53a4c3238c | 1813 | */ |
lorcansmith | 0:2a53a4c3238c | 1814 | #ifndef LWIP_DBG_TYPES_ON |
lorcansmith | 0:2a53a4c3238c | 1815 | #define LWIP_DBG_TYPES_ON LWIP_DBG_ON |
lorcansmith | 0:2a53a4c3238c | 1816 | #endif |
lorcansmith | 0:2a53a4c3238c | 1817 | |
lorcansmith | 0:2a53a4c3238c | 1818 | /** |
lorcansmith | 0:2a53a4c3238c | 1819 | * ETHARP_DEBUG: Enable debugging in etharp.c. |
lorcansmith | 0:2a53a4c3238c | 1820 | */ |
lorcansmith | 0:2a53a4c3238c | 1821 | #ifndef ETHARP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1822 | #define ETHARP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1823 | #endif |
lorcansmith | 0:2a53a4c3238c | 1824 | |
lorcansmith | 0:2a53a4c3238c | 1825 | /** |
lorcansmith | 0:2a53a4c3238c | 1826 | * NETIF_DEBUG: Enable debugging in netif.c. |
lorcansmith | 0:2a53a4c3238c | 1827 | */ |
lorcansmith | 0:2a53a4c3238c | 1828 | #ifndef NETIF_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1829 | #define NETIF_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1830 | #endif |
lorcansmith | 0:2a53a4c3238c | 1831 | |
lorcansmith | 0:2a53a4c3238c | 1832 | /** |
lorcansmith | 0:2a53a4c3238c | 1833 | * PBUF_DEBUG: Enable debugging in pbuf.c. |
lorcansmith | 0:2a53a4c3238c | 1834 | */ |
lorcansmith | 0:2a53a4c3238c | 1835 | #ifndef PBUF_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1836 | #define PBUF_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1837 | #endif |
lorcansmith | 0:2a53a4c3238c | 1838 | |
lorcansmith | 0:2a53a4c3238c | 1839 | /** |
lorcansmith | 0:2a53a4c3238c | 1840 | * API_LIB_DEBUG: Enable debugging in api_lib.c. |
lorcansmith | 0:2a53a4c3238c | 1841 | */ |
lorcansmith | 0:2a53a4c3238c | 1842 | #ifndef API_LIB_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1843 | #define API_LIB_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1844 | #endif |
lorcansmith | 0:2a53a4c3238c | 1845 | |
lorcansmith | 0:2a53a4c3238c | 1846 | /** |
lorcansmith | 0:2a53a4c3238c | 1847 | * API_MSG_DEBUG: Enable debugging in api_msg.c. |
lorcansmith | 0:2a53a4c3238c | 1848 | */ |
lorcansmith | 0:2a53a4c3238c | 1849 | #ifndef API_MSG_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1850 | #define API_MSG_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1851 | #endif |
lorcansmith | 0:2a53a4c3238c | 1852 | |
lorcansmith | 0:2a53a4c3238c | 1853 | /** |
lorcansmith | 0:2a53a4c3238c | 1854 | * SOCKETS_DEBUG: Enable debugging in sockets.c. |
lorcansmith | 0:2a53a4c3238c | 1855 | */ |
lorcansmith | 0:2a53a4c3238c | 1856 | #ifndef SOCKETS_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1857 | #define SOCKETS_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1858 | #endif |
lorcansmith | 0:2a53a4c3238c | 1859 | |
lorcansmith | 0:2a53a4c3238c | 1860 | /** |
lorcansmith | 0:2a53a4c3238c | 1861 | * ICMP_DEBUG: Enable debugging in icmp.c. |
lorcansmith | 0:2a53a4c3238c | 1862 | */ |
lorcansmith | 0:2a53a4c3238c | 1863 | #ifndef ICMP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1864 | #define ICMP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1865 | #endif |
lorcansmith | 0:2a53a4c3238c | 1866 | |
lorcansmith | 0:2a53a4c3238c | 1867 | /** |
lorcansmith | 0:2a53a4c3238c | 1868 | * IGMP_DEBUG: Enable debugging in igmp.c. |
lorcansmith | 0:2a53a4c3238c | 1869 | */ |
lorcansmith | 0:2a53a4c3238c | 1870 | #ifndef IGMP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1871 | #define IGMP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1872 | #endif |
lorcansmith | 0:2a53a4c3238c | 1873 | |
lorcansmith | 0:2a53a4c3238c | 1874 | /** |
lorcansmith | 0:2a53a4c3238c | 1875 | * INET_DEBUG: Enable debugging in inet.c. |
lorcansmith | 0:2a53a4c3238c | 1876 | */ |
lorcansmith | 0:2a53a4c3238c | 1877 | #ifndef INET_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1878 | #define INET_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1879 | #endif |
lorcansmith | 0:2a53a4c3238c | 1880 | |
lorcansmith | 0:2a53a4c3238c | 1881 | /** |
lorcansmith | 0:2a53a4c3238c | 1882 | * IP_DEBUG: Enable debugging for IP. |
lorcansmith | 0:2a53a4c3238c | 1883 | */ |
lorcansmith | 0:2a53a4c3238c | 1884 | #ifndef IP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1885 | #define IP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1886 | #endif |
lorcansmith | 0:2a53a4c3238c | 1887 | |
lorcansmith | 0:2a53a4c3238c | 1888 | /** |
lorcansmith | 0:2a53a4c3238c | 1889 | * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. |
lorcansmith | 0:2a53a4c3238c | 1890 | */ |
lorcansmith | 0:2a53a4c3238c | 1891 | #ifndef IP_REASS_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1892 | #define IP_REASS_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1893 | #endif |
lorcansmith | 0:2a53a4c3238c | 1894 | |
lorcansmith | 0:2a53a4c3238c | 1895 | /** |
lorcansmith | 0:2a53a4c3238c | 1896 | * RAW_DEBUG: Enable debugging in raw.c. |
lorcansmith | 0:2a53a4c3238c | 1897 | */ |
lorcansmith | 0:2a53a4c3238c | 1898 | #ifndef RAW_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1899 | #define RAW_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1900 | #endif |
lorcansmith | 0:2a53a4c3238c | 1901 | |
lorcansmith | 0:2a53a4c3238c | 1902 | /** |
lorcansmith | 0:2a53a4c3238c | 1903 | * MEM_DEBUG: Enable debugging in mem.c. |
lorcansmith | 0:2a53a4c3238c | 1904 | */ |
lorcansmith | 0:2a53a4c3238c | 1905 | #ifndef MEM_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1906 | #define MEM_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1907 | #endif |
lorcansmith | 0:2a53a4c3238c | 1908 | |
lorcansmith | 0:2a53a4c3238c | 1909 | /** |
lorcansmith | 0:2a53a4c3238c | 1910 | * MEMP_DEBUG: Enable debugging in memp.c. |
lorcansmith | 0:2a53a4c3238c | 1911 | */ |
lorcansmith | 0:2a53a4c3238c | 1912 | #ifndef MEMP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1913 | #define MEMP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1914 | #endif |
lorcansmith | 0:2a53a4c3238c | 1915 | |
lorcansmith | 0:2a53a4c3238c | 1916 | /** |
lorcansmith | 0:2a53a4c3238c | 1917 | * SYS_DEBUG: Enable debugging in sys.c. |
lorcansmith | 0:2a53a4c3238c | 1918 | */ |
lorcansmith | 0:2a53a4c3238c | 1919 | #ifndef SYS_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1920 | #define SYS_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1921 | #endif |
lorcansmith | 0:2a53a4c3238c | 1922 | |
lorcansmith | 0:2a53a4c3238c | 1923 | /** |
lorcansmith | 0:2a53a4c3238c | 1924 | * TIMERS_DEBUG: Enable debugging in timers.c. |
lorcansmith | 0:2a53a4c3238c | 1925 | */ |
lorcansmith | 0:2a53a4c3238c | 1926 | #ifndef TIMERS_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1927 | #define TIMERS_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1928 | #endif |
lorcansmith | 0:2a53a4c3238c | 1929 | |
lorcansmith | 0:2a53a4c3238c | 1930 | /** |
lorcansmith | 0:2a53a4c3238c | 1931 | * TCP_DEBUG: Enable debugging for TCP. |
lorcansmith | 0:2a53a4c3238c | 1932 | */ |
lorcansmith | 0:2a53a4c3238c | 1933 | #ifndef TCP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1934 | #define TCP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1935 | #endif |
lorcansmith | 0:2a53a4c3238c | 1936 | |
lorcansmith | 0:2a53a4c3238c | 1937 | /** |
lorcansmith | 0:2a53a4c3238c | 1938 | * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. |
lorcansmith | 0:2a53a4c3238c | 1939 | */ |
lorcansmith | 0:2a53a4c3238c | 1940 | #ifndef TCP_INPUT_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1941 | #define TCP_INPUT_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1942 | #endif |
lorcansmith | 0:2a53a4c3238c | 1943 | |
lorcansmith | 0:2a53a4c3238c | 1944 | /** |
lorcansmith | 0:2a53a4c3238c | 1945 | * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. |
lorcansmith | 0:2a53a4c3238c | 1946 | */ |
lorcansmith | 0:2a53a4c3238c | 1947 | #ifndef TCP_FR_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1948 | #define TCP_FR_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1949 | #endif |
lorcansmith | 0:2a53a4c3238c | 1950 | |
lorcansmith | 0:2a53a4c3238c | 1951 | /** |
lorcansmith | 0:2a53a4c3238c | 1952 | * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit |
lorcansmith | 0:2a53a4c3238c | 1953 | * timeout. |
lorcansmith | 0:2a53a4c3238c | 1954 | */ |
lorcansmith | 0:2a53a4c3238c | 1955 | #ifndef TCP_RTO_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1956 | #define TCP_RTO_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1957 | #endif |
lorcansmith | 0:2a53a4c3238c | 1958 | |
lorcansmith | 0:2a53a4c3238c | 1959 | /** |
lorcansmith | 0:2a53a4c3238c | 1960 | * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. |
lorcansmith | 0:2a53a4c3238c | 1961 | */ |
lorcansmith | 0:2a53a4c3238c | 1962 | #ifndef TCP_CWND_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1963 | #define TCP_CWND_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1964 | #endif |
lorcansmith | 0:2a53a4c3238c | 1965 | |
lorcansmith | 0:2a53a4c3238c | 1966 | /** |
lorcansmith | 0:2a53a4c3238c | 1967 | * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. |
lorcansmith | 0:2a53a4c3238c | 1968 | */ |
lorcansmith | 0:2a53a4c3238c | 1969 | #ifndef TCP_WND_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1970 | #define TCP_WND_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1971 | #endif |
lorcansmith | 0:2a53a4c3238c | 1972 | |
lorcansmith | 0:2a53a4c3238c | 1973 | /** |
lorcansmith | 0:2a53a4c3238c | 1974 | * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. |
lorcansmith | 0:2a53a4c3238c | 1975 | */ |
lorcansmith | 0:2a53a4c3238c | 1976 | #ifndef TCP_OUTPUT_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1977 | #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1978 | #endif |
lorcansmith | 0:2a53a4c3238c | 1979 | |
lorcansmith | 0:2a53a4c3238c | 1980 | /** |
lorcansmith | 0:2a53a4c3238c | 1981 | * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. |
lorcansmith | 0:2a53a4c3238c | 1982 | */ |
lorcansmith | 0:2a53a4c3238c | 1983 | #ifndef TCP_RST_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1984 | #define TCP_RST_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1985 | #endif |
lorcansmith | 0:2a53a4c3238c | 1986 | |
lorcansmith | 0:2a53a4c3238c | 1987 | /** |
lorcansmith | 0:2a53a4c3238c | 1988 | * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. |
lorcansmith | 0:2a53a4c3238c | 1989 | */ |
lorcansmith | 0:2a53a4c3238c | 1990 | #ifndef TCP_QLEN_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1991 | #define TCP_QLEN_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 1992 | #endif |
lorcansmith | 0:2a53a4c3238c | 1993 | |
lorcansmith | 0:2a53a4c3238c | 1994 | /** |
lorcansmith | 0:2a53a4c3238c | 1995 | * UDP_DEBUG: Enable debugging in UDP. |
lorcansmith | 0:2a53a4c3238c | 1996 | */ |
lorcansmith | 0:2a53a4c3238c | 1997 | #ifndef UDP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 1998 | #define UDP_DEBUG LWIP_DBG_ON |
lorcansmith | 0:2a53a4c3238c | 1999 | #endif |
lorcansmith | 0:2a53a4c3238c | 2000 | |
lorcansmith | 0:2a53a4c3238c | 2001 | /** |
lorcansmith | 0:2a53a4c3238c | 2002 | * TCPIP_DEBUG: Enable debugging in tcpip.c. |
lorcansmith | 0:2a53a4c3238c | 2003 | */ |
lorcansmith | 0:2a53a4c3238c | 2004 | #ifndef TCPIP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2005 | #define TCPIP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2006 | #endif |
lorcansmith | 0:2a53a4c3238c | 2007 | |
lorcansmith | 0:2a53a4c3238c | 2008 | /** |
lorcansmith | 0:2a53a4c3238c | 2009 | * PPP_DEBUG: Enable debugging for PPP. |
lorcansmith | 0:2a53a4c3238c | 2010 | */ |
lorcansmith | 0:2a53a4c3238c | 2011 | #ifndef PPP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2012 | #define PPP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2013 | #endif |
lorcansmith | 0:2a53a4c3238c | 2014 | |
lorcansmith | 0:2a53a4c3238c | 2015 | /** |
lorcansmith | 0:2a53a4c3238c | 2016 | * SLIP_DEBUG: Enable debugging in slipif.c. |
lorcansmith | 0:2a53a4c3238c | 2017 | */ |
lorcansmith | 0:2a53a4c3238c | 2018 | #ifndef SLIP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2019 | #define SLIP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2020 | #endif |
lorcansmith | 0:2a53a4c3238c | 2021 | |
lorcansmith | 0:2a53a4c3238c | 2022 | /** |
lorcansmith | 0:2a53a4c3238c | 2023 | * DHCP_DEBUG: Enable debugging in dhcp.c. |
lorcansmith | 0:2a53a4c3238c | 2024 | */ |
lorcansmith | 0:2a53a4c3238c | 2025 | #ifndef DHCP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2026 | #define DHCP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2027 | #endif |
lorcansmith | 0:2a53a4c3238c | 2028 | |
lorcansmith | 0:2a53a4c3238c | 2029 | /** |
lorcansmith | 0:2a53a4c3238c | 2030 | * AUTOIP_DEBUG: Enable debugging in autoip.c. |
lorcansmith | 0:2a53a4c3238c | 2031 | */ |
lorcansmith | 0:2a53a4c3238c | 2032 | #ifndef AUTOIP_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2033 | #define AUTOIP_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2034 | #endif |
lorcansmith | 0:2a53a4c3238c | 2035 | |
lorcansmith | 0:2a53a4c3238c | 2036 | /** |
lorcansmith | 0:2a53a4c3238c | 2037 | * SNMP_MSG_DEBUG: Enable debugging for SNMP messages. |
lorcansmith | 0:2a53a4c3238c | 2038 | */ |
lorcansmith | 0:2a53a4c3238c | 2039 | #ifndef SNMP_MSG_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2040 | #define SNMP_MSG_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2041 | #endif |
lorcansmith | 0:2a53a4c3238c | 2042 | |
lorcansmith | 0:2a53a4c3238c | 2043 | /** |
lorcansmith | 0:2a53a4c3238c | 2044 | * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. |
lorcansmith | 0:2a53a4c3238c | 2045 | */ |
lorcansmith | 0:2a53a4c3238c | 2046 | #ifndef SNMP_MIB_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2047 | #define SNMP_MIB_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2048 | #endif |
lorcansmith | 0:2a53a4c3238c | 2049 | |
lorcansmith | 0:2a53a4c3238c | 2050 | /** |
lorcansmith | 0:2a53a4c3238c | 2051 | * DNS_DEBUG: Enable debugging for DNS. |
lorcansmith | 0:2a53a4c3238c | 2052 | */ |
lorcansmith | 0:2a53a4c3238c | 2053 | #ifndef DNS_DEBUG |
lorcansmith | 0:2a53a4c3238c | 2054 | #define DNS_DEBUG LWIP_DBG_OFF |
lorcansmith | 0:2a53a4c3238c | 2055 | #endif |
lorcansmith | 0:2a53a4c3238c | 2056 | |
lorcansmith | 0:2a53a4c3238c | 2057 | #endif /* __LWIP_OPT_H__ */ |