Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

2014-08-08 Thread Paul Webber
Simon,

Thanks. I do have a listen open as well.  I used 
tcp_listen_with_backlog(pcb,1)   with my #define TCP_LISTEN_BACKLOG  1. I guess 
I don't understand the backlog function. Should the backlog be larger than 1?

Thanks again,
Paul

From: lwip-users-bounces+pwebber=heat-timer@nongnu.org 
 on behalf of S G 

Sent: Friday, August 08, 2014 4:30 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

My guess would be that you have manual listen backlog enabled but don't tell 
the stack to decrement the listen backlog after accepting a connection...

Simon
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

2014-08-08 Thread S G
My guess would be that you have manual listen backlog enabled but don't tell 
the stack to decrement the listen backlog after accepting a connection...

Simon
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

2014-08-08 Thread Paul Webber
Sergio,

I have been to the site many times and find it very helpful. My problem is that 
I can send data from my project to our server with no problem the first time 
but after closing the first connection and opening another with a different 
port the server will not respond to the request. At the server side we see the 
message that the connection was forcibly closed. I have look for clues as to 
why. Any ideas on what I am doing wrong?

Thanks

Paul


-Original Message-
From: lwip-users-bounces+pwebber=heat-timer@nongnu.org 
[mailto:lwip-users-bounces+pwebber=heat-timer@nongnu.org] On Behalf Of 
Sergio R. Caprile
Sent: Friday, August 08, 2014 1:46 PM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

Read the wiki, and if it is not clear enough, I will change it 
http://lwip.wikia.com/wiki/Raw/TCP

So far, the last user that asked (almost) exactly the same as you did not 
complain, so it should be OK.


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] Embedded Web server unable to display image atclientsid

2014-08-08 Thread Paul Webber
Sergio,

I have been to the site many times and find it very helpful. My problem is that 
I can send data from my project to our server with no problem the first time 
but after closing the first connection and opening another with a different 
port the server will not respond to the request. At the server side we see the 
message that the connection was forcibly closed. I have look for clues as to 
why. Any ideas on what I am doing wrong?

Thanks

Paul

-Original Message-
From: lwip-users-bounces+pwebber=heat-timer@nongnu.org 
[mailto:lwip-users-bounces+pwebber=heat-timer@nongnu.org] On Behalf Of 
Sergio R. Caprile
Sent: Friday, August 08, 2014 2:04 PM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] Embedded Web server unable to display image 
atclientsid

You have a working http server in the contrib tree.
You also have my http server, which expands a bit over the "official" one:
http://scaprile.ldir.com.ar/cms/category/os/lwhttpd/
If that is not enough and you really need to do your own, you have working 
examples on how to develop TCP applications on the contrib tree; check tcpecho 
and smtp (besides the aforementioned http server, also) And you have a wiki 
with proper documentation:
http://lwip.wikia.com/wiki/Raw/TCP
If something in the wiki is not clear, I'll change it.

And, finally, two _personal_ pieces of advice:
- if you plan on developing something TCP/IP, do yourself a favor and learn 
TCP/IP first. Particularly if you will actually use TCP and not UDP.
- if you plan on developing on lwIP, get the contrib tree, study the examples, 
break them, read the wiki, write small examples, make them work, and then jump 
into rocket science (as a web server).


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] Embedded Web server unable to display image atclientsid

2014-08-08 Thread Sergio R. Caprile
You have a working http server in the contrib tree.
You also have my http server, which expands a bit over the "official" one:
http://scaprile.ldir.com.ar/cms/category/os/lwhttpd/
If that is not enough and you really need to do your own, you have
working examples on how to develop TCP applications on the contrib tree;
check tcpecho and smtp (besides the aforementioned http server, also)
And you have a wiki with proper documentation:
http://lwip.wikia.com/wiki/Raw/TCP
If something in the wiki is not clear, I'll change it.

And, finally, two _personal_ pieces of advice:
- if you plan on developing something TCP/IP, do yourself a favor and
learn TCP/IP first. Particularly if you will actually use TCP and not UDP.
- if you plan on developing on lwIP, get the contrib tree, study the
examples, break them, read the wiki, write small examples, make them
work, and then jump into rocket science (as a web server).


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] LWIP RAW tcp_close, tcp_connect

2014-08-08 Thread Sergio R. Caprile
Read the wiki, and if it is not clear enough, I will change it
http://lwip.wikia.com/wiki/Raw/TCP

So far, the last user that asked (almost) exactly the same as you did
not complain, so it should be OK.


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] Sending to a non-local network without default netif set

2014-08-08 Thread Fabian Koch
Hey Mark, Simon,

well it does work when introducing the source address in the routing algorithm 
and thats what I did for now.
But obviously, Simon is right: routing doesn't have anything to do with the 
source address and it shouldn't have to.

The underlying problem in LwIP at the moment is that the ip_route() function is 
used to determine the netif that we should be sending on when it's not already 
clear and that leads to most of the problems, because in that early state of 
determining

There are several functions where LwIP uses the output of ip_route() to find a 
local interface to send on. And in those cases, it actually _should_ consider 
the source address (meaning the bind() address). When actually _sending_ the 
packet, the ip_route() should work as usual like any routing algorithm does. 
Only based on destination.

Ip_route() is used in a few places other than the IP layer to determine the 
local netif to send on:
in udp_connect()
in udp_sendto()
in tcp_eff_send_mss()
in snmp_send_trap()
in etharp_add_static_entry()

Essentially, those placed need to get a different function which considers more 
info than ip_route().
Then you also do not need to touch both the ipv6 and the ipv4 version of the 
route function.

But yeah, if you need a quick solution that doesn't quite "feel" right, using 
the source address in ip_route() is a way to go for now ;o)

Cheers,
Fabian

PS: I also wrote an open issue about this on my experimental fork of lwip on 
github:
https://github.com/tabascoeye/lwip/issues/5
(pull-requests are welcomed)

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users