I was trying to set a host name for my IP address, which mean when i want to access my webrabbit http://90.0.0.110 , i also can access it through http://test
i use the sethostname() but it doesnt work is there any setting that i could have miss out? below are part of my code. Thanks
There are a couple of simple ways that might achieve what you need but both rely primarily on external systems to work.
using the macros DHCP_SEND_HOSTNAME and DHCP_CLASS_ID you can get to register your hostname with the DHCP server (although you seem to be using static IP addressing so it would require a bit of juggling to make this work…). According to the comments in BOOTP.LIB some DHCP servers can use this info to respond to DNS queries and provide name resolution. This is obviously very dependent on your DHCP server
Using the local hosts.txt or equivilant file you could set up a static mapping and then the OS will resolve the names for you.