|
From: | Sam Jansen |
Subject: | Re: [lwip-users] initialisation of lwIP |
Date: | Wed, 12 Jan 2005 10:21:42 +1300 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041222 |
franz keuner wrote:
IP4_ADDR(&gw, 192,168,0,200); IP4_ADDR(&ipaddr, 172,16,2,6); IP4_ADDR(&netmask, 255,255,255,0);
Note that your IP address and gateway are on different networks here! You can't do that. That isn't the problem that you are reporting yet, but it will be in the future if you continue using those IP addresses.
printf("\nbringing up ethernet interface.\n");netif_set_ipaddr(ethif, &ipaddr); netif_set_netmask(ethif, &netmask); netif_set_gw(ethif, &gw); netif_set_up(ethif);
... What is ethif set to? Is it valid memory?
So the addresses aren`t the same. That`s what I don`t unterstand.
Looks like something is quite broken here. The addresses are passed through and printed out unmodified in netif_set_ipaddr and so on.
Why don't you try printing out the value of the ip addresses gw, ipaddr, and netmask before calling the netif_ setup functions? They should be correct, and if so, it would seem likely that the only possible point of failure is your "ethif" pointer being somehow invalid (you can use ip_addr_debug_print(debug, ipaddr)).
[Prev in Thread] | Current Thread | [Next in Thread] |