Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: webrtc/base/ipaddress.cc

Issue 1411253008: WebRTC should generate default private address even when adapter enumeration is disabled. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: after rebase on master Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/ipaddress.h ('k') | webrtc/base/network.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/ipaddress.cc
diff --git a/webrtc/base/ipaddress.cc b/webrtc/base/ipaddress.cc
index 316207fe498c145c3ef489dc2622264f96784391..f0698e52f128408f82ac72958696e82edc16728e 100644
--- a/webrtc/base/ipaddress.cc
+++ b/webrtc/base/ipaddress.cc
@@ -506,4 +506,15 @@ IPAddress GetLoopbackIP(int family) {
}
return rtc::IPAddress();
}
+
+IPAddress GetAnyIP(int family) {
+ if (family == AF_INET) {
+ return rtc::IPAddress(INADDR_ANY);
+ }
+ if (family == AF_INET6) {
+ return rtc::IPAddress(in6addr_any);
+ }
+ return rtc::IPAddress();
+}
+
} // Namespace rtc
« no previous file with comments | « webrtc/base/ipaddress.h ('k') | webrtc/base/network.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698