def IpMaskMatch(ip, ip_mask):
  (ip_int_mask, ip_int_mask_bits) = IpMaskToInts(ip_mask)
  ip_int = IpToInt(ip)
  return (ip_int & ip_int_mask_bits) == ip_int_mask
Check if an IP is inside an IP mask.
dataset/ETHPy150Open google/simian/src/simian/mac/common/ipcalc.py/IpMaskMatch