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