Home
last modified time | relevance | path

Searched refs:netmaskToPrefixLength (Results 1 – 3 of 3) sorted by relevance

/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DInet4AddressUtilsTest.java26 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()
/frameworks/libs/net/common/src_frameworkcommon/com/android/net/module/util/
DInet4AddressUtils.java118 public static int netmaskToPrefixLength(Inet4Address netmask) { in netmaskToPrefixLength() method in Inet4AddressUtils
/frameworks/base/core/java/android/net/
DNetworkUtils.java228 public static int netmaskToPrefixLength(Inet4Address netmask) { in netmaskToPrefixLength() method in NetworkUtils
230 return Inet4AddressUtils.netmaskToPrefixLength(netmask); in netmaskToPrefixLength()