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

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: reduce the ipv6 flags exposed. 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 | « no previous file | no next file » | 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 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698