lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] howto put tcp packet together


From: Bernhard 'Gustl' Bauer
Subject: Re: [lwip-users] howto put tcp packet together
Date: Thu, 30 Apr 2009 10:35:30 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Kieran Mansley schrieb:
On Thu, 2009-04-30 at 08:54 +0200, Bernhard 'Gustl' Bauer wrote:
A wireshark file is attached. My lwip does only get callbacks for packets no. 4, 13, 24, 35, ... Packets no. 14, 25, 36, ... don't generate any callbacks. How can I get the data in these packets? Btw pcb->next and pbuf->next are always 0!

That sounds very peculiar.  All the received data should be indicated to
the application.

TCP says the network packets may be out of order. There is a sequence number to sort them. Does LWIP take care of this?

Yes.  The whole of TCP is dealt with by lwIP.  You'll just get a stream
of bytes that is already in the correct order without any network
headers delivered to the application in arbitrary chunks.

Packet no. 13 has 377 bytes, packet no. 14 has 44 bytes. This is reported by DEBUG messages:
tcp_recved: received 377 bytes, wnd 24000 (0).
tcp_recved: received 44 bytes, wnd 24000 (0).

So should I get 2 callbacks with pbufs of 377 and 44 bytes, or 1 callback with 2 pbufs of 377 and 44 bytes, or 1 callback with 1 pbuf of 421 bytes?

Gustl






reply via email to

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