33 #ifndef __LWIP_PBUF_H__
34 #define __LWIP_PBUF_H__
45 #define LWIP_SUPPORT_CUSTOM_PBUF (IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF)
47 #define PBUF_TRANSPORT_HLEN 20
48 #define PBUF_IP_HLEN 20
69 #define PBUF_FLAG_PUSH 0x01U
72 #define PBUF_FLAG_IS_CUSTOM 0x02U
74 #define PBUF_FLAG_MCASTLOOP 0x04U
112 #if LWIP_SUPPORT_CUSTOM_PBUF
114 typedef void (*pbuf_free_custom_fn)(
struct pbuf *p);
121 pbuf_free_custom_fn custom_free_function;
128 struct pbuf *pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type
type)ICACHE_FLASH_ATTR;
129 #if LWIP_SUPPORT_CUSTOM_PBUF
130 struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type
type,
131 struct pbuf_custom *p,
void *payload_mem,
132 u16_t payload_mem_len)ICACHE_FLASH_ATTR;
134 void pbuf_realloc(
struct pbuf *p, u16_t size)ICACHE_FLASH_ATTR;
135 u8_t pbuf_header(
struct pbuf *p, s16_t header_size)ICACHE_FLASH_ATTR;
136 void pbuf_ref(
struct pbuf *p)ICACHE_FLASH_ATTR;
137 u8_t pbuf_free(
struct pbuf *p)ICACHE_FLASH_ATTR;
138 u8_t pbuf_clen(
struct pbuf *p)ICACHE_FLASH_ATTR;
139 void pbuf_cat(
struct pbuf *head,
struct pbuf *tail)ICACHE_FLASH_ATTR;
140 void pbuf_chain(
struct pbuf *head,
struct pbuf *tail)ICACHE_FLASH_ATTR;
141 struct pbuf *pbuf_dechain(
struct pbuf *p)ICACHE_FLASH_ATTR;
142 err_t pbuf_copy(
struct pbuf *p_to,
struct pbuf *p_from)ICACHE_FLASH_ATTR;
143 u16_t pbuf_copy_partial(
struct pbuf *p,
void *dataptr, u16_t
len, u16_t offset)ICACHE_FLASH_ATTR;
144 err_t pbuf_take(
struct pbuf *buf,
const void *dataptr, u16_t
len)ICACHE_FLASH_ATTR;
145 struct pbuf *pbuf_coalesce(
struct pbuf *p, pbuf_layer layer)ICACHE_FLASH_ATTR;
146 #if LWIP_CHECKSUM_ON_COPY
147 err_t pbuf_fill_chksum(
struct pbuf *p, u16_t start_offset,
const void *dataptr,
148 u16_t
len, u16_t *chksum)ICACHE_FLASH_ATTR;
151 u8_t pbuf_get_at(
struct pbuf* p, u16_t offset)ICACHE_FLASH_ATTR;
152 u16_t pbuf_memcmp(
struct pbuf* p, u16_t offset,
const void* s2, u16_t n)ICACHE_FLASH_ATTR;
153 u16_t pbuf_memfind(
struct pbuf* p,
const void* mem, u16_t mem_len, u16_t start_offset)ICACHE_FLASH_ATTR;
154 u16_t pbuf_strstr(
struct pbuf* p,
const char* substr)ICACHE_FLASH_ATTR;
u16_t tot_len
Definition: pbuf.h:90
void * eb
Definition: pbuf.h:109
struct pbuf * next
Definition: pbuf.h:78
u16_t len
Definition: pbuf.h:93
u8_t flags
Definition: pbuf.h:99
void * payload
Definition: pbuf.h:81
u8_t type
Definition: pbuf.h:96
u16_t ref
Definition: pbuf.h:106