Index: webrtc/base/ipaddress.cc |
diff --git a/webrtc/base/ipaddress.cc b/webrtc/base/ipaddress.cc |
index 768a7092a3c797db17c86748cc15b9387cd3a1dd..3dd856a64abc817ac8de32d22e04a85ccaa74cab 100644 |
--- a/webrtc/base/ipaddress.cc |
+++ b/webrtc/base/ipaddress.cc |
@@ -498,4 +498,13 @@ int IPAddressPrecedence(const IPAddress& ip) { |
return 0; |
} |
-} // Namespace talk base |
+IPAddress GetLoopbackIP(int family) { |
+ if (family == AF_INET) { |
+ return rtc::IPAddress(INADDR_LOOPBACK); |
+ } |
+ if (family == AF_INET6) { |
+ return rtc::IPAddress(in6addr_loopback); |
+ } |
+ return rtc::IPAddress(); |
+} |
+} // Namespace rtc |