Chromium Code Reviews| Index: net/base/net_util.h |
| diff --git a/net/base/net_util.h b/net/base/net_util.h |
| index 9e30d2b052948701a24fda85c21908ef503d271a..0ed082906a9b074cc64f0b5995101e1a8c6217d7 100644 |
| --- a/net/base/net_util.h |
| +++ b/net/base/net_util.h |
| @@ -427,6 +427,15 @@ const uint16* GetPortFieldFromSockaddr(const struct sockaddr* address, |
| int GetPortFromSockaddr(const struct sockaddr* address, |
| socklen_t address_len); |
| +// Returns true if |host| is one of the names (e.g. "localhost") or IP |
| +// addresses (IPv4 127.0.0.0/8 or IPv6 ::1) that indicate a loopback. |
| +// |
| +// Note that this function does not check for IP addresses other than |
| +// the above that have been mapped back to the local machine, i.e. |
|
wtc
2011/03/25 19:06:24
Nit: "mapped back to the local machine" is a littl
Jói
2011/03/25 21:26:51
Yes, I mean via /etc/hosts or by the host admin ma
|
| +// it only checks for IP addresses that by definition are loopback |
| +// addresses. |
| +bool IsLocalhost(const std::string& host); |
| + |
| // struct that is used by GetNetworkList() to represent a network |
| // interface. |
| struct NetworkInterface { |