(netmask)
return masklen - netlen
Convert an Integer reprsenting a Netmask to an prefixlen.

    E.g. 0xffffff00 (255.255.255.0) returns 24
Convert an Integer reprsenting a Netmask to an prefixlen.
Convert an Integer reprsenting a Netmask to an prefixlen .
def _netmaskToPrefixlen(netmask):
    """Convert an Integer reprsenting a Netmask to an prefixlen.

    E.g. 0xffffff00 (255.255.255.0) returns 24
    """

    netlen = _count0Bits(netmask)
    masklen = _count1Bits(netmask)
    _checkNetmask(netmask, masklen)
    return masklen - netlen
def _netmaskToPrefixlen ( netmask ) : netlen = _count0Bits ( netmask ) masklen = _count1Bits ( netmask ) _checkNetmask ( netmask , masklen ) return masklen - netlen