Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: net/base/net_util.h

Issue 580283002: Interface change for net_util.h for WebRTC IPv6 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modify one extra test case for the new NetworkInterface constructor parameter Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/p2p/ipc_network_manager_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 39cb6abdc9caef02a5b3b3532d5efddeb4d1df33..5999ad273e1fbedff0cf193288eed5e22b230cba 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -438,6 +438,24 @@ NET_EXPORT_PRIVATE int GetPortFromSockaddr(const struct sockaddr* address,
// machine.
NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host);
+// A subset of IP address attributes which are actionable by the
+// application layer. Currently unimplemented for all hosts;
+// IP_ADDRESS_ATTRIBUTE_NONE is always returned.
+enum IPAddressAttributes {
+ IP_ADDRESS_ATTRIBUTE_NONE = 0,
+
+ // A temporary address is dynamic by nature and will not contain MAC
+ // address. Presence of MAC address in IPv6 addresses can be used to
+ // track an endpoint and cause privacy concern. Please refer to
+ // RFC4941.
+ IP_ADDRESS_ATTRIBUTE_TEMPORARY = 1 << 0,
+
+ // A temporary address could become deprecated once the preferred
+ // lifetime is reached. It is still valid but shouldn't be used to
+ // create new connections.
+ IP_ADDRESS_ATTRIBUTE_DEPRECATED = 1 << 1,
+};
+
// struct that is used by GetNetworkList() to represent a network
// interface.
struct NET_EXPORT NetworkInterface {
@@ -447,7 +465,8 @@ struct NET_EXPORT NetworkInterface {
uint32 interface_index,
NetworkChangeNotifier::ConnectionType type,
const IPAddressNumber& address,
- uint32 network_prefix);
+ uint32 network_prefix,
+ int ip_address_attributes);
~NetworkInterface();
std::string name;
@@ -456,6 +475,7 @@ struct NET_EXPORT NetworkInterface {
NetworkChangeNotifier::ConnectionType type;
IPAddressNumber address;
uint32 network_prefix;
+ int ip_address_attributes; // Combination of |IPAddressAttributes|.
};
typedef std::vector<NetworkInterface> NetworkInterfaceList;
« no previous file with comments | « content/renderer/p2p/ipc_network_manager_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698