Hello,
Do somebody knows which function to use to change the Network (DNS) name of the DIGI? This name can be retrieve with a “gethostbyaddr” (DNS request) on its own address (at the condition that the DIGI started in DHCP mode). This name could be changed by the user, but I can’t find where…
Thanks!
Paul
Paul,
The DNS name is set on your server, not on the Digi module. You need to set a static address, or set names for each possible DHCP address.
On an office network, the names are a function of LanMan, which is based on NetBIOS. They are not TCP/IP.
In other words, there is NO name propagated from the Digi module.
-Erik
Hi, thanks Erik.
However, the DIGI get its DNS name of the kind “c63f007.my_company_name.priv”. I would like to know where the “c63f007” name comes from? From the DIGI?
As I assumes that NetBios is not implemented in the DIGI, maybe this name is given by the Digi during DHCP…
Paul
Paul,
Ok, the way that it works is that on the DNS server, the assignment is:
192.168.63.005 c63f005.my_company_name.priv
192.168.63.006 c63f006.my_company_name.priv
192.168.63.007 c63f007.my_company_name.priv
192.168.63.008 c63f008.my_company_name.priv
And when the DHCP assigns the 192.168.63.007, the machine is automatically c63f007.my_company_name.priv.
By the way, if you are using gethostbyaddr(), has the new NetOS added it? I am using 6.0 and I had to write my own version.
-Erik
Hi Erik,
Ok, that sounds like that, even if the IP is :
192.168.10.143 => c63f007.my_company_name.priv
But I now understand where it gets its name.
For the gethostbyaddr(), it is in “bsp/common/nainet.c”, but I have sometimes strange strings returned by this function, I am not sure I should use it (it is for the BSP)…
I am still using NETOS 6.0f at this time.
Paul
Yeah, I ended up rewriting most of the network functions, including gethostbyname(), gethostbyaddr(), and about 10 others. I gave up using the NA functions for DNS lookups. At least I learned a lot in the process!
-Erik