57 #ifndef LWIP_HDR_PBUF_H 58 #define LWIP_HDR_PBUF_H 73 #ifndef LWIP_SUPPORT_CUSTOM_PBUF 74 #define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG)) 80 #define PBUF_TRANSPORT_HLEN 20 82 #define PBUF_IP_HLEN 40 84 #define PBUF_IP_HLEN 20 147 #define PBUF_FLAG_PUSH 0x01U 150 #define PBUF_FLAG_IS_CUSTOM 0x02U 152 #define PBUF_FLAG_MCASTLOOP 0x04U 154 #define PBUF_FLAG_LLBCAST 0x08U 156 #define PBUF_FLAG_LLMCAST 0x10U 158 #define PBUF_FLAG_TCP_FIN 0x20U 207 #if LWIP_SUPPORT_CUSTOM_PBUF 209 typedef void (*pbuf_free_custom_fn)(
struct pbuf *p);
216 pbuf_free_custom_fn custom_free_function;
221 #ifndef PBUF_POOL_FREE_OOSEQ 222 #define PBUF_POOL_FREE_OOSEQ 1 224 #if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ 225 extern volatile u8_t pbuf_free_ooseq_pending;
226 void pbuf_free_ooseq(
void);
230 #define PBUF_CHECK_FREE_OOSEQ() do { if(pbuf_free_ooseq_pending) { \ 233 pbuf_free_ooseq(); }}while(0) 236 #define PBUF_CHECK_FREE_OOSEQ() 243 #if LWIP_SUPPORT_CUSTOM_PBUF 244 struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type
type,
245 struct pbuf_custom *p,
void *payload_mem,
246 u16_t payload_mem_len);
263 #if LWIP_CHECKSUM_ON_COPY 264 err_t pbuf_fill_chksum(
struct pbuf *p, u16_t start_offset,
const void *dataptr,
265 u16_t
len, u16_t *chksum);
267 #if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE 268 void pbuf_split_64k(
struct pbuf *p,
struct pbuf **rest);
274 u16_t
pbuf_memcmp(
const struct pbuf* p, u16_t offset,
const void* s2, u16_t n);
275 u16_t
pbuf_memfind(
const struct pbuf* p,
const void*
mem, u16_t mem_len, u16_t start_offset);
void pbuf_realloc(struct pbuf *p, u16_t size)
struct pbuf * pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset)
u8_t pbuf_header_force(struct pbuf *p, s16_t header_size)
u16_t pbuf_memcmp(const struct pbuf *p, u16_t offset, const void *s2, u16_t n)
void pbuf_ref(struct pbuf *p)
struct pbuf * pbuf_dechain(struct pbuf *p)
u8_t pbuf_header(struct pbuf *p, s16_t header_size)
err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
u16_t pbuf_memfind(const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset)
u8_t pbuf_get_at(const struct pbuf *p, u16_t offset)
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
void pbuf_chain(struct pbuf *head, struct pbuf *tail)
void pbuf_cat(struct pbuf *head, struct pbuf *tail)
u16_t pbuf_strstr(const struct pbuf *p, const char *substr)
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type)
u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
u8_t pbuf_free(struct pbuf *p)
u16_t pbuf_clen(const struct pbuf *p)
struct pbuf * pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
int pbuf_try_get_at(const struct pbuf *p, u16_t offset)