Darran Shepherd / Mbed 2 deprecated Bonjour

Dependencies:   mbed

Committer:
darran
Date:
Fri Jun 18 09:11:35 2010 +0000
Revision:
0:55a05330f8cc

        

Who changed what in which revision?

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