RE: [GD-Windows] DNS server temporary change
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2004-04-07 16:53:01
|
It sounds like the original requester has a specific DNS set-up on the local machine that prevents the plain functions from working, but at times he wants to actually get a real DNS resolution from the outside world. nslookup allows you to specify a specific, non-local host for looking up names, hence it would work even if local DNS is differently configured. I'm not going to speculate about what this could be useful for, except to say that we use DNS as a well-tested, high-performance distributed name space database in our server cluster. We wrote our own DNS client code, which isn't that hard -- and it supports asynchronous operation ;-) Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Chris Raine Sent: Wednesday, April 07, 2004 6:20 AM To: gam...@li... Subject: Re: [GD-Windows] DNS server temporary change I would use getaddrinfo() to fill a addrinfo structure or use gethostname() to fill a hostent structure. If the name you specified exists both structures will contain the IP-Address in network byte-order which can be converted to an ascii string by the use of the inet_ntoa() function. All these functions are well documented in the Platform SDK -> Windows Sockets. Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well. hoping to have helped, chris On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! > > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? > > Thanks in advance > > Diogo de Andrade > dio...@sp... > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |