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: PHAM ANH THIEN
Subject: Re: [lwip-users] seq number & ACK issue
Date: Tue, 2 Mar 2010 17:45:02 +0700

ok, I understood how this value update, it is increased with value equal size of 2 packets after 2 packets sending successfully.

Thanks a lot.

On Tue, Mar 2, 2010 at 5:30 PM, Kieran Mansley <address@hidden> wrote:
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



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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