[En-Nut-Discussion] DHCP: IP addr & hostnm not set in CONFNET & CONFOS structures when using DHCP

Sander Smeenk sandersmeenk at hotmail.com
Mon May 30 10:53:37 CEST 2005

DHCP: IP address & hostname not set in CONFNET & CONFOS structures when 
using DHCP


I don't know if this is a bug, or whether I'm doing something wrong here.
I'm using Nut/Os version: pre and WinAVR version: 2004-0720

When I use the following code:

	// Force NutDhcpIfConfig to use DHCP by clearing previous settings

	confnet.cdn_cip_addr		= 0;
	confnet.cdn_ip_mask		= 0;
	confnet.cdn_gateway		= 0;
	memset( &confos.hostname, 0, sizeof(confos.hostname) );

	if (NutDhcpIfConfig("eth0", my_mac, 60000))
	  // print error ...

	  // print ok ...


Then the 'network mask' and the 'standard gateway' are set in the CONFNET 
BUT the ip address and hostname are not set in CONFNET and CONFOS 

Is this a bug, or am I doing something wrong here?

I included my initialization functions with the mail. In my main function, I 
call Eth0_Init () to start the initialization.

Thanx in advance :)

Sander Smeenk

More information about the En-Nut-Discussion mailing list