/********************************************************************** * $Id$ lwipopts.h 2011-11-20 *//** * @file lwipopts.h * @brief LWIP option overrides * @version 1.0 * @date 20. Nov. 2011 * @author NXP MCU SW Application Team * * Copyright(C) 2011, NXP Semiconductor * All rights reserved. * *********************************************************************** * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * products. This software is supplied "AS IS" without any warranties. * NXP Semiconductors assumes no responsibility or liability for the * use of the software, conveys no license or title under any patent, * copyright, or mask work right to the product. NXP Semiconductors * reserves the right to make changes in the software without * notification. NXP Semiconductors also make no representation or * warranty that such application will be suitable for the specified * use without further testing or modification. **********************************************************************/ #ifndef __LWIP_USER_OPT_H__ #define __LWIP_USER_OPT_H__ /* Standalone build */ #define NO_SYS 1 /* Use LWIP timers */ #define NO_SYS_NO_TIMERS 0 /* 32-bit alignment */ #define MEM_ALIGNMENT 4 /* pbuf buffers in pool. In zero-copy mode, these buffers are located in peripheral RAM. In copied mode, they are located in internal IRAM */ #define PBUF_POOL_SIZE 8 /* No padding needed */ #define ETH_PAD_SIZE 0 #define IP_SOF_BROADCAST 1 #define IP_SOF_BROADCAST_RECV 1 /* The ethernet FCS is performed in hardware. The IP, TCP, and UDP CRCs still need to be done in hardware. */ #define CHECKSUM_GEN_IP 1 #define CHECKSUM_GEN_UDP 1 #define CHECKSUM_GEN_TCP 1 #define CHECKSUM_CHECK_IP 1 #define CHECKSUM_CHECK_UDP 1 #define CHECKSUM_CHECK_TCP 1 #define LWIP_CHECKSUM_ON_COPY 1 /* Use LWIP version of htonx() to allow generic functionality across all platforms. If you are using the Cortex Mx devices, you might be able to use the Cortex __rev instruction instead. */ #define LWIP_PLATFORM_BYTESWAP 0 /** * MEM_SIZE: the size of the heap memory. If the application will send * a lot of data that needs to be copied, this should be set high. */ #define MEM_SIZE (31 * 1024) #define MEMP_MEM_MALLOC 1 //MKB added to try and clean up the memory a bit //this makes a big difference and it appears to work heaps better //my understanding is that it allows the memory to be used as one big //chunk rather than individual pools of pbufs. ofcourse this is fine if you don't //have lots of connections to the box, which we don;t /* DHCP is ok, UDP is required with DHCP */ #define LWIP_DHCP 1 #define LWIP_UDP 1 /* Hostname can be used */ #define LWIP_NETIF_HOSTNAME 1 #define LWIP_BROADCAST_PING 0 /* MSS should match the hardware packet size */ #define TCP_MSS 1460 #define TCP_SND_BUF (2 * TCP_MSS) #define TCP_LISTEN_BACKLOG 0 //Default = 0 == off 0 means "disabled". In this case, backlog is limited by the number of PCBs. //this means we use all our memory up accepting listening pcb's then can't service them so we limit to 1 #define TCP_DEFAULT_LISTEN_BACKLOG 4 #define LWIP_SOCKET 0 #define LWIP_NETCONN 0 #define MEMP_NUM_SYS_TIMEOUT 300 #define LWIP_STATS 0 #define LINK_STATS 0 #define LWIP_STATS_DISPLAY 0 #define SYS_LIGHTWEIGHT_PROT 1 #undef LWIP_DEBUG #define LWIP_DEBUG #ifdef LWIP_DEBUG #define LWIP_DBG_MIN_LEVEL 0 #define PPP_DEBUG LWIP_DBG_OFF #define HTTPD_DEBUG LWIP_DBG_OFF #define MEM_DEBUG LWIP_DBG_OFF #define MEMP_DEBUG LWIP_DBG_OFF #define PBUF_DEBUG LWIP_DBG_OFF #define API_LIB_DEBUG LWIP_DBG_OFF #define API_MSG_DEBUG LWIP_DBG_OFF #define TCPIP_DEBUG LWIP_DBG_OFF #define NETIF_DEBUG LWIP_DBG_ON #define SOCKETS_DEBUG LWIP_DBG_OFF #define DNS_DEBUG LWIP_DBG_OFF #define AUTOIP_DEBUG LWIP_DBG_OFF #define DHCP_DEBUG LWIP_DBG_OFF #define IP_DEBUG LWIP_DBG_OFF #define IP_REASS_DEBUG LWIP_DBG_OFF #define ICMP_DEBUG LWIP_DBG_OFF #define IGMP_DEBUG LWIP_DBG_OFF #define UDP_DEBUG LWIP_DBG_OFF #define TCP_DEBUG LWIP_DBG_OFF #define TCP_INPUT_DEBUG LWIP_DBG_OFF #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF #define TCP_RTO_DEBUG LWIP_DBG_OFF #define TCP_CWND_DEBUG LWIP_DBG_OFF #define TCP_WND_DEBUG LWIP_DBG_OFF #define TCP_FR_DEBUG LWIP_DBG_OFF #define TCP_QLEN_DEBUG LWIP_DBG_OFF #define TCP_RST_DEBUG LWIP_DBG_OFF /* This define is custom for the LPC EMAC driver. Enabled it to get debug messages for the driver. */ #define UDP_LPC_EMAC LWIP_DBG_OFF #endif #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) #define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do { printf("Assertion \"%s\" failed at line %d in %s\n", \ x, __LINE__, __FILE__); fflush(NULL); abort(); } while(0) #define PPP_SUPPORT 1 #define PPPOS_SUPPORT PPP_SUPPORT // PPPOS_SUPPORT==1: Enable PPP Over Serial #if PPP_SUPPORT #define PPP_INPROC_MULTITHREADED (!NO_SYS) #define PAP_SUPPORT 1 // PAP_SUPPORT==1: Support PAP. #define CHAP_SUPPORT 1 #define MSCHAP_SUPPORT 0 // MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET! #define CBCP_SUPPORT 0 // CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! #define CCP_SUPPORT 0 // CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET! #define VJ_SUPPORT 0 // VJ_SUPPORT==1: Support VJ header compression. #define MD5_SUPPORT 0 //MD5_SUPPORT==1: Support MD5 (see also CHAP). #endif /* PPP_SUPPORT */ #endif /* __LWIP_USER_OPT_H__ */