[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] pbuf payload length
From: |
Jani Monoses |
Subject: |
[lwip-users] Re: [lwip] pbuf payload length |
Date: |
Wed, 08 Jan 2003 23:54:10 -0000 |
Just to make sure I understand what you want to accomplish
-you have a linear data buf of size len in memory.
-you want it copied to a possibly chained pbuf which you know(?) has tot_len
>=len
correct?
If it's a one time copy it's easy do a pbuf_realloc(p,len) and the copy
the data over by walking the chain.
However if you want to call copy_data2pbuf() repeatedly on the same pbuf then
as you say you should keep an external var.
In ip_frag.c in CVS there's a copy_from_buf() which does the opposite:copies
from
a chained pbuf to linear memory keeping track of the offset and current pbuf in
chain.
If it's similar to what you need then it's easy to modify.
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] pbuf payload length,
Jani Monoses <=