Lines Matching refs:addr2
93 const IPAddress& addr2) {
94 if ((IPIsAny(addr) != IPIsAny(addr2)) ||
95 (IPIsLoopback(addr) != IPIsLoopback(addr2)) ||
96 (IPIsPrivate(addr) != IPIsPrivate(addr2)) ||
97 (HashIP(addr) != HashIP(addr2)) ||
98 (addr.Size() != addr2.Size()) ||
99 (addr.family() != addr2.family()) ||
100 (addr.ToString() != addr2.ToString())) {
105 v4addr2 = addr2.ipv4_address();
111 v6addr2 = addr2.ipv6_address();
275 IPAddress addr2(addr);
277 EXPECT_PRED2(AreEqual, addr, addr2);
280 addr2 = IPAddress(addr);
281 EXPECT_PRED2(AreEqual, addr, addr2);
284 addr2 = IPAddress(addr);
285 EXPECT_PRED2(AreEqual, addr, addr2);
288 addr2 = IPAddress(addr);
289 EXPECT_PRED2(AreEqual, addr, addr2);
292 addr2 = IPAddress(addr);
293 EXPECT_PRED2(AreEqual, addr, addr2);
296 addr2 = IPAddress(addr);
297 EXPECT_PRED2(AreEqual, addr, addr2);
300 addr2 = IPAddress(addr);
301 EXPECT_PRED2(AreEqual, addr, addr2);
304 addr2 = IPAddress(addr);
305 EXPECT_PRED2(AreEqual, addr, addr2);
308 addr2 = IPAddress(addr);
309 EXPECT_PRED2(AreEqual, addr, addr2);
318 IPAddress addr2(v4addr2);
322 EXPECT_TRUE(addr2 == addr2);
326 EXPECT_FALSE(addr2 == addr);
327 EXPECT_FALSE(addr2 == addr3);
328 EXPECT_FALSE(addr == addr2);
329 EXPECT_FALSE(addr3 == addr2);
352 EXPECT_FALSE(addr2 == addr4);
353 EXPECT_FALSE(addr2 == addr5);
354 EXPECT_FALSE(addr2 == addr6);
355 EXPECT_FALSE(addr4 == addr2);
356 EXPECT_FALSE(addr5 == addr2);
357 EXPECT_FALSE(addr6 == addr2);
381 IPAddress addr2(kIPv4PublicAddr); // 1.2.3.4
390 EXPECT_TRUE(addr1 < addr2);
391 EXPECT_TRUE(addr2 < addr3);
399 EXPECT_FALSE(addr1 > addr2);
400 EXPECT_FALSE(addr2 > addr3);
409 EXPECT_FALSE(addr2 > addr2);
419 EXPECT_FALSE(addr2 < addr2);
430 IPAddress addr2;
431 addr2 = IPAddress(INADDR_ANY);
435 EXPECT_PRED2(AreEqual, addr, addr2);
437 addr2 = IPAddress(INADDR_LOOPBACK);
440 EXPECT_PRED2(AreEqual, addr, addr2);
442 addr2 = IPAddress(kIPv4RFC1918Addr);
445 EXPECT_PRED2(AreEqual, addr, addr2);
447 addr2 = IPAddress(kIPv4PublicAddr);
450 EXPECT_PRED2(AreEqual, addr, addr2);
452 addr2 = IPAddress(in6addr_any);
455 EXPECT_PRED2(AreEqual, addr, addr2);
457 addr2 = IPAddress(in6addr_loopback);
460 EXPECT_PRED2(AreEqual, addr, addr2);
462 addr2 = IPAddress(kIPv6LinkLocalAddr);
465 EXPECT_PRED2(AreEqual, addr, addr2);
467 addr2 = IPAddress(kIPv6PublicAddr);
470 EXPECT_PRED2(AreEqual, addr, addr2);
472 addr2 = IPAddress(kIPv4MappedRFC1918Addr);
474 EXPECT_PRED2(AreEqual, addr, addr2);
559 IPAddress addr2(kIPv4RFC1918Addr);
561 EXPECT_EQ(addr2, addr);
565 addr2 = IPAddress(kIPv4PublicAddr);
567 EXPECT_EQ(addr, addr2);
571 addr2 = IPAddress(kIPv6PublicAddr);
573 EXPECT_EQ(addr, addr2);
577 addr2 = addr;
579 EXPECT_EQ(addr, addr2);
581 addr2 = addr;
583 EXPECT_EQ(addr, addr2);
587 addr2 = addr;
589 EXPECT_EQ(addr, addr2);
593 addr2 = IPAddress(htonl(kIPv4PublicAddr));
595 EXPECT_EQ(addr, addr2);
600 IPAddress addr2(kIPv4MappedPublicAddr);
602 EXPECT_EQ(addr, addr2);
605 addr2 = IPAddress(kIPv4MappedPublicAddr);
607 EXPECT_EQ(addr, addr2);
610 addr2 = IPAddress(kIPv6PublicAddr);
612 EXPECT_EQ(addr, addr2);