[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] do a copy of pbuf
From: |
Jonathan Larmour |
Subject: |
Re: [lwip-users] do a copy of pbuf |
Date: |
Wed, 19 Mar 2008 17:00:49 +0000 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070530) |
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