Lines Matching refs:prefixLength
422 int prefixLength = 0; in netmaskToPrefixLength() local
433 prefixLength += (value == 0) ? 0 : CHAR_BIT - ffs(value) + 1; in netmaskToPrefixLength()
441 return prefixLength; in netmaskToPrefixLength()
451 const std::string &ifname, const char *addrString, int prefixLength) { in interfaceHasAddress() argument
487 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
491 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
492 return (prefixLength == netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
501 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
505 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
506 return (prefixLength == netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
523 const int prefixLength; in TEST_F() member
543 sTun.name(), td.addrString, td.prefixLength); in TEST_F()
553 EXPECT_TRUE(interfaceHasAddress(sTun.name(), td.addrString, td.prefixLength)); in TEST_F()
559 status = mNetd->interfaceDelAddress(sTun.name(), td.addrString, td.prefixLength); in TEST_F()