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


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to