[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
Hello,
I don't know if this is a bug, or whether I'm doing something wrong here.
I'm using Nut/Os version: 3.9.5.1 pre and WinAVR version: 2004-0720
When I use the following code:
<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 ...
}
else
{
// print ok ...
}
</code>
Then the 'network mask' and the 'standard gateway' are set in the CONFNET
structure,
BUT the ip address and hostname are not set in CONFNET and CONFOS
structures.
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