Quantum Leaps / Mbed 2 deprecated qp_lwip

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lwipopts.h Source File

lwipopts.h

00001 /*****************************************************************************
00002 * Product: lwIP options for the LM3S6965 evaluaiton board
00003 * Last Updated for lwIP Version: 1.4.0.rc2
00004 * Date of the Last Update:  Feb 10, 2011
00005 *
00006 *                    Q u a n t u m     L e a P s
00007 *                    ---------------------------
00008 *                    innovating embedded systems
00009 *
00010 * Copyright (C) 2002-2011 Quantum Leaps, LLC. All rights reserved.
00011 *
00012 * This software may be distributed and modified under the terms of the GNU
00013 * General Public License version 2 (GPL) as published by the Free Software
00014 * Foundation and appearing in the file GPL.TXT included in the packaging of
00015 * this file. Please note that GPL Section 2[b] requires that all works based
00016 * on this software must also be made publicly available under the terms of
00017 * the GPL ("Copyleft").
00018 *
00019 * Alternatively, this software may be distributed and modified under the
00020 * terms of Quantum Leaps commercial licenses, which expressly supersede
00021 * the GPL and are specifically designed for licensees interested in
00022 * retaining the proprietary status of their code.
00023 *
00024 * Contact information:
00025 * Quantum Leaps Web site:  http://www.quantum-leaps.com
00026 * e-mail:                  info@quantum-leaps.com
00027 *****************************************************************************/
00028 /*
00029 * NOTE:  This file has been derived from the lwip/src/include/lwip/opt.h
00030 * header file. For additional details, refer to the original "opt.h" file
00031 * and lwIP documentation.
00032 */
00033 #ifndef __LWIPOPTS_H__
00034 #define __LWIPOPTS_H__
00035 
00036 //****************************************************************************
00037 //
00038 // -------------- Static IPv4 addresses  ----------------
00039 // (relevant only when DHCP or AUTOIP are NOT configured
00040 //
00041 //****************************************************************************
00042                                       // the default IP address of the host...
00043 #define STATIC_IPADDR0                  192
00044 #define STATIC_IPADDR1                  168
00045 #define STATIC_IPADDR2                  0
00046 #define STATIC_IPADDR3                  100
00047                                                 // the default network mask...
00048 #define STATIC_NET_MASK0                255
00049 #define STATIC_NET_MASK1                255
00050 #define STATIC_NET_MASK2                255
00051 #define STATIC_NET_MASK3                0
00052                                           // the default gateway IP address...
00053 #define STATIC_GW_IPADDR0               0
00054 #define STATIC_GW_IPADDR1               0
00055 #define STATIC_GW_IPADDR2               0
00056 #define STATIC_GW_IPADDR3               0
00057 
00058 //****************************************************************************
00059 //
00060 // ----------------  lwIP Port Options ----------
00061 //
00062 //****************************************************************************
00063 //#define HOST_TMR_INTERVAL
00064 //#define DHCP_EXPIRE_TIMER_MSECS         (60 * 1000)
00065 //#define TX_PBUF_QUEUE_LEN               8
00066 
00067 //****************************************************************************
00068 //
00069 // ---------- Platform specific locking ----------
00070 //
00071 //****************************************************************************
00072 //#define SYS_LIGHTWEIGHT_PROT            0
00073 #define NO_SYS                          1           // default is 0
00074 //#define NO_SYS_NO_TIMERS                0
00075 //#define MEMCPY(dst,src,len)             memcpy(dst,src,len)
00076 //#define SMEMCPY(dst,src,len)            memcpy(dst,src,len)
00077 
00078 //****************************************************************************
00079 //
00080 // ----------------  HTTPD Options ----------
00081 //
00082 //****************************************************************************
00083 #define INCLUDE_HTTPD_SSI
00084 #define INCLUDE_HTTPD_CGI
00085 //#define DYNAMIC_HTTP_HEADERS
00086 //#define INCLUDE_HTTPD_DEBUG
00087 
00088 //****************************************************************************
00089 //
00090 // ---------- Memory options ----------
00091 //
00092 //****************************************************************************
00093 //#define MEM_LIBC_MALLOC                 0
00094 //#define MEMP_MEM_MALLOC                 0
00095 #define MEM_ALIGNMENT                   4           // default is 1
00096 #define MEM_SIZE                        (8 * 1024)  // default is 1600
00097 //#define MEMP_SEPARATE_POOLS             0
00098 //#define MEMP_OVERFLOW_CHECK             0
00099 //#define MEMP_SANITY_CHECK               0
00100 //#define MEM_USE_POOLS                   0
00101 //#define MEM_USE_POOLS_TRY_BIGGER_POOL   0
00102 //#define MEMP_USE_CUSTOM_POOLS           0
00103 //#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0
00104 
00105 //****************************************************************************
00106 //
00107 // ---------- Internal Memory Pool Sizes ----------
00108 //
00109 //****************************************************************************
00110 //#define MEMP_NUM_PBUF                   16
00111 //#define MEMP_NUM_RAW_PCB                4
00112 //#define MEMP_NUM_UDP_PCB                4
00113 #define MEMP_NUM_TCP_PCB                10          // default 5
00114 //#define MEMP_NUM_TCP_PCB_LISTEN         8
00115 //#define MEMP_NUM_TCP_SEG                16
00116 //#define MEMP_NUM_REASSDATA              5
00117 //#define MEMP_NUM_ARP_QUEUE              30
00118 //#define MEMP_NUM_IGMP_GROUP             8
00119 #define MEMP_NUM_SYS_TIMEOUT            4           // default 3
00120 //#define MEMP_NUM_NETBUF                 2
00121 //#define MEMP_NUM_NETCONN                4
00122 //#define MEMP_NUM_TCPIP_MSG_API          8
00123 //#define MEMP_NUM_TCPIP_MSG_INPKT        8
00124 //#define MEMP_NUM_SNMP_NODE              50
00125 //#define MEMP_NUM_SNMP_ROOTNODE          30
00126 //#define MEMP_NUM_SNMP_VARBIND           2
00127 //#define MEMP_NUM_SNMP_VALUE             3
00128 //#define MEMP_NUM_NETDB                  1
00129 //#define MEMP_NUM_LOCALHOSTLIST          1
00130 //#define MEMP_NUM_PPPOE_INTERFACES       1
00131 //#define PBUF_POOL_SIZE                  16
00132 
00133 //****************************************************************************
00134 //
00135 // ---------- ARP options ----------
00136 //
00137 //****************************************************************************
00138 //#define LWIP_ARP                        1
00139 //#define ARP_TABLE_SIZE                  10
00140 //#define ARP_QUEUEING                    0
00141 //#define ETHARP_TRUST_IP_MAC             0
00142 //#define ETHARP_SUPPORT_VLAN             0
00143 //#define LWIP_ETHERNET                   (LWIP_ARP || PPPOE_SUPPORT)
00144 //#define ETH_PAD_SIZE                    0
00145 //#define ETHARP_SUPPORT_STATIC_ENTRIES   0
00146 
00147 //****************************************************************************
00148 //
00149 // ---------- IP options ----------
00150 //
00151 //****************************************************************************
00152 //#define IP_FORWARD                      0
00153 //#define IP_OPTIONS_ALLOWED              1
00154 #define IP_REASSEMBLY                   0           // default is 1
00155 #define IP_FRAG                         0           // default is 1
00156 //#define IP_REASS_MAXAGE                 3
00157 //#define IP_REASS_MAX_PBUFS              10
00158 //#define IP_FRAG_USES_STATIC_BUF         0
00159 //#define IP_FRAG_MAX_MTU                 1500
00160 //#define IP_DEFAULT_TTL                  255
00161 //#define IP_SOF_BROADCAST                0
00162 //#define IP_SOF_BROADCAST_RECV           0
00163 
00164 //****************************************************************************
00165 //
00166 // ---------- ICMP options ----------
00167 //
00168 //****************************************************************************
00169 //#define LWIP_ICMP                       1
00170 //#define ICMP_TTL                       (IP_DEFAULT_TTL)
00171 //#define LWIP_BROADCAST_PING             0
00172 //#define LWIP_MULTICAST_PING             0
00173 
00174 //****************************************************************************
00175 //
00176 // ---------- RAW options ----------
00177 //
00178 //****************************************************************************
00179 //#define LWIP_RAW                        1
00180 //#define RAW_TTL                        (IP_DEFAULT_TTL)
00181 
00182 //****************************************************************************
00183 //
00184 // ---------- DHCP options ----------
00185 //
00186 //****************************************************************************
00187 #define LWIP_DHCP                       1           // default is 0
00188 //#define DHCP_DOES_ARP_CHECK             ((LWIP_DHCP) && (LWIP_ARP))
00189 
00190 //****************************************************************************
00191 //
00192 // ---------- AUTOIP options ----------
00193 //
00194 //****************************************************************************
00195 //#define LWIP_AUTOIP                     1            // default is 0
00196 //#define LWIP_DHCP_AUTOIP_COOP           0
00197 //#define LWIP_DHCP_AUTOIP_COOP_TRIES     9
00198 
00199 //****************************************************************************
00200 //
00201 // ---------- SNMP options ----------
00202 //
00203 //****************************************************************************
00204 //#define LWIP_SNMP                       0
00205 //#define SNMP_CONCURRENT_REQUESTS        1
00206 //#define SNMP_TRAP_DESTINATIONS          1
00207 //#define SNMP_PRIVATE_MIB                0
00208 //#define SNMP_SAFE_REQUESTS              1
00209 //#define SNMP_MAX_OCTET_STRING_LEN       127
00210 //#define SNMP_MAX_TREE_DEPTH             15
00211 
00212 //****************************************************************************
00213 //
00214 // ---------- IGMP options ----------
00215 //
00216 //****************************************************************************
00217 //#define LWIP_IGMP                       0
00218 
00219 //****************************************************************************
00220 //
00221 // ---------- DNS options -----------
00222 //
00223 //****************************************************************************
00224 //#define LWIP_DNS                        0
00225 //#define DNS_TABLE_SIZE                  4
00226 //#define DNS_MAX_NAME_LENGTH             256
00227 //#define DNS_MAX_SERVERS                 2
00228 //#define DNS_DOES_NAME_CHECK             1
00229 //#define DNS_USES_STATIC_BUF             1
00230 //#define DNS_MSG_SIZE                    512
00231 //#define DNS_LOCAL_HOSTLIST              0
00232 //#define DNS_LOCAL_HOSTLIST_IS_DYNAMIC   0
00233 
00234 //****************************************************************************
00235 //
00236 // ---------- UDP options ----------
00237 //
00238 //****************************************************************************
00239 //#define LWIP_UDP                        1
00240 //#define LWIP_UDPLITE                    0
00241 //#define UDP_TTL                         (IP_DEFAULT_TTL)
00242 //#define LWIP_NETBUF_RECVINFO            0
00243 
00244 //****************************************************************************
00245 //
00246 // ---------- UPNP options ----------
00247 //
00248 //****************************************************************************
00249 //#define LWIP_UPNP                       0
00250 
00251 //****************************************************************************
00252 //
00253 // ---------- PTPD options ----------
00254 //
00255 //****************************************************************************
00256 //#define LWIP_PTPD                       0
00257 
00258 //****************************************************************************
00259 //
00260 // ---------- TCP options ----------
00261 //
00262 //****************************************************************************
00263 //#define LWIP_TCP                        1
00264 //#define TCP_TTL                         (IP_DEFAULT_TTL)
00265 //#define TCP_WND                         (4 * TCP_MSS)
00266 //#define TCP_MAXRTX                      12
00267 //#define TCP_SYNMAXRTX                   6
00268 //#define TCP_QUEUE_OOSEQ                 (LWIP_TCP)
00269 #define TCP_MSS                         256 // default is 536
00270 //#define TCP_CALCULATE_EFF_SEND_MSS      1
00271 #define TCP_SND_BUF                     (2 * TCP_MSS) // default is 256
00272 //#define TCP_SND_QUEUELEN     ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
00273 //#define TCP_SNDQUEUELOWAT               ((TCP_SND_QUEUELEN)/2)
00274 //#define TCP_LISTEN_BACKLOG              0
00275 //#define TCP_DEFAULT_LISTEN_BACKLOG      0xFF
00276 //#define TCP_OVERSIZE                    TCP_MSS
00277 //#define LWIP_TCP_TIMESTAMPS             0
00278 //#define TCP_WND_UPDATE_THRESHOLD        (TCP_WND / 4)
00279 
00280 //****************************************************************************
00281 //
00282 // ---------- API options ----------
00283 //
00284 //****************************************************************************
00285 //#define LWIP_EVENT_API                  0
00286 //#define LWIP_CALLBACK_API               1
00287 
00288 //****************************************************************************
00289 //
00290 // ---------- Pbuf options ----------
00291 //
00292 //****************************************************************************
00293 //#define ETH_PAD_SIZE
00294 //#define PBUF_LINK_HLEN                  (14 + ETH_PAD_SIZE)
00295 //#define PBUF_POOL_BUFSIZE     LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
00296 
00297 //****************************************************************************
00298 //
00299 // ---------- Network Interfaces options ----------
00300 //
00301 //****************************************************************************
00302 #define LWIP_NETIF_HOSTNAME             1           // default is 0
00303 //#define LWIP_NETIF_API                  0
00304 //#define LWIP_NETIF_STATUS_CALLBACK      0
00305 //#define LWIP_NETIF_LINK_CALLBACK        0
00306 //#define LWIP_NETIF_HWADDRHINT           0
00307 //#define LWIP_NETIF_LOOPBACK             0
00308 //#define LWIP_LOOPBACK_MAX_PBUFS         0
00309 //#define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS)
00310 //#define LWIP_NETIF_TX_SINGLE_PBUF       0
00311 
00312 
00313 //****************************************************************************
00314 //
00315 // ---------- LOOPIF options ----------
00316 //
00317 //****************************************************************************
00318 //#define LWIP_HAVE_LOOPIF                0
00319 
00320 //****************************************************************************
00321 //
00322 // ---------- SLIPIF options ----------
00323 //
00324 //****************************************************************************
00325 //#define LWIP_HAVE_SLIPIF                0
00326 
00327 //****************************************************************************
00328 //
00329 // ---------- Thread options ----------
00330 //
00331 //****************************************************************************
00332 //#define TCPIP_THREAD_NAME              "tcpip_thread"
00333 //#define TCPIP_THREAD_STACKSIZE          0
00334 //#define TCPIP_THREAD_PRIO               1
00335 //#define TCPIP_MBOX_SIZE                 0
00336 //#define SLIPIF_THREAD_NAME             "slipif_loop"
00337 //#define SLIPIF_THREAD_STACKSIZE         0
00338 //#define SLIPIF_THREAD_PRIO              1
00339 //#define PPP_THREAD_NAME                "pppInputThread"
00340 //#define PPP_THREAD_STACKSIZE            0
00341 //#define PPP_THREAD_PRIO                 1
00342 //#define DEFAULT_THREAD_NAME            "lwIP"
00343 //#define DEFAULT_THREAD_STACKSIZE        0
00344 //#define DEFAULT_THREAD_PRIO             1
00345 //#define DEFAULT_RAW_RECVMBOX_SIZE       0
00346 //#define DEFAULT_UDP_RECVMBOX_SIZE       0
00347 //#define DEFAULT_TCP_RECVMBOX_SIZE       0
00348 //#define DEFAULT_ACCEPTMBOX_SIZE         0
00349 
00350 //****************************************************************************
00351 //
00352 // ---------- Sequential layer options ----------
00353 //
00354 //****************************************************************************
00355 //#define LWIP_TCPIP_CORE_LOCKING         0
00356 //#define LWIP_TCPIP_CORE_LOCKING_INPUT   0
00357 #define LWIP_NETCONN                    0           // default is 1
00358 //#define LWIP_TCPIP_TIMEOUT              1
00359 
00360 //****************************************************************************
00361 //
00362 // ---------- Socket Options ----------
00363 //
00364 //****************************************************************************
00365 #define LWIP_SOCKET                     0           // default is 1
00366 //#define LWIP_COMPAT_SOCKETS             1
00367 //#define LWIP_POSIX_SOCKETS_IO_NAMES     1
00368 //#define LWIP_TCP_KEEPALIVE              0
00369 //#define LWIP_SO_RCVTIMEO                0
00370 //#define LWIP_SO_RCVBUF                  0
00371 //#define RECV_BUFSIZE_DEFAULT            INT_MAX
00372 //#define SO_REUSE                        0
00373 //#define SO_REUSE_RXTOALL                0
00374 
00375 //****************************************************************************
00376 //
00377 // ---------- Statistics options ----------
00378 //
00379 //****************************************************************************
00380 #define LWIP_STATS                      1
00381 //#define LWIP_STATS_DISPLAY              0
00382 #define LINK_STATS                      1
00383 //#define ETHARP_STATS                    (LWIP_ARP)
00384 //#define IP_STATS                        1
00385 //#define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
00386 //#define ICMP_STATS                      1
00387 //#define IGMP_STATS                      (LWIP_IGMP)
00388 //#define UDP_STATS                       (LWIP_UDP)
00389 //#define TCP_STATS                       (LWIP_TCP)
00390 //#define MEM_STATS           ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
00391 //#define MEMP_STATS                      (MEMP_MEM_MALLOC == 0)
00392 //#define SYS_STATS                       (NO_SYS == 0)
00393 
00394 //****************************************************************************
00395 //
00396 // ---------- PPP options ----------
00397 //
00398 //****************************************************************************
00399 //#define PPP_SUPPORT                     0
00400 //#define PPPOE_SUPPORT                   0
00401 //#define PPPOS_SUPPORT                   PPP_SUPPORT
00402 
00403 #if PPP_SUPPORT
00404 //#define NUM_PPP                         1
00405 //#define PAP_SUPPORT                     0
00406 //#define CHAP_SUPPORT                    0
00407 //#define MSCHAP_SUPPORT                  0
00408 //#define CBCP_SUPPORT                    0
00409 //#define CCP_SUPPORT                     0
00410 //#define VJ_SUPPORT                      0
00411 //#define MD5_SUPPORT                     0
00412 //#define FSM_DEFTIMEOUT                  6
00413 //#define FSM_DEFMAXTERMREQS              2
00414 //#define FSM_DEFMAXCONFREQS              10
00415 //#define FSM_DEFMAXNAKLOOPS              5
00416 //#define UPAP_DEFTIMEOUT                 6
00417 //#define UPAP_DEFREQTIME                 30
00418 //#define CHAP_DEFTIMEOUT                 6
00419 //#define CHAP_DEFTRANSMITS               10
00420 //#define LCP_ECHOINTERVAL                0
00421 //#define LCP_MAXECHOFAILS                3
00422 //#define PPP_MAXIDLEFLAG                 100
00423 
00424 //#define PPP_MAXMTU                      1500
00425 //#define PPP_DEFMRU                      296
00426 #endif
00427 
00428 //****************************************************************************
00429 //
00430 // ---------- checksum options ----------
00431 //
00432 //****************************************************************************
00433 //#define CHECKSUM_GEN_IP                 1
00434 //#define CHECKSUM_GEN_UDP                1
00435 //#define CHECKSUM_GEN_TCP                1
00436 //#define CHECKSUM_CHECK_IP               1
00437 //#define CHECKSUM_CHECK_UDP              1
00438 //#define CHECKSUM_CHECK_TCP              1
00439 //#define LWIP_CHECKSUM_ON_COPY           0
00440 
00441 //****************************************************************************
00442 //
00443 // ---------- Debugging options ----------
00444 //
00445 //****************************************************************************
00446 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF // LWIP_DBG_LEVEL_ALL
00447 //#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_WARNING
00448 //#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_SERIOUS
00449 //#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_SEVERE
00450 
00451 //#define LWIP_DBG_TYPES_ON               LWIP_DBG_ON
00452 #define LWIP_DBG_TYPES_ON  \
00453     (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH)
00454 
00455 //#define ETHARP_DEBUG                    LWIP_DBG_ON     // default is OFF
00456 //#define NETIF_DEBUG                     LWIP_DBG_ON     // default is OFF
00457 //#define PBUF_DEBUG                      LWIP_DBG_OFF
00458 //#define API_LIB_DEBUG                   LWIP_DBG_OFF
00459 //#define API_MSG_DEBUG                   LWIP_DBG_OFF
00460 //#define SOCKETS_DEBUG                   LWIP_DBG_OFF
00461 //#define ICMP_DEBUG                      LWIP_DBG_OFF
00462 //#define IGMP_DEBUG                      LWIP_DBG_OFF
00463 //#define INET_DEBUG                      LWIP_DBG_OFF
00464 //#define IP_DEBUG                        LWIP_DBG_ON     // default is OFF
00465 //#define IP_REASS_DEBUG                  LWIP_DBG_OFF
00466 //#define RAW_DEBUG                       LWIP_DBG_OFF
00467 //#define MEM_DEBUG                       LWIP_DBG_OFF
00468 //#define MEMP_DEBUG                      LWIP_DBG_OFF
00469 //#define SYS_DEBUG                       LWIP_DBG_OFF
00470 //#define TCP_DEBUG                       LWIP_DBG_OFF
00471 //#define TCP_INPUT_DEBUG                 LWIP_DBG_OFF
00472 //#define TCP_FR_DEBUG                    LWIP_DBG_OFF
00473 //#define TCP_RTO_DEBUG                   LWIP_DBG_OFF
00474 //#define TCP_CWND_DEBUG                  LWIP_DBG_OFF
00475 //#define TCP_WND_DEBUG                   LWIP_DBG_OFF
00476 //#define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF
00477 //#define TCP_RST_DEBUG                   LWIP_DBG_OFF
00478 //#define TCP_QLEN_DEBUG                  LWIP_DBG_OFF
00479 //#define UDP_DEBUG                       LWIP_DBG_ON     // default is OFF
00480 //#define TCPIP_DEBUG                     LWIP_DBG_OFF
00481 //#define PPP_DEBUG                       LWIP_DBG_OFF
00482 //#define SLIP_DEBUG                      LWIP_DBG_OFF
00483 //#define DHCP_DEBUG                      LWIP_DBG_ON     // default is OFF
00484 //#define AUTOIP_DEBUG                    LWIP_DBG_OFF
00485 //#define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
00486 //#define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
00487 //#define DNS_DEBUG                       LWIP_DBG_OFF
00488 
00489 #endif /* __LWIPOPTS_H__ */