summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.h
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 17:47:10 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 17:47:10 +0000
commit2f3bc65c0d7abb88bc3f9c88d32625eceaa7f5bc (patch)
tree748f318e00982b2a3a2ca3591cbd6cdb4f5c1b6b /net/base/net_util.h
parent5ce20320ef59981866de5f51ef2ddc671ea205e8 (diff)
downloadchromium_src-2f3bc65c0d7abb88bc3f9c88d32625eceaa7f5bc.zip
chromium_src-2f3bc65c0d7abb88bc3f9c88d32625eceaa7f5bc.tar.gz
chromium_src-2f3bc65c0d7abb88bc3f9c88d32625eceaa7f5bc.tar.bz2
[Linux] Enable connecting to localhost when offline.
Add a utility function to determine if only loopback address are configured. Add a mechanism to add supplemental HostResolverFlags in the HostResolver. Change the resolver on Linux to not use AI_ADDRCONFIG if only loopback addresses are configured. BUG=41408 TEST=localhost works when offline Review URL: http://codereview.chromium.org/3036011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.h')
-rw-r--r--net/base/net_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 5633c11..978d4fb 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -327,6 +327,10 @@ void SetExplicitlyAllowedPorts(const std::wstring& allowed_ports);
// TODO(jar): Make test more in-depth as needed.
bool IPv6Supported();
+// Returns true if it can determine that only loopback addresses are configured.
+// i.e. if only 127.0.0.1 and ::1 are routable.
+bool HaveOnlyLoopbackAddresses();
+
// IPAddressNumber is used to represent an IP address's numeric value as an
// array of bytes, from most significant to least significant. This is the
// network byte ordering.