lwip Packet buffers (PBUF) API 操作 集合

struct pbuf *  pbuf_alloc (pbuf_layer layer, u16_t length, pbuf_type type) 
  
struct pbuf *  pbuf_alloc_reference (void *payload, u16_t length, pbuf_type type) 
  
struct pbuf *  pbuf_alloced_custom (pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, void *payload_mem, u16_t payload_mem_len) 
  
void  pbuf_realloc (struct pbuf *p, u16_t new_len) 
  
u8_t  pbuf_free (struct pbuf *p) 
  
void  pbuf_ref (struct pbuf *p) 
  
void  pbuf_cat (struct pbuf *h, struct pbuf *t) 
  
void  pbuf_chain (struct pbuf *h, struct pbuf *t) 
  
err_t  pbuf_copy (struct pbuf *p_to, const struct pbuf *p_from) 
  
u16_t  pbuf_copy_partial (const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset) 
  
void *  pbuf_get_contiguous (const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset) 
  
struct pbuf *  pbuf_skip (struct pbuf *in, u16_t in_offset, u16_t *out_offset) 
  
err_t  pbuf_take (struct pbuf *buf, const void *dataptr, u16_t len) 
  
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) 
  
struct pbuf *  pbuf_clone (pbuf_layer layer, pbuf_type type, struct pbuf *p) 
  
u8_t  pbuf_get_at (const struct pbuf *p, u16_t offset) 
  
int  pbuf_try_get_at (const struct pbuf *p, u16_t offset) 
  
void  pbuf_put_at (struct pbuf *p, u16_t offset, u8_t data) 
  
u16_t  pbuf_memcmp (const struct pbuf *p, u16_t offset, const void *s2, u16_t n) 
  
u16_t  pbuf_memfind (const struct pbuf *p, const void *mem, u16_t mem_len, u16_t start_offset) 

官网介绍:http://lwip.nongnu.org/2_1_x/group__pbuf.html

 

转载于:https://www.cnblogs.com/suozhang/p/10207170.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值