33 #ifndef LWIP_HDR_PBUF_H 34 #define LWIP_HDR_PBUF_H 49 #ifndef LWIP_SUPPORT_CUSTOM_PBUF 50 #define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG)) 56 #define PBUF_TRANSPORT_HLEN 20 58 #define PBUF_IP_HLEN 40 60 #define PBUF_IP_HLEN 20 95 #define PBUF_FLAG_PUSH 0x01U 98 #define PBUF_FLAG_IS_CUSTOM 0x02U 100 #define PBUF_FLAG_MCASTLOOP 0x04U 102 #define PBUF_FLAG_LLBCAST 0x08U 104 #define PBUF_FLAG_LLMCAST 0x10U 106 #define PBUF_FLAG_TCP_FIN 0x20U 154 #if LWIP_SUPPORT_CUSTOM_PBUF 156 typedef void (*pbuf_free_custom_fn)(
struct pbuf *p);
163 pbuf_free_custom_fn custom_free_function;
167 #if LWIP_TCP && TCP_QUEUE_OOSEQ 169 #ifndef PBUF_POOL_FREE_OOSEQ 170 #define PBUF_POOL_FREE_OOSEQ 1 172 #if NO_SYS && PBUF_POOL_FREE_OOSEQ 173 extern volatile u8_t pbuf_free_ooseq_pending;
174 void pbuf_free_ooseq(
void);
178 #define PBUF_CHECK_FREE_OOSEQ() do { if(pbuf_free_ooseq_pending) { \ 181 pbuf_free_ooseq(); }}while(0) 189 #if LWIP_SUPPORT_CUSTOM_PBUF 190 struct pbuf *pbuf_alloced_custom(pbuf_layer l,
u16_t length, pbuf_type
type,
191 struct pbuf_custom *p,
void *payload_mem,
192 u16_t payload_mem_len);
209 #if LWIP_CHECKSUM_ON_COPY 210 err_t pbuf_fill_chksum(
struct pbuf *p,
u16_t start_offset,
const void *dataptr,
213 #if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE 214 void pbuf_split_64k(
struct pbuf *p,
struct pbuf **rest);
u16_t pbuf_memcmp(struct pbuf *p, u16_t offset, const void *s2, u16_t n)
void pbuf_chain(struct pbuf *head, struct pbuf *tail)
u16_t pbuf_copy_partial(struct pbuf *p, void *dataptr, u16_t len, u16_t offset)
u8_t pbuf_header_force(struct pbuf *p, s16_t header_size)
u8_t pbuf_clen(struct pbuf *p)
struct pbuf * pbuf_dechain(struct pbuf *p)
u8_t pbuf_free(struct pbuf *p)
void pbuf_ref(struct pbuf *p)
u8_t pbuf_header(struct pbuf *p, s16_t header_size)
u8_t pbuf_get_at(struct pbuf *p, u16_t offset)
u16_t pbuf_strstr(struct pbuf *p, const char *substr)
void pbuf_cat(struct pbuf *head, struct pbuf *tail)
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
struct pbuf * pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
void pbuf_realloc(struct pbuf *p, u16_t size)
struct pbuf * pbuf_skip(struct pbuf *in, u16_t in_offset, u16_t *out_offset)
u16_t pbuf_memfind(struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset)
err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type)