[En-Nut-Discussion] compile problem in ethernut 4.x ?

Sven Kasemann sven.kasemann at web.de
Fri Feb 3 10:41:40 CET 2006


> convert to:
> 
>     /*
>      * LAN configuration using EEPROM values or DHCP/ARP method.
>      * If it fails, use fixed values.
>      */
> //    if (NutDhcpIfConfig("eth0", 0, 60000)) {
>         u_char mac[] = { MYMAC };
>         u_long ip_addr = inet_addr(MYIP);
>         u_long ip_mask = inet_addr(MYMASK);
> 
>         puts("EEPROM/DHCP/ARP config failed");
>         NutNetIfConfig("eth0", mac, ip_addr, ip_mask);
> //    }

I think what you want to do is the following:

/* comment */

 /*    if (NutDhcpIfConfig("eth0", 0, 60000)) {
         u_char mac[] = { MYMAC };
         u_long ip_addr = inet_addr(MYIP);
         u_long ip_mask = inet_addr(MYMASK);
 
         puts("EEPROM/DHCP/ARP config failed");
         NutNetIfConfig("eth0", mac, ip_addr, ip_mask);
     }
*/
-- 
Sven Kasemann <sven.kasemann at web.de>




More information about the En-Nut-Discussion mailing list