Click here to Skip to main content
Licence 
First Posted 28 Sep 2002
Views 85,582
Bookmarked 16 times

DNS if u need it

By | 1 Oct 2002 | Article
Simple quering DNS servers for retrieve information about host's DNS records

Introduction

Some times you want to receive information from DNS servers using C++. This simple project shows how you can send and receive messages to and from DNS servers.

There are 2 downloads supplied (see above)
The first download contains the DNS structures and CDnsResolver class that you can use to make queries of your own.
The second download contains a sample project, console application.
Use sample app:
usingdns.exe DNS server mail_host mail_host [any count hosts]

For advanced users I'm add new demo project dgramm.zip
This showing as interpret DNS answers (gethostbyname() too ;)

This cool for Mail servers or just for study how it works.

For more inforamtion read the RFC documentation at DNS.NET [^] which also contains a number of useful tools.

If you know how to return this information under plain Win32 please post a message below.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

DarkSn0w

Web Developer

Russian Federation Russian Federation

Member

Programmer with 5 year of work
like networking applications and fun codes


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralBon! Pinmemberalexiworld1:48 16 May '04  
QuestionWhy atre there so many compiler warnings? Pinmemberhesterloli17:33 8 Jan '04  
AnswerRe: Why atre there so many compiler warnings? PinmemberDarkSn0w23:51 8 Jan '04  
GeneralRe: Why atre there so many compiler warnings? Pinmemberhesterloli4:53 9 Jan '04  
GeneralRe: Why atre there so many compiler warnings? PinmemberDarkSn0w5:09 10 Jan '04  
GeneralGREAT CODE!!!!! PinsussBarçaBoy8:45 6 Nov '03  
GeneralRe: GREAT CODE!!!!! PinmemberDarkSn0w19:44 6 Nov '03  
GeneralRe: GREAT CODE!!!!! PinsussAnonymous7:02 25 Dec '03  
GeneralRe: GREAT CODE!!!!! PinmemberDarkSn0w23:57 8 Jan '04  
GeneralRe: GREAT CODE!!!!! Pinsussd-code10:14 3 Dec '04  
GeneralGREAT CODE!!!!! PinmemberBarçaBoy8:45 6 Nov '03  
Generalthanks Pinmembernjuhuangchinesemy22:02 6 Oct '03  
Generalgethostbyaddr Pinmembermycia17:51 30 Mar '03  
GeneralRe: gethostbyaddr PinmemberDarkSn0w3:34 22 Apr '03  
GeneralThanx... PinmemberEPulse1:12 22 Feb '03  
GeneralRe: Thanx... PinmemberDarkSn0w3:29 22 Apr '03  
GeneralDNSQuery() PinmemberAndreas Saurwein6:07 6 Feb '03  
GeneralRe: DNSQuery() PinmemberDarkSn0w3:26 22 Apr '03  
GeneralDon't use this source Pinmemberwukas5:41 6 Feb '03  
GeneralRe: Don't use this source PinmemberDarkSn0w3:25 22 Apr '03  
GeneralRe: Don't use this source PinmemberDarkSn0w19:37 6 Nov '03  
GeneralRe: Don't use this source Pinmember_BenC_1:35 22 Oct '04  
GeneralRe: Don't use this source PinmemberTuPacMansur19:32 5 Sep '05  
Questiongethostbyname() ?? PinsussAnonymous7:06 30 Sep '02  
AnswerRe: gethostbyname() ?? PinmemberDarkSn0w18:12 1 Oct '02  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 2 Oct 2002
Article Copyright 2002 by DarkSn0w
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid