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

Unified Diff: net/base/net_util.h

Issue 538243003: proposed interface change at //net for webrtc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define IPv6 Address flags and expose online_links_ from address tracker 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
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index c74dfd2ea48486b08e16be9fdb700b9d99f06bd0..610a45d040fc569746dc52989137550239df964c 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -438,6 +438,22 @@ NET_EXPORT_PRIVATE int GetPortFromSockaddr(const struct sockaddr* address,
// machine.
NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host);
+// Only expose a subset of IPv6 address flags which is actionable to
pauljensen 2014/09/10 17:55:18 Remove "Only expose". I'm not sure "IPv6 address f
lorenzo 2014/09/11 06:06:10 I don't think "address flags" is a standard term.
guoweis_webrtc 2014/09/12 23:55:21 Done. Changed the name to IPAddressAttributes.
guoweis_webrtc 2014/09/12 23:55:21 Changed the name to IPAddressAttributes.
+// application layer. Addresses with flags which are not combination
pauljensen 2014/09/10 17:55:18 Insert "a" in between "not combination"
guoweis_webrtc 2014/09/12 23:55:21 Done.
+// of listed below will be filtered out from GetNetworkList.
lorenzo 2014/09/11 06:06:10 I think this comment should just describe the flag
guoweis_webrtc 2014/09/12 23:55:21 Done.
+enum IPv6AddressFlag {
lorenzo 2014/09/11 06:06:10 Is there a reason for this enum to be IPv6-specifi
guoweis_webrtc 2014/09/12 23:55:21 Changed the enum name to IPAddressAttributes
+ IPV6_ADDRESS_FLAG_NONE = 0,
+
+ // Temporary address is dynamic by nature and will not carry MAC
+ // address.
+ IPV6_ADDRESS_FLAG_TEMPORARY = 1 << 0,
+
+ // Temporary address could become deprecated once the preferred
+ // lifetime is reached. It is still valid but shouldn't be used to
+ // create new connection.
+ IPV6_ADDRESS_FLAG_DEPRECATED = 1 << 1,
+};
+
// struct that is used by GetNetworkList() to represent a network
// interface.
struct NET_EXPORT NetworkInterface {
@@ -447,7 +463,8 @@ struct NET_EXPORT NetworkInterface {
uint32 interface_index,
NetworkChangeNotifier::ConnectionType type,
const IPAddressNumber& address,
- size_t network_prefix);
+ size_t network_prefix,
+ int ipv6_flags);
~NetworkInterface();
std::string name;
@@ -456,6 +473,7 @@ struct NET_EXPORT NetworkInterface {
NetworkChangeNotifier::ConnectionType type;
IPAddressNumber address;
size_t network_prefix;
+ int ipv6_flags; // Combination of |IPv6AddressFlag|.
};
typedef std::vector<NetworkInterface> NetworkInterfaceList;

Powered by Google App Engine
This is Rietveld 408576698