DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 10th, 2004, 07:37 AM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Where can I get the source code for the windows dns client?

The same as the title.
Thanks.

Reply With Quote
  #2  
Old June 10th, 2004, 08:34 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
no clue, what exactly do you need? I've written DNS clients before. You just wanting to learn how to code one?
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links:

Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts

Reply With Quote
  #3  
Old June 10th, 2004, 05:10 PM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Than you in advance

Quote:
Originally Posted by SilentRage
no clue, what exactly do you need? I've written DNS clients before. You just wanting to learn how to code one?

_______________________________
Yes ,I want to code one .but I do not know how to do.
Can you give me some advices or some information?

Reply With Quote
  #4  
Old June 10th, 2004, 09:12 PM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
Ok, and what specific function do you want your program to be? A general resolver, a fully featured dns resolution tool like nslookup or dig, or something more specialized?

Reply With Quote
  #5  
Old June 11th, 2004, 03:51 AM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks!

Quote:
Originally Posted by SilentRage
Ok, and what specific function do you want your program to be? A general resolver, a fully featured dns resolution tool like nslookup or dig, or something more specialized?

------------------------------------
my english is poor ,so I hope I have understood your words clearly.
what I want to code is the program which can send a dns
query ,and then get the reply from the dns server.
and then,I can get the info from the reply .
like this: I send a dns query wiht the message "www.sina.com"
and I can get the reply from the server.Then I get the info of the address as"172.16. . ".
or the reverse.Like "172.16. . " to "www.sina.com"
.
I hope that I express it clearly.

Reply With Quote
  #6  
Old June 11th, 2004, 08:52 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
ok, so you don't care about anything but resolving domains to IPs and IPs to domains? You don't even need to make manual DNS queries to do that. You can use the following functions:

gethostbyname()
gethostbyaddr()

Reply With Quote
  #7  
Old June 11th, 2004, 07:36 PM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i....

Quote:
Originally Posted by SilentRage
ok, so you don't care about anything but resolving domains to IPs and IPs to domains? You don't even need to make manual DNS queries to do that. You can use the following functions:

gethostbyname()
gethostbyaddr()

----------------------------------
I know them .but I cant use.
I shoud code a program to carry out the funtion like the gethostbyname() and gethostbyaddr().

Reply With Quote
  #8  
Old June 11th, 2004, 08:39 PM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
Why can't you use them? Do you just not know how?

Reply With Quote
  #9  
Old June 12th, 2004, 05:50 AM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I dont know....

Quote:
Originally Posted by SilentRage
Why can't you use them? Do you just not know how?

-------------------
I asked ......but he told me I cant use them .
I have no idea.
my god.

Reply With Quote
  #10  
Old June 12th, 2004, 08:38 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
Ok, so since you want a resolver, but you don't want to use the gethost functions, here's the source to the light-weight resolver I made.

It's not easy stuff though, and will be difficult for you to understand I think. All it does is resolve domains to IPs. It does not resolve IPs to domains. It does follow CNAME's, you can configure it to resend UDP requests, you can configure it with a timeout per request. It does no caching. This is the code I provided for the guy who said BIND choked under their web crawler resolution requests. So he used my code instead and paid me $100 for writing it within only 24 hours. Results tell you what servers were queried for what domain including the original request, cname requests, and name server requests when the root TLD servers don't provide glue.

It compiles to only 8KB using the windows LCC compiler. It is not linux/unix compatible code.
Attached Files
File Type: zip resolver.zip (5.5 KB, 226 views)

Last edited by SilentRage : June 12th, 2004 at 08:40 AM.

Reply With Quote
  #11  
Old June 13th, 2004, 12:18 AM
ningmeng ningmeng is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 ningmeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank u so much

Quote:
Originally Posted by SilentRage
Ok, so since you want a resolver, but you don't want to use the gethost functions, here's the source to the light-weight resolver I made.

It's not easy stuff though, and will be difficult for you to understand I think. All it does is resolve domains to IPs. It does not resolve IPs to domains. It does follow CNAME's, you can configure it to resend UDP requests, you can configure it with a timeout per request. It does no caching. This is the code I provided for the guy who said BIND choked under their web crawler resolution requests. So he used my code instead and paid me $100 for writing it within only 24 hours. Results tell you what servers were queried for what domain including the original request, cname requests, and name server requests when the root TLD servers don't provide glue.

It compiles to only 8KB using the windows LCC compiler. It is not linux/unix compatible code.

------------------------
You are right!It is difficult to me to understand.
But I believe it will help me much.
Thank you again.

Reply With Quote
  #12  
Old September 14th, 2004, 04:16 PM
AllenKll AllenKll is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 AllenKll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You Da Man!!!!!!!!!!

SilentRage

You are the MAN!!!

I was going insane trying to figure out how to resolve a host name by readin those damned RFC documents.. Which are excelent resourses if you wanted to make a full service protocal loving Deamon.

But if you want something simple? Forget it. with the exception of the SMTP spec.. (That was pretty damned simple.)

I really appreciate you posting the sample code. I d/led and had it running in under 5 mins with VC++ 6.0

It's so much easier to observe the behavior of the protocol I want that to recreate it from those docs.

Thanks Again for saving my sanity

-allenkll

Oh, FYI, I didn't use the WINAPI functions because I am doing some experimentation to prove out a design that will be going into an embedded LAN enabled uP.

Reply With Quote
  #13  
Old September 14th, 2004, 04:39 PM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,195 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 15 h 53 m 4 sec
Reputation Power: 77
heh heh, well you made me feel like a million bucks. Always feels great to be appreciated by others of similar talents. So that old enemy of mine, VC++, was able to swallow my code eh? Probably not without some modification suredly! But definate kudos to you for figuring out how to work it! That code is no joke!

Most certainly if you have questions reguarding the DNS protocol or coding applications that makes use of the DNS protocol feel free to ask.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > Where can I get the source code for the windows dns client?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump