VZTECH / lwip

Dependents:   EthernetInterface

Fork of lwip by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers opt.h Source File

opt.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  *
00004  * lwIP Options Configuration
00005  */
00006 
00007 /*
00008  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
00009  * All rights reserved. 
00010  * 
00011  * Redistribution and use in source and binary forms, with or without modification, 
00012  * are permitted provided that the following conditions are met:
00013  *
00014  * 1. Redistributions of source code must retain the above copyright notice,
00015  *    this list of conditions and the following disclaimer.
00016  * 2. Redistributions in binary form must reproduce the above copyright notice,
00017  *    this list of conditions and the following disclaimer in the documentation
00018  *    and/or other materials provided with the distribution.
00019  * 3. The name of the author may not be used to endorse or promote products
00020  *    derived from this software without specific prior written permission. 
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
00023  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
00024  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
00025  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00026  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
00027  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00028  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00029  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
00030  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
00031  * OF SUCH DAMAGE.
00032  *
00033  * This file is part of the lwIP TCP/IP stack.
00034  * 
00035  * Author: Adam Dunkels <adam@sics.se>
00036  *
00037  */
00038 #ifndef __LWIP_OPT_H__
00039 #define __LWIP_OPT_H__
00040 
00041 /*
00042  * Include user defined options first. Anything not defined in these files
00043  * will be set to standard values. Override anything you dont like!
00044  */
00045 #include "lwipopts.h"
00046 #include "lwip/debug.h"
00047 
00048 /*
00049    -----------------------------------------------
00050    ---------- Platform specific locking ----------
00051    -----------------------------------------------
00052 */
00053 
00054 /**
00055  * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
00056  * critical regions during buffer allocation, deallocation and memory
00057  * allocation and deallocation.
00058  */
00059 #ifndef SYS_LIGHTWEIGHT_PROT
00060 #define SYS_LIGHTWEIGHT_PROT            0
00061 #endif
00062 
00063 /** 
00064  * NO_SYS==1: Provides VERY minimal functionality. Otherwise,
00065  * use lwIP facilities.
00066  */
00067 #ifndef NO_SYS
00068 #define NO_SYS                          0
00069 #endif
00070 
00071 /**
00072  * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1
00073  * Mainly for compatibility to old versions.
00074  */
00075 #ifndef NO_SYS_NO_TIMERS
00076 #define NO_SYS_NO_TIMERS                0
00077 #endif
00078 
00079 /**
00080  * MEMCPY: override this if you have a faster implementation at hand than the
00081  * one included in your C library
00082  */
00083 #ifndef MEMCPY
00084 #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
00085 #endif
00086 
00087 /**
00088  * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a
00089  * call to memcpy() if the length is known at compile time and is small.
00090  */
00091 #ifndef SMEMCPY
00092 #define SMEMCPY(dst,src,len)            memcpy(dst,src,len)
00093 #endif
00094 
00095 /*
00096    ------------------------------------
00097    ---------- Memory options ----------
00098    ------------------------------------
00099 */
00100 /**
00101  * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
00102  * instead of the lwip internal allocator. Can save code size if you
00103  * already use it.
00104  */
00105 #ifndef MEM_LIBC_MALLOC
00106 #define MEM_LIBC_MALLOC                 0
00107 #endif
00108 
00109 /**
00110 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
00111 * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
00112 * speed and usage from interrupts!
00113 */
00114 #ifndef MEMP_MEM_MALLOC
00115 #define MEMP_MEM_MALLOC                 0
00116 #endif
00117 
00118 /**
00119  * MEM_ALIGNMENT: should be set to the alignment of the CPU
00120  *    4 byte alignment -> #define MEM_ALIGNMENT 4
00121  *    2 byte alignment -> #define MEM_ALIGNMENT 2
00122  */
00123 #ifndef MEM_ALIGNMENT
00124 #define MEM_ALIGNMENT                   1
00125 #endif
00126 
00127 /**
00128  * MEM_SIZE: the size of the heap memory. If the application will send
00129  * a lot of data that needs to be copied, this should be set high.
00130  */
00131 #ifndef MEM_SIZE
00132 #define MEM_SIZE                        1600
00133 #endif
00134 
00135 /**
00136  * MEMP_SEPARATE_POOLS: if defined to 1, each pool is placed in its own array.
00137  * This can be used to individually change the location of each pool.
00138  * Default is one big array for all pools
00139  */
00140 #ifndef MEMP_SEPARATE_POOLS
00141 #define MEMP_SEPARATE_POOLS             0
00142 #endif
00143 
00144 /**
00145  * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable
00146  * amount of bytes before and after each memp element in every pool and fills
00147  * it with a prominent default value.
00148  *    MEMP_OVERFLOW_CHECK == 0 no checking
00149  *    MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed
00150  *    MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time
00151  *      memp_malloc() or memp_free() is called (useful but slow!)
00152  */
00153 #ifndef MEMP_OVERFLOW_CHECK
00154 #define MEMP_OVERFLOW_CHECK             0
00155 #endif
00156 
00157 /**
00158  * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make
00159  * sure that there are no cycles in the linked lists.
00160  */
00161 #ifndef MEMP_SANITY_CHECK
00162 #define MEMP_SANITY_CHECK               0
00163 #endif
00164 
00165 /**
00166  * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set
00167  * of memory pools of various sizes. When mem_malloc is called, an element of
00168  * the smallest pool that can provide the length needed is returned.
00169  * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
00170  */
00171 #ifndef MEM_USE_POOLS
00172 #define MEM_USE_POOLS                   0
00173 #endif
00174 
00175 /**
00176  * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next
00177  * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more
00178  * reliable. */
00179 #ifndef MEM_USE_POOLS_TRY_BIGGER_POOL
00180 #define MEM_USE_POOLS_TRY_BIGGER_POOL   0
00181 #endif
00182 
00183 /**
00184  * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h
00185  * that defines additional pools beyond the "standard" ones required
00186  * by lwIP. If you set this to 1, you must have lwippools.h in your 
00187  * inlude path somewhere. 
00188  */
00189 #ifndef MEMP_USE_CUSTOM_POOLS
00190 #define MEMP_USE_CUSTOM_POOLS           0
00191 #endif
00192 
00193 /**
00194  * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from
00195  * interrupt context (or another context that doesn't allow waiting for a
00196  * semaphore).
00197  * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT,
00198  * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs
00199  * with each loop so that mem_free can run.
00200  *
00201  * ATTENTION: As you can see from the above description, this leads to dis-/
00202  * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc
00203  * can need longer.
00204  *
00205  * If you don't want that, at least for NO_SYS=0, you can still use the following
00206  * functions to enqueue a deallocation call which then runs in the tcpip_thread
00207  * context:
00208  * - pbuf_free_callback(p);
00209  * - mem_free_callback(m);
00210  */
00211 #ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
00212 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
00213 #endif
00214 
00215 /*
00216    ------------------------------------------------
00217    ---------- Internal Memory Pool Sizes ----------
00218    ------------------------------------------------
00219 */
00220 /**
00221  * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
00222  * If the application sends a lot of data out of ROM (or other static memory),
00223  * this should be set high.
00224  */
00225 #ifndef MEMP_NUM_PBUF
00226 #define MEMP_NUM_PBUF                   16
00227 #endif
00228 
00229 /**
00230  * MEMP_NUM_RAW_PCB: Number of raw connection PCBs
00231  * (requires the LWIP_RAW option)
00232  */
00233 #ifndef MEMP_NUM_RAW_PCB
00234 #define MEMP_NUM_RAW_PCB                16//pzn4
00235 #endif
00236 
00237 /**
00238  * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
00239  * per active UDP "connection".
00240  * (requires the LWIP_UDP option)
00241  */
00242 #ifndef MEMP_NUM_UDP_PCB
00243 #define MEMP_NUM_UDP_PCB                64//4
00244 #endif
00245 
00246 /**
00247  * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
00248  * (requires the LWIP_TCP option)
00249  */
00250 #ifndef MEMP_NUM_TCP_PCB
00251 #define MEMP_NUM_TCP_PCB                5
00252 #endif
00253 
00254 /**
00255  * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
00256  * (requires the LWIP_TCP option)
00257  */
00258 #ifndef MEMP_NUM_TCP_PCB_LISTEN
00259 #define MEMP_NUM_TCP_PCB_LISTEN         8
00260 #endif
00261 
00262 /**
00263  * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
00264  * (requires the LWIP_TCP option)
00265  */
00266 #ifndef MEMP_NUM_TCP_SEG
00267 #define MEMP_NUM_TCP_SEG                16
00268 #endif
00269 
00270 /**
00271  * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for
00272  * reassembly (whole packets, not fragments!)
00273  */
00274 #ifndef MEMP_NUM_REASSDATA
00275 #define MEMP_NUM_REASSDATA              5
00276 #endif
00277 
00278 /**
00279  * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent
00280  * (fragments, not whole packets!).
00281  * This is only used with IP_FRAG_USES_STATIC_BUF==0 and
00282  * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs
00283  * where the packet is not yet sent when netif->output returns.
00284  */
00285 #ifndef MEMP_NUM_FRAG_PBUF
00286 #define MEMP_NUM_FRAG_PBUF              15
00287 #endif
00288 
00289 /**
00290  * MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
00291  * packets (pbufs) that are waiting for an ARP request (to resolve
00292  * their destination address) to finish.
00293  * (requires the ARP_QUEUEING option)
00294  */
00295 #ifndef MEMP_NUM_ARP_QUEUE
00296 #define MEMP_NUM_ARP_QUEUE              30
00297 #endif
00298 
00299 /**
00300  * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces
00301  * can be members et the same time (one per netif - allsystems group -, plus one
00302  * per netif membership).
00303  * (requires the LWIP_IGMP option)
00304  */
00305 #ifndef MEMP_NUM_IGMP_GROUP
00306 #define MEMP_NUM_IGMP_GROUP             8
00307 #endif
00308 
00309 /**
00310  * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
00311  * (requires NO_SYS==0)
00312  */
00313 #ifndef MEMP_NUM_SYS_TIMEOUT
00314 #define MEMP_NUM_SYS_TIMEOUT            3
00315 #endif
00316 
00317 /**
00318  * MEMP_NUM_NETBUF: the number of struct netbufs.
00319  * (only needed if you use the sequential API, like api_lib.c)
00320  */
00321 #ifndef MEMP_NUM_NETBUF
00322 #define MEMP_NUM_NETBUF                 8//pzn2
00323 
00324 #endif
00325 
00326 /**
00327  * MEMP_NUM_NETCONN: the number of struct netconns.
00328  * (only needed if you use the sequential API, like api_lib.c)
00329  */
00330 #ifndef MEMP_NUM_NETCONN
00331 #define MEMP_NUM_NETCONN                64//4
00332 #endif
00333 
00334 /**
00335  * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
00336  * for callback/timeout API communication. 
00337  * (only needed if you use tcpip.c)
00338  */
00339 #ifndef MEMP_NUM_TCPIP_MSG_API
00340 #define MEMP_NUM_TCPIP_MSG_API          8
00341 #endif
00342 
00343 /**
00344  * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
00345  * for incoming packets. 
00346  * (only needed if you use tcpip.c)
00347  */
00348 #ifndef MEMP_NUM_TCPIP_MSG_INPKT
00349 #define MEMP_NUM_TCPIP_MSG_INPKT        8
00350 #endif
00351 
00352 /**
00353  * MEMP_NUM_SNMP_NODE: the number of leafs in the SNMP tree.
00354  */
00355 #ifndef MEMP_NUM_SNMP_NODE
00356 #define MEMP_NUM_SNMP_NODE              50
00357 #endif
00358 
00359 /**
00360  * MEMP_NUM_SNMP_ROOTNODE: the number of branches in the SNMP tree.
00361  * Every branch has one leaf (MEMP_NUM_SNMP_NODE) at least!
00362  */
00363 #ifndef MEMP_NUM_SNMP_ROOTNODE
00364 #define MEMP_NUM_SNMP_ROOTNODE          30
00365 #endif
00366 
00367 /**
00368  * MEMP_NUM_SNMP_VARBIND: the number of concurrent requests (does not have to
00369  * be changed normally) - 2 of these are used per request (1 for input,
00370  * 1 for output)
00371  */
00372 #ifndef MEMP_NUM_SNMP_VARBIND
00373 #define MEMP_NUM_SNMP_VARBIND           2
00374 #endif
00375 
00376 /**
00377  * MEMP_NUM_SNMP_VALUE: the number of OID or values concurrently used
00378  * (does not have to be changed normally) - 3 of these are used per request
00379  * (1 for the value read and 2 for OIDs - input and output)
00380  */
00381 #ifndef MEMP_NUM_SNMP_VALUE
00382 #define MEMP_NUM_SNMP_VALUE             3
00383 #endif
00384 
00385 /**
00386  * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls
00387  * (before freeing the corresponding memory using lwip_freeaddrinfo()).
00388  */
00389 #ifndef MEMP_NUM_NETDB
00390 #define MEMP_NUM_NETDB                  1
00391 #endif
00392 
00393 /**
00394  * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list
00395  * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
00396  */
00397 #ifndef MEMP_NUM_LOCALHOSTLIST
00398 #define MEMP_NUM_LOCALHOSTLIST          1
00399 #endif
00400 
00401 /**
00402  * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE
00403  * interfaces (only used with PPPOE_SUPPORT==1)
00404  */
00405 #ifndef MEMP_NUM_PPPOE_INTERFACES
00406 #define MEMP_NUM_PPPOE_INTERFACES       1
00407 #endif
00408 
00409 /**
00410  * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. 
00411  */
00412 #ifndef PBUF_POOL_SIZE
00413 #define PBUF_POOL_SIZE                  16
00414 #endif
00415 
00416 /*
00417    ---------------------------------
00418    ---------- ARP options ----------
00419    ---------------------------------
00420 */
00421 /**
00422  * LWIP_ARP==1: Enable ARP functionality.
00423  */
00424 #ifndef LWIP_ARP
00425 #define LWIP_ARP                        1
00426 #endif
00427 
00428 /**
00429  * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
00430  */
00431 #ifndef ARP_TABLE_SIZE
00432 #define ARP_TABLE_SIZE                  10
00433 #endif
00434 
00435 /**
00436  * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address
00437  * resolution. By default, only the most recent packet is queued per IP address.
00438  * This is sufficient for most protocols and mainly reduces TCP connection
00439  * startup time. Set this to 1 if you know your application sends more than one
00440  * packet in a row to an IP address that is not in the ARP cache.
00441  */
00442 #ifndef ARP_QUEUEING
00443 #define ARP_QUEUEING                    0
00444 #endif
00445 
00446 /**
00447  * ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
00448  * updated with the source MAC and IP addresses supplied in the packet.
00449  * You may want to disable this if you do not trust LAN peers to have the
00450  * correct addresses, or as a limited approach to attempt to handle
00451  * spoofing. If disabled, lwIP will need to make a new ARP request if
00452  * the peer is not already in the ARP table, adding a little latency.
00453  * The peer *is* in the ARP table if it requested our address before.
00454  * Also notice that this slows down input processing of every IP packet!
00455  */
00456 #ifndef ETHARP_TRUST_IP_MAC
00457 #define ETHARP_TRUST_IP_MAC             0
00458 #endif
00459 
00460 /**
00461  * ETHARP_SUPPORT_VLAN==1: support receiving ethernet packets with VLAN header.
00462  * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check.
00463  * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
00464  * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
00465  */
00466 #ifndef ETHARP_SUPPORT_VLAN
00467 #define ETHARP_SUPPORT_VLAN             0
00468 #endif
00469 
00470 /** LWIP_ETHERNET==1: enable ethernet support for PPPoE even though ARP
00471  * might be disabled
00472  */
00473 #ifndef LWIP_ETHERNET
00474 #define LWIP_ETHERNET                   (LWIP_ARP || PPPOE_SUPPORT)
00475 #endif
00476 
00477 /** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure
00478  * alignment of payload after that header. Since the header is 14 bytes long,
00479  * without this padding e.g. addresses in the IP header will not be aligned
00480  * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
00481  */
00482 #ifndef ETH_PAD_SIZE
00483 #define ETH_PAD_SIZE                    0 //2 does not work here!!! by pzn
00484 #endif
00485 
00486 /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
00487  * entries (using etharp_add_static_entry/etharp_remove_static_entry).
00488  */
00489 #ifndef ETHARP_SUPPORT_STATIC_ENTRIES
00490 #define ETHARP_SUPPORT_STATIC_ENTRIES   0
00491 #endif
00492 
00493 
00494 /*
00495    --------------------------------
00496    ---------- IP options ----------
00497    --------------------------------
00498 */
00499 /**
00500  * IP_FORWARD==1: Enables the ability to forward IP packets across network
00501  * interfaces. If you are going to run lwIP on a device with only one network
00502  * interface, define this to 0.
00503  */
00504 #ifndef IP_FORWARD
00505 #define IP_FORWARD                      0
00506 #endif
00507 
00508 /**
00509  * IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
00510  *      IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
00511  *      IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
00512  */
00513 #ifndef IP_OPTIONS_ALLOWED
00514 #define IP_OPTIONS_ALLOWED              1
00515 #endif
00516 
00517 /**
00518  * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
00519  * this option does not affect outgoing packet sizes, which can be controlled
00520  * via IP_FRAG.
00521  */
00522 #ifndef IP_REASSEMBLY
00523 #define IP_REASSEMBLY                   0//pzn1
00524 #endif
00525 
00526 /**
00527  * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
00528  * that this option does not affect incoming packet sizes, which can be
00529  * controlled via IP_REASSEMBLY.
00530  */
00531 #ifndef IP_FRAG
00532 #define IP_FRAG                         o//pzn1
00533 #endif
00534 
00535 /**
00536  * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)
00537  * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived
00538  * in this time, the whole packet is discarded.
00539  */
00540 #ifndef IP_REASS_MAXAGE
00541 #define IP_REASS_MAXAGE                 3
00542 #endif
00543 
00544 /**
00545  * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
00546  * Since the received pbufs are enqueued, be sure to configure
00547  * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive
00548  * packets even if the maximum amount of fragments is enqueued for reassembly!
00549  */
00550 #ifndef IP_REASS_MAX_PBUFS
00551 #define IP_REASS_MAX_PBUFS              10
00552 #endif
00553 
00554 /**
00555  * IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
00556  * fragmentation. Otherwise pbufs are allocated and reference the original
00557  * packet data to be fragmented (or with LWIP_NETIF_TX_SINGLE_PBUF==1,
00558  * new PBUF_RAM pbufs are used for fragments).
00559  * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs!
00560  */
00561 #ifndef IP_FRAG_USES_STATIC_BUF
00562 #define IP_FRAG_USES_STATIC_BUF         0
00563 #endif
00564 
00565 /**
00566  * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer
00567  * (requires IP_FRAG_USES_STATIC_BUF==1)
00568  */
00569 #if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
00570 #define IP_FRAG_MAX_MTU                 1500
00571 #endif
00572 
00573 /**
00574  * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
00575  */
00576 #ifndef IP_DEFAULT_TTL
00577 #define IP_DEFAULT_TTL                  77
00578 #endif
00579 
00580 /**
00581  * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast
00582  * filter per pcb on udp and raw send operations. To enable broadcast filter
00583  * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
00584  */
00585 #ifndef IP_SOF_BROADCAST
00586 #define IP_SOF_BROADCAST                0
00587 #endif
00588 
00589 /**
00590  * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
00591  * filter on recv operations.
00592  */
00593 #ifndef IP_SOF_BROADCAST_RECV
00594 #define IP_SOF_BROADCAST_RECV           0
00595 #endif
00596 
00597 /*
00598    ----------------------------------
00599    ---------- ICMP options ----------
00600    ----------------------------------
00601 */
00602 /**
00603  * LWIP_ICMP==1: Enable ICMP module inside the IP stack.
00604  * Be careful, disable that make your product non-compliant to RFC1122
00605  */
00606 #ifndef LWIP_ICMP
00607 #define LWIP_ICMP                       1
00608 #endif
00609 
00610 /**
00611  * ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
00612  */
00613 #ifndef ICMP_TTL
00614 #define ICMP_TTL                       (IP_DEFAULT_TTL)
00615 #endif
00616 
00617 /**
00618  * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only)
00619  */
00620 #ifndef LWIP_BROADCAST_PING
00621 #define LWIP_BROADCAST_PING             0
00622 #endif
00623 
00624 /**
00625  * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
00626  */
00627 #ifndef LWIP_MULTICAST_PING
00628 #define LWIP_MULTICAST_PING             0
00629 #endif
00630 
00631 /*
00632    ---------------------------------
00633    ---------- RAW options ----------
00634    ---------------------------------
00635 */
00636 /**
00637  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
00638  */
00639 #ifndef LWIP_RAW
00640 #define LWIP_RAW                        0//pzn1
00641 #endif
00642 
00643 /**
00644  * LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
00645  */
00646 #ifndef RAW_TTL
00647 #define RAW_TTL                        (IP_DEFAULT_TTL)
00648 #endif
00649 
00650 /*
00651    ----------------------------------
00652    ---------- DHCP options ----------
00653    ----------------------------------
00654 */
00655 /**
00656  * LWIP_DHCP==1: Enable DHCP module.
00657  */
00658 #ifndef LWIP_DHCP
00659 #define LWIP_DHCP                       0
00660 #endif
00661 
00662 /**
00663  * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address.
00664  */
00665 #ifndef DHCP_DOES_ARP_CHECK
00666 #define DHCP_DOES_ARP_CHECK             ((LWIP_DHCP) && (LWIP_ARP))
00667 #endif
00668 
00669 /*
00670    ------------------------------------
00671    ---------- AUTOIP options ----------
00672    ------------------------------------
00673 */
00674 /**
00675  * LWIP_AUTOIP==1: Enable AUTOIP module.
00676  */
00677 #ifndef LWIP_AUTOIP
00678 #define LWIP_AUTOIP                     0
00679 #endif
00680 
00681 /**
00682  * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on
00683  * the same interface at the same time.
00684  */
00685 #ifndef LWIP_DHCP_AUTOIP_COOP
00686 #define LWIP_DHCP_AUTOIP_COOP           0
00687 #endif
00688 
00689 /**
00690  * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
00691  * that should be sent before falling back on AUTOIP. This can be set
00692  * as low as 1 to get an AutoIP address very quickly, but you should
00693  * be prepared to handle a changing IP address when DHCP overrides
00694  * AutoIP.
00695  */
00696 #ifndef LWIP_DHCP_AUTOIP_COOP_TRIES
00697 #define LWIP_DHCP_AUTOIP_COOP_TRIES     9
00698 #endif
00699 
00700 /*
00701    ----------------------------------
00702    ---------- SNMP options ----------
00703    ----------------------------------
00704 */
00705 /**
00706  * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
00707  * transport.
00708  */
00709 #ifndef LWIP_SNMP
00710 #define LWIP_SNMP                       0
00711 #endif
00712 
00713 /**
00714  * SNMP_CONCURRENT_REQUESTS: Number of concurrent requests the module will
00715  * allow. At least one request buffer is required.
00716  * Does not have to be changed unless external MIBs answer request asynchronously
00717  */
00718 #ifndef SNMP_CONCURRENT_REQUESTS
00719 #define SNMP_CONCURRENT_REQUESTS        1
00720 #endif
00721 
00722 /**
00723  * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap
00724  * destination is required
00725  */
00726 #ifndef SNMP_TRAP_DESTINATIONS
00727 #define SNMP_TRAP_DESTINATIONS          1
00728 #endif
00729 
00730 /**
00731  * SNMP_PRIVATE_MIB: 
00732  * When using a private MIB, you have to create a file 'private_mib.h' that contains
00733  * a 'struct mib_array_node mib_private' which contains your MIB.
00734  */
00735 #ifndef SNMP_PRIVATE_MIB
00736 #define SNMP_PRIVATE_MIB                0
00737 #endif
00738 
00739 /**
00740  * Only allow SNMP write actions that are 'safe' (e.g. disabeling netifs is not
00741  * a safe action and disabled when SNMP_SAFE_REQUESTS = 1).
00742  * Unsafe requests are disabled by default!
00743  */
00744 #ifndef SNMP_SAFE_REQUESTS
00745 #define SNMP_SAFE_REQUESTS              1
00746 #endif
00747 
00748 /**
00749  * The maximum length of strings used. This affects the size of
00750  * MEMP_SNMP_VALUE elements.
00751  */
00752 #ifndef SNMP_MAX_OCTET_STRING_LEN
00753 #define SNMP_MAX_OCTET_STRING_LEN       127
00754 #endif
00755 
00756 /**
00757  * The maximum depth of the SNMP tree.
00758  * With private MIBs enabled, this depends on your MIB!
00759  * This affects the size of MEMP_SNMP_VALUE elements.
00760  */
00761 #ifndef SNMP_MAX_TREE_DEPTH
00762 #define SNMP_MAX_TREE_DEPTH             15
00763 #endif
00764 
00765 /**
00766  * The size of the MEMP_SNMP_VALUE elements, normally calculated from
00767  * SNMP_MAX_OCTET_STRING_LEN and SNMP_MAX_TREE_DEPTH.
00768  */
00769 #ifndef SNMP_MAX_VALUE_SIZE
00770 #define SNMP_MAX_VALUE_SIZE             LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN)+1, sizeof(s32_t)*(SNMP_MAX_TREE_DEPTH))
00771 #endif
00772 
00773 /*
00774    ----------------------------------
00775    ---------- IGMP options ----------
00776    ----------------------------------
00777 */
00778 /**
00779  * LWIP_IGMP==1: Turn on IGMP module. 
00780  */
00781 #ifndef LWIP_IGMP
00782 #define LWIP_IGMP                       0
00783 #endif
00784 
00785 /*
00786    ----------------------------------
00787    ---------- DNS options -----------
00788    ----------------------------------
00789 */
00790 /**
00791  * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
00792  * transport.
00793  */
00794 #ifndef LWIP_DNS
00795 #define LWIP_DNS                        0
00796 #endif
00797 
00798 /** DNS maximum number of entries to maintain locally. */
00799 #ifndef DNS_TABLE_SIZE
00800 #define DNS_TABLE_SIZE                  4
00801 #endif
00802 
00803 /** DNS maximum host name length supported in the name table. */
00804 #ifndef DNS_MAX_NAME_LENGTH
00805 #define DNS_MAX_NAME_LENGTH             256
00806 #endif
00807 
00808 /** The maximum of DNS servers */
00809 #ifndef DNS_MAX_SERVERS
00810 #define DNS_MAX_SERVERS                 2
00811 #endif
00812 
00813 /** DNS do a name checking between the query and the response. */
00814 #ifndef DNS_DOES_NAME_CHECK
00815 #define DNS_DOES_NAME_CHECK             1
00816 #endif
00817 
00818 /** DNS message max. size. Default value is RFC compliant. */
00819 #ifndef DNS_MSG_SIZE
00820 #define DNS_MSG_SIZE                    512
00821 #endif
00822 
00823 /** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled,
00824  *  you have to define
00825  *    #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}
00826  *  (an array of structs name/address, where address is an u32_t in network
00827  *  byte order).
00828  *
00829  *  Instead, you can also use an external function:
00830  *  #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
00831  *  that returns the IP address or INADDR_NONE if not found.
00832  */
00833 #ifndef DNS_LOCAL_HOSTLIST
00834 #define DNS_LOCAL_HOSTLIST              0
00835 #endif /* DNS_LOCAL_HOSTLIST */
00836 
00837 /** If this is turned on, the local host-list can be dynamically changed
00838  *  at runtime. */
00839 #ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
00840 #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC   0
00841 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
00842 
00843 /*
00844    ---------------------------------
00845    ---------- UDP options ----------
00846    ---------------------------------
00847 */
00848 /**
00849  * LWIP_UDP==1: Turn on UDP.
00850  */
00851 #ifndef LWIP_UDP
00852 #define LWIP_UDP                        1
00853 #endif
00854 
00855 /**
00856  * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
00857  */
00858 #ifndef LWIP_UDPLITE
00859 #define LWIP_UDPLITE                    0
00860 #endif
00861 
00862 /**
00863  * UDP_TTL: Default Time-To-Live value.
00864  */
00865 #ifndef UDP_TTL
00866 #define UDP_TTL                         (IP_DEFAULT_TTL)
00867 #endif
00868 
00869 /**
00870  * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf.
00871  */
00872 #ifndef LWIP_NETBUF_RECVINFO
00873 #define LWIP_NETBUF_RECVINFO            0
00874 #endif
00875 
00876 /*
00877    ---------------------------------
00878    ---------- TCP options ----------
00879    ---------------------------------
00880 */
00881 /**
00882  * LWIP_TCP==1: Turn on TCP.
00883  */
00884 #ifndef LWIP_TCP
00885 #define LWIP_TCP                        1
00886 #endif
00887 
00888 /**
00889  * TCP_TTL: Default Time-To-Live value.
00890  */
00891 #ifndef TCP_TTL
00892 #define TCP_TTL                         (IP_DEFAULT_TTL)
00893 #endif
00894 
00895 /**
00896  * TCP_WND: The size of a TCP window.  This must be at least 
00897  * (2 * TCP_MSS) for things to work well
00898  */
00899 #ifndef TCP_WND
00900 #define TCP_WND                         (4 * TCP_MSS)
00901 #endif 
00902 
00903 /**
00904  * TCP_MAXRTX: Maximum number of retransmissions of data segments.
00905  */
00906 #ifndef TCP_MAXRTX
00907 #define TCP_MAXRTX                      12
00908 #endif
00909 
00910 /**
00911  * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
00912  */
00913 #ifndef TCP_SYNMAXRTX
00914 #define TCP_SYNMAXRTX                   6
00915 #endif
00916 
00917 /**
00918  * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
00919  * Define to 0 if your device is low on memory.
00920  */
00921 #ifndef TCP_QUEUE_OOSEQ
00922 #define TCP_QUEUE_OOSEQ                 (LWIP_TCP)
00923 #endif
00924 
00925 /**
00926  * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
00927  * you might want to increase this.)
00928  * For the receive side, this MSS is advertised to the remote side
00929  * when opening a connection. For the transmit size, this MSS sets
00930  * an upper limit on the MSS advertised by the remote host.
00931  */
00932 #ifndef TCP_MSS
00933 #define TCP_MSS                         536
00934 #endif
00935 
00936 /**
00937  * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really
00938  * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which
00939  * reflects the available reassembly buffer size at the remote host) and the
00940  * largest size permitted by the IP layer" (RFC 1122)
00941  * Setting this to 1 enables code that checks TCP_MSS against the MTU of the
00942  * netif used for a connection and limits the MSS if it would be too big otherwise.
00943  */
00944 #ifndef TCP_CALCULATE_EFF_SEND_MSS
00945 #define TCP_CALCULATE_EFF_SEND_MSS      1
00946 #endif
00947 
00948 
00949 /**
00950  * TCP_SND_BUF: TCP sender buffer space (bytes). 
00951  */
00952 #ifndef TCP_SND_BUF
00953 #define TCP_SND_BUF                     256
00954 #endif
00955 
00956 /**
00957  * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
00958  * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
00959  */
00960 #ifndef TCP_SND_QUEUELEN
00961 #define TCP_SND_QUEUELEN                ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
00962 #endif
00963 
00964 /**
00965  * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than
00966  * TCP_SND_BUF. It is the amount of space which must be available in the
00967  * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
00968  */
00969 #ifndef TCP_SNDLOWAT
00970 #define TCP_SNDLOWAT                    ((TCP_SND_BUF)/2)
00971 #endif
00972 
00973 /**
00974  * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be grater
00975  * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below
00976  * this number, select returns writable (combined with TCP_SNDLOWAT).
00977  */
00978 #ifndef TCP_SNDQUEUELOWAT
00979 #define TCP_SNDQUEUELOWAT               ((TCP_SND_QUEUELEN)/2)
00980 #endif
00981 
00982 /**
00983  * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
00984  */
00985 #ifndef TCP_LISTEN_BACKLOG
00986 #define TCP_LISTEN_BACKLOG              0
00987 #endif
00988 
00989 /**
00990  * The maximum allowed backlog for TCP listen netconns.
00991  * This backlog is used unless another is explicitly specified.
00992  * 0xff is the maximum (u8_t).
00993  */
00994 #ifndef TCP_DEFAULT_LISTEN_BACKLOG
00995 #define TCP_DEFAULT_LISTEN_BACKLOG      0xff
00996 #endif
00997 
00998 /**
00999  * TCP_OVERSIZE: The maximum number of bytes that tcp_write may
01000  * allocate ahead of time in an attempt to create shorter pbuf chains
01001  * for transmission. The meaningful range is 0 to TCP_MSS. Some
01002  * suggested values are:
01003  *
01004  * 0:         Disable oversized allocation. Each tcp_write() allocates a new
01005               pbuf (old behaviour).
01006  * 1:         Allocate size-aligned pbufs with minimal excess. Use this if your
01007  *            scatter-gather DMA requires aligned fragments.
01008  * 128:       Limit the pbuf/memory overhead to 20%.
01009  * TCP_MSS:   Try to create unfragmented TCP packets.
01010  * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
01011  */
01012 #ifndef TCP_OVERSIZE
01013 #define TCP_OVERSIZE                    TCP_MSS
01014 #endif
01015 
01016 /**
01017  * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
01018  */
01019 #ifndef LWIP_TCP_TIMESTAMPS
01020 #define LWIP_TCP_TIMESTAMPS             0
01021 #endif
01022 
01023 /**
01024  * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an
01025  * explicit window update
01026  */
01027 #ifndef TCP_WND_UPDATE_THRESHOLD
01028 #define TCP_WND_UPDATE_THRESHOLD   (TCP_WND / 4)
01029 #endif
01030 
01031 /**
01032  * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
01033  *     LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
01034  *         events (accept, sent, etc) that happen in the system.
01035  *     LWIP_CALLBACK_API==1: The PCB callback function is called directly
01036  *         for the event.
01037  */
01038 #ifndef LWIP_EVENT_API
01039 #define LWIP_EVENT_API                  0
01040 #define LWIP_CALLBACK_API               1
01041 #else 
01042 #define LWIP_EVENT_API                  1
01043 #define LWIP_CALLBACK_API               0
01044 #endif
01045 
01046 
01047 /*
01048    ----------------------------------
01049    ---------- Pbuf options ----------
01050    ----------------------------------
01051 */
01052 /**
01053  * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
01054  * link level header. The default is 14, the standard value for
01055  * Ethernet.
01056  */
01057 #ifndef PBUF_LINK_HLEN
01058 #define PBUF_LINK_HLEN                  (14 + ETH_PAD_SIZE)
01059 #endif
01060 
01061 /**
01062  * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
01063  * designed to accomodate single full size TCP frame in one pbuf, including
01064  * TCP_MSS, IP header, and link header.
01065  */
01066 #ifndef PBUF_POOL_BUFSIZE
01067 #define PBUF_POOL_BUFSIZE               LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
01068 #endif
01069 
01070 /*
01071    ------------------------------------------------
01072    ---------- Network Interfaces options ----------
01073    ------------------------------------------------
01074 */
01075 /**
01076  * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
01077  * field.
01078  */
01079 #ifndef LWIP_NETIF_HOSTNAME
01080 #define LWIP_NETIF_HOSTNAME             0
01081 #endif
01082 
01083 /**
01084  * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
01085  */
01086 #ifndef LWIP_NETIF_API
01087 #define LWIP_NETIF_API                  0
01088 #endif
01089 
01090 /**
01091  * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
01092  * changes its up/down status (i.e., due to DHCP IP acquistion)
01093  */
01094 #ifndef LWIP_NETIF_STATUS_CALLBACK
01095 #define LWIP_NETIF_STATUS_CALLBACK      0
01096 #endif
01097 
01098 /**
01099  * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
01100  * whenever the link changes (i.e., link down)
01101  */
01102 #ifndef LWIP_NETIF_LINK_CALLBACK
01103 #define LWIP_NETIF_LINK_CALLBACK        0
01104 #endif
01105 
01106 /**
01107  * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table
01108  * indices) in struct netif. TCP and UDP can make use of this to prevent
01109  * scanning the ARP table for every sent packet. While this is faster for big
01110  * ARP tables or many concurrent connections, it might be counterproductive
01111  * if you have a tiny ARP table or if there never are concurrent connections.
01112  */
01113 #ifndef LWIP_NETIF_HWADDRHINT
01114 #define LWIP_NETIF_HWADDRHINT           0
01115 #endif
01116 
01117 /**
01118  * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
01119  * address equal to the netif IP address, looping them back up the stack.
01120  */
01121 #ifndef LWIP_NETIF_LOOPBACK
01122 #define LWIP_NETIF_LOOPBACK             0
01123 #endif
01124 
01125 /**
01126  * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
01127  * sending for each netif (0 = disabled)
01128  */
01129 #ifndef LWIP_LOOPBACK_MAX_PBUFS
01130 #define LWIP_LOOPBACK_MAX_PBUFS         0
01131 #endif
01132 
01133 /**
01134  * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in
01135  * the system, as netifs must change how they behave depending on this setting
01136  * for the LWIP_NETIF_LOOPBACK option to work.
01137  * Setting this is needed to avoid reentering non-reentrant functions like
01138  * tcp_input().
01139  *    LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a
01140  *       multithreaded environment like tcpip.c. In this case, netif->input()
01141  *       is called directly.
01142  *    LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup.
01143  *       The packets are put on a list and netif_poll() must be called in
01144  *       the main application loop.
01145  */
01146 #ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING
01147 #define LWIP_NETIF_LOOPBACK_MULTITHREADING    (!NO_SYS)
01148 #endif
01149 
01150 /**
01151  * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
01152  * to be sent into one single pbuf. This is for compatibility with DMA-enabled
01153  * MACs that do not support scatter-gather.
01154  * Beware that this might involve CPU-memcpy before transmitting that would not
01155  * be needed without this flag! Use this only if you need to!
01156  *
01157  * @todo: TCP and IP-frag do not work with this, yet:
01158  */
01159 #ifndef LWIP_NETIF_TX_SINGLE_PBUF
01160 #define LWIP_NETIF_TX_SINGLE_PBUF             0
01161 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */
01162 
01163 /*
01164    ------------------------------------
01165    ---------- LOOPIF options ----------
01166    ------------------------------------
01167 */
01168 /**
01169  * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
01170  */
01171 #ifndef LWIP_HAVE_LOOPIF
01172 #define LWIP_HAVE_LOOPIF                0
01173 #endif
01174 
01175 /*
01176    ------------------------------------
01177    ---------- SLIPIF options ----------
01178    ------------------------------------
01179 */
01180 /**
01181  * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
01182  */
01183 #ifndef LWIP_HAVE_SLIPIF
01184 #define LWIP_HAVE_SLIPIF                0
01185 #endif
01186 
01187 /*
01188    ------------------------------------
01189    ---------- Thread options ----------
01190    ------------------------------------
01191 */
01192 /**
01193  * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
01194  */
01195 #ifndef TCPIP_THREAD_NAME
01196 #define TCPIP_THREAD_NAME              "tcpip_thread"
01197 #endif
01198 
01199 /**
01200  * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread.
01201  * The stack size value itself is platform-dependent, but is passed to
01202  * sys_thread_new() when the thread is created.
01203  */
01204 #ifndef TCPIP_THREAD_STACKSIZE
01205 #define TCPIP_THREAD_STACKSIZE          0
01206 #endif
01207 
01208 /**
01209  * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread.
01210  * The priority value itself is platform-dependent, but is passed to
01211  * sys_thread_new() when the thread is created.
01212  */
01213 #ifndef TCPIP_THREAD_PRIO
01214 #define TCPIP_THREAD_PRIO               1
01215 #endif
01216 
01217 /**
01218  * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages
01219  * The queue size value itself is platform-dependent, but is passed to
01220  * sys_mbox_new() when tcpip_init is called.
01221  */
01222 #ifndef TCPIP_MBOX_SIZE
01223 #define TCPIP_MBOX_SIZE                 0
01224 #endif
01225 
01226 /**
01227  * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
01228  */
01229 #ifndef SLIPIF_THREAD_NAME
01230 #define SLIPIF_THREAD_NAME             "slipif_loop"
01231 #endif
01232 
01233 /**
01234  * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread.
01235  * The stack size value itself is platform-dependent, but is passed to
01236  * sys_thread_new() when the thread is created.
01237  */
01238 #ifndef SLIPIF_THREAD_STACKSIZE
01239 #define SLIPIF_THREAD_STACKSIZE         0
01240 #endif
01241 
01242 /**
01243  * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread.
01244  * The priority value itself is platform-dependent, but is passed to
01245  * sys_thread_new() when the thread is created.
01246  */
01247 #ifndef SLIPIF_THREAD_PRIO
01248 #define SLIPIF_THREAD_PRIO              1
01249 #endif
01250 
01251 /**
01252  * PPP_THREAD_NAME: The name assigned to the pppInputThread.
01253  */
01254 #ifndef PPP_THREAD_NAME
01255 #define PPP_THREAD_NAME                "pppInputThread"
01256 #endif
01257 
01258 /**
01259  * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread.
01260  * The stack size value itself is platform-dependent, but is passed to
01261  * sys_thread_new() when the thread is created.
01262  */
01263 #ifndef PPP_THREAD_STACKSIZE
01264 #define PPP_THREAD_STACKSIZE            0
01265 #endif
01266 
01267 /**
01268  * PPP_THREAD_PRIO: The priority assigned to the pppInputThread.
01269  * The priority value itself is platform-dependent, but is passed to
01270  * sys_thread_new() when the thread is created.
01271  */
01272 #ifndef PPP_THREAD_PRIO
01273 #define PPP_THREAD_PRIO                 1
01274 #endif
01275 
01276 /**
01277  * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
01278  */
01279 #ifndef DEFAULT_THREAD_NAME
01280 #define DEFAULT_THREAD_NAME            "lwIP"
01281 #endif
01282 
01283 /**
01284  * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread.
01285  * The stack size value itself is platform-dependent, but is passed to
01286  * sys_thread_new() when the thread is created.
01287  */
01288 #ifndef DEFAULT_THREAD_STACKSIZE
01289 #define DEFAULT_THREAD_STACKSIZE        0
01290 #endif
01291 
01292 /**
01293  * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread.
01294  * The priority value itself is platform-dependent, but is passed to
01295  * sys_thread_new() when the thread is created.
01296  */
01297 #ifndef DEFAULT_THREAD_PRIO
01298 #define DEFAULT_THREAD_PRIO             1
01299 #endif
01300 
01301 /**
01302  * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
01303  * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed
01304  * to sys_mbox_new() when the recvmbox is created.
01305  */
01306 #ifndef DEFAULT_RAW_RECVMBOX_SIZE
01307 #define DEFAULT_RAW_RECVMBOX_SIZE       0
01308 #endif
01309 
01310 /**
01311  * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
01312  * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed
01313  * to sys_mbox_new() when the recvmbox is created.
01314  */
01315 #ifndef DEFAULT_UDP_RECVMBOX_SIZE
01316 #define DEFAULT_UDP_RECVMBOX_SIZE       0
01317 #endif
01318 
01319 /**
01320  * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a
01321  * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed
01322  * to sys_mbox_new() when the recvmbox is created.
01323  */
01324 #ifndef DEFAULT_TCP_RECVMBOX_SIZE
01325 #define DEFAULT_TCP_RECVMBOX_SIZE       8//jhc0
01326 #endif
01327 
01328 /**
01329  * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections.
01330  * The queue size value itself is platform-dependent, but is passed to
01331  * sys_mbox_new() when the acceptmbox is created.
01332  */
01333 #ifndef DEFAULT_ACCEPTMBOX_SIZE
01334 #define DEFAULT_ACCEPTMBOX_SIZE         0
01335 #endif
01336 
01337 /*
01338    ----------------------------------------------
01339    ---------- Sequential layer options ----------
01340    ----------------------------------------------
01341 */
01342 /**
01343  * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
01344  * Don't use it if you're not an active lwIP project member
01345  */
01346 #ifndef LWIP_TCPIP_CORE_LOCKING
01347 #define LWIP_TCPIP_CORE_LOCKING         0
01348 #endif
01349 
01350 /**
01351  * LWIP_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!)
01352  * Don't use it if you're not an active lwIP project member
01353  */
01354 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
01355 #define LWIP_TCPIP_CORE_LOCKING_INPUT   0
01356 #endif
01357 
01358 /**
01359  * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
01360  */
01361 #ifndef LWIP_NETCONN
01362 #define LWIP_NETCONN                    1
01363 #endif
01364 
01365 /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create
01366  * timers running in tcpip_thread from another thread.
01367  */
01368 #ifndef LWIP_TCPIP_TIMEOUT
01369 #define LWIP_TCPIP_TIMEOUT              1//jhc0
01370 #endif
01371 
01372 /*
01373    ------------------------------------
01374    ---------- Socket options ----------
01375    ------------------------------------
01376 */
01377 /**
01378  * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
01379  */
01380 #ifndef LWIP_SOCKET
01381 #define LWIP_SOCKET                     1
01382 #endif
01383 
01384 /**
01385  * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
01386  * (only used if you use sockets.c)
01387  */
01388 #ifndef LWIP_COMPAT_SOCKETS
01389 #define LWIP_COMPAT_SOCKETS             1
01390 #endif
01391 
01392 /**
01393  * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
01394  * Disable this option if you use a POSIX operating system that uses the same
01395  * names (read, write & close). (only used if you use sockets.c)
01396  */
01397 #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
01398 #define LWIP_POSIX_SOCKETS_IO_NAMES     1
01399 #endif
01400 
01401 /**
01402  * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
01403  * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
01404  * in seconds. (does not require sockets.c, and will affect tcp.c)
01405  */
01406 #ifndef LWIP_TCP_KEEPALIVE
01407 #define LWIP_TCP_KEEPALIVE              0
01408 #endif
01409 
01410 /**
01411  * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing.
01412  */
01413 #ifndef LWIP_SO_RCVTIMEO
01414 #define LWIP_SO_RCVTIMEO                0
01415 #endif
01416 
01417 /**
01418  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
01419  */
01420 #ifndef LWIP_SO_RCVBUF
01421 #define LWIP_SO_RCVBUF                  0
01422 #endif
01423 
01424 /**
01425  * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
01426  */
01427 #ifndef RECV_BUFSIZE_DEFAULT
01428 #define RECV_BUFSIZE_DEFAULT            INT_MAX
01429 #endif
01430 
01431 /**
01432  * SO_REUSE==1: Enable SO_REUSEADDR option.
01433  */
01434 #ifndef SO_REUSE
01435 #define SO_REUSE                        0
01436 #endif
01437 
01438 /**
01439  * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
01440  * to all local matches if SO_REUSEADDR is turned on.
01441  * WARNING: Adds a memcpy for every packet if passing to more than one pcb!
01442  */
01443 #ifndef SO_REUSE_RXTOALL
01444 #define SO_REUSE_RXTOALL                0
01445 #endif
01446 
01447 /*
01448    ----------------------------------------
01449    ---------- Statistics options ----------
01450    ----------------------------------------
01451 */
01452 /**
01453  * LWIP_STATS==1: Enable statistics collection in lwip_stats.
01454  */
01455 #ifndef LWIP_STATS
01456 #define LWIP_STATS                      0
01457 #endif
01458 
01459 #if LWIP_STATS
01460 
01461 /**
01462  * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
01463  */
01464 #ifndef LWIP_STATS_DISPLAY
01465 #define LWIP_STATS_DISPLAY              0
01466 #endif
01467 
01468 /**
01469  * LINK_STATS==1: Enable link stats.
01470  */
01471 #ifndef LINK_STATS
01472 #define LINK_STATS                      1
01473 #endif
01474 
01475 /**
01476  * ETHARP_STATS==1: Enable etharp stats.
01477  */
01478 #ifndef ETHARP_STATS
01479 #define ETHARP_STATS                    (LWIP_ARP)
01480 #endif
01481 
01482 /**
01483  * IP_STATS==1: Enable IP stats.
01484  */
01485 #ifndef IP_STATS
01486 #define IP_STATS                        1
01487 #endif
01488 
01489 /**
01490  * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
01491  * on if using either frag or reass.
01492  */
01493 #ifndef IPFRAG_STATS
01494 #define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
01495 #endif
01496 
01497 /**
01498  * ICMP_STATS==1: Enable ICMP stats.
01499  */
01500 #ifndef ICMP_STATS
01501 #define ICMP_STATS                      0
01502 #endif
01503 
01504 /**
01505  * IGMP_STATS==1: Enable IGMP stats.
01506  */
01507 #ifndef IGMP_STATS
01508 #define IGMP_STATS                      (LWIP_IGMP)
01509 #endif
01510 
01511 /**
01512  * UDP_STATS==1: Enable UDP stats. Default is on if
01513  * UDP enabled, otherwise off.
01514  */
01515 #ifndef UDP_STATS
01516 #define UDP_STATS                       (LWIP_UDP)
01517 #endif
01518 
01519 /**
01520  * TCP_STATS==1: Enable TCP stats. Default is on if TCP
01521  * enabled, otherwise off.
01522  */
01523 #ifndef TCP_STATS
01524 #define TCP_STATS                       (LWIP_TCP)
01525 #endif
01526 
01527 /**
01528  * MEM_STATS==1: Enable mem.c stats.
01529  */
01530 #ifndef MEM_STATS
01531 #define MEM_STATS                       ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
01532 #endif
01533 
01534 /**
01535  * MEMP_STATS==1: Enable memp.c pool stats.
01536  */
01537 #ifndef MEMP_STATS
01538 #define MEMP_STATS                      (MEMP_MEM_MALLOC == 0)
01539 #endif
01540 
01541 /**
01542  * SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
01543  */
01544 #ifndef SYS_STATS
01545 #define SYS_STATS                       (NO_SYS == 0)
01546 #endif
01547 
01548 #else
01549 
01550 #define LINK_STATS                      0
01551 #define IP_STATS                        0
01552 #define IPFRAG_STATS                    0
01553 #define ICMP_STATS                      0
01554 #define IGMP_STATS                      0
01555 #define UDP_STATS                       0
01556 #define TCP_STATS                       0
01557 #define MEM_STATS                       0
01558 #define MEMP_STATS                      0
01559 #define SYS_STATS                       0
01560 #define LWIP_STATS_DISPLAY              0
01561 
01562 #endif /* LWIP_STATS */
01563 
01564 /*
01565    ---------------------------------
01566    ---------- PPP options ----------
01567    ---------------------------------
01568 */
01569 /**
01570  * PPP_SUPPORT==1: Enable PPP.
01571  */
01572 #ifndef PPP_SUPPORT
01573 #define PPP_SUPPORT                     0
01574 #endif
01575 
01576 /**
01577  * PPPOE_SUPPORT==1: Enable PPP Over Ethernet
01578  */
01579 #ifndef PPPOE_SUPPORT
01580 #define PPPOE_SUPPORT                   0
01581 #endif
01582 
01583 /**
01584  * PPPOS_SUPPORT==1: Enable PPP Over Serial
01585  */
01586 #ifndef PPPOS_SUPPORT
01587 #define PPPOS_SUPPORT                   PPP_SUPPORT
01588 #endif
01589 
01590 #if PPP_SUPPORT
01591 
01592 /**
01593  * NUM_PPP: Max PPP sessions.
01594  */
01595 #ifndef NUM_PPP
01596 #define NUM_PPP                         1
01597 #endif
01598 
01599 /**
01600  * PAP_SUPPORT==1: Support PAP.
01601  */
01602 #ifndef PAP_SUPPORT
01603 #define PAP_SUPPORT                     0
01604 #endif
01605 
01606 /**
01607  * CHAP_SUPPORT==1: Support CHAP.
01608  */
01609 #ifndef CHAP_SUPPORT
01610 #define CHAP_SUPPORT                    0
01611 #endif
01612 
01613 /**
01614  * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
01615  */
01616 #ifndef MSCHAP_SUPPORT
01617 #define MSCHAP_SUPPORT                  0
01618 #endif
01619 
01620 /**
01621  * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
01622  */
01623 #ifndef CBCP_SUPPORT
01624 #define CBCP_SUPPORT                    0
01625 #endif
01626 
01627 /**
01628  * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
01629  */
01630 #ifndef CCP_SUPPORT
01631 #define CCP_SUPPORT                     0
01632 #endif
01633 
01634 /**
01635  * VJ_SUPPORT==1: Support VJ header compression.
01636  */
01637 #ifndef VJ_SUPPORT
01638 #define VJ_SUPPORT                      0
01639 #endif
01640 
01641 /**
01642  * MD5_SUPPORT==1: Support MD5 (see also CHAP).
01643  */
01644 #ifndef MD5_SUPPORT
01645 #define MD5_SUPPORT                     0
01646 #endif
01647 
01648 /*
01649  * Timeouts
01650  */
01651 #ifndef FSM_DEFTIMEOUT
01652 #define FSM_DEFTIMEOUT                  6       /* Timeout time in seconds */
01653 #endif
01654 
01655 #ifndef FSM_DEFMAXTERMREQS
01656 #define FSM_DEFMAXTERMREQS              2       /* Maximum Terminate-Request transmissions */
01657 #endif
01658 
01659 #ifndef FSM_DEFMAXCONFREQS
01660 #define FSM_DEFMAXCONFREQS              10      /* Maximum Configure-Request transmissions */
01661 #endif
01662 
01663 #ifndef FSM_DEFMAXNAKLOOPS
01664 #define FSM_DEFMAXNAKLOOPS              5       /* Maximum number of nak loops */
01665 #endif
01666 
01667 #ifndef UPAP_DEFTIMEOUT
01668 #define UPAP_DEFTIMEOUT                 6       /* Timeout (seconds) for retransmitting req */
01669 #endif
01670 
01671 #ifndef UPAP_DEFREQTIME
01672 #define UPAP_DEFREQTIME                 30      /* Time to wait for auth-req from peer */
01673 #endif
01674 
01675 #ifndef CHAP_DEFTIMEOUT
01676 #define CHAP_DEFTIMEOUT                 6       /* Timeout time in seconds */
01677 #endif
01678 
01679 #ifndef CHAP_DEFTRANSMITS
01680 #define CHAP_DEFTRANSMITS               10      /* max # times to send challenge */
01681 #endif
01682 
01683 /* Interval in seconds between keepalive echo requests, 0 to disable. */
01684 #ifndef LCP_ECHOINTERVAL
01685 #define LCP_ECHOINTERVAL                0
01686 #endif
01687 
01688 /* Number of unanswered echo requests before failure. */
01689 #ifndef LCP_MAXECHOFAILS
01690 #define LCP_MAXECHOFAILS                3
01691 #endif
01692 
01693 /* Max Xmit idle time (in jiffies) before resend flag char. */
01694 #ifndef PPP_MAXIDLEFLAG
01695 #define PPP_MAXIDLEFLAG                 100
01696 #endif
01697 
01698 /*
01699  * Packet sizes
01700  *
01701  * Note - lcp shouldn't be allowed to negotiate stuff outside these
01702  *    limits.  See lcp.h in the pppd directory.
01703  * (XXX - these constants should simply be shared by lcp.c instead
01704  *    of living in lcp.h)
01705  */
01706 #define PPP_MTU                         1500     /* Default MTU (size of Info field) */
01707 #ifndef PPP_MAXMTU
01708 /* #define PPP_MAXMTU  65535 - (PPP_HDRLEN + PPP_FCSLEN) */
01709 #define PPP_MAXMTU                      1500 /* Largest MTU we allow */
01710 #endif
01711 #define PPP_MINMTU                      64
01712 #define PPP_MRU                         1500     /* default MRU = max length of info field */
01713 #define PPP_MAXMRU                      1500     /* Largest MRU we allow */
01714 #ifndef PPP_DEFMRU
01715 #define PPP_DEFMRU                      296             /* Try for this */
01716 #endif
01717 #define PPP_MINMRU                      128             /* No MRUs below this */
01718 
01719 #ifndef MAXNAMELEN
01720 #define MAXNAMELEN                      256     /* max length of hostname or name for auth */
01721 #endif
01722 #ifndef MAXSECRETLEN
01723 #define MAXSECRETLEN                    256     /* max length of password or secret */
01724 #endif
01725 
01726 #endif /* PPP_SUPPORT */
01727 
01728 /*
01729    --------------------------------------
01730    ---------- Checksum options ----------
01731    --------------------------------------
01732 */
01733 /**
01734  * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
01735  */
01736 #ifndef CHECKSUM_GEN_IP
01737 #define CHECKSUM_GEN_IP                 1
01738 #endif
01739  
01740 /**
01741  * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
01742  */
01743 #ifndef CHECKSUM_GEN_UDP
01744 #define CHECKSUM_GEN_UDP                1
01745 #endif
01746  
01747 /**
01748  * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
01749  */
01750 #ifndef CHECKSUM_GEN_TCP
01751 #define CHECKSUM_GEN_TCP                1
01752 #endif
01753  
01754 /**
01755  * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
01756  */
01757 #ifndef CHECKSUM_CHECK_IP
01758 #define CHECKSUM_CHECK_IP               1
01759 #endif
01760  
01761 /**
01762  * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
01763  */
01764 #ifndef CHECKSUM_CHECK_UDP
01765 #define CHECKSUM_CHECK_UDP              1
01766 #endif
01767 
01768 /**
01769  * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
01770  */
01771 #ifndef CHECKSUM_CHECK_TCP
01772 #define CHECKSUM_CHECK_TCP              1
01773 #endif
01774 
01775 /**
01776  * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
01777  * application buffers to pbufs.
01778  */
01779 #ifndef LWIP_CHECKSUM_ON_COPY
01780 #define LWIP_CHECKSUM_ON_COPY           0
01781 #endif
01782 
01783 /*
01784    ---------------------------------------
01785    ---------- Debugging options ----------
01786    ---------------------------------------
01787 */
01788 /**
01789  * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
01790  * compared against this value. If it is smaller, then debugging
01791  * messages are written.
01792  */
01793 #ifndef LWIP_DBG_MIN_LEVEL
01794 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL
01795 #endif
01796 
01797 /**
01798  * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
01799  * debug messages of certain types.
01800  */
01801 #ifndef LWIP_DBG_TYPES_ON
01802 #define LWIP_DBG_TYPES_ON               LWIP_DBG_ON
01803 #endif
01804 
01805 /**
01806  * ETHARP_DEBUG: Enable debugging in etharp.c.
01807  */
01808 #ifndef ETHARP_DEBUG
01809 #define ETHARP_DEBUG                    LWIP_DBG_OFF
01810 #endif
01811 
01812 /**
01813  * NETIF_DEBUG: Enable debugging in netif.c.
01814  */
01815 #ifndef NETIF_DEBUG
01816 #define NETIF_DEBUG                     LWIP_DBG_OFF
01817 #endif
01818 
01819 /**
01820  * PBUF_DEBUG: Enable debugging in pbuf.c.
01821  */
01822 #ifndef PBUF_DEBUG
01823 #define PBUF_DEBUG                      LWIP_DBG_OFF
01824 #endif
01825 
01826 /**
01827  * API_LIB_DEBUG: Enable debugging in api_lib.c.
01828  */
01829 #ifndef API_LIB_DEBUG
01830 #define API_LIB_DEBUG                   LWIP_DBG_OFF
01831 #endif
01832 
01833 /**
01834  * API_MSG_DEBUG: Enable debugging in api_msg.c.
01835  */
01836 #ifndef API_MSG_DEBUG
01837 #define API_MSG_DEBUG                   LWIP_DBG_OFF
01838 #endif
01839 
01840 /**
01841  * SOCKETS_DEBUG: Enable debugging in sockets.c.
01842  */
01843 #ifndef SOCKETS_DEBUG
01844 #define SOCKETS_DEBUG                   LWIP_DBG_ON//LWIP_DBG_OFF
01845 #endif
01846 
01847 /**
01848  * ICMP_DEBUG: Enable debugging in icmp.c.
01849  */
01850 #ifndef ICMP_DEBUG
01851 #define ICMP_DEBUG                      LWIP_DBG_OFF
01852 #endif
01853 
01854 /**
01855  * IGMP_DEBUG: Enable debugging in igmp.c.
01856  */
01857 #ifndef IGMP_DEBUG
01858 #define IGMP_DEBUG                      LWIP_DBG_OFF
01859 #endif
01860 
01861 /**
01862  * INET_DEBUG: Enable debugging in inet.c.
01863  */
01864 #ifndef INET_DEBUG
01865 #define INET_DEBUG                      LWIP_DBG_OFF
01866 #endif
01867 
01868 /**
01869  * IP_DEBUG: Enable debugging for IP.
01870  */
01871 #ifndef IP_DEBUG
01872 #define IP_DEBUG                        LWIP_DBG_OFF
01873 #endif
01874 
01875 /**
01876  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
01877  */
01878 #ifndef IP_REASS_DEBUG
01879 #define IP_REASS_DEBUG                  LWIP_DBG_OFF
01880 #endif
01881 
01882 /**
01883  * RAW_DEBUG: Enable debugging in raw.c.
01884  */
01885 #ifndef RAW_DEBUG
01886 #define RAW_DEBUG                       LWIP_DBG_OFF
01887 #endif
01888 
01889 /**
01890  * MEM_DEBUG: Enable debugging in mem.c.
01891  */
01892 #ifndef MEM_DEBUG
01893 #define MEM_DEBUG                       LWIP_DBG_OFF
01894 #endif
01895 
01896 /**
01897  * MEMP_DEBUG: Enable debugging in memp.c.
01898  */
01899 #ifndef MEMP_DEBUG
01900 #define MEMP_DEBUG                      LWIP_DBG_OFF
01901 #endif
01902 
01903 /**
01904  * SYS_DEBUG: Enable debugging in sys.c.
01905  */
01906 #ifndef SYS_DEBUG
01907 #define SYS_DEBUG                       LWIP_DBG_OFF
01908 #endif
01909 
01910 /**
01911  * TIMERS_DEBUG: Enable debugging in timers.c.
01912  */
01913 #ifndef TIMERS_DEBUG
01914 #define TIMERS_DEBUG                    LWIP_DBG_OFF
01915 #endif
01916 
01917 /**
01918  * TCP_DEBUG: Enable debugging for TCP.
01919  */
01920 #ifndef TCP_DEBUG
01921 #define TCP_DEBUG                       LWIP_DBG_OFF
01922 #endif
01923 
01924 /**
01925  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
01926  */
01927 #ifndef TCP_INPUT_DEBUG
01928 #define TCP_INPUT_DEBUG                 LWIP_DBG_OFF
01929 #endif
01930 
01931 /**
01932  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
01933  */
01934 #ifndef TCP_FR_DEBUG
01935 #define TCP_FR_DEBUG                    LWIP_DBG_OFF
01936 #endif
01937 
01938 /**
01939  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
01940  * timeout.
01941  */
01942 #ifndef TCP_RTO_DEBUG
01943 #define TCP_RTO_DEBUG                   LWIP_DBG_OFF
01944 #endif
01945 
01946 /**
01947  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
01948  */
01949 #ifndef TCP_CWND_DEBUG
01950 #define TCP_CWND_DEBUG                  LWIP_DBG_OFF
01951 #endif
01952 
01953 /**
01954  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
01955  */
01956 #ifndef TCP_WND_DEBUG
01957 #define TCP_WND_DEBUG                   LWIP_DBG_OFF
01958 #endif
01959 
01960 /**
01961  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
01962  */
01963 #ifndef TCP_OUTPUT_DEBUG
01964 #define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF
01965 #endif
01966 
01967 /**
01968  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
01969  */
01970 #ifndef TCP_RST_DEBUG
01971 #define TCP_RST_DEBUG                   LWIP_DBG_OFF
01972 #endif
01973 
01974 /**
01975  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
01976  */
01977 #ifndef TCP_QLEN_DEBUG
01978 #define TCP_QLEN_DEBUG                  LWIP_DBG_OFF
01979 #endif
01980 
01981 /**
01982  * UDP_DEBUG: Enable debugging in UDP.
01983  */
01984 #ifndef UDP_DEBUG
01985 #define UDP_DEBUG                       LWIP_DBG_OFF
01986 #endif
01987 
01988 /**
01989  * TCPIP_DEBUG: Enable debugging in tcpip.c.
01990  */
01991 #ifndef TCPIP_DEBUG
01992 #define TCPIP_DEBUG                     LWIP_DBG_OFF
01993 #endif
01994 
01995 /**
01996  * PPP_DEBUG: Enable debugging for PPP.
01997  */
01998 #ifndef PPP_DEBUG
01999 #define PPP_DEBUG                       LWIP_DBG_OFF
02000 #endif
02001 
02002 /**
02003  * SLIP_DEBUG: Enable debugging in slipif.c.
02004  */
02005 #ifndef SLIP_DEBUG
02006 #define SLIP_DEBUG                      LWIP_DBG_OFF
02007 #endif
02008 
02009 /**
02010  * DHCP_DEBUG: Enable debugging in dhcp.c.
02011  */
02012 #ifndef DHCP_DEBUG
02013 #define DHCP_DEBUG                      LWIP_DBG_OFF
02014 #endif
02015 
02016 /**
02017  * AUTOIP_DEBUG: Enable debugging in autoip.c.
02018  */
02019 #ifndef AUTOIP_DEBUG
02020 #define AUTOIP_DEBUG                    LWIP_DBG_OFF
02021 #endif
02022 
02023 /**
02024  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
02025  */
02026 #ifndef SNMP_MSG_DEBUG
02027 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
02028 #endif
02029 
02030 /**
02031  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
02032  */
02033 #ifndef SNMP_MIB_DEBUG
02034 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
02035 #endif
02036 
02037 /**
02038  * DNS_DEBUG: Enable debugging for DNS.
02039  */
02040 #ifndef DNS_DEBUG
02041 #define DNS_DEBUG                       LWIP_DBG_OFF
02042 #endif
02043 
02044 #endif /* __LWIP_OPT_H__ */