Re: [lwip-users] Defining the default route

2012-03-20 Thread Ueli Niederer
Below is the code I use to initialize the network stack. ip_addr_t addr, mask; IP4_ADDR(&addr, 192, 168, 1, 42); IP4_ADDR(&mask, 255, 255, 255, 0); netif_add(netif, &addr, &mask, NULL, NULL, ethernetif_init, tcpip_input); A possible cause cause you can't connect outside the lan might b

Re: [lwip-users] Defining the default route

2012-03-20 Thread Mason
Simon Goldschmidt wrote: > Mason wrote: > >> 1) The correct function to use is netif_set_default, right? >> >> 2) If I use static addressing, I have to declare the >> default route myself, using netif_set_default? >> >> 3) When using DHCP, does the DHCP code take care of >> declaring the default

[lwip-users] errno is not set in sockets.c

2012-03-20 Thread Mason
Hello, I am porting libcurl on top of lwip on a POSIX platform. (libcurl uses the BSD sockets API, and non-blocking sockets.) Calling connect on a non-blocking socket is supposed to return EINPROGRESS in errno, but in my port, errno is not set. Looking at sockets.c, the relevant code is: #ifdef

Re: [lwip-users] Noob DHCP question

2012-03-20 Thread Kieran Mansley
On 15 Mar 2012, at 15:37, Chris Ponder wrote: > At the application level I want to know when I have an address, if there is > an error getting an address, if the network lead is disconnected / > re-connected so that I can restart the Ethernet or set a static address as I > see fit. I'm not su

Re: [lwip-users] errno is not set in sockets.c

2012-03-20 Thread Kieran Mansley
On 20 Mar 2012, at 09:53, Mason wrote: > Looking at sockets.c, the relevant code is: > > #ifdef ERRNO > #ifndef set_errno > #define set_errno(err) errno = (err) > #endif > #else /* ERRNO */ > #define set_errno(err) > #endif /* ERRNO */ I suspect that it might be something relevant to Windows po

Re: [lwip-users] Noob DHCP question

2012-03-20 Thread goldsi...@gmx.de
Kieran Mansley wrote: On 15 Mar 2012, at 15:37, Chris Ponder wrote: At the application level I want to know when I have an address, if there is an error getting an address, if the network lead is disconnected / re-connected so that I can restart the Ethernet or set a static address as I see f

Re: [lwip-users] errno is not set in sockets.c

2012-03-20 Thread goldsi...@gmx.de
Kieran Mansley wrote: On 20 Mar 2012, at 09:53, Mason wrote: Looking at sockets.c, the relevant code is: #ifdef ERRNO #ifndef set_errno #define set_errno(err) errno = (err) #endif #else /* ERRNO */ #define set_errno(err) #endif /* ERRNO */ I suspect that it might be something relevant to Wind