Lines Matching +full:- +full:- +full:network
4 * Use of this source code is governed by a BSD-style license
49 class Network; variable
57 bool CompareNetworks(const std::unique_ptr<Network>& a,
58 const std::unique_ptr<Network>& b);
61 // Makes a string key for this network. Used in the network manager's maps.
62 // Network objects are keyed on interface name, network prefix and the
77 // The default local address is the local address used in multi-homed endpoint
94 // Network/mask in CIDR representation.
109 // Length of valid bits in address_ (for ipv4 valid range is 0-32)
113 // Generic network manager interface. It provides list of local
127 ENUMERATION_ALLOWED, // Adapter enumeration is allowed. Getting 0 network
128 // from GetNetworks means that there is no network
134 // Called when network list is updated.
137 // Indicates a failure when getting list of network interfaces.
144 // Start/Stop monitoring of network interfaces
154 // given network, so that quality is tracked appropriately. Does not
156 // The returned vector of Network* is valid as long as the NetworkManager is
158 virtual std::vector<const Network*> GetNetworks() const = 0;
163 // "AnyAddressNetwork" is a network which only contains single "any address"
170 virtual std::vector<const Network*> GetAnyAddressNetworks() = 0;
172 // Dumps the current list of networks in the network manager.
196 std::vector<const Network*> GetNetworks() const override;
197 std::vector<const Network*> GetAnyAddressNetworks() override;
203 // Check if MAC address in |bytes| is one of the pre-defined
209 // `networks_map_` already has a Network object for a network listed
210 // in the `list` then it is reused. Accept ownership of the Network
212 // any change in the network list.
213 void MergeNetworkList(std::vector<std::unique_ptr<Network>> list,
217 void MergeNetworkList(std::vector<std::unique_ptr<Network>> list,
228 Network* GetNetworkFromAddress(const rtc::IPAddress& ip) const;
232 const std::vector<Network*>& GetNetworksInternal() const { return networks_; } in GetNetworksInternal()
234 std::unique_ptr<Network> CreateNetwork(absl::string_view name,
251 std::vector<Network*> networks_;
253 std::map<std::string, std::unique_ptr<Network>> networks_map_;
255 std::unique_ptr<rtc::Network> ipv4_any_address_network_;
256 std::unique_ptr<rtc::Network> ipv6_any_address_network_;
260 // We use 16 bits to save the bandwidth consumption when sending the network
261 // id over the Internet. It is OK that the 16-bit integer overflows to get a
262 // network id 0 because we only compare the network ids in the old and the new
296 // Sets the network ignore list, which is empty by default. Any network on the
297 // ignore list will be filtered from network enumeration results.
325 std::vector<std::unique_ptr<Network>>* networks) const
331 // Creates a network object for each network available on the machine.
333 std::vector<std::unique_ptr<Network>>* networks) const
336 // Determines if a network should be ignored. This should only be determined
337 // based on the network's property instead of any individual IP.
338 bool IsIgnoredNetwork(const Network& network) const RTC_RUN_ON(thread_);
342 // internally, it returns the default local address on a multi-homed endpoint.
348 // Creates a network monitor and listens for network updates.
350 // Stops and removes the network monitor.
352 // Called when it receives updates from the network monitor.
376 // Represents a Unix-type network interface, with a name and single address.
377 class RTC_EXPORT Network {
379 Network(absl::string_view name,
384 : Network(name, in Network() function
391 Network(absl::string_view name,
398 Network(const Network&);
399 ~Network();
402 // Mutable, to support connecting on the const Network passed to cricket::Port
404 mutable sigslot::signal1<const Network*> SignalTypeChanged;
406 // This signal is fired whenever network preference changes.
407 sigslot::signal1<const Network*> SignalNetworkPreferenceChanged;
421 // Returns the name of the interface this network is associated with.
424 // Returns the OS-assigned name for this network. This is useful for
428 // Returns the prefix for this network.
430 // Returns the length, in bits, of this network's prefix.
433 // Returns the family for the network prefix.
436 // `key_` has unique value per network interface. Used in sorting network
440 // Returns the Network's current idea of the 'best' IP it has.
441 // Or return an unset IP if this network has no active addresses.
443 // 1) return all global temporary dynamic and non-deprecated ones.
445 // 3) if #2 not available and WebRTC-IPv6NetworkResolutionFixes enabled,
448 // unique local address, which is not route-able in open internet but might
453 // 0xfc 0r 0xfd will be grouped into its own Network. The result of
454 // that is WebRTC will have one extra Network to generate candidates
462 // Adds an active IP address to this network. Does not check for duplicates.
466 // Sets the network's IP address list. Returns true if new IP addresses were
469 // Get the list of IP Addresses associated with this network.
471 // Clear the network's list of addresses.
475 // name-address mapping is created by the mDNS responder, queries for the
479 // Returns the scope-id of the network's address.
480 // Should only be relevant for link-local IPv6 addresses.
484 // Indicates whether this network should be ignored, perhaps because
491 // network interface used by the VPN, typically the preferred network type
492 // (see for example, the method setUnderlyingNetworks(android.net.Network[])
536 // Twice per Network in BasicPortAllocator if
544 // A unique id assigned by the network manager, which may be signaled
552 // When we enumerate networks and find a previously-seen network is missing,
554 // it inactive, so that we can detect network changes properly.
576 // Debugging description of this network