Advertisement

Domain Resolution :: Winsock

Started by August 01, 2002 11:25 AM
1 comment, last by kuphryn 22 years, 6 months ago
Hi. I have a questions about resolving an IP into its domain name and vice versa. For example, IP: 66.218.71.84 Domain: w5.scd.yahoo.com I am familiar with a solution for the example above. However, there are some IP that I cannot get the domain names. For example and this is something I am making up. IP: 28.116.90.40 Domain: CORENT_WIN2k When I try to resolve 28.116.90.40 using the solution I currently use, the winsock API function returns 28.116.90.40 instead of CORENT_WIN2k. The only program I know that returns the corrent domain name is mIRC (a chat program). I use getaddrinfo() and getnameinfo(). Again, the solution works well except for some weird IP addresses similar to the one I made up. I would like to know is there a parameter somewhere for getaddrinfo() and/or getnameinfo() that will solve the solution example? Or maybe is there another technique? Thanks, Kuphryn
Try gethostbyname() and gethostbyaddr()
Darkhaven Beta-test stage coming soon.
Advertisement
Okay. Thanks.

Kuphryn

This topic is closed to new replies.

Advertisement