Lines Matching refs:addr
52 bool only2Free(in_addr_t addr) { in only2Free() argument
53 return (ntohl(addr) & 0xff) == 2; in only2Free()
55 bool over6Free(in_addr_t addr) { in over6Free() argument
56 return (ntohl(addr) & 0xff) >= 6; in over6Free()
58 bool only10Free(in_addr_t addr) { in only10Free() argument
59 return (ntohl(addr) & 0xff) == 10; in only10Free()
92 struct in_addr addr; in TEST_F() local
94 inet_pton(AF_INET, kIPv4LocalAddr, &addr); in TEST_F()
98 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 29)); in TEST_F()
99 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 16)); in TEST_F()
103 EXPECT_EQ(inet_addr(kIPv4LocalAddr), selectIpv4Address(addr, 29)); in TEST_F()
104 EXPECT_EQ(inet_addr(kIPv4LocalAddr), selectIpv4Address(addr, 20)); in TEST_F()
105 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 15)); in TEST_F()
108 EXPECT_EQ(inet_addr(kIPv4LocalAddr), selectIpv4Address(addr, 32)); in TEST_F()
109 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 33)); in TEST_F()
113 EXPECT_EQ(inet_addr("192.0.0.6"), selectIpv4Address(addr, 29)); in TEST_F()
117 EXPECT_EQ(inet_addr("192.0.0.2"), selectIpv4Address(addr, 29)); in TEST_F()
118 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 30)); in TEST_F()
122 EXPECT_EQ(INADDR_NONE, selectIpv4Address(addr, 29)); in TEST_F()
123 EXPECT_EQ(inet_addr("192.0.0.10"), selectIpv4Address(addr, 24)); in TEST_F()
128 addr.s_addr = inet_addr("8.8.8.8"); in TEST_F()
129 EXPECT_EQ(inet_addr("8.8.8.8"), selectIpv4Address(addr, 29)); in TEST_F()
131 addr.s_addr = inet_addr("127.0.0.1"); in TEST_F()
132 EXPECT_EQ(inet_addr("127.0.0.2"), selectIpv4Address(addr, 29)); in TEST_F()