📄 lwipopts.h
字号:
#ifndef _LWIPOPTS_H_
#define _LWIPOPTS_H_
#ifdef LWIP_DEBUG
#undef LWIP_DEBUG
#endif
/* Options that would ordinarily be application configurable we'll make
configurable differently. These are currently set to lwip defaults */
/* ---------- Statistics options ---------- */
//#define STATS
#ifdef STATS
#define LINK_STATS
#define IP_STATS
#define ICMP_STATS
#define UDP_STATS
#define TCP_STATS
#define MEM_STATS
#define MEMP_STATS
#define PBUF_STATS
#define SYS_STATS
#endif /* STATS */
/* ---------- IP options ---------- */
/* Define IP_FORWARD 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, don't define
this. */
#define IP_FORWARD 0
/* ---------- ICMP options ---------- */
#define ICMP_TTL 255
/* ---------- UDP options ---------- */
#define UDP_TTL 255
/* ---------- TCP options ---------- */
#define TCP_TTL 255
#define TCP_QUEUE_OOSEQ 1
/* TCP Maximum segment size. */
#define TCP_MSS 512
/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF 1024
/* 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 4096
/* Maximum number of retransmissions. */
#define TCP_MAXRTX 12
#define TCP_SYNMAXRTX 12
/* ---------- Memory options ---------- */
#define MEM_ALIGNMENT 1
/* Shrunk this down from 160000 -- this should probably be far memory someday */
#define MEM_SIZE 12000
#define MEM_RECLAIM 1
#define MEMP_RECLAIM 1
#define MEM_POOLS 1
#define MEMP_NUM_PBUF 20
#define MEMP_NUM_UDP_PCB 20
#define MEMP_NUM_TCP_PCB 20
#define MEMP_NUM_TCP_PCB_LISTEN 20
#define MEMP_NUM_TCP_PCB_TW 0
#define MEMP_NUM_TCP_SEG 20
#define MEMP_NUM_NETBUF 20
#define MEMP_NUM_NETCONN 20
#define MEMP_NUM_API_MSG 20
#define MEMP_NUM_TCPIP_MSG 20
#define MEMP_NUM_SYS_TIMEOUT 2
/* ---------- Pbuf options ---------- */
#define PBUF_POOL_SIZE 20
#define PBUF_POOL_BUFSIZE 128
#define PBUF_LINK_HLEN 16
#define ARP_TABLE_SIZE 20
/* Turn on DHCP protocol special processing */
#define LWIP_DHCP 0
#endif /* *_LWIOPTS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -