lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] seq number & ACK issue


From: Kieran Mansley
Subject: Re: [lwip-users] seq number & ACK issue
Date: Tue, 02 Mar 2010 10:30:24 +0000

On Tue, 2010-03-02 at 17:22 +0700, PHAM ANH THIEN wrote:
> 
> So do you know where unacked->seqno is calculated in the code?

There is a list of unacked packets in each pcb (called pcb->unacked) and
the seqno of this list will be the sequence number in the header of the
first packet on this list.  For example, the print statement you refer
to accesses this value like this:

      LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: ACK for %"U32_F", 
unacked->seqno %"U32_F":%"U32_F"\n",
                                    ackno,
                                    pcb->unacked != 
NULL?ntohl(pcb->unacked->tcphdr->seqno): 0,
                                    pcb->unacked != 
NULL?ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0));

I notice that it is printing unsiged values, so how you got a negative
result I don't know.

Kieran





reply via email to

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