?? opt.h
字號(hào):
/** * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS * transport. */#ifndef LWIP_DNS#define LWIP_DNS 0#endif/** DNS maximum number of entries to maintain locally. */#ifndef DNS_TABLE_SIZE#define DNS_TABLE_SIZE 4#endif/** DNS maximum host name length supported in the name table. */#ifndef DNS_MAX_NAME_LENGTH#define DNS_MAX_NAME_LENGTH 256#endif/** The maximum of DNS servers */#ifndef DNS_MAX_SERVERS#define DNS_MAX_SERVERS 2#endif/** DNS do a name checking between the query and the response. */#ifndef DNS_DOES_NAME_CHECK#define DNS_DOES_NAME_CHECK 1#endif/** DNS use a local buffer if DNS_USES_STATIC_BUF=0, a static one if DNS_USES_STATIC_BUF=1, or a dynamic one if DNS_USES_STATIC_BUF=2. The buffer will be of size DNS_MSG_SIZE */#ifndef DNS_USES_STATIC_BUF#define DNS_USES_STATIC_BUF 1#endif/** DNS message max. size. Default value is RFC compliant. */#ifndef DNS_MSG_SIZE#define DNS_MSG_SIZE 512#endif/* --------------------------------- ---------- UDP options ---------- ---------------------------------*//** * LWIP_UDP==1: Turn on UDP. */#ifndef LWIP_UDP#define LWIP_UDP 1#endif/** * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) */#ifndef LWIP_UDPLITE#define LWIP_UDPLITE 0#endif/** * UDP_TTL: Default Time-To-Live value. */#ifndef UDP_TTL#define UDP_TTL (IP_DEFAULT_TTL)#endif/* --------------------------------- ---------- TCP options ---------- ---------------------------------*//** * LWIP_TCP==1: Turn on TCP. */#ifndef LWIP_TCP#define LWIP_TCP 1#endif/** * TCP_TTL: Default Time-To-Live value. */#ifndef TCP_TTL#define TCP_TTL (IP_DEFAULT_TTL)#endif/** * TCP_WND: The size of a TCP window. */#ifndef TCP_WND#define TCP_WND 2048#endif /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */#ifndef TCP_MAXRTX#define TCP_MAXRTX 12#endif/** * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. */#ifndef TCP_SYNMAXRTX#define TCP_SYNMAXRTX 6#endif/** * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. * Define to 0 if your device is low on memory. */#ifndef TCP_QUEUE_OOSEQ#define TCP_QUEUE_OOSEQ 1#endif/** * TCP_MSS: TCP Maximum segment size. (default is 128, a *very* * conservative default.) * For the receive side, this MSS is advertised to the remote side * when opening a connection. For the transmit size, this MSS sets * an upper limit on the MSS advertised by the remote host. */#ifndef TCP_MSS#define TCP_MSS 128#endif/** * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which * reflects the available reassembly buffer size at the remote host) and the * largest size permitted by the IP layer" (RFC 1122) * Setting this to 1 enables code that checks TCP_MSS against the MTU of the * netif used for a connection and limits the MSS if it would be too big otherwise. */#ifndef TCP_CALCULATE_EFF_SEND_MSS#define TCP_CALCULATE_EFF_SEND_MSS 1#endif/** * TCP_SND_BUF: TCP sender buffer space (bytes). */#ifndef TCP_SND_BUF#define TCP_SND_BUF 256#endif/** * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */#ifndef TCP_SND_QUEUELEN#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))#endif/** * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than or equal * to TCP_SND_BUF. It is the amount of space which must be available in the * TCP snd_buf for select to return writable. */#ifndef TCP_SNDLOWAT#define TCP_SNDLOWAT (TCP_SND_BUF/2)#endif/** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. */#ifndef TCP_LISTEN_BACKLOG#define TCP_LISTEN_BACKLOG 0#endif/** * The maximum allowed backlog for TCP listen netconns. * This backlog is used unless another is explicitly specified. * 0xff is the maximum (u8_t). */#ifndef TCP_DEFAULT_LISTEN_BACKLOG#define TCP_DEFAULT_LISTEN_BACKLOG 0xff#endif/** * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all * events (accept, sent, etc) that happen in the system. * LWIP_CALLBACK_API==1: The PCB callback function is called directly * for the event. */#ifndef LWIP_EVENT_API#define LWIP_EVENT_API 0#define LWIP_CALLBACK_API 1#else #define LWIP_EVENT_API 1#define LWIP_CALLBACK_API 0#endif/* ---------------------------------- ---------- Pbuf options ---------- ----------------------------------*//** * PBUF_LINK_HLEN: the number of bytes that should be allocated for a * link level header. The default is 14, the standard value for * Ethernet. */#ifndef PBUF_LINK_HLEN#define PBUF_LINK_HLEN 14#endif/** * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is * designed to accomodate single full size TCP frame in one pbuf, including * TCP_MSS, IP header, and link header. */#ifndef PBUF_POOL_BUFSIZE#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)#endif/* ------------------------------------------------ ---------- Network Interfaces options ---------- ------------------------------------------------*//** * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * field. */#ifndef LWIP_NETIF_HOSTNAME#define LWIP_NETIF_HOSTNAME 0#endif/** * LWIP_NETIF_API==1: Support netif api (in netifapi.c) */#ifndef LWIP_NETIF_API#define LWIP_NETIF_API 0#endif/** * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface * changes its up/down status (i.e., due to DHCP IP acquistion) */#ifndef LWIP_NETIF_STATUS_CALLBACK#define LWIP_NETIF_STATUS_CALLBACK 0#endif/** * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface * whenever the link changes (i.e., link down) */#ifndef LWIP_NETIF_LINK_CALLBACK#define LWIP_NETIF_LINK_CALLBACK 0#endif/** * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table * indices) in struct netif. TCP and UDP can make use of this to prevent * scanning the ARP table for every sent packet. While this is faster for big * ARP tables or many concurrent connections, it might be counterproductive * if you have a tiny ARP table or if there never are concurrent connections. */#ifndef LWIP_NETIF_HWADDRHINT#define LWIP_NETIF_HWADDRHINT 0#endif/* ------------------------------------ ---------- LOOPIF options ---------- ------------------------------------*//** * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c */#ifndef LWIP_HAVE_LOOPIF#define LWIP_HAVE_LOOPIF 0#endif/** * LWIP_LOOPIF_MULTITHREADING: Indicates whether threading is enabled in * the system, as LOOPIF must change how it behaves depending on this setting. * Setting this is needed to avoid reentering non-reentrant functions like * tcp_input(). * LWIP_LOOPIF_MULTITHREADING==1: Indicates that the user is using a * multithreaded environment like tcpip.c. In this case, netif->input() * is called directly. * LWIP_LOOPIF_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. * The packets are put on a list and loopif_poll() must be called in * the main application loop. */#ifndef LWIP_LOOPIF_MULTITHREADING#endif/* ------------------------------------ ---------- Thread options ---------- ------------------------------------*//** * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. */#ifndef TCPIP_THREAD_NAME#define TCPIP_THREAD_NAME "tcpip_thread"#endif/** * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef TCPIP_THREAD_STACKSIZE#define TCPIP_THREAD_STACKSIZE 0#endif/** * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef TCPIP_THREAD_PRIO#define TCPIP_THREAD_PRIO 1#endif/** * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when tcpip_init is called. */#ifndef TCPIP_MBOX_SIZE#define TCPIP_MBOX_SIZE 0#endif/** * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. */#ifndef SLIPIF_THREAD_NAME#define SLIPIF_THREAD_NAME "slipif_loop"#endif/** * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef SLIPIF_THREAD_STACKSIZE#define SLIPIF_THREAD_STACKSIZE 0#endif/** * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef SLIPIF_THREAD_PRIO#define SLIPIF_THREAD_PRIO 1#endif/** * PPP_THREAD_NAME: The name assigned to the pppMain thread. */#ifndef PPP_THREAD_NAME#define PPP_THREAD_NAME "pppMain"#endif/** * PPP_THREAD_STACKSIZE: The stack size used by the pppMain thread. * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef PPP_THREAD_STACKSIZE#define PPP_THREAD_STACKSIZE 0#endif/** * PPP_THREAD_PRIO: The priority assigned to the pppMain thread. * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef PPP_THREAD_PRIO#define PPP_THREAD_PRIO 1#endif/** * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. */#ifndef DEFAULT_THREAD_NAME#define DEFAULT_THREAD_NAME "lwIP"#endif/** * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef DEFAULT_THREAD_STACKSIZE#define DEFAULT_THREAD_STACKSIZE 0#endif/** * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */#ifndef DEFAULT_THREAD_PRIO#define DEFAULT_THREAD_PRIO 1#endif/** * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */#ifndef DEFAULT_RAW_RECVMBOX_SIZE#define DEFAULT_RAW_RECVMBOX_SIZE 0#endif/** * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */#ifndef DEFAULT_UDP_RECVMBOX_SIZE#define DEFAULT_UDP_RECVMBOX_SIZE 0#endif/** * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */#ifndef DEFAULT_TCP_RECVMBOX_SIZE#define DEFAULT_TCP_RECVMBOX_SIZE 0#endif/** * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when the acceptmbox is created. */#ifndef DEFAULT_ACCEPTMBOX_SIZE#define DEFAULT_ACCEPTMBOX_SIZE 0#endif/* ---------------------------------------------- ---------- Sequential layer options ---------- ----------------------------------------------*//** * LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!) * Don't use it if you're not an active lwIP project member */#ifndef LWIP_TCPIP_CORE_LOCKING#define LWIP_TCPIP_CORE_LOCKING 0#endif/** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */#ifndef LWIP_NETCONN#define LWIP_NETCONN 1#endif/* ------------------------------------ ---------- Socket options ---------- ------------------------------------*//** * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) */#ifndef LWIP_SOCKET#define LWIP_SOCKET 1#endif/** * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names. * (only used if you use sockets.c) */#ifndef LWIP_COMPAT_SOCKETS#define LWIP_COMPAT_SOCKETS 1#endif/** * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). (only used if you use sockets.c) */#ifndef LWIP_POSIX_SOCKETS_IO_NAMES#define LWIP_POSIX_SOCKETS_IO_NAMES 1#endif/** * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set * in seconds. (does not require sockets.c, and will affect tcp.c) */#ifndef LWIP_TCP_KEEPALIVE#define LWIP_TCP_KEEPALIVE 0#endif/** * LWIP_SO_RCVTIMEO==1: Enable SO_RCVTIMEO processing. */#ifndef LWIP_SO_RCVTIMEO#define LWIP_SO_RCVTIMEO 0#endif/** * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. */#ifndef LWIP_SO_RCVBUF#define LWIP_SO_RCVBUF 0#endif/** * SO_REUSE==1: Enable SO_REUSEADDR and SO_REUSEPORT options. DO NOT USE! */#ifndef SO_REUSE#define SO_REUSE 0#endif/* ---------------------------------------- ---------- Statistics options ---------- ----------------------------------------*//** * LWIP_STATS==1: Enable statistics collection in lwip_stats. */#ifndef LWIP_STATS#define LWIP_STATS 1#endif#if LWIP_STATS/** * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. */#ifndef LWIP_STATS_DISPLAY#define LWIP_STATS_DISPLAY 0#endif/** * LINK_STATS==1: Enable link stats. */#ifndef LINK_STATS#define LINK_STATS 1#endif/** * ETHARP_STATS==1: Enable etharp stats. */#ifndef ETHARP_STATS
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -