// // lwipopts.h // #ifndef __LWIPOPTS_H__ #define __LWIPOPTS_H__ /* ---------- Memory options ---------- */ #define MEM_ALIGNMENT 4 #define MEM_SIZE 256000 //#define MEM_SIZE 1500 #define MEM_RECLAIM 1 #define MEMP_RECLAIM 1 #define MEMP_NUM_PBUF 1600 #define MEMP_NUM_UDP_PCB 100 #define MEMP_NUM_TCP_PCB 500 #define MEMP_NUM_TCP_PCB_LISTEN 10 #define MEMP_NUM_TCP_SEG 160 #define MEMP_NUM_NETBUF 200 #define MEMP_NUM_NETCONN 200 #define MEMP_NUM_API_MSG 200 #define MEMP_NUM_TCPIP_MSG 2000 #define MEMP_NUM_SYS_TIMEOUT 20 /* ---------- Pbuf options ---------- */ #define PBUF_POOL_SIZE 1024 // default : 128 #define PBUF_POOL_BUFSIZE 1024 #define PBUF_LINK_HLEN 16 /* ---------- TCP options ---------- */ #define TCP_TTL 255 /* Controls if TCP should queue segments that arrive out of order. Define to 0 if your device is low on memory. */ #define TCP_QUEUE_OOSEQ 1 /* TCP Maximum segment size. */ //#define TCP_MSS 1514 #define TCP_MSS 1460 /* TCP sender buffer space (bytes). */ //#define TCP_SND_BUF 20480 #define TCP_SND_BUF 10240 /* TCP sender buffer space (pbufs). This must be at least = 2 * TCP_SND_BUF/TCP_MSS for things to work. */ #define TCP_SND_QUEUELEN 2*TCP_SND_BUF/TCP_MSS /* TCP receive window. */ #define TCP_WND 20480 /* Maximum number of retransmissions of data segments. */ #define TCP_MAXRTX 12 /* Maximum number of retransmissions of SYN segments. */ #define TCP_SYNMAXRTX 6 /* ---------- ARP options ---------- */ #define ARP_TABLE_SIZE 127 /* ---------- IP options ---------- */ /* Define IP_FORWARD to 1 if you wish to have the ability to forward IP packets across network interfaces. If you are going to run lwIP on a device with only one network interface, define this to 0. */ #define IP_FORWARD 0 /* If defined to 1, IP options are allowed (but not parsed). If defined to 0, all packets with IP options are dropped. */ #define IP_OPTIONS 1 /* ---------- ICMP options ---------- */ #define ICMP_TTL 255 /* ---------- UDP options ---------- */ #define UDP_TTL 255 /* ---------- Statistics options ---------- */ #define STATS #define TCP_OUTPUT_DEBUG 1 #ifdef STATS #define LINK_STATS 1 #define IP_STATS 1 #define ICMP_STATS 1 #define UDP_STATS 1 #define TCP_STATS 1 #define MEM_STATS 1 #define MEMP_STATS 1 #define PBUF_STATS 1 #define SYS_STATS 1 #endif /* STATS */ #endif /* __LWIPOPTS_H__ */