EthernetNetIf

Dependents:   XBee_WiFi_EA_LPC4088

Committer:
hmike
Date:
Wed Nov 19 12:00:42 2014 +0000
Revision:
0:62580107d20c
EthernetNetIf

Who changed what in which revision?

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