lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Need help to understand the pbuf_header function????


From: Leon Woestenberg
Subject: Re: [lwip-users] Need help to understand the pbuf_header function????
Date: Tue, 3 Jun 2003 18:43:20 +0200

Hello,

"Kieran Mansley" <address@hidden> wrote:
> On Tue, 3 Jun 2003, Kelly Chan wrote:
>
> > The function below shows the pbuf size by moving forward the payload
ptr. I
> > ...
> > the new header. Will the memory corrupt by using this function??? Is it
> > memory safe?????
>
>...
> the pointer closer and closer to the beginning of the allocated memory,
> but should hopefully (if everything is working as it should) never fall
> off the front.
>
> In reality it doesn't cope well with all the different types of pbuf
> (PBUF_ROM for example), but this has been discussed in the past.
>

To add to this excellent explanation, the result of this discussion is a
feature request:

http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=3034&group_id=3159

This would allow safety checks, and knowledge of referenced exteranl buffers
at
the cost of an extra pbuf field.

However, the current pbuf code should be correct if one obeys its usage. See
the
*.c and *.h source code for comments on this.

Regards,

Leon Woestenberg.






reply via email to

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