summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.h
diff options
context:
space:
mode:
authorthorogood@chromium.org <thorogood@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 10:26:45 +0000
committerthorogood@chromium.org <thorogood@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 10:26:45 +0000
commit7617bdf434e72ea07249762a09fc37753ab23716 (patch)
tree009e6e70deaff62d6936a07a4c2aa6e20e69480f /net/base/net_util.h
parente0ce8a1e940f3d44cef093ff5d9dfb2c7f6fab9c (diff)
downloadchromium_src-7617bdf434e72ea07249762a09fc37753ab23716.zip
chromium_src-7617bdf434e72ea07249762a09fc37753ab23716.tar.gz
chromium_src-7617bdf434e72ea07249762a09fc37753ab23716.tar.bz2
Remove NetAddressToString/getnameinfo() in favour of GURL
This reroutes NetAddressToString in net_util.cc to use GURL's output methods instead. BUG=126212 Review URL: https://chromiumcodereview.appspot.com/10928079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.h')
-rw-r--r--net/base/net_util.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/base/net_util.h b/net/base/net_util.h
index ddbf018..224348b 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -119,7 +119,8 @@ struct SockaddrStorage {
struct sockaddr* const addr;
};
-// Extracts the IP address and port portions of a sockaddr.
+// Extracts the IP address and port portions of a sockaddr. |port| is optional,
+// and will not be filled in if NULL.
bool GetIPAddressFromSockAddr(const struct sockaddr* sock_addr,
socklen_t sock_addr_len,
const unsigned char** address,
@@ -137,14 +138,15 @@ NET_EXPORT std::string IPAddressToStringWithPort(const uint8* address,
size_t address_len,
uint16 port);
-// Same as IPAddressToString() but for a sockaddr.
-NET_EXPORT std::string NetAddressToString(const struct sockaddr* net_address,
- socklen_t address_len);
+// Same as IPAddressToString() but for a sockaddr. This output will not include
+// the IPv6 scope ID.
+NET_EXPORT std::string NetAddressToString(const struct sockaddr* sa,
+ socklen_t sock_addr_len);
-// Same as IPAddressToStringWithPort() but for a sockaddr.
-NET_EXPORT std::string NetAddressToStringWithPort(
- const struct sockaddr* net_address,
- socklen_t address_len);
+// Same as IPAddressToStringWithPort() but for a sockaddr. This output will not
+// include the IPv6 scope ID.
+NET_EXPORT std::string NetAddressToStringWithPort(const struct sockaddr* sa,
+ socklen_t sock_addr_len);
// Same as IPAddressToString() but for an IPAddressNumber.
NET_EXPORT std::string IPAddressToString(const IPAddressNumber& addr);