Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI've not done it yet, The pertinent code is found in "autoip.c". The function is at the bottom "dhc_hostname()". Here are the comments for the function:
/* FUNCTION: dhc_hostname()
*
* Called from the DHCP client to get a valid hostname for this machine. This
* is a default routine which returns a dummy name. The porting engineer is
* expected to define GETHOSTNAME_ALREADY and replace this with a system
* routine.
*
* Note - if MUST always return a string.
*
* PARAM1: none
*
* RETURNS: pointer to ascii hostname string
*/ So, define the MACRO "GETHOSTNAME_ALREADY" to the system library build then add a function dhc_hostname() to your code somewhere similar to what you do for get_mac_addr() and get_ip_addr(). Jake Jake