|
From: | Piero 74 |
Subject: | Re: [lwip-users] do a copy of pbuf |
Date: | Thu, 20 Mar 2008 08:59:58 +0100 |
Piero 74 wrote:
> Hi all.
>
> i have a pbuf from pool, where my driver has copied a packet.
[snip]
> i have a caller function which get this pbuf, and i need to duplicate it
> in another similar pbuf.
The caller needs to duplicate it? That's fine. Just allocate another pbuf
of size p->tot_len. Depending where this is happening, it may want to be
PBUF_POOL or PBUF_RAM. Probably PBUF_POOL.
Then call pbuf_copy which is defined in pbuf.h:
err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from);
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
** Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv> **
** April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |