lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] packet order with tcp_recv


From: Radouch, Zdenek
Subject: Re: [lwip-users] packet order with tcp_recv
Date: Tue, 9 Sep 2014 17:19:48 +0000

> Packets will be received in the order they were sent.

No, TCP packets are IP datagrams that can be lost, duplicated, or
that can arrive out of order. That is, they won't necessarily
arrive in the order they were sent. The TCP input module (tcp_in.c)
does the necessary ordering (it either passes the packet to the user
or queues it to be passed in later) and Simon's question is whether
the tcp_recv callback is delivering packets in order they were
received or in a sorted order (the reconstructed data stream).

Unfortunately I am not familiar with that callback so I don't know
the answer :-(.

Cheers,
-Z


> -----Original Message-----
> From: address@hidden [mailto:lwip-
> address@hidden On Behalf Of Noam
> weissman
> Sent: Tuesday, September 09, 2014 11:49 AM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] packet order with tcp_recv
> 
> Hi,
> 
> In TCP there should not be such an issue. Packets will be received in
> the order they were sent.
> 
> TCP is a stream.
> 
> BR,
> Noam.
> 
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of
> Richner Simon
> Sent: Tuesday, September 09, 2014 3:30 PM
> To: Mailing list for lwIP users
> Subject: [lwip-users] packet order with tcp_recv
> 
> Hi all,
> 
> I have a basic question about tcp_recv:
> 
> Let's say I have some MBs of data I send to the lwip stack. If (for
> whatever reason) tcp packets arrive out of order, will the stack sort
> this out for me and call the tcp_recv callback with packets sorted in
> correct order? Or do I have to check the sequence number myself to make
> sure I put data back together in correct order?
> 
> Thanks for your help
> Simon
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 
> 
> ***********************************************************************
> *
> ************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &
> computer viruses.
> ***********************************************************************
> *
> ************
> 
> 
> 
> 
> 
> 
> ***********************************************************************
> *************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &
> computer viruses.
> ***********************************************************************
> *************
> 
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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