lwIP Options Configuration
This is a default configuration that is usually overridden by a configuration file tuned for a specific application.
#include <wl_api.h>
Macros | |
#define | ETH_PAD_SIZE WL_HEADER_SIZE /* size of wifiengine header */ |
#define | ICMP_TTL (IP_DEFAULT_TTL) |
ICMP_TTL: Default value for Time-To-Live used by ICMP packets. More... | |
#define | IP_DEFAULT_TTL 255 |
IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. More... | |
#define | IP_FORWARD 0 |
IP_FORWARD==1: Enables the ability to forward IP packets across network interfaces. More... | |
#define | IP_FRAG 1 |
IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. More... | |
#define | IP_FRAG_USES_STATIC_BUF 0 |
IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP fragmentation. More... | |
#define | IP_OPTIONS_ALLOWED 1 |
IP_OPTIONS: Defines the behavior for IP options. More... | |
#define | IP_REASS_MAX_PBUFS 10 |
IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. More... | |
#define | IP_REASS_MAXAGE 3 |
IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) a fragmented IP packet waits for all fragments to arrive. More... | |
#define | IP_REASSEMBLY 1 |
IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. More... | |
#define | LINK_STATS 1 |
#define | LWIP_ARP 1 |
LWIP_ARP==1: Enable ARP functionality. More... | |
#define | LWIP_AUTOIP 0 |
LWIP_AUTOIP==1: Enable AUTOIP module. More... | |
#define | LWIP_DHCP 1 |
LWIP_DHCP==1: Enable DHCP module. More... | |
#define | LWIP_DNS 1 |
LWIP_DNS==1: Turn on DNS module. More... | |
#define | LWIP_HAVE_LOOPIF 1 |
LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c. More... | |
#define | LWIP_ICMP 1 |
LWIP_ICMP==1: Enable ICMP module inside the IP stack. More... | |
#define | LWIP_IGMP 1 |
LWIP_IGMP==1: Turn on IGMP module. More... | |
#define | LWIP_LOOPIF_MULTITHREADING 0 |
#define | LWIP_NETCONN 0 |
LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) More... | |
#define | LWIP_NETIF_LINK_CALLBACK 1 |
#define | LWIP_NETIF_STATUS_CALLBACK 1 |
#define | LWIP_RAW 1 |
LWIP_RAW==1: Enable application layer to hook into the IP layer itself. More... | |
#define | LWIP_SNMP 0 |
LWIP_SNMP==1: Turn on SNMP module. More... | |
#define | LWIP_SOCKET 0 |
LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) More... | |
#define | LWIP_STATS 1 |
LWIP_STATS==1: Enable statistics collection in lwip_stats. More... | |
#define | LWIP_TCP 1 |
LWIP_TCP==1: Turn on TCP. More... | |
#define | LWIP_TIMEVAL_PRIVATE 0 |
#define | LWIP_UDP 1 |
LWIP_UDP==1: Turn on UDP. More... | |
#define | LWIP_UDPLITE 0 |
LWIP_UDPLITE==1: Turn on UDP-Lite. More... | |
#define | MEM_ALIGNMENT 4 |
MEM_ALIGNMENT: should be set to the alignment of the CPU 4 byte alignment -> #define MEM_ALIGNMENT 4 2 byte alignment -> #define MEM_ALIGNMENT 2. More... | |
#define | MEM_LIBC_MALLOC 1 |
#define | MEM_SIZE 16000 |
MEM_SIZE: the size of the heap memory. More... | |
#define | MEMP_NUM_ARP_QUEUE 2 |
MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing packets (pbufs) that are waiting for an ARP request (to resolve their destination address) to finish. More... | |
#define | MEMP_NUM_NETBUF 0 |
MEMP_NUM_NETBUF: the number of struct netbufs. More... | |
#define | MEMP_NUM_NETCONN 0 |
MEMP_NUM_NETCONN: the number of struct netconns. More... | |
#define | MEMP_NUM_PBUF 30 |
MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). More... | |
#define | MEMP_NUM_RAW_PCB 4 |
MEMP_NUM_RAW_PCB: Number of raw connection PCBs (requires the LWIP_RAW option) More... | |
#define | MEMP_NUM_SYS_TIMEOUT 0 |
MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. More... | |
#define | MEMP_NUM_TCP_PCB 2 |
MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. More... | |
#define | MEMP_NUM_TCP_PCB_LISTEN 2 |
MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. More... | |
#define | MEMP_NUM_TCP_SEG 32 |
MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. More... | |
#define | MEMP_NUM_TCPIP_MSG_API 0 |
MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used for callback/timeout API communication. More... | |
#define | MEMP_NUM_TCPIP_MSG_INPKT 0 |
MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used for incoming packets. More... | |
#define | MEMP_NUM_UDP_PCB 4 |
MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. More... | |
#define | NO_SYS 1 |
NO_SYS==1: Provides VERY minimal functionality. More... | |
#define | PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) |
PBUF_LINK_HLEN: the number of bytes that should be allocated for a link level header. More... | |
#define | PBUF_POOL_SIZE 32 |
PBUF_POOL_SIZE: the number of buffers in the pbuf pool. More... | |
#define | SNMP_PRIVATE_MIB 0 |
#define | TCP_MSS 512 |
#define | TCP_SND_BUF 4096 |
#define | UDP_TTL (IP_DEFAULT_TTL) |
UDP_TTL: Default Time-To-Live value. More... | |
#define ETH_PAD_SIZE WL_HEADER_SIZE /* size of wifiengine header */ |
#define ICMP_TTL (IP_DEFAULT_TTL) |
ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
#define IP_DEFAULT_TTL 255 |
IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
#define IP_FORWARD 0 |
IP_FORWARD==1: Enables the ability to forward IP packets across network interfaces.
If you are going to run lwIP on a device with only one network interface, define this to 0.
#define IP_FRAG 1 |
IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU.
Note that this option does not affect incoming packet sizes, which can be controlled via IP_REASSEMBLY.
#define IP_FRAG_USES_STATIC_BUF 0 |
IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP fragmentation.
Otherwise pbufs are allocated and reference the original packet data to be fragmented.
#define IP_OPTIONS_ALLOWED 1 |
IP_OPTIONS: Defines the behavior for IP options.
IP_OPTIONS==0_ALLOWED: All packets with IP options are dropped. IP_OPTIONS==1_ALLOWED: IP options are allowed (but not parsed).
#define IP_REASS_MAX_PBUFS 10 |
IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled.
Since the received pbufs are enqueued, be sure to configure PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive packets even if the maximum amount of fragments is enqueued for reassembly!
#define IP_REASS_MAXAGE 3 |
IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) a fragmented IP packet waits for all fragments to arrive.
If not all fragments arrived in this time, the whole packet is discarded.
#define IP_REASSEMBLY 1 |
IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets.
Note that this option does not affect outgoing packet sizes, which can be controlled via IP_FRAG.
#define LINK_STATS 1 |
#define LWIP_ARP 1 |
LWIP_ARP==1: Enable ARP functionality.
#define LWIP_AUTOIP 0 |
LWIP_AUTOIP==1: Enable AUTOIP module.
#define LWIP_DHCP 1 |
LWIP_DHCP==1: Enable DHCP module.
#define LWIP_DNS 1 |
LWIP_DNS==1: Turn on DNS module.
UDP must be available for DNS transport.
#define LWIP_HAVE_LOOPIF 1 |
LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c.
#define LWIP_ICMP 1 |
LWIP_ICMP==1: Enable ICMP module inside the IP stack.
Be careful, disable that make your product non-compliant to RFC1122
#define LWIP_IGMP 1 |
LWIP_IGMP==1: Turn on IGMP module.
#define LWIP_LOOPIF_MULTITHREADING 0 |
#define LWIP_NETCONN 0 |
LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
#define LWIP_NETIF_LINK_CALLBACK 1 |
#define LWIP_NETIF_STATUS_CALLBACK 1 |
#define LWIP_RAW 1 |
LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
#define LWIP_SNMP 0 |
LWIP_SNMP==1: Turn on SNMP module.
UDP must be available for SNMP transport.
#define LWIP_SOCKET 0 |
LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
#define LWIP_STATS 1 |
LWIP_STATS==1: Enable statistics collection in lwip_stats.
#define LWIP_TCP 1 |
LWIP_TCP==1: Turn on TCP.
#define LWIP_TIMEVAL_PRIVATE 0 |
#define LWIP_UDP 1 |
LWIP_UDP==1: Turn on UDP.
#define LWIP_UDPLITE 0 |
LWIP_UDPLITE==1: Turn on UDP-Lite.
(Requires LWIP_UDP)
#define MEM_ALIGNMENT 4 |
MEM_ALIGNMENT: should be set to the alignment of the CPU 4 byte alignment -> #define MEM_ALIGNMENT 4 2 byte alignment -> #define MEM_ALIGNMENT 2.
#define MEM_LIBC_MALLOC 1 |
#define MEM_SIZE 16000 |
MEM_SIZE: the size of the heap memory.
If the application will send a lot of data that needs to be copied, this should be set high.
#define MEMP_NUM_ARP_QUEUE 2 |
MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing packets (pbufs) that are waiting for an ARP request (to resolve their destination address) to finish.
(requires the ARP_QUEUEING option)
#define MEMP_NUM_NETBUF 0 |
MEMP_NUM_NETBUF: the number of struct netbufs.
(only needed if you use the sequential API, like api_lib.c)
#define MEMP_NUM_NETCONN 0 |
MEMP_NUM_NETCONN: the number of struct netconns.
(only needed if you use the sequential API, like api_lib.c)
#define MEMP_NUM_PBUF 30 |
MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
If the application sends a lot of data out of ROM (or other static memory), this should be set high.
#define MEMP_NUM_RAW_PCB 4 |
MEMP_NUM_RAW_PCB: Number of raw connection PCBs (requires the LWIP_RAW option)
#define MEMP_NUM_SYS_TIMEOUT 0 |
MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
(requires NO_SYS==0)
#define MEMP_NUM_TCP_PCB 2 |
MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
(requires the LWIP_TCP option)
#define MEMP_NUM_TCP_PCB_LISTEN 2 |
MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections.
(requires the LWIP_TCP option)
#define MEMP_NUM_TCP_SEG 32 |
MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
(requires the LWIP_TCP option)
#define MEMP_NUM_TCPIP_MSG_API 0 |
MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used for callback/timeout API communication.
(only needed if you use tcpip.c)
#define MEMP_NUM_TCPIP_MSG_INPKT 0 |
MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used for incoming packets.
(only needed if you use tcpip.c)
#define MEMP_NUM_UDP_PCB 4 |
MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks.
One per active UDP "connection". (requires the LWIP_UDP option)
#define NO_SYS 1 |
NO_SYS==1: Provides VERY minimal functionality.
Otherwise, use lwIP facilities.
#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) |
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.
#define PBUF_POOL_SIZE 32 |
PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
#define SNMP_PRIVATE_MIB 0 |
#define TCP_MSS 512 |
#define TCP_SND_BUF 4096 |
#define UDP_TTL (IP_DEFAULT_TTL) |
UDP_TTL: Default Time-To-Live value.