Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows 2000 / DNS / January 2004

Tip: Looking for answers? Try searching our database.

Reading NAPTR records - how?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul D.Smith - 20 Jan 2004 10:17 GMT
Anyone know how I can read a NAPTR record?  I've tried using DnsQuery() but
can't figure out how to get to the response.  There is no NAPTR specific
structure and I don't seem to be able to get to the raw DNS response.

Thanks for any help you can offer,
Paul DS.

--
Please remove the "x-" if replying to sender.
Paul D.Smith - 21 Jan 2004 08:51 GMT
OK, after much trial and error, I have discovered the following.

If the record is of a "Windows knows" type (e.g. SRV or A record), then
Windows "helpfully" converts the response into the appropriate data
structure, e.g. DNS_SRV_DATA, which is in the Data field of each record
returned by DnsQuery().

If the record is _NOT_ of a known type (and NAPTR is _not_ a type that
Windows understands, despite having a #define for the record type), then the
response is presented, untouched, in the Data field and the wDataLength
field indicates how many bytes are present.

Note that multplie NAPTR records are still presented as a chain of multiple
DNS_RECORD structure and the pNext field is still used to traverse the list.
Also, the Dns free functions should still be used to free the data.

Is this inconsistent and a recipe for future problems?  Yes or course it is
but then what did you expect :-).

Paul DS.

> Anyone know how I can read a NAPTR record?  I've tried using DnsQuery() but
> can't figure out how to get to the response.  There is no NAPTR specific
[quoted text clipped - 5 lines]
> --
> Please remove the "x-" if replying to sender.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2012 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.