I'm converting a Net+OS 6.3 project to 7.5. When it starts up, I see it broadcast a few ICMPv6 messages in Wireshark, then it does a DHCP Discover. The DHCP server provides an IPv4 address, mask, gateway, DNS server, etc. as expected. Then, it gets to "applicationStart" where I have placed a line -
numServers = DNSGetServers(servers_list, 4);
There's ONE server in the list and its family is AF_INET(6). There's no IPv4 server address in the list. And subsequent calls to getaddrinfo don't work.
I don't care about IPv6 right now. I want my app to work with IPv4 as it always has. I'll upgrade it to support v6 later. So i thought I'd just disable v6 support in my app. I found APP_USE_STATIC_IPV6 and APP_USE_DHCPV6 in appconf.h. Both are set to APP_ON_NO_INTERFACE, but APP_USE_NVRAM is set to APP_FOR_ALL_PARAMETERS which is what I want (for all other parameters). But because of that, these two parameters use the NVRAM setting which I suspect enables them.
So I have two questions for anyone who can help -
1) Shouldn't DHCP have added an IPv4 DNS server to the list?
2) How can I disable IPv6 regardless of the NVRAM settings?