Go to the documentation of this file.
38 #ifndef LWIP_HDR_PBUF_H
39 #define LWIP_HDR_PBUF_H
54 #ifndef LWIP_SUPPORT_CUSTOM_PBUF
55 #define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG))
61 #define PBUF_TRANSPORT_HLEN 20
63 #define PBUF_IP_HLEN 40
65 #define PBUF_IP_HLEN 20
128 #define PBUF_FLAG_PUSH 0x01U
131 #define PBUF_FLAG_IS_CUSTOM 0x02U
133 #define PBUF_FLAG_MCASTLOOP 0x04U
135 #define PBUF_FLAG_LLBCAST 0x08U
137 #define PBUF_FLAG_LLMCAST 0x10U
139 #define PBUF_FLAG_TCP_FIN 0x20U
188 #if LWIP_SUPPORT_CUSTOM_PBUF
190 typedef void (*pbuf_free_custom_fn)(
struct pbuf *p);
197 pbuf_free_custom_fn custom_free_function;
202 #ifndef PBUF_POOL_FREE_OOSEQ
203 #define PBUF_POOL_FREE_OOSEQ 1
205 #if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ
206 extern volatile u8_t pbuf_free_ooseq_pending;
207 void pbuf_free_ooseq(
void);
211 #define PBUF_CHECK_FREE_OOSEQ() do { if(pbuf_free_ooseq_pending) { \
214 pbuf_free_ooseq(); }}while(0)
217 #define PBUF_CHECK_FREE_OOSEQ()
224 #if LWIP_SUPPORT_CUSTOM_PBUF
226 struct pbuf_custom *p,
void *payload_mem,
227 u16_t payload_mem_len);
244 #if LWIP_CHECKSUM_ON_COPY
245 err_t pbuf_fill_chksum(
struct pbuf *p,
u16_t start_offset,
const void *dataptr,
248 #if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
249 void pbuf_split_64k(
struct pbuf *p,
struct pbuf **rest);
u16_t pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset)
struct pbuf * pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset)
int pbuf_try_get_at(const struct pbuf *p, u16_t offset)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
u16_t pbuf_clen(const struct pbuf *p)
u8_t pbuf_free(struct pbuf *p)
struct pbuf * pbuf_dechain(struct pbuf *p)
u16_t pbuf_strstr(const struct pbuf *p, const char *substr)
u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset)
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type)
struct pbuf * pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
u8_t pbuf_get_at(const struct pbuf *p, u16_t offset)
void pbuf_realloc(struct pbuf *p, u16_t size)
err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
void pbuf_chain(struct pbuf *head, struct pbuf *tail)
void pbuf_ref(struct pbuf *p)
void pbuf_cat(struct pbuf *head, struct pbuf *tail)
u16_t pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n)
u8_t pbuf_header_force(struct pbuf *p, s16_t header_size)
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
u8_t pbuf_header(struct pbuf *p, s16_t header_size)