[Top][All Lists]

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

[lwip-users] Re:help required in lwip project

From: TEJ
Subject: [lwip-users] Re:help required in lwip project
Date: Thu, 21 Dec 2006 16:42:13 +0000 (GMT)

hi all

i m new to lwip. i want to know the implementtion details of server with lwip.
I m not sure abt the which kind of netwrok driver to be used with this lwip suite.
can somebody help me out regarding server -client implementation with lwip

thank you in advance
Mumtaz Ahmad <address@hidden> wrote:
Dear all
I have observed while testing with windows client that some times on retransmission of packets from window the window advertises smaller window .
In that case lwip does not update its snd_wnd which ultimately leads to more data sent by lwip than the advertised window by windows .The window discrads the extra data ,which does not fit in its window ,and ask lwip to send this lost data again as soon its window opens. But some times this demanded sequence number   does not lie on segment boundary . Lwip resend a segement which contains that sequence somewhere in middle ,as lwip cannot fragment that segment to send the exact sequence , but windows keep on insisting for exact sequence .In that case the deadlock is created and ultimately the connection gets stuck .
The check that seems responsible for this is in tcp_in.c in function tcp_receive
if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
        (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
        (pcb->snd_wl2 == ackno && seg->tcphdr->wnd > pcb->snd_wnd))
      pcb->snd_wnd = seg->tcphdr->wnd;
      pcb->snd_wl1 = seqno;
      pcb->snd_wl2 = ackno;
The if check is failed for  retransmitted received packets with a smaller advertised window causing a no window update and causing a dead lock.
This problem may be solved if we add a new check before this check like
if(seg->tcphdr->wnd < pcb->snd_wnd)
    pcb->snd_wnd = seg->tcphdr->wnd;
This new if sets the snd_wnd whenever any small window is advertised
Any one comment please
Best Regards
Mumtaz Ahmad
Manager Network Systems Group
SN Pakistan

lwip-users mailing list

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

reply via email to

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