lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] pbuf chain and packet queue


From: address@hidden
Subject: Re: [lwip-users] pbuf chain and packet queue
Date: Wed, 27 Jan 2010 17:18:31 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Bernhard 'Gustl' Bauer wrote:
OOSEQ is turned on.
This fits to your description that you might have missed a packet (from the wireshark log). So unless you don't have any other problems, treating pbuf chains correctly will do.
I have a few questions that will help me to understand chaining of pbufs
better:

Is tot_len always equal the size of all chained pbufs from this pbuf to
the end?
Yes, and for the last pbuf, len == tot_len.
Is it correct that splitting one packet on several pbufs can only be
done by the CS8900 driver?
Yes, but the problem is the name 'packet' here: your tcp receive callback gets a pointer to one pbuf which may be a chain. This is not necessarily always a packet, but never a packet queue (i.e. for this pbuf chain, the last pbuf with len == tot_len will always have next == NULL).
Is there a need to treat a packet queue different than a pbuf chain (of
one packet)?
Packet queues don't have to be handled by your application or your netif driver: they are only used internally in the stack, e.g. for ARP queueing or netif loopback queueing. However, such packet queues are always splitted (or for tcp streams: combined to one pbuf chain) before being passed out of the stack core, as that would be too complicated for users, I guess.

Simon




reply via email to

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