Home | History | Annotate | Download | only in base

Lines Matching refs:Network

11 #include "webrtc/base/network.h"
64 const Network& network) {
65 return network_manager.IsIgnoredNetwork(network);
151 // Test that the Network ctor works properly.
153 Network ipv4_network1("test_eth0", "Test Network Adapter 1",
156 EXPECT_EQ("Test Network Adapter 1", ipv4_network1.description());
163 Network ipv4_network1("test_eth0", "Test Network Adapter 1",
165 Network ipv4_network2("test_eth1", "Test Network Adapter 2",
174 Network ignore_me("ignore_me", "Ignore me please!",
176 Network include_me("include_me", "Include me please!",
237 // is called, after network update signal is already sent.
258 // Verify that MergeNetworkList() merges network lists properly.
260 Network ipv4_network1("test_eth0", "Test Network Adapter 1",
262 Network ipv4_network2("test_eth1", "Test Network Adapter 2",
270 list.push_back(new Network(ipv4_network1));
281 Network* net1 = list[0];
285 list.push_back(new Network(ipv4_network2));
295 Network* net2 = list[0];
299 list.push_back(new Network(ipv4_network1));
300 list.push_back(new Network(ipv4_network2));
307 // Verify that we get previous instances of Network objects.
316 list.push_back(new Network(ipv4_network2));
317 list.push_back(new Network(ipv4_network1));
324 // Verify that we get previous instances of Network objects.
340 Network ipv6_eth0_linklocalnetwork("test_eth0", "Test NetworkAdapter 1",
344 Network ipv6_eth1_linklocalnetwork("test_eth1", "Test NetworkAdapter 2",
350 Network ipv6_eth0_publicnetwork1_ip1("test_eth0", "Test NetworkAdapter 1",
355 Network ipv6_eth1_publicnetwork1_ip1("test_eth1", "Test NetworkAdapter 1",
358 list->push_back(new Network(ipv6_eth0_linklocalnetwork));
359 list->push_back(new Network(ipv6_eth1_linklocalnetwork));
360 list->push_back(new Network(ipv6_eth0_publicnetwork1_ip1));
361 list->push_back(new Network(ipv6_eth1_publicnetwork1_ip1));
364 // Test that the basic network merging case works.
397 // Make a network with different prefix length.
401 Network* ipv6_network =
402 new Network("test_eth0", "Test Network Adapter 1", prefix, 64 - i);
407 // Add one IPv4 network.
408 Network* ipv4_network = new Network("test_eth0", "Test Network Adapter 1",
419 // List size should be the max allowed IPv6 networks plus one IPv4 network.
422 // Verify that the IPv4 network is in the list.
426 // Tests that when two network lists that describe the same set of networks are
461 // Test that we can merge a network that is the same as another network but with
462 // a different IP. The original network should remain in the list, but have its
470 // Make a network that we're going to change.
474 Network* network_to_change = new Network("test_eth0",
475 "Test Network Adapter 1",
477 Network* changed_network = new Network(*network_to_change);
494 // Make sure the original network is still in the merged list.
500 // Testing a similar case to above, but checking that a network can be updated
514 // Add a second IP to the public network on eth0 (2401:fa00:4:1000/64).
517 Network ipv6_eth0_publicnetwork1_ip2("test_eth0", "Test NetworkAdapter 1",
519 // This is the IP that already existed in the public network on eth0.
522 original_list.push_back(new Network(ipv6_eth0_publicnetwork1_ip2));
537 // This should be the same network object as before.
571 // A second network for eth0.
574 Network ipv6_eth0_publicnetwork2_ip1("test_eth0", "Test NetworkAdapter 1",
577 original_list.push_back(new Network(ipv6_eth0_publicnetwork2_ip1));
590 // Check the new network has 1 IP and that it's the correct one.
624 // There should be at least one IPv6 network (fe80::/64 should be in there).
661 Network ipv4_network1("test_eth0", "Test Network Adapter 1",
669 Network ipv6_eth1_publicnetwork1_ip1("test_eth1", "Test NetworkAdapter 2",
674 list.push_back(new Network(ipv4_network1));
675 list.push_back(new Network(ipv6_eth1_publicnetwork1_ip1));
676 Network* net1 = list[0];
677 Network* net2 = list[1];
682 // After sorting IPv6 network should be higher order than IPv4 networks.
687 Network wifi("wlan0", "Wireless Adapter", IPAddress(0x12345600U), 24,
690 Network ethernet("eth0", "Ethernet", IPAddress(0x12345600U), 24,
693 Network cellular("test_cell", "Cellular Adapter", IPAddress(0x12345600U), 24,
696 Network vpn("bridge_test", "VPN Adapter", IPAddress(0x12345600U), 24,
699 Network unknown("test", "Test Adapter", IPAddress(0x12345600U), 24,
717 // Verify that if there are two addresses on one interface, only one network
755 // 1) Load the dummy network driver:
767 LOG(LS_INFO) << "Looking for dummy network: ";
770 LOG(LS_INFO) << " Network name: " << (*it)->name();
787 LOG(LS_INFO) << " Network name: " << (*it)->name();
798 // prefix/length into a single Network.
809 Network* net1 = new Network("em1", "em1", TruncateIP(ip1, 64), 64);
810 Network* net2 = new Network("em1", "em1", TruncateIP(ip1, 64), 64);
834 // a network becomes inactive and then active again.
837 Network network1("test_wifi", "Test Network Adapter 1",
839 Network network2("test_eth0", "Test Network Adapter 2",
844 Network* net1 = new Network(network1);
855 Network* net2 = new Network(network2);
866 list.push_back(new Network(network1));
876 // Test that the filtering logic follows the defined ruleset in network.h.
884 // Create a network with this prefix.
885 Network
928 // Clear the networks so that there will be network changes below.
930 // Network manager is started, so the callback is called when the network
931 // monitor fires the network-change event.
935 // Network manager is stopped; the network monitor is removed.
953 std::vector<Network*> networks;
955 for (auto& network : networks) {
956 if (network->GetBestIP().family() == AF_INET) {
958 } else if (network->GetBestIP().family() == AF_INET6) {