• Home
  • Raw
  • Download

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()
176 return IPPrefix(IPAddress(IPV4_ONES), length).toString(); in TEST()
220 return IPPrefix(IPAddress(IPV6_ONES), length).toString(); in TEST()
387 IPAddress ip; in TEST()
388 EXPECT_TRUE(IPAddress::forString(expectation.ip, &ip)) in TEST()
391 IPAddress ipTruncated; in TEST()
392 EXPECT_TRUE(IPAddress::forString(expectation.ipTruncated, &ipTruncated)) in TEST()
407 {EQ, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV4_ANY), 0)}, in TEST()
408 {EQ, IPPrefix(IPAddress(IPV4_ANY), IPV4_ADDR_BITS), IPPrefix(IPAddress(IPV4_ANY))}, in TEST()
409 {EQ, IPPrefix(IPAddress(IPV6_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
410 {EQ, IPPrefix(IPAddress(IPV6_ANY), IPV6_ADDR_BITS), IPPrefix(IPAddress(IPV6_ANY))}, in TEST()
412 {EQ, IPPrefix(IPAddress(FE80_1)), IPPrefix(IPAddress(FE80_1, 0), IPV6_ADDR_BITS)}, in TEST()
414 {EQ, IPPrefix(IPAddress(FE80_1), 64), IPPrefix(IPAddress(FE80_2), 64)}, in TEST()
416 {EQ, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_2, 17), 64)}, in TEST()
418 {LT, IPPrefix(), IPPrefix(IPAddress(IPV4_ANY), 0)}, in TEST()
420 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV4_ANY), 1)}, in TEST()
421 {LT, IPPrefix(IPAddress(IPV4_ANY), 1), IPPrefix(IPAddress(IPV4_ANY), IPV4_ADDR_BITS)}, in TEST()
423 {LT, IPPrefix(IPAddress(IPV4_ONES), 0), IPPrefix(IPAddress(IPV4_ONES), 1)}, in TEST()
424 {LT, IPPrefix(IPAddress(IPV4_ONES), 1), IPPrefix(IPAddress(IPV4_ONES), IPV4_ADDR_BITS)}, in TEST()
426 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
427 {LT, IPPrefix(IPAddress(IPV4_ANY), 1), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
428 {LT, IPPrefix(IPAddress(IPV4_ANY), 24), IPPrefix(IPAddress::forString("0.0.0.1"))}, in TEST()
430 {LT, IPPrefix(IPAddress(IPV4_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
431 {LT, IPPrefix(IPAddress(IPV4_ONES)), IPPrefix(IPAddress(IPV6_ANY))}, in TEST()
433 {LT, IPPrefix(), IPPrefix(IPAddress(IPV6_ANY), 0)}, in TEST()
435 {LT, IPPrefix(IPAddress(IPV6_ANY), 0), IPPrefix(IPAddress(IPV6_ANY), 1)}, in TEST()
436 {LT, IPPrefix(IPAddress(IPV6_ANY), 1), IPPrefix(IPAddress(IPV6_ANY), IPV6_ADDR_BITS)}, in TEST()
438 {LT, IPPrefix(IPAddress(IPV6_ONES), 0), IPPrefix(IPAddress(IPV6_ONES), 1)}, in TEST()
439 {LT, IPPrefix(IPAddress(IPV6_ONES), 1), IPPrefix(IPAddress(IPV6_ONES), IPV6_ADDR_BITS)}, in TEST()
441 {LT, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_2, 22), 64)}, in TEST()
442 {LT, IPPrefix(IPAddress(FE80_1, 17), 64), IPPrefix(IPAddress(FE80_1, 18), 64)}, in TEST()
443 {LT, IPPrefix(IPAddress(FE80_1, 18), 64), IPPrefix(IPAddress(FE80_1, 19), 64)}, in TEST()
458 {EQ, IPSockAddr(IPAddress(IPV4_ANY)), IPSockAddr(IPAddress(IPV4_ANY), 0)}, in TEST()
459 {EQ, IPSockAddr(IPAddress(IPV6_ANY)), IPSockAddr(IPAddress(IPV6_ANY), 0)}, in TEST()
460 {EQ, IPSockAddr(IPAddress(FE80_1), 80), IPSockAddr(IPAddress(FE80_1), 80)}, in TEST()
461 {EQ, IPSockAddr(IPAddress(FE80_1, 17)), IPSockAddr(IPAddress(FE80_1, 17), 0)}, in TEST()
462 {LT, IPSockAddr(IPAddress(IPV4_ANY), 0), IPSockAddr(IPAddress(IPV4_ANY), 1)}, in TEST()
463 {LT, IPSockAddr(IPAddress(IPV4_ANY), 53), IPSockAddr(IPAddress(IPV4_ANY), 123)}, in TEST()
464 {LT, IPSockAddr(IPAddress(IPV4_ONES), 123), IPSockAddr(IPAddress(IPV6_ANY), 53)}, in TEST()
465 {LT, IPSockAddr(IPAddress(IPV6_ANY), 0), IPSockAddr(IPAddress(IPV6_ANY), 1)}, in TEST()
466 {LT, IPSockAddr(IPAddress(IPV6_ANY), 53), IPSockAddr(IPAddress(IPV6_ANY), 123)}, in TEST()
467 {LT, IPSockAddr(IPAddress(FE80_1), 80), IPSockAddr(IPAddress(FE80_1, 17), 80)}, in TEST()
468 {LT, IPSockAddr(IPAddress(FE80_1, 17), 80), IPSockAddr(IPAddress(FE80_1, 22), 80)}, in TEST()
482 EXPECT_EQ("0.0.0.0:0", IPSockAddr(IPAddress(IPV4_ANY)).toString()); in TEST()
483 EXPECT_EQ("255.255.255.255:67", IPSockAddr(IPAddress(IPV4_ONES), 67).toString()); in TEST()
484 EXPECT_EQ("[::]:0", IPSockAddr(IPAddress(IPV6_ANY)).toString()); in TEST()
485 EXPECT_EQ("[::1]:53", IPSockAddr(IPAddress(IPV6_LOOPBACK), 53).toString()); in TEST()
486 EXPECT_EQ("[fe80::1]:0", IPSockAddr(IPAddress(FE80_1)).toString()); in TEST()
487 EXPECT_EQ("[fe80::2%17]:123", IPSockAddr(IPAddress(FE80_2, 17), 123).toString()); in TEST()
492 const IPSockAddr linkLocalNtpSockaddr(IPAddress(FE80_2, idx), 123); in TEST()
493 EXPECT_EQ(IPAddress(FE80_2, idx), linkLocalNtpSockaddr.ip()); in TEST()
497 EXPECT_EQ(IPAddress(FE80, idx), linkLocalPrefix.ip()); in TEST()