Is there any way to read DNS address when DHCP is enabled? I use ‘customizeIamGetIfAddrInfo()’ which gives me current IP, subnet mask, gateway, but DNS is reported as 0.0.0.0.
Even if I disable the DHCP and it uses “APP_PRIMARY_DNS_ADDRESS” defined in “appconf.h”, the function still returns DNS as zero.
Thanks for suggestion.
I’ve tried to modify the function, but the problem is if you want to translate the host name using “getaddrinfo()” inside the function “NAGetAppSntpPrimary()” it does not work. It just get stuck. I guess the problem is that network connection is not established yet while calling the function “NAGetAppSntpPrimary()” and so it cannot access the DNS.
So it seems the only option is to use just an IP address.