lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Defining the default route


From: Ueli Niederer
Subject: Re: [lwip-users] Defining the default route
Date: Tue, 20 Mar 2012 08:35:11 +0100
User-agent: Internet Messaging Program (IMP) H3 (4.3.9)

Below is the code I use to initialize the network stack.
<snip>
  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 be that you didn't specify a gateway (3rd parameter). The gateway becomes necessary if you want to communicate outside your subnet.

Regards
Ueli



reply via email to

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