Lines Matching refs:IPAddress

94     const std::vector<OperatorExpectation<IPAddress>> kExpectations{  in TEST()
95 {EQ, IPAddress(), IPAddress()}, in TEST()
96 {EQ, IPAddress(IPV4_ONES), IPAddress(IPV4_ONES)}, in TEST()
97 {EQ, IPAddress(IPV6_ONES), IPAddress(IPV6_ONES)}, in TEST()
98 {EQ, IPAddress(FE80_1), IPAddress(FE80_1)}, in TEST()
99 {EQ, IPAddress(FE80_2), IPAddress(FE80_2)}, in TEST()
100 {LT, IPAddress(), IPAddress(IPV4_ANY)}, in TEST()
101 {LT, IPAddress(), IPAddress(IPV4_ONES)}, in TEST()
102 {LT, IPAddress(), IPAddress(IPV6_ANY)}, in TEST()
103 {LT, IPAddress(), IPAddress(IPV6_ONES)}, in TEST()
104 {LT, IPAddress(IPV4_ANY), IPAddress(IPV4_ONES)}, in TEST()
105 {LT, IPAddress(IPV4_ANY), IPAddress(IPV6_ANY)}, in TEST()
106 {LT, IPAddress(IPV4_ONES), IPAddress(IPV6_ANY)}, in TEST()
107 {LT, IPAddress(IPV4_ONES), IPAddress(IPV6_ONES)}, in TEST()
108 {LT, IPAddress(IPV6_ANY), IPAddress(IPV6_LOOPBACK)}, in TEST()
109 {LT, IPAddress(IPV6_ANY), IPAddress(IPV6_ONES)}, in TEST()
110 {LT, IPAddress(IPV6_LOOPBACK), IPAddress(IPV6_ONES)}, in TEST()
111 {LT, IPAddress(FE80_1), IPAddress(FE80_2)}, in TEST()
112 {LT, IPAddress(FE80_1), IPAddress(IPV6_ONES)}, in TEST()
113 {LT, IPAddress(FE80_2), IPAddress(IPV6_ONES)}, in TEST()
115 {LT, IPAddress(FE80_1), IPAddress(FE80_1, 1)}, in TEST()
116 {LT, IPAddress(FE80_1, 1), IPAddress(FE80_1, 2)}, in TEST()
118 {LT, IPAddress(FE80_1, 2), IPAddress(FE80_2, 1)}, in TEST()
132 const IPAddress ones(IPV4_ONES); in TEST()
134 const IPAddress ones22(ones, 22); in TEST()
137 const IPAddress ones23(ones, 23); in TEST()
141 EXPECT_EQ("fe80::1%22", IPAddress(FE80_1, 22).toString()); in TEST()
142 EXPECT_EQ("fe80::2%23", IPAddress(FE80_2, 23).toString()); in TEST()
146 const IPAddress fe80_intf22(FE80_1, 22); in TEST()
148 EXPECT_EQ(fe80_intf22, IPAddress(fe80_intf22)); in TEST()
149 EXPECT_EQ(IPAddress(FE80_1), IPAddress(fe80_intf22, 0)); in TEST()
153 IPAddress ip; in TEST()
155 EXPECT_FALSE(IPAddress::forString("not_an_ip", &ip)); in TEST()
156 EXPECT_FALSE(IPAddress::forString("not_an_ip", nullptr)); in TEST()
157 EXPECT_EQ(IPAddress(), IPAddress::forString("not_an_ip")); in TEST()
159 EXPECT_EQ(IPAddress(IPV4_ANY), IPAddress::forString("0.0.0.0")); in TEST()
160 EXPECT_EQ(IPAddress(IPV4_ONES), IPAddress::forString("255.255.255.255")); in TEST()
161 EXPECT_EQ(IPAddress(IPV4_LOOPBACK), IPAddress::forString("127.0.0.1")); in TEST()
163 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("::")); in TEST()
164 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("::0")); in TEST()
165 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("0::")); in TEST()
166 EXPECT_EQ(IPAddress(IPV6_LOOPBACK), IPAddress::forString("::1")); in TEST()
167 EXPECT_EQ(IPAddress(IPV6_LOOPBACK), IPAddress::forString("0::1")); in TEST()
168 EXPECT_EQ(IPAddress(FE80_1), IPAddress::forString("fe80::1")); in TEST()
169 EXPECT_EQ(IPAddress(FE80_1, 22), IPAddress::forString("fe80::1%22")); in TEST()
171 EXPECT_EQ(IPAddress(FE80_1, 1), IPAddress::forString("fe80::1%lo")); in TEST()
200 EXPECT_EQ(IPPrefix(IPAddress::forString("2001:db8::"), 32), prefix); in TEST()
213 return IPPrefix(IPAddress(IPV4_ONES), length).toString(); in TEST()
257 return IPPrefix(IPAddress(IPV6_ONES), length).toString(); in TEST()
424 IPAddress ip; in TEST()
425 EXPECT_TRUE(IPAddress::forString(expectation.ip, &ip)) in TEST()
428 IPAddress ipTruncated; in TEST()
429 EXPECT_TRUE(IPAddress::forString(expectation.ipTruncated, &ipTruncated)) in TEST()
444 {EQ, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV4_ANY), 0)}, in TEST()
445 {EQ, IPPrefix(IPAddress(IPV4_ANY), IPV4_ADDR_BITS), IPPrefix(IPAddress(IPV4_ANY))}, in TEST()
446 {EQ, IPPrefix(IPAddress(IPV6_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
447 {EQ, IPPrefix(IPAddress(IPV6_ANY), IPV6_ADDR_BITS), IPPrefix(IPAddress(IPV6_ANY))}, in TEST()
449 {EQ, IPPrefix(IPAddress(FE80_1)), IPPrefix(IPAddress(FE80_1, 0), IPV6_ADDR_BITS)}, in TEST()
451 {EQ, IPPrefix(IPAddress(FE80_1), 64), IPPrefix(IPAddress(FE80_2), 64)}, in TEST()
453 {EQ, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_2, 17), 64)}, in TEST()
455 {LT, IPPrefix(), IPPrefix(IPAddress(IPV4_ANY), 0)}, in TEST()
457 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV4_ANY), 1)}, in TEST()
458 {LT, IPPrefix(IPAddress(IPV4_ANY), 1), IPPrefix(IPAddress(IPV4_ANY), IPV4_ADDR_BITS)}, in TEST()
460 {LT, IPPrefix(IPAddress(IPV4_ONES), 0), IPPrefix(IPAddress(IPV4_ONES), 1)}, in TEST()
461 {LT, IPPrefix(IPAddress(IPV4_ONES), 1), IPPrefix(IPAddress(IPV4_ONES), IPV4_ADDR_BITS)}, in TEST()
463 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
464 {LT, IPPrefix(IPAddress(IPV4_ANY), 1), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
465 {LT, IPPrefix(IPAddress(IPV4_ANY), 24), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
467 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
468 {LT, IPPrefix(IPAddress(IPV4_ONES)), IPPrefix(IPAddress(IPV6_ANY))}, in TEST()
470 {LT, IPPrefix(), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
472 {LT, IPPrefix(IPAddress(IPV6_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 1)}, in TEST()
473 {LT, IPPrefix(IPAddress(IPV6_ANY), 1), IPPrefix(IPAddress(IPV6_ANY), IPV6_ADDR_BITS)}, in TEST()
475 {LT, IPPrefix(IPAddress(IPV6_ONES), 0), IPPrefix(IPAddress(IPV6_ONES), 1)}, in TEST()
476 {LT, IPPrefix(IPAddress(IPV6_ONES), 1), IPPrefix(IPAddress(IPV6_ONES), IPV6_ADDR_BITS)}, in TEST()
478 {LT, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_2, 22), 64)}, in TEST()
479 {LT, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_1, 18), 64)}, in TEST()
480 {LT, IPPrefix(IPAddress(FE80_1, 18), 64), IPPrefix(IPAddress(FE80_1, 19), 64)}, in TEST()
495 {EQ, IPSockAddr(IPAddress(IPV4_ANY)), IPSockAddr(IPAddress(IPV4_ANY), 0)}, in TEST()
496 {EQ, IPSockAddr(IPAddress(IPV6_ANY)), IPSockAddr(IPAddress(IPV6_ANY), 0)}, in TEST()
497 {EQ, IPSockAddr(IPAddress(FE80_1), 80), IPSockAddr(IPAddress(FE80_1), 80)}, in TEST()
498 {EQ, IPSockAddr(IPAddress(FE80_1, 17)), IPSockAddr(IPAddress(FE80_1, 17), 0)}, in TEST()
499 {LT, IPSockAddr(IPAddress(IPV4_ANY), 0), IPSockAddr(IPAddress(IPV4_ANY), 1)}, in TEST()
500 {LT, IPSockAddr(IPAddress(IPV4_ANY), 53), IPSockAddr(IPAddress(IPV4_ANY), 123)}, in TEST()
501 {LT, IPSockAddr(IPAddress(IPV4_ONES), 123), IPSockAddr(IPAddress(IPV6_ANY), 53)}, in TEST()
502 {LT, IPSockAddr(IPAddress(IPV6_ANY), 0), IPSockAddr(IPAddress(IPV6_ANY), 1)}, in TEST()
503 {LT, IPSockAddr(IPAddress(IPV6_ANY), 53), IPSockAddr(IPAddress(IPV6_ANY), 123)}, in TEST()
504 {LT, IPSockAddr(IPAddress(FE80_1), 80), IPSockAddr(IPAddress(FE80_1, 17), 80)}, in TEST()
505 {LT, IPSockAddr(IPAddress(FE80_1, 17), 80), IPSockAddr(IPAddress(FE80_1, 22), 80)}, in TEST()
519 EXPECT_EQ("0.0.0.0:0", IPSockAddr(IPAddress(IPV4_ANY)).toString()); in TEST()
520 EXPECT_EQ("255.255.255.255:67", IPSockAddr(IPAddress(IPV4_ONES), 67).toString()); in TEST()
521 EXPECT_EQ("[::]:0", IPSockAddr(IPAddress(IPV6_ANY)).toString()); in TEST()
522 EXPECT_EQ("[::1]:53", IPSockAddr(IPAddress(IPV6_LOOPBACK), 53).toString()); in TEST()
523 EXPECT_EQ("[fe80::1]:0", IPSockAddr(IPAddress(FE80_1)).toString()); in TEST()
524 EXPECT_EQ("[fe80::2%17]:123", IPSockAddr(IPAddress(FE80_2, 17), 123).toString()); in TEST()
529 const IPSockAddr linkLocalNtpSockaddr(IPAddress(FE80_2, idx), 123); in TEST()
530 EXPECT_EQ(IPAddress(FE80_2, idx), linkLocalNtpSockaddr.ip()); in TEST()
534 EXPECT_EQ(IPAddress(FE80, idx), linkLocalPrefix.ip()); in TEST()