Index: net/base/net_util_linux.h |
diff --git a/net/base/net_util_linux.h b/net/base/net_util_linux.h |
index 340c3802eea080878a82db44a6b989a6c329971b..cb871babc8d5ed5eafc2869426092f311a2c69d6 100644 |
--- a/net/base/net_util_linux.h |
+++ b/net/base/net_util_linux.h |
@@ -8,9 +8,12 @@ |
// This file is only used to expose some of the internals |
// of net_util_linux.cc to tests. |
+#include <string> |
+ |
#include "base/containers/hash_tables.h" |
#include "net/base/address_tracker_linux.h" |
#include "net/base/net_util.h" |
+#include "net/base/network_change_notifier.h" |
namespace net { |
namespace internal { |
@@ -18,6 +21,18 @@ namespace internal { |
typedef char* (*GetInterfaceNameFunction)(unsigned int interface_index, |
char* ifname); |
+// Returns the name for the interface with interface index |interface_index|. |
+// |buf| should be a pointer to an array of size IFNAMSIZ. The returned pointer |
+// will point to |buf|. This function acts like if_indextoname which cannot be |
+// used as net/if.h cannot be mixed with linux/if.h. We'll stick with |
+// exclusively talking to the kernel and not the C library. |
+char* GetInterfaceName(unsigned int interface_index, char* buf); |
+ |
+// Gets the connection type for interface |ifname| by checking for wireless |
+// extensions. |
+NetworkChangeNotifier::ConnectionType GetInterfaceConnectionType( |
+ const std::string& ifname); |
+ |
NET_EXPORT bool GetNetworkListImpl( |
NetworkInterfaceList* networks, |
int policy, |