[En-Nut-Discussion] Sending Host name to DHCP server

Damian Slee damian at commtech.com.au
Wed Mar 3 08:10:39 CET 2004


Hi all,

I added this to DhcpRequest() thinking I could use confnet.cd_name to
store a local host name.  Found out quickly that confnet.cd_name holds
the device name "eth0".  So my DHCP server lease table now shows
"eth0.commtech.com.au" :-)  Better than "" I guess.

Does any one have a need for a proper host name field?
And a valid name entry in their dhcp server lease table?

Maybe it can be added to the confnet structure, or standard ethernut
eeprom structure some where?

MS DHCP server can register the name using dynamic DNS to MS DNServer.
Haven't got it to work yet tho.

Comments please...

damian

--------------------------------------------------------------
/* Pass host name if specified in confnet structure.  */
/* viewing DHCP lease table shows something sensible. */
len = strlen(confnet.cd_name);
if (len > 0)  {
	optlen += DhcpAddOptionFromRAM(op + optlen, DHCPOPT_HOSTNAME,
confnet.cd_name, len);
}
 



More information about the En-Nut-Discussion mailing list