Version of http://mbed.org/cookbook/NetServicesTribute with setting set the same for LPC2368

Dependents:   UDPSocketExample 24LCxx_I2CApp WeatherPlatform_pachube HvZServerLib ... more

Committer:
simon
Date:
Tue Nov 23 14:15:36 2010 +0000
Revision:
0:350011bf8be7
Experimental version for testing UDP

Who changed what in which revision?

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