Chromium Code Reviews| Index: net/base/net_util.h |
| diff --git a/net/base/net_util.h b/net/base/net_util.h |
| index c74dfd2ea48486b08e16be9fdb700b9d99f06bd0..ebf487389bbeff9b72696ec37b9c727ba3c20ed4 100644 |
| --- a/net/base/net_util.h |
| +++ b/net/base/net_util.h |
| @@ -438,6 +438,17 @@ NET_EXPORT_PRIVATE int GetPortFromSockaddr(const struct sockaddr* address, |
| // machine. |
| NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host); |
| +// Only expose a subset of actionable IPv6 address flags to |
| +// application layer. Addresses with flags which are not combination |
| +// of listed below will be filtered out from GetNetworkList. |
| +enum IPv6AddressFlag { |
| + IPV6_ADDRESS_FLAG_NONE = 0x00, |
| + // This enum follows the IFA definition in if_addr.h |
|
Ryan Sleevi
2014/09/08 18:15:44
This doesn't really add value for non-Linux Users.
guoweis_webrtc
2014/09/12 23:55:21
Removed that line.
|
| + IPV6_ADDRESS_FLAG_TEMPORARY = 0x01, |
| + IPV6_ADDRESS_FLAG_DEPRECATED = 0x20, |
| + IPV6_ADDRESS_FLAG_PERMANENT = 0x80, |
|
Ryan Sleevi
2014/09/08 18:15:44
Why did you skip a bunch of flag values? Are you t
guoweis_webrtc
2014/09/12 23:55:21
Done.
|
| +}; |
| + |
| // struct that is used by GetNetworkList() to represent a network |
| // interface. |
| struct NET_EXPORT NetworkInterface { |
| @@ -456,6 +467,7 @@ struct NET_EXPORT NetworkInterface { |
| NetworkChangeNotifier::ConnectionType type; |
| IPAddressNumber address; |
| size_t network_prefix; |
| + int ipv6_flags; |
|
Ryan Sleevi
2014/09/08 18:15:44
Document
guoweis_webrtc
2014/09/12 23:55:21
I put a comment after the variable
// Combination
|
| }; |
| typedef std::vector<NetworkInterface> NetworkInterfaceList; |
| @@ -464,9 +476,6 @@ typedef std::vector<NetworkInterface> NetworkInterfaceList; |
| enum HostAddressSelectionPolicy { |
| INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, |
| EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, |
| - // Include temp address only when interface has both permanent and |
| - // temp addresses. |
| - INCLUDE_ONLY_TEMP_IPV6_ADDRESS_IF_POSSIBLE = 0x2, |
| }; |
| // Returns list of network interfaces except loopback interface. If an |