lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using pbufs in a recv function - next vs ref vs tot_len


From: Chris Frost
Subject: Re: [lwip-users] Using pbufs in a recv function - next vs ref vs tot_len
Date: Tue, 11 Jan 2005 21:26:57 -0800
User-agent: Mutt/1.3.28i

On Wed, Jan 12, 2005 at 02:18:25PM +1030, Paul C wrote:
> Here is a skeleton of the code I use.

Thanks, this is very helpful. I was incorrectly using pbuf_free(), I had
not read that it frees not just p, but all those in p's chain.

Changing my code to follow your outline, transfers are sucessful, but
I do notice that I get pbufs from time to time that for the first pbuf in
the chain, q->len < p->tot_len. Ignoring this oddity appears to work,
but it certainly seems odd. Might anyone comments on whether this may be
expected or if it seems fishy?

Fwiw in these cases, q->len = 48, p->tot_len = 96, q is the first
in the chain (q == p), and q->next is not 0.

-- 
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email address@hidden with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>




reply via email to

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