lwIP 2.2.1 Lightweight IP stack

Macros
PBUF
lwIP » Options (lwipopts.h)

## Macros
#define | PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
#define | PBUF_LINK_ENCAPSULATION_HLEN 0
#define | PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
#define | LWIP_PBUF_REF_T u8_t
#define | LWIP_PBUF_CUSTOM_DATA
#define | LWIP_PBUF_CUSTOM_DATA_INIT(p)

## Detailed Description

## Macro Definition Documentation

## ◆ LWIP_PBUF_CUSTOM_DATA

#define LWIP_PBUF_CUSTOM_DATA

LWIP_PBUF_CUSTOM_DATA: Store private data on pbufs (e.g. timestamps) This extends struct pbuf so user can store custom data on every pbuf. e.g.: #define LWIP_PBUF_CUSTOM_DATA u32_t myref;

## ◆ LWIP_PBUF_CUSTOM_DATA_INIT

#define LWIP_PBUF_CUSTOM_DATA_INIT | ( |  | p | ) |

LWIP_PBUF_CUSTOM_DATA_INIT: Initialize private data on pbufs. e.g. for the above example definition: #define LWIP_PBUF_CUSTOM_DATA(p) (p)->myref = 0

## ◆ LWIP_PBUF_REF_T

#define LWIP_PBUF_REF_T u8_t

LWIP_PBUF_REF_T: Refcount type in pbuf. Default width of u8_t can be increased if 255 refs are not enough for you.

## ◆ PBUF_LINK_ENCAPSULATION_HLEN

#define PBUF_LINK_ENCAPSULATION_HLEN 0

PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated for an additional encapsulation header before ethernet headers (e.g. 802.11)

## ◆ PBUF_LINK_HLEN

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

## ◆ PBUF_POOL_BUFSIZE

#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)

PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is designed to accommodate single full size TCP frame in one pbuf, including TCP_MSS, IP header, and link header.