def __ipv4_netmask(value):
    '''validate an IPv4 dotted quad or integer CIDR netmask'''
    valid, errmsg = False, 'dotted quad or integer CIDR (0->32)'
    valid, value, _ = __int(value)
    if not (valid and 0 <= value <= 32):
        valid = salt.utils.validate.net.netmask(value)
    return (valid, value, errmsg)
dataset/ETHPy150Open saltstack/salt/salt/modules/debian_ip.py/__ipv4_netmask/original