C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 01-16-2004, 10:56 AM   #1
* Death to Visual Basic *
 
Devil Panther's Avatar
 
Join Date: Aug 2001
Posts: 768
DNS lookup?

How do I write my own DNS lookup to list all sub domains on a host.
Because you see i want to write an smtp server, but as i've learned, after i send mail with my smtp server, it sends mail to the destination's smtp server. but how my smtp server finds the destination's smtp server's address?
So I did a little reasearch and I found out that it's done with dns lookup, but i could not find a manual on how to do that.

Please help.
Thanks.
__________________
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

http://www.Bloodware.net - Developing free software for the community.
Devil Panther is offline   Reply With Quote
Old 01-16-2004, 01:03 PM   #2
Yes, my avatar is stolen
 
anonytmouse's Avatar
 
Join Date: Dec 2002
Posts: 2,544
You need to lookup mx dns records. MX is short for Mail Exchange. These records point to the incoming smtp server for a domain.

Some operating systems have apis to lookup mx records. For example, DnsQuery is available on Windows 2000/XP. Alternatively you can use a library or just some code using sockets.

C code using sockets:
http://cvs.synchro.net/cgi-bin/viewc...bs3/mxlookup.c

DnsQuery function:
http://www.developer2.com/features/stories/34508.html
anonytmouse is offline   Reply With Quote
Old 01-17-2004, 07:05 AM   #3
* Death to Visual Basic *
 
Devil Panther's Avatar
 
Join Date: Aug 2001
Posts: 768
Thanks alot.
__________________
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

http://www.Bloodware.net - Developing free software for the community.
Devil Panther is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS issue George2 C# Programming 1 08-02-2008 10:15 AM
Lookup in lists agentsmith C Programming 1 12-07-2007 02:14 PM
gethostbyaddr() reverse lookups failing (???) Uncle Rico C Programming 9 08-19-2005 09:22 AM
win2k dns lookup serrrrrver Tech Board 11 01-13-2003 12:50 PM
DNS Lookup xxx Windows Programming 1 01-08-2003 02:43 PM


All times are GMT -6. The time now is 06:35 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22