lwIP 2.2.0 Lightweight IP stack

Macros
Internal memory pools
lwIP » Options (lwipopts.h) » Infrastructure

## Macros
#define | MEMP_NUM_PBUF 16
#define | MEMP_NUM_RAW_PCB 4
#define | MEMP_NUM_UDP_PCB 4
#define | MEMP_NUM_TCP_PCB 5
#define | MEMP_NUM_TCP_PCB_LISTEN 8
#define | MEMP_NUM_TCP_SEG 16
#define | MEMP_NUM_ALTCP_PCB MEMP_NUM_TCP_PCB
#define | MEMP_NUM_REASSDATA 5
#define | MEMP_NUM_FRAG_PBUF 15
#define | MEMP_NUM_ARP_QUEUE 30
#define | MEMP_NUM_IGMP_GROUP 8
#define | LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_ACD + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD + LWIP_IPV6_DHCP6)))
#define | MEMP_NUM_SYS_TIMEOUT LWIP_NUM_SYS_TIMEOUT_INTERNAL
#define | MEMP_NUM_NETBUF 2
#define | MEMP_NUM_NETCONN 4
#define | MEMP_NUM_SELECT_CB 4
#define | MEMP_NUM_TCPIP_MSG_API 8
#define | MEMP_NUM_TCPIP_MSG_INPKT 8
#define | MEMP_NUM_NETDB 1
#define | MEMP_NUM_LOCALHOSTLIST 1
#define | PBUF_POOL_SIZE 16
#define | MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API
#define | MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API
#define | MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API
#define | MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API

## Detailed Description

## Macro Definition Documentation

## ◆ LWIP_NUM_SYS_TIMEOUT_INTERNAL

#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_ACD + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD + LWIP_IPV6_DHCP6)))

The number of sys timeouts used by the core stack (not apps) The default number of timeouts is calculated here for all enabled modules.

## ◆ MEMP_NUM_ALTCP_PCB

#define MEMP_NUM_ALTCP_PCB MEMP_NUM_TCP_PCB

MEMP_NUM_ALTCP_PCB: the number of simultaneously active altcp layer pcbs. (requires the LWIP_ALTCP option) Connections with multiple layers require more than one altcp_pcb (e.g. TLS over TCP requires 2 altcp_pcbs, one for TLS and one for TCP).

## ◆ MEMP_NUM_API_MSG

#define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API

MEMP_NUM_API_MSG: the number of concurrently active calls to various socket, netconn, and tcpip functions

## ◆ MEMP_NUM_ARP_QUEUE

#define MEMP_NUM_ARP_QUEUE 30

MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing packets (pbufs) that are waiting for an ARP request (to resolve their destination address) to finish. (requires the ARP_QUEUEING option)

## ◆ MEMP_NUM_DNS_API_MSG

#define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API

MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname

## ◆ MEMP_NUM_FRAG_PBUF

#define MEMP_NUM_FRAG_PBUF 15

MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent (fragments, not whole packets!). This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs where the packet is not yet sent when netif->output returns.

## ◆ MEMP_NUM_IGMP_GROUP

#define MEMP_NUM_IGMP_GROUP 8

MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces can be members at the same time (one per netif - allsystems group -, plus one per netif membership). (requires the LWIP_IGMP option)

## ◆ MEMP_NUM_LOCALHOSTLIST

#define MEMP_NUM_LOCALHOSTLIST 1

MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.

## ◆ MEMP_NUM_NETBUF

#define MEMP_NUM_NETBUF 2

MEMP_NUM_NETBUF: the number of struct netbufs. (only needed if you use the sequential API, like api_lib.c)

## ◆ MEMP_NUM_NETCONN

#define MEMP_NUM_NETCONN 4

MEMP_NUM_NETCONN: the number of struct netconns. (only needed if you use the sequential API, like api_lib.c)

## ◆ MEMP_NUM_NETDB

#define MEMP_NUM_NETDB 1

MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls (before freeing the corresponding memory using lwip_freeaddrinfo()).

## ◆ MEMP_NUM_NETIFAPI_MSG

#define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API

MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the netifapi functions

## ◆ MEMP_NUM_PBUF

#define MEMP_NUM_PBUF 16

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.

## ◆ MEMP_NUM_RAW_PCB

#define MEMP_NUM_RAW_PCB 4

MEMP_NUM_RAW_PCB: Number of raw connection PCBs (requires the LWIP_RAW option)

## ◆ MEMP_NUM_REASSDATA

#define MEMP_NUM_REASSDATA 5

MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for reassembly (whole packets, not fragments!)

## ◆ MEMP_NUM_SELECT_CB

#define MEMP_NUM_SELECT_CB 4

MEMP_NUM_SELECT_CB: the number of struct lwip_select_cb. (Only needed if you have LWIP_MPU_COMPATIBLE==1 and use the socket API. In that case, you need one per thread calling lwip_select.)

## ◆ MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA

#define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API

MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls to getsockopt/setsockopt

## ◆ MEMP_NUM_SYS_TIMEOUT

#define MEMP_NUM_SYS_TIMEOUT LWIP_NUM_SYS_TIMEOUT_INTERNAL

MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. The default number of timeouts is calculated here for all enabled modules. The formula expects settings to be either '0' or '1'.

## ◆ MEMP_NUM_TCP_PCB

#define MEMP_NUM_TCP_PCB 5

MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. (requires the LWIP_TCP option)

## ◆ MEMP_NUM_TCP_PCB_LISTEN

#define MEMP_NUM_TCP_PCB_LISTEN 8

MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. (requires the LWIP_TCP option)

## ◆ MEMP_NUM_TCP_SEG

#define MEMP_NUM_TCP_SEG 16

MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. (requires the LWIP_TCP option)

## ◆ MEMP_NUM_TCPIP_MSG_API

#define MEMP_NUM_TCPIP_MSG_API 8

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)

## ◆ MEMP_NUM_TCPIP_MSG_INPKT

#define MEMP_NUM_TCPIP_MSG_INPKT 8

MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used for incoming packets. (only needed if you use tcpip.c)

## ◆ MEMP_NUM_UDP_PCB

#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)

## ◆ PBUF_POOL_SIZE

#define PBUF_POOL_SIZE 16

PBUF_POOL_SIZE: the number of buffers in the pbuf pool.