henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_BASE_NETWORK_H_ |
| 12 | #define WEBRTC_BASE_NETWORK_H_ |
| 13 | |
| 14 | #include <deque> |
| 15 | #include <map> |
| 16 | #include <string> |
| 17 | #include <vector> |
| 18 | |
| 19 | #include "webrtc/base/basictypes.h" |
| 20 | #include "webrtc/base/ipaddress.h" |
| 21 | #include "webrtc/base/messagehandler.h" |
guoweis@webrtc.org | f358aea | 2015-02-18 18:44:01 +0000 | [diff] [blame] | 22 | #include "webrtc/base/scoped_ptr.h" |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 23 | #include "webrtc/base/sigslot.h" |
| 24 | |
| 25 | #if defined(WEBRTC_POSIX) |
| 26 | struct ifaddrs; |
| 27 | #endif // defined(WEBRTC_POSIX) |
| 28 | |
| 29 | namespace rtc { |
| 30 | |
| 31 | class Network; |
honghaiz | 023f3ef | 2015-10-19 09:39:32 -0700 | [diff] [blame] | 32 | class NetworkMonitorInterface; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 33 | class Thread; |
| 34 | |
| 35 | enum AdapterType { |
| 36 | // This enum resembles the one in Chromium net::ConnectionType. |
| 37 | ADAPTER_TYPE_UNKNOWN = 0, |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 38 | ADAPTER_TYPE_ETHERNET = 1 << 0, |
| 39 | ADAPTER_TYPE_WIFI = 1 << 1, |
| 40 | ADAPTER_TYPE_CELLULAR = 1 << 2, |
| 41 | ADAPTER_TYPE_VPN = 1 << 3, |
| 42 | ADAPTER_TYPE_LOOPBACK = 1 << 4 |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 43 | }; |
| 44 | |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 45 | // By default, ignore loopback interfaces on the host. |
| 46 | const int kDefaultNetworkIgnoreMask = ADAPTER_TYPE_LOOPBACK; |
| 47 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 48 | // Makes a string key for this network. Used in the network manager's maps. |
| 49 | // Network objects are keyed on interface name, network prefix and the |
| 50 | // length of that prefix. |
| 51 | std::string MakeNetworkKey(const std::string& name, const IPAddress& prefix, |
| 52 | int prefix_length); |
| 53 | |
| 54 | // Generic network manager interface. It provides list of local |
| 55 | // networks. |
| 56 | class NetworkManager { |
| 57 | public: |
| 58 | typedef std::vector<Network*> NetworkList; |
| 59 | |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 60 | // This enum indicates whether adapter enumeration is allowed. |
| 61 | enum EnumerationPermission { |
guoweis | ea1012b | 2015-08-21 09:06:28 -0700 | [diff] [blame] | 62 | ENUMERATION_ALLOWED, // Adapter enumeration is allowed. Getting 0 network |
| 63 | // from GetNetworks means that there is no network |
| 64 | // available. |
| 65 | ENUMERATION_BLOCKED, // Adapter enumeration is disabled. |
| 66 | // GetAnyAddressNetworks() should be used instead. |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 67 | }; |
| 68 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 69 | NetworkManager(); |
| 70 | virtual ~NetworkManager(); |
| 71 | |
| 72 | // Called when network list is updated. |
| 73 | sigslot::signal0<> SignalNetworksChanged; |
| 74 | |
| 75 | // Indicates a failure when getting list of network interfaces. |
| 76 | sigslot::signal0<> SignalError; |
| 77 | |
| 78 | // Start/Stop monitoring of network interfaces |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 79 | // list. SignalNetworksChanged or SignalError is emitted immediately |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 80 | // after StartUpdating() is called. After that SignalNetworksChanged |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 81 | // is emitted whenever list of networks changes. |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 82 | virtual void StartUpdating() = 0; |
| 83 | virtual void StopUpdating() = 0; |
| 84 | |
| 85 | // Returns the current list of networks available on this machine. |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 86 | // StartUpdating() must be called before this method is called. |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 87 | // It makes sure that repeated calls return the same object for a |
| 88 | // given network, so that quality is tracked appropriately. Does not |
| 89 | // include ignored networks. |
| 90 | virtual void GetNetworks(NetworkList* networks) const = 0; |
| 91 | |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 92 | // return the current permission state of GetNetworks() |
Guo-wei Shieh | 86cb923 | 2015-08-19 10:57:53 -0700 | [diff] [blame] | 93 | virtual EnumerationPermission enumeration_permission() const; |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 94 | |
guoweis@webrtc.org | f358aea | 2015-02-18 18:44:01 +0000 | [diff] [blame] | 95 | // "AnyAddressNetwork" is a network which only contains single "any address" |
| 96 | // IP address. (i.e. INADDR_ANY for IPv4 or in6addr_any for IPv6). This is |
| 97 | // useful as binding to such interfaces allow default routing behavior like |
| 98 | // http traffic. |
guoweis@webrtc.org | 9dfe7aa | 2015-02-18 20:27:17 +0000 | [diff] [blame] | 99 | // TODO(guoweis): remove this body when chromium implements this. |
| 100 | virtual void GetAnyAddressNetworks(NetworkList* networks) {} |
guoweis@webrtc.org | f358aea | 2015-02-18 18:44:01 +0000 | [diff] [blame] | 101 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 102 | // Dumps a list of networks available to LS_INFO. |
| 103 | virtual void DumpNetworks(bool include_ignored) {} |
guoweis@webrtc.org | a094cac | 2015-01-28 19:34:05 +0000 | [diff] [blame] | 104 | |
| 105 | struct Stats { |
| 106 | int ipv4_network_count; |
| 107 | int ipv6_network_count; |
| 108 | Stats() { |
| 109 | ipv4_network_count = 0; |
| 110 | ipv6_network_count = 0; |
| 111 | } |
| 112 | }; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 113 | }; |
| 114 | |
| 115 | // Base class for NetworkManager implementations. |
| 116 | class NetworkManagerBase : public NetworkManager { |
| 117 | public: |
| 118 | NetworkManagerBase(); |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 119 | ~NetworkManagerBase() override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 120 | |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 121 | void GetNetworks(std::vector<Network*>* networks) const override; |
| 122 | void GetAnyAddressNetworks(NetworkList* networks) override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 123 | bool ipv6_enabled() const { return ipv6_enabled_; } |
| 124 | void set_ipv6_enabled(bool enabled) { ipv6_enabled_ = enabled; } |
| 125 | |
guoweis@webrtc.org | 2444d96 | 2015-01-30 00:09:28 +0000 | [diff] [blame] | 126 | void set_max_ipv6_networks(int networks) { max_ipv6_networks_ = networks; } |
| 127 | int max_ipv6_networks() { return max_ipv6_networks_; } |
| 128 | |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 129 | EnumerationPermission enumeration_permission() const override; |
| 130 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 131 | protected: |
| 132 | typedef std::map<std::string, Network*> NetworkMap; |
| 133 | // Updates |networks_| with the networks listed in |list|. If |
| 134 | // |network_map_| already has a Network object for a network listed |
| 135 | // in the |list| then it is reused. Accept ownership of the Network |
| 136 | // objects in the |list|. |changed| will be set to true if there is |
| 137 | // any change in the network list. |
| 138 | void MergeNetworkList(const NetworkList& list, bool* changed); |
| 139 | |
guoweis@webrtc.org | a094cac | 2015-01-28 19:34:05 +0000 | [diff] [blame] | 140 | // |stats| will be populated even if |*changed| is false. |
| 141 | void MergeNetworkList(const NetworkList& list, |
| 142 | bool* changed, |
| 143 | NetworkManager::Stats* stats); |
| 144 | |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 145 | void set_enumeration_permission(EnumerationPermission state) { |
| 146 | enumeration_permission_ = state; |
| 147 | } |
| 148 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 149 | private: |
| 150 | friend class NetworkTest; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 151 | |
Guo-wei Shieh | 47872ec | 2015-08-19 10:32:46 -0700 | [diff] [blame] | 152 | EnumerationPermission enumeration_permission_; |
| 153 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 154 | NetworkList networks_; |
guoweis@webrtc.org | 2444d96 | 2015-01-30 00:09:28 +0000 | [diff] [blame] | 155 | int max_ipv6_networks_; |
| 156 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 157 | NetworkMap networks_map_; |
| 158 | bool ipv6_enabled_; |
guoweis@webrtc.org | f358aea | 2015-02-18 18:44:01 +0000 | [diff] [blame] | 159 | |
| 160 | rtc::scoped_ptr<rtc::Network> ipv4_any_address_network_; |
| 161 | rtc::scoped_ptr<rtc::Network> ipv6_any_address_network_; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | // Basic implementation of the NetworkManager interface that gets list |
| 165 | // of networks using OS APIs. |
| 166 | class BasicNetworkManager : public NetworkManagerBase, |
honghaiz | 023f3ef | 2015-10-19 09:39:32 -0700 | [diff] [blame] | 167 | public MessageHandler, |
| 168 | public sigslot::has_slots<> { |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 169 | public: |
| 170 | BasicNetworkManager(); |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 171 | ~BasicNetworkManager() override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 172 | |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 173 | void StartUpdating() override; |
| 174 | void StopUpdating() override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 175 | |
| 176 | // Logs the available networks. |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 177 | void DumpNetworks(bool include_ignored) override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 178 | |
| 179 | // MessageHandler interface. |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 180 | void OnMessage(Message* msg) override; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 181 | bool started() { return start_count_ > 0; } |
| 182 | |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 183 | // Sets the network ignore list, which is empty by default. Any network on the |
| 184 | // ignore list will be filtered from network enumeration results. |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 185 | void set_network_ignore_list(const std::vector<std::string>& list) { |
| 186 | network_ignore_list_ = list; |
| 187 | } |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 188 | |
| 189 | // Sets the network types to ignore. For instance, calling this with |
| 190 | // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and |
| 191 | // loopback interfaces. Set to kDefaultNetworkIgnoreMask by default. |
| 192 | void set_network_ignore_mask(int network_ignore_mask) { |
| 193 | // TODO(phoglund): implement support for other types than loopback. |
| 194 | // See https://code.google.com/p/webrtc/issues/detail?id=4288. |
| 195 | // Then remove set_network_ignore_list. |
| 196 | network_ignore_mask_ = network_ignore_mask; |
| 197 | } |
| 198 | |
| 199 | int network_ignore_mask() const { return network_ignore_mask_; } |
| 200 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 201 | #if defined(WEBRTC_LINUX) |
| 202 | // Sets the flag for ignoring non-default routes. |
| 203 | void set_ignore_non_default_routes(bool value) { |
| 204 | ignore_non_default_routes_ = true; |
| 205 | } |
| 206 | #endif |
| 207 | |
| 208 | protected: |
| 209 | #if defined(WEBRTC_POSIX) |
| 210 | // Separated from CreateNetworks for tests. |
| 211 | void ConvertIfAddrs(ifaddrs* interfaces, |
| 212 | bool include_ignored, |
| 213 | NetworkList* networks) const; |
| 214 | #endif // defined(WEBRTC_POSIX) |
| 215 | |
| 216 | // Creates a network object for each network available on the machine. |
| 217 | bool CreateNetworks(bool include_ignored, NetworkList* networks) const; |
| 218 | |
guoweis@webrtc.org | b91d0f5 | 2015-03-17 14:43:20 +0000 | [diff] [blame] | 219 | // Determines if a network should be ignored. This should only be determined |
| 220 | // based on the network's property instead of any individual IP. |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 221 | bool IsIgnoredNetwork(const Network& network) const; |
| 222 | |
| 223 | private: |
| 224 | friend class NetworkTest; |
| 225 | |
honghaiz | 023f3ef | 2015-10-19 09:39:32 -0700 | [diff] [blame] | 226 | // Creates a network monitor and listens for network updates. |
| 227 | void StartNetworkMonitor(); |
| 228 | // Stops and removes the network monitor. |
| 229 | void StopNetworkMonitor(); |
| 230 | // Called when it receives updates from the network monitor. |
| 231 | void OnNetworksChanged(); |
| 232 | |
| 233 | // Updates the networks and reschedules the next update. |
| 234 | void UpdateNetworksContinually(); |
| 235 | // Only updates the networks; does not reschedule the next update. |
| 236 | void UpdateNetworksOnce(); |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 237 | |
| 238 | Thread* thread_; |
| 239 | bool sent_first_update_; |
| 240 | int start_count_; |
| 241 | std::vector<std::string> network_ignore_list_; |
phoglund@webrtc.org | 006521d | 2015-02-12 09:23:59 +0000 | [diff] [blame] | 242 | int network_ignore_mask_; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 243 | bool ignore_non_default_routes_; |
honghaiz | 023f3ef | 2015-10-19 09:39:32 -0700 | [diff] [blame] | 244 | scoped_ptr<NetworkMonitorInterface> network_monitor_; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 245 | }; |
| 246 | |
| 247 | // Represents a Unix-type network interface, with a name and single address. |
| 248 | class Network { |
| 249 | public: |
| 250 | Network(const std::string& name, const std::string& description, |
| 251 | const IPAddress& prefix, int prefix_length); |
| 252 | |
| 253 | Network(const std::string& name, const std::string& description, |
| 254 | const IPAddress& prefix, int prefix_length, AdapterType type); |
kwiberg@webrtc.org | 67186fe | 2015-03-09 22:21:53 +0000 | [diff] [blame] | 255 | ~Network(); |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 256 | |
| 257 | // Returns the name of the interface this network is associated wtih. |
| 258 | const std::string& name() const { return name_; } |
| 259 | |
| 260 | // Returns the OS-assigned name for this network. This is useful for |
| 261 | // debugging but should not be sent over the wire (for privacy reasons). |
| 262 | const std::string& description() const { return description_; } |
| 263 | |
| 264 | // Returns the prefix for this network. |
| 265 | const IPAddress& prefix() const { return prefix_; } |
| 266 | // Returns the length, in bits, of this network's prefix. |
| 267 | int prefix_length() const { return prefix_length_; } |
| 268 | |
| 269 | // |key_| has unique value per network interface. Used in sorting network |
| 270 | // interfaces. Key is derived from interface name and it's prefix. |
| 271 | std::string key() const { return key_; } |
| 272 | |
aluebs@webrtc.org | 07dcf60 | 2015-02-27 18:42:22 +0000 | [diff] [blame] | 273 | // Returns the Network's current idea of the 'best' IP it has. |
| 274 | // Or return an unset IP if this network has no active addresses. |
| 275 | // Here is the rule on how we mark the IPv6 address as ignorable for WebRTC. |
| 276 | // 1) return all global temporary dynamic and non-deprecrated ones. |
| 277 | // 2) if #1 not available, return global ones. |
| 278 | // 3) if #2 not available, use ULA ipv6 as last resort. (ULA stands |
| 279 | // for unique local address, which is not route-able in open |
| 280 | // internet but might be useful for a close WebRTC deployment. |
| 281 | |
| 282 | // TODO(guoweis): rule #3 actually won't happen at current |
| 283 | // implementation. The reason being that ULA address starting with |
| 284 | // 0xfc 0r 0xfd will be grouped into its own Network. The result of |
| 285 | // that is WebRTC will have one extra Network to generate candidates |
| 286 | // but the lack of rule #3 shouldn't prevent turning on IPv6 since |
| 287 | // ULA should only be tried in a close deployment anyway. |
| 288 | |
| 289 | // Note that when not specifying any flag, it's treated as case global |
| 290 | // IPv6 address |
guoweis@webrtc.org | 369a637 | 2014-09-17 22:37:29 +0000 | [diff] [blame] | 291 | IPAddress GetBestIP() const; |
| 292 | |
| 293 | // Keep the original function here for now. |
| 294 | // TODO(guoweis): Remove this when all callers are migrated to GetBestIP(). |
| 295 | IPAddress ip() const { return GetBestIP(); } |
guoweis@webrtc.org | fa60398 | 2014-09-09 23:42:40 +0000 | [diff] [blame] | 296 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 297 | // Adds an active IP address to this network. Does not check for duplicates. |
guoweis@webrtc.org | fa60398 | 2014-09-09 23:42:40 +0000 | [diff] [blame] | 298 | void AddIP(const InterfaceAddress& ip) { ips_.push_back(ip); } |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 299 | |
| 300 | // Sets the network's IP address list. Returns true if new IP addresses were |
| 301 | // detected. Passing true to already_changed skips this check. |
guoweis@webrtc.org | fa60398 | 2014-09-09 23:42:40 +0000 | [diff] [blame] | 302 | bool SetIPs(const std::vector<InterfaceAddress>& ips, bool already_changed); |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 303 | // Get the list of IP Addresses associated with this network. |
guoweis@webrtc.org | fa60398 | 2014-09-09 23:42:40 +0000 | [diff] [blame] | 304 | const std::vector<InterfaceAddress>& GetIPs() const { return ips_;} |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 305 | // Clear the network's list of addresses. |
| 306 | void ClearIPs() { ips_.clear(); } |
| 307 | |
| 308 | // Returns the scope-id of the network's address. |
| 309 | // Should only be relevant for link-local IPv6 addresses. |
| 310 | int scope_id() const { return scope_id_; } |
| 311 | void set_scope_id(int id) { scope_id_ = id; } |
| 312 | |
| 313 | // Indicates whether this network should be ignored, perhaps because |
| 314 | // the IP is 0, or the interface is one we know is invalid. |
| 315 | bool ignored() const { return ignored_; } |
| 316 | void set_ignored(bool ignored) { ignored_ = ignored; } |
| 317 | |
| 318 | AdapterType type() const { return type_; } |
| 319 | int preference() const { return preference_; } |
| 320 | void set_preference(int preference) { preference_ = preference; } |
| 321 | |
| 322 | // Debugging description of this network |
| 323 | std::string ToString() const; |
| 324 | |
| 325 | private: |
| 326 | std::string name_; |
| 327 | std::string description_; |
| 328 | IPAddress prefix_; |
| 329 | int prefix_length_; |
| 330 | std::string key_; |
guoweis@webrtc.org | fa60398 | 2014-09-09 23:42:40 +0000 | [diff] [blame] | 331 | std::vector<InterfaceAddress> ips_; |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 332 | int scope_id_; |
| 333 | bool ignored_; |
| 334 | AdapterType type_; |
| 335 | int preference_; |
| 336 | |
| 337 | friend class NetworkManager; |
| 338 | }; |
| 339 | |
| 340 | } // namespace rtc |
| 341 | |
| 342 | #endif // WEBRTC_BASE_NETWORK_H_ |