|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
The same as the title.
Thanks. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
Than you in advance
Quote:
_______________________________ Yes ,I want to code one .but I do not know how to do. Can you give me some advices or some information? |
|
#4
|
||||
|
||||
|
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?
|
|
#5
|
|||
|
|||
|
Thanks!
Quote:
------------------------------------ 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. ![]() |
|
#6
|
||||
|
||||
|
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() |
|
#7
|
|||
|
|||
|
i....
Quote:
---------------------------------- I know them .but I cant use. I shoud code a program to carry out the funtion like the gethostbyname() and gethostbyaddr(). |
|
#8
|
||||
|
||||
|
Why can't you use them? Do you just not know how?
|
|
#9
|
|||
|
|||
|
I dont know....
Quote:
------------------- I asked ......but he told me I cant use them . I have no idea. my god. |
|
#10
|
||||
|
||||
|
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. Last edited by SilentRage : June 12th, 2004 at 08:40 AM. |
|
#11
|
|||
|
|||
|
Thank u so much
Quote:
------------------------ You are right!It is difficult to me to understand. But I believe it will help me much. Thank you again. |
|
#12
|
|||
|
|||
|
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. |
|
#13
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > System Administration > DNS > Where can I get the source code for the windows dns client? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|