Home
last modified time | relevance | path

Searched refs:IPAddress (Results 1 – 25 of 76) sorted by relevance

1234

/external/webrtc/webrtc/base/
Dipaddress.h50 class IPAddress {
52 IPAddress() : family_(AF_UNSPEC) { in IPAddress() function
56 explicit IPAddress(const in_addr& ip4) : family_(AF_INET) { in IPAddress() function
61 explicit IPAddress(const in6_addr& ip6) : family_(AF_INET6) { in IPAddress() function
65 explicit IPAddress(uint32_t ip_in_host_byte_order) : family_(AF_INET) { in IPAddress() function
70 IPAddress(const IPAddress& other) : family_(other.family_) { in IPAddress() function
74 virtual ~IPAddress() {} in ~IPAddress()
76 const IPAddress & operator=(const IPAddress& other) {
82 bool operator==(const IPAddress& other) const;
83 bool operator!=(const IPAddress& other) const;
[all …]
Dipaddress.cc49 uint32_t IPAddress::v4AddressAsHostOrderInteger() const { in v4AddressAsHostOrderInteger()
57 bool IPAddress::IsNil() const { in IsNil()
61 size_t IPAddress::Size() const { in Size()
72 bool IPAddress::operator==(const IPAddress &other) const { in operator ==()
85 bool IPAddress::operator!=(const IPAddress &other) const { in operator !=()
89 bool IPAddress::operator >(const IPAddress &other) const { in operator >()
93 bool IPAddress::operator <(const IPAddress &other) const { in operator <()
118 std::ostream& operator<<(std::ostream& os, const IPAddress& ip) { in operator <<()
123 in6_addr IPAddress::ipv6_address() const { in ipv6_address()
127 in_addr IPAddress::ipv4_address() const { in ipv4_address()
[all …]
Dipaddress_unittest.cc105 bool AreEqual(const IPAddress& addr, in AreEqual()
106 const IPAddress& addr2) { in AreEqual()
132 IPAddress addr(0); // Intentionally make it v4. in BrokenIPStringFails()
140 IPAddress addr; in CheckMaskCount()
148 IPAddress addr; in TryInvalidMaskCount()
158 IPAddress addr, expected; in CheckTruncateIP()
161 IPAddress truncated = TruncateIP(addr, truncate_length); in CheckTruncateIP()
166 IPAddress addr; in TEST()
181 IPAddress addr(v4addr); in TEST()
190 addr = IPAddress(v4addr); in TEST()
[all …]
Dsocket_unittest.h62 const IPAddress kIPv4Loopback;
63 const IPAddress kIPv6Loopback;
66 void ConnectInternal(const IPAddress& loopback);
67 void ConnectWithDnsLookupInternal(const IPAddress& loopback,
69 void ConnectFailInternal(const IPAddress& loopback);
71 void ConnectWithDnsLookupFailInternal(const IPAddress& loopback);
72 void ConnectWithClosedSocketInternal(const IPAddress& loopback);
73 void ConnectWhileNotClosedInternal(const IPAddress& loopback);
74 void ServerCloseDuringConnectInternal(const IPAddress& loopback);
75 void ClientCloseDuringConnectInternal(const IPAddress& loopback);
[all …]
Dsocketaddress_unittest.cc39 EXPECT_EQ(IPAddress(), addr.ipaddr()); in TEST()
45 SocketAddress addr(IPAddress(0x01020304), 5678); in TEST()
47 EXPECT_EQ(IPAddress(0x01020304U), addr.ipaddr()); in TEST()
56 EXPECT_EQ(IPAddress(0x01020304U), addr.ipaddr()); in TEST()
64 IPAddress tocheck(kTestV6Addr); in TEST()
77 EXPECT_EQ(IPAddress(0xFFFFFFFFU), addr.ipaddr()); in TEST()
86 EXPECT_EQ(IPAddress(), addr.ipaddr()); in TEST()
96 EXPECT_EQ(IPAddress(0x01020304U), addr.ipaddr()); in TEST()
104 SocketAddress addr(IPAddress(0x88888888), 9999); in TEST()
107 EXPECT_EQ(IPAddress(0x01020304U), addr.ipaddr()); in TEST()
[all …]
Dnetwork_unittest.cc105 IPAddress ip; in CreateIpv6Addr()
154 IPAddress(0x12345600U), 24); in TEST_F()
157 EXPECT_EQ(IPAddress(0x12345600U), ipv4_network1.prefix()); in TEST_F()
164 IPAddress(0x12345600U), 24, ADAPTER_TYPE_ETHERNET); in TEST_F()
166 IPAddress(0x010000U), 24, ADAPTER_TYPE_ETHERNET); in TEST_F()
175 IPAddress(0x12345600U), 24); in TEST_F()
177 IPAddress(0x12345600U), 24); in TEST_F()
199 IPAddress ip = (*it)->GetBestIP(); in TEST_F()
261 IPAddress(0x12345600U), 24); in TEST_F()
263 IPAddress(0x00010000U), 16); in TEST_F()
[all …]
Dnetwork.h55 std::string MakeNetworkKey(const std::string& name, const IPAddress& prefix,
64 virtual bool GetDefaultLocalAddress(int family, IPAddress* ipaddr) const = 0;
117 bool GetDefaultLocalAddress(int family, IPAddress* ipaddr) const override;
145 bool GetDefaultLocalAddress(int family, IPAddress* ipaddr) const override;
165 void set_default_local_addresses(const IPAddress& ipv4,
166 const IPAddress& ipv6);
182 IPAddress default_local_ipv4_address_;
183 IPAddress default_local_ipv6_address_;
236 IPAddress QueryDefaultLocalAddress(int family) const;
266 const IPAddress& prefix,
[all …]
Dnetwork.cc87 IPAddress ip_a = a->GetBestIP(); in SortNetworks()
88 IPAddress ip_b = b->GetBestIP(); in SortNetworks()
157 std::string MakeNetworkKey(const std::string& name, const IPAddress& prefix, in MakeNetworkKey()
175 bool NetworkManager::GetDefaultLocalAddress(int family, IPAddress* addr) const { in GetDefaultLocalAddress()
198 const rtc::IPAddress ipv4_any_address(INADDR_ANY); in GetAnyAddressNetworks()
208 const rtc::IPAddress ipv6_any_address(in6addr_any); in GetAnyAddressNetworks()
346 void NetworkManagerBase::set_default_local_addresses(const IPAddress& ipv4, in set_default_local_addresses()
347 const IPAddress& ipv6) { in set_default_local_addresses()
357 IPAddress* ipaddr) const { in GetDefaultLocalAddress()
399 IPAddress prefix; in ConvertIfAddrs()
[all …]
Dsocketaddress.cc51 SetIP(IPAddress(ip_as_host_order_integer)); in SocketAddress()
55 SocketAddress::SocketAddress(const IPAddress& ip, int port) { in SocketAddress()
67 ip_ = IPAddress(); in Clear()
92 ip_ = IPAddress(ip_as_host_order_integer); in SetIP()
96 void SocketAddress::SetIP(const IPAddress& ip) { in SetIP()
107 ip_ = IPAddress(); in SetIP()
113 ip_ = IPAddress(ip_as_host_order_integer); in SetResolvedIP()
117 void SocketAddress::SetResolvedIP(const IPAddress& ip) { in SetResolvedIP()
131 const IPAddress& SocketAddress::ipaddr() const { in ipaddr()
282 IPAddress ip, in ToSockAddrStorageHelper()
[all …]
Dwin32_unittest.cc44 WinPing::PingResult result = ping.Ping(IPAddress(INADDR_LOOPBACK), 20, 50, 1, in TEST_F()
48 WinPing::PingResult v6result = ping.Ping(IPAddress(in6addr_loopback), 20, in TEST_F()
55 IPAddress(INADDR_LOOPBACK), 0, 50, 1, false)); in TEST_F()
57 IPAddress(INADDR_LOOPBACK), 20, 0, 1, false)); in TEST_F()
59 IPAddress(INADDR_LOOPBACK), 20, 50, 0, false)); in TEST_F()
63 IPAddress ipv6; in TEST_F()
Difaddrs_converter.cc22 IPAddress* mask) { in ConvertIfAddrsToIPAddress()
25 *ip = IPAddress( in ConvertIfAddrsToIPAddress()
27 *mask = IPAddress( in ConvertIfAddrsToIPAddress()
39 *mask = IPAddress( in ConvertIfAddrsToIPAddress()
Dsocketaddress.h42 SocketAddress(const IPAddress& ip, int port);
64 void SetIP(const IPAddress& ip);
77 void SetResolvedIP(const IPAddress& ip);
89 const IPAddress& ipaddr() const;
181 IPAddress ip_;
Dsocket_unittest.cc184 bool IsUnspecOrEmptyIP(const IPAddress& address) { in IsUnspecOrEmptyIP()
192 void SocketTest::ConnectInternal(const IPAddress& loopback) { in ConnectInternal()
246 void SocketTest::ConnectWithDnsLookupInternal(const IPAddress& loopback, in ConnectWithDnsLookupInternal()
295 void SocketTest::ConnectFailInternal(const IPAddress& loopback) { in ConnectFailInternal()
325 EXPECT_EQ(IPAddress(), accept_addr.ipaddr()); in ConnectFailInternal()
328 void SocketTest::ConnectWithDnsLookupFailInternal(const IPAddress& loopback) { in ConnectWithDnsLookupFailInternal()
369 void SocketTest::ConnectWithClosedSocketInternal(const IPAddress& loopback) { in ConnectWithClosedSocketInternal()
387 void SocketTest::ConnectWhileNotClosedInternal(const IPAddress& loopback) { in ConnectWhileNotClosedInternal()
430 void SocketTest::ServerCloseDuringConnectInternal(const IPAddress& loopback) { in ServerCloseDuringConnectInternal()
458 void SocketTest::ClientCloseDuringConnectInternal(const IPAddress& loopback) { in ClientCloseDuringConnectInternal()
[all …]
Dfakenetwork.h101 IPAddress prefix = TruncateIP(it->first.ipaddr(), prefix_length); in DoUpdateNetworks()
123 IPAddress default_local_ipv4_address_;
124 IPAddress default_local_ipv6_address_;
Dvirtualsocketserver.h43 IPAddress GetDefaultRoute(int family);
44 void SetDefaultRoute(const IPAddress& from_addr);
126 IPAddress GetNextIP(int family);
236 IPAddress default_route_v4_;
237 IPAddress default_route_v6_;
/external/bcc/tests/python/
Dtest_xlate1.py5 from netaddr import IPAddress
42 key1 = self.xlate.Key(IPAddress("172.16.1.2").value, IPAddress("172.16.1.1").value)
43 … leaf1 = self.xlate.Leaf(IPAddress("192.168.1.2").value, IPAddress("192.168.1.1").value, 0, 0)
45 key2 = self.xlate.Key(IPAddress("192.168.1.1").value, IPAddress("192.168.1.2").value)
46 leaf2 = self.xlate.Leaf(IPAddress("172.16.1.1").value, IPAddress("172.16.1.2").value, 0, 0)
Dtest_lpm_trie.py8 from netaddr import IPAddress
55 k1 = KeyV6(64, IPAddress('2a00:1450:4001:814:200e::').words)
59 k2 = KeyV6(96, IPAddress('2a00:1450:4001:814::200e').words)
63 k = KeyV6(128, IPAddress('2a00:1450:4001:814::1024').words)
66 k = KeyV6(128, IPAddress('2a00:1450:4001:814:2046::').words)
70 k = KeyV6(128, IPAddress('2a00:ffff::').words)
Dtest_stat1.py9 from netaddr import IPAddress
43 key = self.stats.Key(IPAddress("172.16.1.2").value, IPAddress("172.16.1.1").value)
/external/bcc/examples/networking/tunnel_monitor/
Dmonitor.py8 from netaddr import IPAddress
40 "outer_sip": str(IPAddress(k.outer_sip)),
41 "outer_dip": str(IPAddress(k.outer_dip)),
42 "inner_sip": str(IPAddress(k.inner_sip)),
43 "inner_dip": str(IPAddress(k.inner_dip)),
52 return "%s,%s,%d,%s,%s" % (IPAddress(k.outer_sip), IPAddress(k.outer_dip), k.vni,
53 IPAddress(k.inner_sip), IPAddress(k.inner_dip))
/external/webrtc/webrtc/p2p/client/
Dportallocator_unittest.cc35 using rtc::IPAddress;
265 const rtc::IPAddress& host_candidate_addr, in CheckDisableAdapterEnumeration()
266 const rtc::IPAddress& stun_candidate_addr, in CheckDisableAdapterEnumeration()
267 const rtc::IPAddress& relay_candidate_udp_transport_addr, in CheckDisableAdapterEnumeration()
268 const rtc::IPAddress& relay_candidate_tcp_transport_addr) { in CheckDisableAdapterEnumeration()
270 rtc::IPAddress()); in CheckDisableAdapterEnumeration()
292 rtc::IPAddress related_address = host_candidate_addr; in CheckDisableAdapterEnumeration()
411 AddInterface(SocketAddress(IPAddress(0x12345600U), 0), "test_eth0", in TEST_F()
413 AddInterface(SocketAddress(IPAddress(0x12345601U), 0), "test_wlan0", in TEST_F()
415 AddInterface(SocketAddress(IPAddress(0x12345602U), 0), "test_cell0", in TEST_F()
[all …]
Dfakeportallocator.h32 const rtc::IPAddress& ip, in Create()
62 const rtc::IPAddress& ip, in TestUDPPort()
96 rtc::IPAddress(INADDR_LOOPBACK), 8), in FakePortAllocatorSession()
99 network_.AddIP(rtc::IPAddress(INADDR_LOOPBACK)); in FakePortAllocatorSession()
/external/webrtc/webrtc/p2p/base/
Dstun_unittest.cc43 rtc::IPAddress expected_address) { in CheckStunAddressAttribute()
535 rtc::IPAddress test_address(kIPv4TestAddress1); in TEST_F()
549 rtc::IPAddress test_address(kIPv4TestAddress1); in TEST_F()
560 rtc::IPAddress test_address(kIPv6TestAddress1); in TEST_F()
573 rtc::IPAddress test_address(kIPv6TestAddress1); in TEST_F()
584 rtc::IPAddress test_address(kIPv6TestAddress1); in TEST_F()
713 rtc::IPAddress test_address(kIPv4TestAddress1); in TEST_F()
723 rtc::IPAddress test_address(kIPv6TestAddress1); in TEST_F()
770 rtc::IPAddress test_address(kIPv4TestAddress1); in TEST_F()
809 rtc::IPAddress test_ip(kIPv6TestAddress2); in TEST_F()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/x509/
DGeneralName.java18 import org.bouncycastle.util.IPAddress;
266 if (IPAddress.isValidIPv6WithNetmask(ip) || IPAddress.isValidIPv6(ip)) in toGeneralNameEncoding()
297 else if (IPAddress.isValidIPv4WithNetmask(ip) || IPAddress.isValidIPv4(ip)) in toGeneralNameEncoding()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/x509/
DGeneralName.java19 import com.android.org.bouncycastle.util.IPAddress;
275 if (IPAddress.isValidIPv6WithNetmask(ip) || IPAddress.isValidIPv6(ip)) in toGeneralNameEncoding()
306 else if (IPAddress.isValidIPv4WithNetmask(ip) || IPAddress.isValidIPv4(ip)) in toGeneralNameEncoding()
/external/bcc/examples/networking/distributed_bridge/
Dtunnel.py11 from netaddr import EUI, IPAddress
30 mcast = IPAddress("239.1.1.1")
76 print(EUI(k.mac), k.ifindex, IPAddress(v.remote_ipv4),

1234