diff options
author | mallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:18:08 +0000 |
---|---|---|
committer | mallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:18:08 +0000 |
commit | 2ea231e82b3a7179e80ac79dcc115d9072e29e1f (patch) | |
tree | cdf8ab0b750140ad998e359d19f7432d9bac7556 /net/base/net_util.h | |
parent | 650046a1c7e5aff9dc754985fedae8c92d6a80f7 (diff) | |
download | chromium_src-2ea231e82b3a7179e80ac79dcc115d9072e29e1f.zip chromium_src-2ea231e82b3a7179e80ac79dcc115d9072e29e1f.tar.gz chromium_src-2ea231e82b3a7179e80ac79dcc115d9072e29e1f.tar.bz2 |
Adding code to detect network interface type on Windows. This information is provided to clients of net::GetNetworkList.
Windows API which provides these details are exposed via IP_ADAPTER_UNICAST_ADDRESS.
(http://msdn.microsoft.com/en-us/library/windows/desktop/aa366058(v=vs.85).aspx)
BUG=361791
R=pauljensen@chromium.org
TBR=justinlin@chromium.org,vitalybuka@chromium.org
Review URL: https://codereview.chromium.org/232343003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.h')
-rw-r--r-- | net/base/net_util.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/base/net_util.h b/net/base/net_util.h index 5556f5e..d83744f 100644 --- a/net/base/net_util.h +++ b/net/base/net_util.h @@ -24,6 +24,7 @@ #include "net/base/address_family.h" #include "net/base/escape.h" #include "net/base/net_export.h" +#include "net/base/network_change_notifier.h" class GURL; @@ -429,15 +430,6 @@ NET_EXPORT_PRIVATE int GetPortFromSockaddr(const struct sockaddr* address, // machine. NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host); -// Category of network interface types. -enum NetworkInterfaceType { - NETWORK_INTERFACE_UNKNOWN, - NETWORK_INTERFACE_ETHERNET, - NETWORK_INTERFACE_WIFI, - NETWORK_INTERFACE_CELLULAR, - NETWORK_INTERFACE_VPN -}; - // struct that is used by GetNetworkList() to represent a network // interface. struct NET_EXPORT NetworkInterface { @@ -445,7 +437,7 @@ struct NET_EXPORT NetworkInterface { NetworkInterface(const std::string& name, const std::string& friendly_name, uint32 interface_index, - NetworkInterfaceType type, + NetworkChangeNotifier::ConnectionType type, const IPAddressNumber& address, size_t network_prefix); ~NetworkInterface(); @@ -453,7 +445,7 @@ struct NET_EXPORT NetworkInterface { std::string name; std::string friendly_name; // Same as |name| on non-Windows. uint32 interface_index; // Always 0 on Android. - NetworkInterfaceType type; + NetworkChangeNotifier::ConnectionType type; IPAddressNumber address; size_t network_prefix; }; |