/* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels * */ #ifndef __LWIP_OPTS_1802_H__ #define __LWIP_OPTS_1802_H__ #define LWIP_VERSION_PLATFORM "1802(s)" #define DEFAULT_SPREAD_FACTOR (1) #define DEFAULT_SPREAD_FACTOR_DOUBLE (1) #define DEFAULT_SPREAD_FACTOR_SOCKET (1) #define PC_USB_UL_BUF_SIZE (1692) #define UL_PMSG_SIZE (26) #define UL_ECM_PMSG_SIZE (24) #define LWIP_RATE_TXACK_DEFAULT_SET (32) #define LWIP_RATE_TXDATA_DEFAULT_SET (18) #if LWIP_IMS_SUPPORT #define LWIP_RATE_RXIMS_DEFAULT_SET (32) #else #define LWIP_RATE_RXIMS_DEFAULT_SET (0) #endif #define LWIP_RATE_RXFLOW_DEFAULT_SET (16) #define LWIP_RATE_RXDATA_DEFAULT_SET (60) #define LWIP_RATE_AP_EFAULT_SET (32) /*macro define for msg_size and mbox queue size, * mbox queue size setting need according to msg_size, * adjust mbox queue size, set smaller than msg_size, * avoid msg_pool reverse using, cause to memory flush */ #define ARP_MSG_SIZE (32) #define TX_MSG_SIZE (384) #define PPP_TX_MSG_SIZE (256) #define LTE_MSG_SIZE (512) #define LTE_IMS_MSG_SIZE (256) #define ACK_MSG_SIZE (256) #define LWIP_MQ_ARP_SIZE (28) //< ARP_MSG_SIZE #define LWIP_MQ_TX_SIZE (368) //< TX_MSG_SIZE #define LWIP_MQ_NW_SIZE (480) //< LTE_MSG_SIZE #define LWIP_MQ_NW_IMS_SIZE (240) //< LTE_IMS_MSG_SIZE #define LWIP_MQ_ACK_SIZE (240) //< ACK_MSG_SIZE #define LWIP_MQ_AP_SIZE (240) //Note: ap msg use malloc methos #define LWIP_CPSR_OP_TICK_CNT (16) #define LWIP_LOCK_PP_LEVEL (6) //#define LWIP_TCPIP_RATE (8) /***************************************** *lwip macro define for different customer *this macro need check before compiler for different customer *default settings is for common 5M ******************************************/ #define LWIP_RA_DNS_OPT_IPV6ONLY (0) //this macro control ra dns option #define LWIP_MAC_FILTER_FLG (1) //enable or disable mac filter for forward chain #define LWIP_WAN_ACCESS_PORT_REDIRECT (0) #define LWIP_USING_TP_METHOD_ADJUST_PP (1) #define LWIP_DSIM_SUPPORT (1) #define LWIP_TCPIP_NO_LOCK (1) #define IP_FILTER_EN (1) #define LWIP_GETSET_CONN_OPT (0) #define LWIP_IP_RECOVERY_FLAG (1) #define LWIP_DUMP_IP_HEADER (0) #define LWIP_REDIRECT (1) #if LWIP_IMS_SUPPORT #define LWIP_IPSEC (1) #else #define LWIP_IPSEC (0) #endif #define LWIP_TCP_WRITE_STAGE_OPT (1) #define LWIP_SYS_PROTECT_USING_MUTEX (0) #define LWIP_SO_BINDTODEVICE (1) /***************************************/ /*fearture macro define*/ #define LWIP_NETIF_WF_UAP (1) #define LWIP_NETIF_BRIDGE (1) #define LWIP_NETIF_LTE_TEST (0) #define LWIP_NETIF_PC (1) #define LWIP_NETIF_LTE (1) #define LWIP_NETIF_PPP (1) #define LWIP_NETIF_ETH (1) #define LWIP_NETIF_MBIM (1) #if LWIP_IMS_SUPPORT #define LWIP_NETIF_TUNE (1) #else #define LWIP_NETIF_TUNE (0) #endif #define LWIP_CHKSUM_ALGORITHM 3 #define MEM_ALIGNMENT 4 #define MEMP_NUM_RAW_PCB (8 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_UDP_PCB (32 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_TCP_PCB (64 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_TCP_PCB_LISTEN (32 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_TCP_SEG (64 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_REASSDATA (32) #define MEMP_NUM_ARP_QUEUE (16 / DEFAULT_SPREAD_FACTOR_DOUBLE) #define MEMP_NUM_NETDB (64 / DEFAULT_SPREAD_FACTOR_SOCKET) /*support get multi-addr answers, DNS_MAX_ANS_NUM_GET = 4*/ #define MEMP_NUM_NETBUF (512 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_NETCONN (128 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_SYS_TIMEOUT (128 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MEMP_NUM_PBUF (512 * 2) #define MEMP_NUM_TCPIP_MSG_API (512 / DEFAULT_SPREAD_FACTOR) #define MEMP_NUM_TCPIP_MSG_INPKT (512 / DEFAULT_SPREAD_FACTOR) #define PBUF_POOL_SIZE (64) #define ARP_TABLE_SIZE (32 / DEFAULT_SPREAD_FACTOR_DOUBLE) #define IP_REASS_MAX_PBUFS (64) #define DEFAULT_THREAD_STACKSIZE (4096) #define DEFAULT_THREAD_PRIO 90 #define TCPIP_THREAD_STACKSIZE (4096) #define TCPIP_THREAD_PRIO 80 #define DNSR_THREAD_PRIO TCPIP_THREAD_PRIO #define DHCPD_THREAD_PRIO TCPIP_THREAD_PRIO #define MANTRIGGER_THREAD_PRIO TCPIP_THREAD_PRIO #define TCPIP_MBOX_SIZE (512) /*no use*/ #define DEFAULT_RAW_RECVMBOX_SIZE (256 / DEFAULT_SPREAD_FACTOR_SOCKET) #define DEFAULT_UDP_RECVMBOX_SIZE (256 / DEFAULT_SPREAD_FACTOR_SOCKET) #define DEFAULT_TCP_RECVMBOX_SIZE (256 / DEFAULT_SPREAD_FACTOR_SOCKET) #define DEFAULT_ACCEPTMBOX_SIZE (256 / DEFAULT_SPREAD_FACTOR_SOCKET) #define MTU_MAX_SET 1500 //fixed to 1500 #define TCP_MSS 1460 #define LWIP_IPV6 1 #define LWIP_IPV6_MLD 0 #define LWIP_IPV6_FORWARD 1 #define LWIP_IPV6_FRAG 1 #define LWIP_RAW 1 #define IP_FORWARD 1 #define LWIP_DHCP 1 #define LWIP_IGMP 1 #define LWIP_DNS 1 #define LWIP_NETIF_API 1 #define ARP_QUEUEING 0 #define IP_FRAG_USES_STATIC_BUF 1 #define LWIP_DHCP_SERVER 1 #define ETHARP_SUPPORT_STATIC_ENTRIES 1 #define LWIP_IPV6_DHCP6 1 #define LWIP_DHCP6_SERVER 1 #define LWIP_ARP 1 #define LWIP_CHECKSUM_ON_COPY 1 #define CHECKSUM_CHECK_IP 0 #define CHECKSUM_CHECK_UDP 0 #define CHECKSUM_GEN_UDP 1 #define TCP_DNS_TURN_EN 1 #define TCP_MSS_ADJUST_EN 1 #define UDP_ECHO_SVR 0 #define TCP_ECHO_SVR 0 #define LWIP_DNS_RELAY 1 #define IP_NAT 1 #define IP_NAT_FTP_ALG 1 #define IP_NAT_FRAG_EN 1 #define IP_NAT_TRIGGER_EN 1 #define IP_NAT_PORT_FWD_EN 1 #define LWIP_SIP_ALG 0 #define LWIP_PPTP_ALG 1 #define LWIP_BIH_46 0 #define TCP_LISTEN_BACKLOG 1 #define ERRNO 1 #define NO_SYS 0 #define LWIP_STATS 0 #define ETHARP_TRUST_IP_MAC 0 #define LWIP_PROVIDE_ERRNO 1 #define LWIP_COMPAT_MUTEX 1 /*for 1802S and 1802 and falcon, use pool method*/ #if 1 #define MEM_USE_POOLS 1 #define MEMP_USE_CUSTOM_POOLS 1 #define MEM_LIBC_MALLOC 0 #define MEMP_MEM_MALLOC 0 #define SYS_LIGHTWEIGHT_PROT 1 #define MEMP_OVERFLOW_CHECK 0 #else #define MEM_USE_POOLS 0 #define MEMP_USE_CUSTOM_POOLS 0 #define MEM_LIBC_MALLOC 1 #define MEMP_MEM_MALLOC 1 #define SYS_LIGHTWEIGHT_PROT 1 #define MEMP_OVERFLOW_CHECK 0 #endif #define LWIP_NO_STATIC 0 //close lwip static flag, default set is disable; open static #define LWIP_DNS_API_ERROR_TURN 1 #endif /* __LWIP_OPTS_H__ */