lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] do a copy of pbuf


From: Piero 74
Subject: Re: [lwip-users] do a copy of pbuf
Date: Thu, 20 Mar 2008 08:59:58 +0100

Thanks Jifl

yesterday night i found the same solution... i saw pbuf_copy() function in lwip code.
If my idea works, i will post a message about it.

Piero

2008/3/19, Jonathan Larmour <address@hidden>:
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]