lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] ARP interfering with TCP server??


From: beach.dk
Subject: [lwip-users] ARP interfering with TCP server??
Date: Mon, 24 Oct 2005 18:05:39 +0200

Hi there,

I've got a bug in my embedded product that is using lwip and maybe some out
there can help me find out if the bug is located in my code or in lwip.

My application is a TCP server that I've based on the 'raw api' httpd example.
http://savannah.nongnu.org/cgi-bin/viewcvs/lwip/contrib/ports/msvc6/httpd.c
(my application is not a web server but basically it does the same 'command/answer')

The difference is that the webserver example closes the connection after each request
which my server doesn't. (I think a mordern webserver does/should not close the connection
automatially if there is a "Connection: keep-alive" present in the HTTP header)


The bug has to do with if there is need for an ARP request/reply before the command/answer
to an existing TCP connection.

Here is an example:

1) The very first Command/Answer:
   I can see that an ARP request/reply is executed successfully.
   I can see that the listening port creates a connection.
   I can see that the command/answer is executed.
   Success.

2) The second,3:rd, 4:th...... Command/Answer:
   I can see that the command/answer is executed.
   Success.

3) Wait until the entry (in the PC arp table) is deleted (2 minutes in windows XP)
   or delete is manually.

4) Another Command/Answer
   I can see that an ARP request/reply is executed successfully.
   Everything stops....


The problem is related to the ARP becuase if I add a static entry in the ARP table
it never fails.

Also it never fails for 'Commands' smaller that 129 bytes. This made me think that
it had something to do with signed/unsigned chars but I've compiled my code with both types.

If I enable debug I can see that
 "pbuf_free: 0x2000276c has ref 1, ending here."
is outputed, but that does not help *me* understand what the bug/problem is.

So has anyone out there experinced this or maybe has possibilty to test this with
your implementation of lwip.

Regards
/Per/
 

reply via email to

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