I am working on linux environment and c language. I can not use python,perl,PHP and apache. What my exact need is I want to give a same host name to each device connected in the network. I know that we can't give same host names to all the devices. But Can it be done through cnmae?
For example:
There are 3 devices connected in a local network Device-A,Device-B and Device-C. The IP address will be 192.168.0.4,192.168.0.5 and 192.168.0.6. Each device contain one httpd server from which I can access the web pages of that device in my PC. Let say if I type 192.168.0.4 in the browser then it will open the web page of that device. Now My PC is directly connected to one device. And I will write device.local in the browser so it should open local device's web page. Is it possible? If yes then how?
Research which I have made:
- I have used dnsmasq but it fails to run. I have just turned on the cname in dnsmasq.conf file. It gives me following error: dnsmasq: bad option at line 529 of /etc/dnsmasq.conf
I am using avahi for zero conf networking. In that avahi-daemon is there. So I can give the host name to each device. But it gives the name like device.local,device-2.local and device-3.local. After that I have followed this link also but it did not work for me.
http://www.mail-archive.com/avahi@lists.freedesktop.org/msg01907.html
Thank in advance. It is really important for me to solve this problem.