📄 lwipopts.h
字号:
//*****************************************************************************
//
// ---------- API options ----------
//
//*****************************************************************************
//#define LWIP_EVENT_API 0
//#define LWIP_CALLBACK_API 1
//*****************************************************************************
//
// ---------- Pbuf options ----------
//
//*****************************************************************************
#define PBUF_LINK_HLEN 16 // default is 14
#define PBUF_POOL_BUFSIZE 256
// default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
#define ETH_PAD_SIZE 2 // default is 0
//*****************************************************************************
//
// ---------- Network Interfaces options ----------
//
//*****************************************************************************
//#define LWIP_NETIF_HOSTNAME 0
//#define LWIP_NETIF_API 0
//#define LWIP_NETIF_STATUS_CALLBACK 0
//#define LWIP_NETIF_LINK_CALLBACK 0
//#define LWIP_NETIF_HWADDRHINT 0
//*****************************************************************************
//
// ---------- LOOPIF options ----------
//
//*****************************************************************************
//#define LWIP_HAVE_LOOPIF 0
//#define LWIP_LOOPIF_MULTITHREADING 1
//*****************************************************************************
//
// ---------- Thread options ----------
//
//*****************************************************************************
#define TCPIP_THREAD_NAME "tcpip_thread"
#define TCPIP_THREAD_STACKSIZE 300
#define TCPIP_THREAD_PRIO 3
//#define TCPIP_MBOX_SIZE 0
//#define SLIPIF_THREAD_NAME "slipif_loop"
//#define SLIPIF_THREAD_STACKSIZE 0
//#define SLIPIF_THREAD_PRIO 1
//#define PPP_THREAD_NAME "pppMain"
//#define PPP_THREAD_STACKSIZE 0
//#define PPP_THREAD_PRIO 1
#define DEFAULT_THREAD_NAME "lwIP"
#define DEFAULT_THREAD_STACKSIZE 128
#define DEFAULT_THREAD_PRIO 3
//#define DEFAULT_RAW_RECVMBOX_SIZE 0
//#define DEFAULT_UDP_RECVMBOX_SIZE 0
//#define DEFAULT_TCP_RECVMBOX_SIZE 0
//#define DEFAULT_ACCEPTMBOX_SIZE 0
//*****************************************************************************
//
// ---------- Sequential layer options ----------
//
//*****************************************************************************
//#define LWIP_TCPIP_CORE_LOCKING 0
#define LWIP_NETCONN 1 // default is 1
//*****************************************************************************
//
// ---------- Socket Options ----------
//
//*****************************************************************************
#define LWIP_SOCKET 0 // default is 1
//#define LWIP_COMPAT_SOCKETS 1
//#define LWIP_POSIX_SOCKETS_IO_NAMES 1
//#define LWIP_TCP_KEEPALIVE 0
//#define LWIP_SO_RCVTIMEO 0
//#define LWIP_SO_RCVBUF 0
//#define SO_REUSE 0
//*****************************************************************************
//
// ---------- Statistics options ----------
//
//*****************************************************************************
#define LWIP_STATS 1
#define LWIP_STATS_DISPLAY 1
#define LINK_STATS 1
#define ETHARP_STATS (LWIP_ARP)
#define IP_STATS 1
//#define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
#define ICMP_STATS 1
//#define IGMP_STATS (LWIP_IGMP)
#define UDP_STATS (LWIP_UDP)
#define TCP_STATS (LWIP_TCP)
#define MEM_STATS 1
#define MEMP_STATS 1
#define SYS_STATS 1
//*****************************************************************************
//
// ---------- PPP options ----------
//
//*****************************************************************************
#define PPP_SUPPORT 0
#define PPPOE_SUPPORT 0
//#define PPPOS_SUPPORT PPP_SUPPORT
#if PPP_SUPPORT
//#define NUM_PPP 1
//#define PAP_SUPPORT 0
//#define CHAP_SUPPORT 0
//#define MSCHAP_SUPPORT 0
//#define CBCP_SUPPORT 0
//#define CCP_SUPPORT 0
//#define VJ_SUPPORT 0
//#define MD5_SUPPORT 0
//#define FSM_DEFTIMEOUT 6
//#define FSM_DEFMAXTERMREQS 2
//#define FSM_DEFMAXCONFREQS 10
//#define FSM_DEFMAXNAKLOOPS 5
//#define UPAP_DEFTIMEOUT 6
//#define UPAP_DEFREQTIME 30
//#define CHAP_DEFTIMEOUT 6
//#define CHAP_DEFTRANSMITS 10
//#define LCP_ECHOINTERVAL 0
//#define LCP_MAXECHOFAILS 3
//#define PPP_MAXIDLEFLAG 100
//#define PPP_MAXMTU 1500
//#define PPP_DEFMRU 296
#endif
//*****************************************************************************
//
// ---------- checksum options ----------
//
//*****************************************************************************
//#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
//*****************************************************************************
//
// ---------- Debugging options ----------
//
//*****************************************************************************
#define U8_F "c"
#define S8_F "c"
#define X8_F "x"
#define U16_F "u"
#define S16_F "d"
#define X16_F "x"
#define U32_F "u"
#define S32_F "d"
#define X32_F "x"
//extern void LWIPDebug(const char *pcString, ...);
//#define LWIP_PLATFORM_DIAG(x) {LWIPDebug x;}
extern void LWIPDebug(const char *pcString, ...);
extern void UART1printf(const char *pcString, ...);
#define LWIP_PLATFORM_DIAG(x) {UART1printf x;}
#define LWIP_DEBUG 1
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_WARNING
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SERIOUS
//#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SEVERE
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
//#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH)
#define ETHARP_DEBUG LWIP_DBG_ON // default is OFF
#define NETIF_DEBUG LWIP_DBG_ON // default is OFF
#define PBUF_DEBUG LWIP_DBG_ON
#define API_LIB_DEBUG LWIP_DBG_ON
#define API_MSG_DEBUG LWIP_DBG_ON
#define SOCKETS_DEBUG LWIP_DBG_ON
#define ICMP_DEBUG LWIP_DBG_ON
#define IGMP_DEBUG LWIP_DBG_ON
#define INET_DEBUG LWIP_DBG_ON
#define IP_DEBUG LWIP_DBG_ON // default is OFF
#define IP_REASS_DEBUG LWIP_DBG_ON
#define RAW_DEBUG LWIP_DBG_ON
#define MEM_DEBUG LWIP_DBG_ON
#define MEMP_DEBUG LWIP_DBG_ON
#define SYS_DEBUG LWIP_DBG_ON
#define TCP_DEBUG LWIP_DBG_ON
#define TCP_INPUT_DEBUG LWIP_DBG_ON
#define TCP_FR_DEBUG LWIP_DBG_ON
#define TCP_RTO_DEBUG LWIP_DBG_ON
#define TCP_CWND_DEBUG LWIP_DBG_ON
#define TCP_WND_DEBUG LWIP_DBG_ON
#define TCP_OUTPUT_DEBUG LWIP_DBG_ON
#define TCP_RST_DEBUG LWIP_DBG_ON
#define TCP_QLEN_DEBUG LWIP_DBG_ON
#define UDP_DEBUG LWIP_DBG_ON // default is OFF
#define TCPIP_DEBUG LWIP_DBG_ON
#define PPP_DEBUG LWIP_DBG_ON
#define SLIP_DEBUG LWIP_DBG_ON
#define DHCP_DEBUG LWIP_DBG_ON // default is OFF
#define AUTOIP_DEBUG LWIP_DBG_ON
#define SNMP_MSG_DEBUG LWIP_DBG_ON
#define SNMP_MIB_DEBUG LWIP_DBG_ON
#define DNS_DEBUG LWIP_DBG_ON
#endif /* __LWIPOPTS_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -