lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] tcp_write in the connect handling function


From: Rajaraman Krishnan
Subject: [lwip-users] Re: [lwip] tcp_write in the connect handling function
Date: Thu, 09 Jan 2003 00:11:41 -0000

Hi Adam,

I tried the CVS version. I had some problems with the compilation (in
tapif.c and some ip_addr_broadcast is not defined during final linking
stage). I got around that. But then the problem when I run my LwIP TCP
client and Linux IP stack server is worse now. After Arping, the connect
handling function is never called.

When I run tcpdump, I notice that the arp happened properly and then the
Linux side keeps sending some message (I think window message) but no
response from the LwIP side. Any idea what is going on?

Thanks,

Rajaram



----- Original Message -----
From: "Adam Dunkels" <address@hidden>
To: <address@hidden>
Sent: Wednesday, February 13, 2002 8:55 PM
Subject: Re: [lwip] tcp_write in the connect handling function


> Hi Rajaram!
>
> (I saw your other mail about this as well.)
>
> On Tuesday 12 February 2002 08.06, you wrote:
> > When I try to do a tcp_write from the function that handle the
connection
> > (i.e. which was passed to tcp_connect), I get the following message and
it
> > aborts.
> >
> >  Assertion "tcp_enqueue: valid queue length" failed at line 178 in
> > /home/rajaram/utils/lwip-0.5.0/src/core/tcp_output.c
> >
> > I noticed that this was because the function passed to tcp_connect is
> > called even before the initial window packet is sent. The server side
> > doesnt even receive the connect. When I remove the tcp_write from this
> > function It connects fine.
>
> This is a bug in version 0.5.0 of lwIP. It has been fixed in the current
CVS
> version and will be fixed in the upcoming 0.5.1 version as well.
>
> In the meantime, you can download the CVS version and run that instead.
>
> > So should I wait for some other call back to do the tcp_write? I thought
I
> > would register a tcp_sent call back. But that doesnt get called in this
> > case. So what am I to do if the first thing I want to do after setting
up a
> > connection is write to it?
>
> You should register a tcp_connect() callback. That will be called at once
> when the connection has been established, and then tcp_write() can be used
to
> send data.
>
> /adam
> --
> Adam Dunkels <address@hidden>
> http://www.sics.se/~adam
> [This message was sent through the lwip discussion list.]
>

[This message was sent through the lwip discussion list.]




reply via email to

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