[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] dhcp works but i cant get static ip to work
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] dhcp works but i cant get static ip to work |
Date: |
Tue, 05 Feb 2008 15:09:53 +0000 |
On Tue, 2008-02-05 at 15:05 +0000, Julian Gardner [RSD] wrote:
>
> This is my code which i cant seem to get working on a static ip
> address, if i set the dhcp to on it works fine?
>
> looked in scribbiwiki and it looks right to me
>
> netif_add( &smcif_if, &ipaddr, &netmask, &gw, NULL, smcIfinit,
> tcpip_input);
> netif_set_default( &smcif_if);
> if( e2Prom.ethernetSettings.dhcpActive )
> {
> // Seems i need to do this to get DHCP to work
> IP4_ADDR( &smcif_if.ip_addr, 0, 0, 0, 0);
> IP4_ADDR( &smcif_if.gw, 0, 0, 0,
> 0);
> IP4_ADDR( &smcif_if.netmask, 255, 255, 255, 255);
> dhcp_start( &smcif_if);
> }
> else
> {
> netif_set_addr( &smcif_if, &ipaddr, &netmask, &gw);
> netif_set_up( &smcif_if);
> }
Can you explain which bit doesn't work? I.e. what is the symptom of
your problem?
Kieran