def _checkNetaddrWorksWithPrefixlen(net, prefixlen, version):
 if ((net & _prefixlenToNetmask(prefixlen, version)) == net):
  return 1
 else:
  return 0

def _checkNetaddrWorksWithPrefixlen ( net , prefixlen , version ) : if ( ( net & _prefixlenToNetmask ( prefixlen , version ) ) == net ) : return 1 else : return 0
check if a base addess of e network is compatible with a prefixlen .