Lines Matching refs:prefixLength
710 int prefixLength = 0; in netmaskToPrefixLength() local
721 prefixLength += (value == 0) ? 0 : CHAR_BIT - ffs(value) + 1; in netmaskToPrefixLength()
729 return prefixLength; in netmaskToPrefixLength()
739 const std::string &ifname, const char *addrString, int prefixLength) { in interfaceHasAddress() argument
775 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
779 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
780 return (prefixLength == netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
789 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
793 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
794 return (prefixLength == netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
811 const int prefixLength; in TEST_F() member
831 SCOPED_TRACE(String8::format("Offending IP address %s/%d", td.addrString, td.prefixLength)); in TEST_F()
835 sTun.name(), td.addrString, td.prefixLength); in TEST_F()
845 EXPECT_TRUE(interfaceHasAddress(sTun.name(), td.addrString, td.prefixLength)); in TEST_F()
851 status = mNetd->interfaceDelAddress(sTun.name(), td.addrString, td.prefixLength); in TEST_F()
2608 int prefixLength = 0; in ipv4NetmaskToPrefixLength() local
2611 prefixLength++; in ipv4NetmaskToPrefixLength()
2614 return prefixLength; in ipv4NetmaskToPrefixLength()
2646 int prefixLength = 0; in getInterfaceIPv4Prefix() local
2648 prefixLength = ipv4NetmaskToPrefixLength( in getInterfaceIPv4Prefix()
2652 return prefixLength; in getInterfaceIPv4Prefix()
2722 EXPECT_EQ(getInterfaceIPv4Prefix(ifName), interfaceCfg.prefixLength); in expectCurrentInterfaceConfigurationEquals()
2729 EXPECT_EQ(getInterfaceIPv4Prefix(setCfg.ifName), setCfg.prefixLength); in expectCurrentInterfaceConfigurationAlmostEqual()
2760 const std::string& addr, int prefixLength, in makeInterfaceCfgParcel() argument
2766 cfg.prefixLength = prefixLength; in makeInterfaceCfgParcel()
3516 int prefixLength, in makeTetherOffloadRule() argument
3523 parcel.prefixLength = prefixLength; in makeTetherOffloadRule()