Due to my poor English foundation, I couldn't understand many things, so I checked Baidu translation while checking Baidu. The opt header file in lwip is b
asically a basic option setting of lwip, which includes a lot of things. If the protocols of arp, icmp, udp, ip, tcp are enabled and set, and there are some other settings, checking this file will help you understand the program settings without knowing it.
A lot of the Chinese content below is translated from Baidu, so it is very inaccurate. Criticism and correction are welcome.
SYS_LIGHTWEIGHT_PROT Platform lock, protecting the allocation and release of cache in key areas
NO_SYS --- Whether to bring the operating system, =1 with, =0 without
MEMCPY(dst,src,len) --- Memory copy. If you want to write your own copy function, you can replace it.
SMEMCPY(dst,src,len) --- Memory copy If you want to write your own copy function, you can replace it
MEM_LIBC_MALLOC --- Use of memory function library, use C library when =1, use your own library when =0
MEMP_MEM_MALLOC --- = 1, use mem_malloc/mem_free instead of allocation pool
MEM_ALIGNMENT --- Byte alignment = 1 should be 2-byte alignment
MEM_SIZE --- Heap memory size should be set very high if a lot of content is sent
MEMP_OVERFLOW_CHECK --- Overflow protection is turned off when it is 0. It can be 1 or 2, 2 is slower
MEMP_SANITY_CHECK --- Chain check, check whether there is a cycle in the list after each free
MEM_USE_POOLS --- Custom memory pools
MEM_USE_POOLS_TRY_BIGGER_POOL--- Increase the memory pool to increase system reliability
MEMP_USE_CUSTOM_POOLS --- Use custom memory pools related to lwippools.h
LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT --- Free memory from other contexts
MEMP_NUM_PBUF --- Number of RAW protocol control blocks
MEMP_NUM_UDP_PCB --- Number of UDP protocol control blocks
MEMP_NUM_
TCP_PCB --- Number of TCP protocol control blocks
MEMP_NUM_TCP_PCB_LISTEN ---Number of TCP listening connections
MEMP_NUM_TCP_SEG --- Number of TCP queuing segments
MEMP_NUM_REASSDATA --- Number of IP packets queued
MEMP_NUM_ARP_QUEUE --- Number of arp queues
MEMP_NUM_IGMP_GROUP --- Number of multicast network interfaces
MEMP_NUM_SYS_TIMEOUT --- System timeout setting
MEMP_NUM_NETBUF --- Number of netbuf structures
MEMP_NUM_NETCONN --- Number of netconn structures
MEMP_NUM_TCPIP_MSG_API --- Number of TCPIP messages
MEMP_NUM_TCPIP_MSG_INPKT --- TCPIP data packet related settings
PBUF_POOL_SIZE --- pbuf pool size
LWIP_ARP ---Function on/off
ARP_TABLE_SIZE --- Number of IP address buffer pairs
ARP_QUEUEING --- arp queueing
ETHARP_TRUST_IP_MAC ---arp ip mac first turn off
IP_FORWARD --- IP packet forwarding
IP_OPTIONS_ALLOWED ---IP options allowed
IP_REASSEMBLY --- IP breakpoint resume
IP_FRAG --- IP breakpoint send
IP_REASS_MAXAGE --- Maximum time to fragment a packet
IP_REASS_MAX_PBUFS --- Number of segment assembly
IP_FRAG_USES_STATIC_BUF --- Enable static buffer
IP_FRAG_MAX_MTU ---IP maximum buffer size
IP_DEFAULT_TTL --- IP maximum ttl time
IP_SOF_BROADCAST --- ip sof broadcast
IP_SOF_BROADCAST_RECV --- spf broadcast filtering
LWIP_
ICMP --- ICMP enable
ICMP_TTL --- ICMP maximum ttl time
LWIP_BROADCAST_PING --- Whether to respond to broadcast ping
LWIP_MULTICAST_PING --- Whether to respond to multicast ping
LWIP_RAW ---raw protocol enable
RAW_TTL --- raw ttl time
LWIP_DHCP --- DHCP enable
DHCP_DOES_ARP_CHECK --- arp address check
LWIP_AUTOIP --- Automatic ip enable
LWIP_DHCP_AUTOIP_COOP --- dhcp automatic ip interface
WIP_DHCP_AUTOIP_COOP_TRIES --- dhcp discovery number
LWIP_
SNMP --- snmp enable
SNMP_CONCURRENT_REQUESTS --- SNMP concurrent requests
SNMP_TRAP_DESTINATIONS --- snmp trap related
SNMP_PRIVATE_MIB --- snmp private mib
SNMP_SAFE_REQUESTS --- SNMP security related
LWIP_IGMP --- IGMP settings
LWIP_DNS --- DNS enable
DNS_TABLE_SIZE --- Maximum number of DNS records
DNS_MAX_NAME_LENGTH --- Maximum length of dns host name
DNS_MAX_SERVERS --- Maximum number of DNS servers
DNS_DOES_NAME_CHECK --- DNS response check
DNS_USES_STATIC_BUF --- DNS local cache number
DNS_MSG_SIZE --- DNS message size
DNS_LOCAL_HOSTLIST --- dns host list
DNS_LOCAL_HOSTLIST_IS_DYNAMIC --- DNS dynamic list
LWIP_UDP --- udp enable
LWIP_UDPLITE --- udp datagram
UDP_TTL --- UDP ttl time
LWIP_TCP --- TCP enable
TCP_TTL --- TCP TTL time
TCP_WND --- TCP window length
TCP_MAXRTX --- TCP maximum retransmission times
TCP_SYNMAXRTX --- Maximum number of retransmissions of TCP syn segment
TCP_QUEUE_OOSEQ --- TCP queue arrival order should be sort-dependent
TCP_MSS --- TCP Maximum Segment Size
TCP_CALCULATE_EFF_SEND_MSS --- Used to limit mms
TCP_SND_BUF --- TCP send buffer space (bytes)
TCP_SND_QUEUELEN ---TCP send buffer space (pbufs)
TCP_SNDLOWAT --- TCP write space (bytes)
TCP_LISTEN_BACKLOG --- Enable TCP backlog selective listen protocol control block
TCP_DEFAULT_LISTEN_BACKLOG --- Maximum number of protocol control blocks allowed to be listened
LWIP_TCP_TIMESTAMPS --- Support TCP timestamp option
TCP_WND_UPDATE_THRESHOLD --- Window update and trigger
LWIP_EVENT_API LWIP_CALLBACK_API --- Only one is 1, controlled by the system or by a callback function
PBUF_LINK_HLEN --- Link layer header
PBUF_POOL_BUFSIZE --- pbuf pool size
LWIP_NETIF_HOSTNAME --- Use dhcp_option_hostname with netif hostname
lwip_netif_api --- Whether to support netif API, 1 means support
LWIP_NETIF_STATUS_CALLBACK --- Callback function support interface
lwip_netif_link_callback --- Link failure related
lwip_netif_hwaddrhint --- Cache link layer address hint
lwip_netif_loopback --- Supports the destination IP of the sent data packet
lwip_loopback_max_pbufs --- Maximum number of pbufs in the queue for loopback
LWIP_NETIF_LOOPBACK_MULTITHREADING --- Whether to enable multithreading
LWIP_NETIF_TX_SINGLE_PBUF --- Single Pbuf send
LWIP_HAVE_LOOPIF --- Support loopback address (127.0.0.1) and loopif.c
LWIP_HAVE_SLIPIF --- Support sliding interface and slipif C
TCPIP_THREAD_NAME --- The name assigned to the main TCPIP thread
tcpip_thread_stacksize --- TCPIP stack size used by the main thread
TCPIP_THREAD_PRIO --- Priority assigned to the main TCPIP thread
tcpip_mbox_size --- Mailbox size for TCPIP thread messages
SLIPIF_THREAD_NAME --- SLIPIF thread name
SLIPIF_THREAD_STACKSIZE --- Assigned to slipif_loop thread priority
PPP_THREAD_NAME --- PPP protocol thread name
PPP_THREAD_STACKSIZE --- Stack size used by the pppmain thread
ppp_thread_prio --- Priority assigned to the pppmain thread
DEFAULT_THREAD_NAME --- Default LWIP thread name
DEFAULT_THREAD_STACKSIZE --- Default stack size
default_thread_prio --- The priority assigned to any other LwIP threads
default_raw_recvmbox_size --- Other raw mailbox sizes
DEFAULT_UDP_RECVMBOX_SIZE --- Other UDP mailbox size
DEFAULT_TCP_RECVMBOX_SIZE --- Other TCP mailbox size
DEFAULT_ACCEPTMBOX_SIZE --- ACCEPTMBOX size
lwip_tcpip_core_locking --- (Experimental!) Not normally used
lwip_netconn --- Enable netconn API (need to use api_lib.C)
lwip_socket --- Enable Socket API (needs sockets.c)
lwip_compat_sockets --- BSD socket function names
lwip_posix_sockets_io_names --- Enable POSIX-style socket function names for posix systems
LWIP_TCP_KEEPALIVE --- Dead link detection
LWIP_SO_RCVBUF --- Enable blocking handler
RECV_BUFSIZE_DEFAULT --- If blocking processing is enabled, this setting is the blocking buffer size
SO_REUSE --- resend
lwip_stats --- Enable lwip_stats statistics
LWIP_STATS_DISPLAY --- Compile and output statistics function
LINK_STATS --- Enable link statistics
ETHARP_STATS --- Enable arp statistics
IP_STATS --- Enable IP statistics
IPFRAG_STATS --- IP fragmentation statistics
ICMP_STATS --- ICMP statistics
IGMP_STATS ---igmp statistics
UDP_STATS --- udp statistics
TCP_STATS --- TCP statistics
MEM_STATS ---Memory management statistics
MEMP_STATS --- Memory list statistics
SYS_STATS --- System statistics
PPP_SUPPORT --- Enable PPP protocol
PP
POE_SUPPORT --- Enable PPPOE protocol
PPPOS_SUPPORT --- Enable pppos protocol
NUM_PPP --- Maximum PPP sessions
PAP_SUPPORT --- Enable pap password authentication protocol
CHAP_SUPPORT--- Enable CHAP protocol
MSCHAP_SUPPORT --- Enable mschap. Currently not supported, do not set
CBCP_SUPPORT --- Enable CBCP. Currently not supported, do not set
CCP_SUPPORT --- Enable CCP. Currently not supported, do not set.
VJ_SUPPORT --- Enable support for this header compression
md5_support --- Support MD5
FSM_DEFTIMEOUT --- DEFTIMEOUT
FSM_DEFMAXTERMREQS --- Maximum termination request transmission
FSM_DEFMAXCONFREQS --- Maximum configuration request transmissions
FSM_DEFMAXNAKLOOPS --- Maximum number of NAK loops
UPAP_DEFTIMEOUT --- Resend request timeout (seconds)
UPAP_DEFREQTIME --- Time to wait for authentication request peer
CHAP_DEFTIMEOUT --- chap default exit time
CHAP_DEFTRANSMITS --- Competition maximum send time
LCP_ECHOINTERVAL --- The interval between KeepAlive echo requests, 0 seconds is disabled
LCP_MAXECHOFAILS --- Number of pending echo requests before failure
PPP_MAXIDLEFLAG --- Maximum transmit idle time (before flag character is sent)
CHECKSUM_GEN_IP --- Generate IP packet checksum
CHECKSUM_GEN_UDP --- Generate UDP packet checksum
CHECKSUM_GEN_TCP --- Generate TCP packet checksum
CHECKSUM_CHECK_IP ---Incoming IP packet check
CHECKSUM_CHECK_UDP --- Incoming UDP packet checksum
CHECKSUM_CHECK_TCP --- Incoming TCP packet checksum
The following are various debugging
LWIP_DBG_MIN_LEVEL
LWIP_DBG_TYPES_ON
ETHARP_DEBUG
NETIF_DEBUG
PBUF_DEBUG
API_LIB_DEBUG
API_MSG_DEBUG
SOCKETS_DEBUG
ICMP_DEBUG
IGMP_DEBUG
INET_DEBUG
IP_DEBUG
IP_REASS_DEBUG
RAW_DEBUG
MEM_DEBUG
MEMP_DEBUG
SYS_DEBUG
TCP_DEBUG
TCP_INPUT_DEBUG
TCP_FR_DEBUG
TCP_RTO_DEBUG
TCP_CWND_DEBUG
TCP_WND_DEBUG
TCP_OUTPUT_DEBUG
TCP_RST_DEBUG
TCP_QLEN_DEBUG
UDP_DEBUG
TCPIP_DEBUG
PPP_DEBUG
SLIP_DEBUG
DHCP_DEBUG
AUTOIP_DEBUG
SNMP_MSG_DEBUG
SNMP_MIB_DEBUG
DNS_DEBUG