⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opt.h

📁 lwip-1.4.0
💻 H
📖 第 1 页 / 共 4 页
字号:
 * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an * explicit window update */#ifndef TCP_WND_UPDATE_THRESHOLD#define TCP_WND_UPDATE_THRESHOLD   (TCP_WND / 4)#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 + ETH_PAD_SIZE)#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/** * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP * address equal to the netif IP address, looping them back up the stack. */#ifndef LWIP_NETIF_LOOPBACK#define LWIP_NETIF_LOOPBACK             0#endif/** * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback * sending for each netif (0 = disabled) */#ifndef LWIP_LOOPBACK_MAX_PBUFS#define LWIP_LOOPBACK_MAX_PBUFS         0#endif/** * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in * the system, as netifs must change how they behave depending on this setting * for the LWIP_NETIF_LOOPBACK option to work. * Setting this is needed to avoid reentering non-reentrant functions like * tcp_input(). *    LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a *       multithreaded environment like tcpip.c. In this case, netif->input() *       is called directly. *    LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. *       The packets are put on a list and netif_poll() must be called in *       the main application loop. */#ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING#define LWIP_NETIF_LOOPBACK_MULTITHREADING    (!NO_SYS)#endif/** * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data * to be sent into one single pbuf. This is for compatibility with DMA-enabled * MACs that do not support scatter-gather. * Beware that this might involve CPU-memcpy before transmitting that would not * be needed without this flag! Use this only if you need to! * * @todo: TCP and IP-frag do not work with this, yet: */#ifndef LWIP_NETIF_TX_SINGLE_PBUF#define LWIP_NETIF_TX_SINGLE_PBUF             0#endif /* LWIP_NETIF_TX_SINGLE_PBUF *//*   ------------------------------------   ---------- 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/*   ------------------------------------   ---------- SLIPIF options ----------   ------------------------------------*//** * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c */#ifndef LWIP_HAVE_SLIPIF#define LWIP_HAVE_SLIPIF                0#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 pppInputThread. */#ifndef PPP_THREAD_NAME#define PPP_THREAD_NAME                "pppInputThread"#endif/** * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread. * 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 pppInputThread. * 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_TCPIP_CORE_LOCKING_INPUT: (EXPERIMENTAL!) * Don't use it if you're not an active lwIP project member */#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT#define LWIP_TCPIP_CORE_LOCKING_INPUT   0#endif/** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */#ifndef LWIP_NETCONN#define LWIP_NETCONN                    1#endif/** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create * timers running in tcpip_thread from another thread. */#ifndef LWIP_TCPIP_TIMEOUT#define LWIP_TCPIP_TIMEOUT              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/** * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. */#ifndef RECV_BUFSIZE_DEFAULT#define RECV_BUFSIZE_DEFAULT            INT_MAX#endif/** * SO_REUSE==1: Enable SO_REUSEADDR option. */#ifndef SO_REUSE#define SO_REUSE                        0#endif/** * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets * to all local matches if SO_REUSEADDR is turned on. * WARNING: Adds a memcpy for every packet if passing to more than one pcb! */#ifndef SO_REUSE_RXTOALL#define SO_REUSE_RXTOALL                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#define ETHARP_STATS                    (LWIP_ARP)#endif/** * IP_STATS==1: Enable IP stats. */#ifndef IP_STATS#define IP_STATS                        1#endif/** * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is * on if using either frag or reass. */#ifndef IPFRAG_STATS#define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)#endif/** * ICMP_STATS==1: Enable ICMP stats. */#ifndef ICMP_STATS#define ICMP_STATS                      1#endif/** * IGMP_STATS==1: Enable IGMP stats. */#ifndef IGMP_STATS#define IGMP_STATS                      (LWIP_IGMP)#endif/** * UDP_STATS==1: Enable UDP stats. Default is on if * UDP enabled, otherwise off. */#ifndef UDP_STATS#define UDP_STATS                       (LWIP_UDP)#endif/** * TCP_STATS==1: Enable TCP stats. Default is on if TCP * enabled, otherwise off. */#ifndef TCP_STATS#define TCP_STATS                       (LWIP_TCP)#endif/** * MEM_STATS==1: Enable mem.c stats. */#ifndef MEM_STATS#define MEM_STATS                       ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))#endif/**

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -