set arduino host name?

Hi guys,

How do you set the arduino host name?

you know so that if you do a ping -a it returns Pinging Arduino [] with 32 bytes of data.

I know I can setup a DNS record on my dns server but that wont work if its not connected to my dns server.



That's strange. Are you using 1.0? In 1.0 the sources say:

// in Dhcp.h
#define HOST_NAME "WIZnet"

// in Dhcp.c
void DhcpClass::send_DHCP_MESSAGE(uint8_t messageType, uint16_t secondsElapsed)
// OPT - host name
    buffer[16] = hostName; 
    buffer[17] = strlen(HOST_NAME) + 3; // length of hostname + last 3 bytes of mac address
    strcpy((char*)&(buffer[18]), HOST_NAME);
    buffer[24] = _dhcpMacAddr[3];
    buffer[25] = _dhcpMacAddr[4];
    buffer[26] = _dhcpMacAddr[5];

I would have expected that to set the HOST_NAME to "WIZnet" plus the last three bytes of the MAC address. Since the MAC address is in BINARY is it likely that those characters are not valid in a host name, anyway. :(