# DNS Client Sample operation with NetOS 7.0

**URL:** <https://forums.digi.com/t/dns-client-sample-operation-with-netos-7-0/5300>\
**Category:** NET+OS\
**Created:** [August 30, 2007, 2:07pm UTC](https://forums.digi.com/t/dns-client-sample-operation-with-netos-7-0/5300 "2007-08-30T14:07:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdeabill](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rdeabill](https://forums.digi.com/u/rdeabill)\
**Post date:** [August 30, 2007, 2:07pm UTC](https://forums.digi.com/t/dns-client-sample-operation-with-netos-7-0/5300/1 "2007-08-30T14:07:22Z")

</div>

Hi,

I am having a few problems understanding what is happening with this sample application under 7.0

I have slightly modified the sample so that after rhe initial DNS servers are removed I run DNSGetServers()  
and display the results.

The output I get is

\>Start DNS Client application  
\>The following servers were found:  
\>1) ::FFFF  
\>2) ::FFFF  
\>Removed DNS server ::FFFF  
\>Removed DNS server ::FFFF  
\>The following servers were found:  
\>1)  
\>2)  
\>DNSAddServer() for 10.0.0.1 succeeded.  
\>DNSAddServer() for 212.159.13.49 succeeded.  
\>The following servers were found:  
\>1) ::FFFF  
\>2) ::FFFF  
\>Domain name: [digi.com](http://digi.com) has IP address: 66.77.174.69  
\>Cannot resolve IP address for domain name: [digi.com](http://digi.com)  
\>Domain name: [yahoo.com](http://yahoo.com) has IP address: 66.94.234.13  
\>IP address: 66.94.234.13 has domain name: \>w2.rc.vip.scd.yahoo.com  
\>All done

Initially there seem to be two servers defined

After removal the call to DNSGetServers() returns 2 rather  
than zero.

After I have added my new DNS Servers the print of there adresses is stil wrong but they do seem to work correctly.

It seems that the DNSGetServers() function is broken.  
Any help on what is going on would be apprectiated

Regards  
Roy

---

<div class="post-metadata">

**Author:** ![charliek](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@charliek](https://forums.digi.com/u/charliek)\
**Post date:** [September 3, 2007, 12:36am UTC](https://forums.digi.com/t/dns-client-sample-operation-with-netos-7-0/5300/2 "2007-09-03T00:36:32Z")

</div>

It appears that you’re checking the IPv6 IP address (or the first part). Note they are sockaddr\_storage structures rather than sockaddr\_in structures.

How exactly are you checking the IP address of the stored IP addresses?

---

<div class="post-metadata">

**Author:** ![rdeabill](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rdeabill](https://forums.digi.com/u/rdeabill)\
**Post date:** [September 3, 2007, 8:03am UTC](https://forums.digi.com/t/dns-client-sample-operation-with-netos-7-0/5300/3 "2007-09-03T08:03:02Z")

</div>

Hi,

This is directly from the sample application:-  
as per the attached file.

I have commented out the TEST\_IPV6\_DNS symbol
