code: 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, errmsgf __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)
docs: validate an IPv4 dotted quad or integer CIDR netmask