Check if a base addess of a network is compatible with a prefixlen
(net, prefixlen, version)
| 1263 | |
| 1264 | |
| 1265 | def _checkNetaddrWorksWithPrefixlen(net, prefixlen, version): |
| 1266 | """Check if a base addess of a network is compatible with a prefixlen""" |
| 1267 | if net & _prefixlenToNetmask(prefixlen, version) == net: |
| 1268 | return 1 |
| 1269 | else: |
| 1270 | return 0 |
| 1271 | |
| 1272 | |
| 1273 | def _netmaskToPrefixlen(netmask): |
no test coverage detected