| Index: runtime/bin/socket_win.cc
|
| diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
|
| index bac17baff374821e53dc383847163cfc1e83400a..dbb06a02f51ca260ad56ac71186e7e37e22496ab 100644
|
| --- a/runtime/bin/socket_win.cc
|
| +++ b/runtime/bin/socket_win.cc
|
| @@ -254,6 +254,27 @@ AddressList<SocketAddress>* Socket::LookupAddress(const char* host,
|
| }
|
|
|
|
|
| +const char* Socket::ReverseLookup(RawAddr addr, OSError** os_error) {
|
| + char* host = new char[NI_MAXHOST];
|
| + int status = getnameinfo(&addr.addr,
|
| + SocketAddress::GetAddrLength(&addr),
|
| + host,
|
| + NI_MAXHOST,
|
| + NULL,
|
| + 0,
|
| + NI_NAMEREQD);
|
| + if (status != 0) {
|
| + ASSERT(*os_error == NULL);
|
| + DWORD error_code = WSAGetLastError();
|
| + SetLastError(error_code);
|
| + *os_error = new OSError();
|
| + delete host;
|
| + return NULL;
|
| + }
|
| + return host;
|
| +}
|
| +
|
| +
|
| AddressList<InterfaceSocketAddress>* Socket::ListInterfaces(
|
| int type,
|
| OSError** os_error) {
|
|
|