Hi Swati,
        Does your DNS server have the PTR records in the IP6.ARPA (or IP6.INT) domain 
for the IP address you are looking up? Short of that nothing else strikes my mind.

Regards
Suresh

-----Original Message-----
From: AGARWAL,SWATI (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 2:56 PM
To: Suresh Krishnan (QB/LMC); '[EMAIL PROTECTED]'
Subject: RE: Reverse lookup for IPv6 on Windows


Thanks Suresh. I tried it. But I am getting the following error:
 
WSANO_DATA
11004 
Valid name, no data record of requested type. 
The requested name is valid and was found in the database, but it does not
have the correct associated data being resolved for. The usual example for
this is a host name-to-address translation attempt (using gethostbyname or
WSAAsyncGetHostByName) which uses the DNS (Domain Name Server). An MX record
is returned but no A record-indicating the host itself exists, but is not
directly reachable.  


According to the above error it says that this is a hostname to ip address
translation. In my case it is vice versa. Also I am doing IPv6. I am able to
get the resolve the IPv6 addresses with nslookup using the 128 bit string.

Any thoughts?

Swati

-----Original Message-----
From: Suresh Krishnan (QB/LMC) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 12:35 PM
To: 'AGARWAL,SWATI (HP-FtCollins,ex1)'; '[EMAIL PROTECTED]'
Subject: RE: Reverse lookup for IPv6 on Windows


Hi Swati,
        It has been a while since I did this, but here goes.

Regards
Suresh

<<<<<<<<<<<<<<<CODE SNIPPET>>>>>>>>>>>>>>>>>>>

  SOCKADDR_IN sinDest;
  int iDummy;  // Length if you want to use it in case of error in
WSAStringToAddress

  // WSAStartup blah blah 
  // strIP is the char * with your IP address
  // strHostName will be the resolved hostname (char *)

  sinDest.sin_family = AF_INET;
  WSAStringToAddress(strIP, AF_INET, NULL,(LPSOCKADDR)&sinDest, &iDummy);

  if(getnameinfo((struct sockaddr *)&sinDest,sizeof(sinDest),
                  strHostName,sizeof(strHostName),
                  NULL, // Service info - don't care
                    0, // Service info - don't care
                  NI_NAMEREQD // I want an error if it is not resolved
                ))
  {
        // Error
  }
  else
  {
        // Success
  }

  // WSACleanup blah blah 
<<<<<<<<<<<<<<<CODE SNIPPET>>>>>>>>>>>>>>>>>>>


-----Original Message-----
From: AGARWAL,SWATI (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 1:05 PM
To: '[EMAIL PROTECTED]'
Subject: Reverse lookup for IPv6 on Windows


Hello,

I am trying to do a reverse lookup on IPv6 on Windows. I am using
getnameinfo for that.  I am not able to successfully do this. Does someone
have an example code for this?


Swati
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to