[En-Nut-Discussion] DHCP renewal
Joe Doubek
jdoubek at control4.com
Tue Jun 15 17:23:03 CEST 2004
Can anyone guide me on how I might go about renewing the DHCP address
on demand. It appears the NutDhcpIfConfig
Function looks for both a valid mac and an ip address/mask of zero in
EEPROM before it will start the DHCP thread.
Currently I am attempting something like this, where mac is a valid mac
addr:
confnet.cdn_cip_addr = 0;
confnet.cdn_ip_mask = 0;
NutNetSaveConfig(); /* store an invalid ip addr and mask in EEPROM
*/
if (NutDhcpIfConfig("eth0", mac, DHCP_TIMEOUT))
{
printf("DHCP server not found...\n");
return -1;
}
I do this after I have successfully received a DHCP address and I am
just sitting in an idle state. When I do this the DHCP
thread never appears to attempt to obtain an address (watching ethereal
I never see a DHCP discover), and eventually DHCP
times out. Any ideas?
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040615/8c30def2/attachment.html>
More information about the En-Nut-Discussion
mailing list