Lines Matching refs:addr2
110 const IPAddress& addr2) {
111 if ((IPIsAny(addr) != IPIsAny(addr2)) ||
112 (IPIsLoopback(addr) != IPIsLoopback(addr2)) ||
113 (IPIsPrivate(addr) != IPIsPrivate(addr2)) ||
114 (HashIP(addr) != HashIP(addr2)) ||
115 (addr.Size() != addr2.Size()) ||
116 (addr.family() != addr2.family()) ||
117 (addr.ToString() != addr2.ToString())) {
122 v4addr2 = addr2.ipv4_address();
128 v6addr2 = addr2.ipv6_address();
292 IPAddress addr2(addr);
294 EXPECT_PRED2(AreEqual, addr, addr2);
297 addr2 = IPAddress(addr);
298 EXPECT_PRED2(AreEqual, addr, addr2);
301 addr2 = IPAddress(addr);
302 EXPECT_PRED2(AreEqual, addr, addr2);
305 addr2 = IPAddress(addr);
306 EXPECT_PRED2(AreEqual, addr, addr2);
309 addr2 = IPAddress(addr);
310 EXPECT_PRED2(AreEqual, addr, addr2);
313 addr2 = IPAddress(addr);
314 EXPECT_PRED2(AreEqual, addr, addr2);
317 addr2 = IPAddress(addr);
318 EXPECT_PRED2(AreEqual, addr, addr2);
321 addr2 = IPAddress(addr);
322 EXPECT_PRED2(AreEqual, addr, addr2);
325 addr2 = IPAddress(addr);
326 EXPECT_PRED2(AreEqual, addr, addr2);
335 IPAddress addr2(v4addr2);
339 EXPECT_TRUE(addr2 == addr2);
343 EXPECT_FALSE(addr2 == addr);
344 EXPECT_FALSE(addr2 == addr3);
345 EXPECT_FALSE(addr == addr2);
346 EXPECT_FALSE(addr3 == addr2);
369 EXPECT_FALSE(addr2 == addr4);
370 EXPECT_FALSE(addr2 == addr5);
371 EXPECT_FALSE(addr2 == addr6);
372 EXPECT_FALSE(addr4 == addr2);
373 EXPECT_FALSE(addr5 == addr2);
374 EXPECT_FALSE(addr6 == addr2);
398 IPAddress addr2(kIPv4PublicAddr); // 1.2.3.4
407 EXPECT_TRUE(addr1 < addr2);
408 EXPECT_TRUE(addr2 < addr3);
416 EXPECT_FALSE(addr1 > addr2);
417 EXPECT_FALSE(addr2 > addr3);
426 EXPECT_FALSE(addr2 > addr2);
436 EXPECT_FALSE(addr2 < addr2);
447 IPAddress addr2;
448 addr2 = IPAddress(INADDR_ANY);
452 EXPECT_PRED2(AreEqual, addr, addr2);
454 addr2 = IPAddress(INADDR_LOOPBACK);
457 EXPECT_PRED2(AreEqual, addr, addr2);
459 addr2 = IPAddress(kIPv4RFC1918Addr);
462 EXPECT_PRED2(AreEqual, addr, addr2);
464 addr2 = IPAddress(kIPv4PublicAddr);
467 EXPECT_PRED2(AreEqual, addr, addr2);
469 addr2 = IPAddress(in6addr_any);
472 EXPECT_PRED2(AreEqual, addr, addr2);
474 addr2 = IPAddress(in6addr_loopback);
477 EXPECT_PRED2(AreEqual, addr, addr2);
479 addr2 = IPAddress(kIPv6LinkLocalAddr);
482 EXPECT_PRED2(AreEqual, addr, addr2);
484 addr2 = IPAddress(kIPv6PublicAddr);
487 EXPECT_PRED2(AreEqual, addr, addr2);
489 addr2 = IPAddress(kIPv4MappedRFC1918Addr);
491 EXPECT_PRED2(AreEqual, addr, addr2);
576 IPAddress addr2(kIPv4RFC1918Addr);
578 EXPECT_EQ(addr2, addr);
582 addr2 = IPAddress(kIPv4PublicAddr);
584 EXPECT_EQ(addr, addr2);
588 addr2 = IPAddress(kIPv6PublicAddr);
590 EXPECT_EQ(addr, addr2);
594 addr2 = addr;
596 EXPECT_EQ(addr, addr2);
598 addr2 = addr;
600 EXPECT_EQ(addr, addr2);
604 addr2 = addr;
606 EXPECT_EQ(addr, addr2);
610 addr2 = IPAddress(htonl(kIPv4PublicAddr));
612 EXPECT_EQ(addr, addr2);
617 IPAddress addr2(kIPv4MappedPublicAddr);
619 EXPECT_EQ(addr, addr2);
622 addr2 = IPAddress(kIPv4MappedPublicAddr);
624 EXPECT_EQ(addr, addr2);
627 addr2 = IPAddress(kIPv6PublicAddr);
629 EXPECT_EQ(addr, addr2);