Test if this network belongs to a private range. Returns: A boolean, True if the network is reserved per iana-ipv4-special-registry or iana-ipv6-special-registry.
(self)
| 1072 | |
| 1073 | @property |
| 1074 | def is_private(self): |
| 1075 | """Test if this network belongs to a private range. |
| 1076 | |
| 1077 | Returns: |
| 1078 | A boolean, True if the network is reserved per |
| 1079 | iana-ipv4-special-registry or iana-ipv6-special-registry. |
| 1080 | |
| 1081 | """ |
| 1082 | return any(self.network_address in priv_network and |
| 1083 | self.broadcast_address in priv_network |
| 1084 | for priv_network in self._constants._private_networks) and all( |
| 1085 | self.network_address not in network and |
| 1086 | self.broadcast_address not in network |
| 1087 | for network in self._constants._private_networks_exceptions |
| 1088 | ) |
| 1089 | |
| 1090 | @property |
| 1091 | def is_global(self): |