Searched refs:netmaskToPrefixLength (Results 1 – 4 of 4) sorted by relevance
26 import static com.android.net.module.util.Inet4AddressUtils.netmaskToPrefixLength;147 netmaskToPrefixLength(addr); in assertInvalidNetworkMask()155 assertEquals(0, netmaskToPrefixLength(ipv4Address("0.0.0.0"))); in testNetmaskToPrefixLength()156 assertEquals(9, netmaskToPrefixLength(ipv4Address("255.128.0.0"))); in testNetmaskToPrefixLength()157 assertEquals(17, netmaskToPrefixLength(ipv4Address("255.255.128.0"))); in testNetmaskToPrefixLength()158 assertEquals(23, netmaskToPrefixLength(ipv4Address("255.255.254.0"))); in testNetmaskToPrefixLength()159 assertEquals(31, netmaskToPrefixLength(ipv4Address("255.255.255.254"))); in testNetmaskToPrefixLength()160 assertEquals(32, netmaskToPrefixLength(ipv4Address("255.255.255.255"))); in testNetmaskToPrefixLength()
118 public static int netmaskToPrefixLength(Inet4Address netmask) { in netmaskToPrefixLength() method in Inet4AddressUtils
227 public static int netmaskToPrefixLength(Inet4Address netmask) { in netmaskToPrefixLength() method in NetworkUtils229 return Inet4AddressUtils.netmaskToPrefixLength(netmask); in netmaskToPrefixLength()