Modified version of NetServices. Fixes an issue where connections failed should the HTTP response status line be received in a packet on its own prior to any further headers. Changes are made to the HTTPClient.cpp file's readHeaders method.

Committer:
andrewbonney
Date:
Fri Apr 08 14:39:41 2011 +0000
Revision:
0:ec559500a63f

        

Who changed what in which revision?

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