Пример #1
0
 def _update_ipv6_prefix_store(self, ipv6_addr: bytes):
     ipv6_str = ipv6_addr.decode('utf-8')
     interface = get_ipv6_interface_id(ipv6_str)
     prefix = get_ipv6_prefix(ipv6_str)
     self._service_manager.interface_to_prefix_mapper.save_prefix(
         interface, prefix)
Пример #2
0
def get_ipv6_match_value(ip_addr) -> str:
    return get_ipv6_prefix(str(
        ip_addr.address.decode('utf-8'))) + "/" + IPV6_PREFIX_LEN