mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-06 06:39:46 +00:00
pbuf_alloc_copy -> pbuf_clone
This commit is contained in:
parent
3a01c32e55
commit
e57552d401
@ -1332,7 +1332,7 @@ pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
|
|||||||
* @return a new pbuf or NULL if allocation fails
|
* @return a new pbuf or NULL if allocation fails
|
||||||
*/
|
*/
|
||||||
struct pbuf *
|
struct pbuf *
|
||||||
pbuf_alloc_copy(pbuf_layer layer, pbuf_type type, struct pbuf *p)
|
pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
|
||||||
{
|
{
|
||||||
struct pbuf *q;
|
struct pbuf *q;
|
||||||
err_t err;
|
err_t err;
|
||||||
|
@ -1521,10 +1521,10 @@
|
|||||||
* be needed without this flag! Use this only if you need to!
|
* be needed without this flag! Use this only if you need to!
|
||||||
*
|
*
|
||||||
* ATTENTION: a driver should *NOT* rely on getting single pbufs but check TX
|
* ATTENTION: a driver should *NOT* rely on getting single pbufs but check TX
|
||||||
* pbufs for being in one piece. If not, @ref pbuf_alloc_copy can be used to get
|
* pbufs for being in one piece. If not, @ref pbuf_clone can be used to get
|
||||||
* a single pbuf:
|
* a single pbuf:
|
||||||
* if (p->next != NULL) {
|
* if (p->next != NULL) {
|
||||||
* struct pbuf *q = pbuf_alloc_copy(PBUF_RAW, PBUF_RAM, p);
|
* struct pbuf *q = pbuf_clone(PBUF_RAW, PBUF_RAM, p);
|
||||||
* if (q == NULL) {
|
* if (q == NULL) {
|
||||||
* return ERR_MEM;
|
* return ERR_MEM;
|
||||||
* }
|
* }
|
||||||
|
@ -262,7 +262,7 @@ 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);
|
err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset);
|
||||||
struct pbuf *pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset);
|
struct pbuf *pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset);
|
||||||
struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer);
|
struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer);
|
||||||
struct pbuf *pbuf_alloc_copy(pbuf_layer l, pbuf_type type, struct pbuf *p);
|
struct pbuf *pbuf_clone(pbuf_layer l, pbuf_type type, struct pbuf *p);
|
||||||
#if LWIP_CHECKSUM_ON_COPY
|
#if LWIP_CHECKSUM_ON_COPY
|
||||||
err_t pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr,
|
err_t pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr,
|
||||||
u16_t len, u16_t *chksum);
|
u16_t len, u16_t *chksum);
|
||||||
|
Loading…
Reference in New Issue
Block a user