parameters: (self, node, dst_addr)
return_statement: return cur_lpm_len
docstring: return the longest prefix match of dst_addr in node's
          advertising prefix pool
docstring_summary: return the longest prefix match of dst_addr in node's
          advertising prefix pool
docstring_tokens: return the longest prefix match of dst_addr in node s advertising prefix pool
function: def get_lpm_len_from_node(self, node, dst_addr):
          """
          return the longest prefix match of dst_addr in node's
          advertising prefix pool
          """
  
          cur_lpm_len = 0
          dst_addr = ipaddress.ip_address(dst_addr)
          is_ipv4 = isinstance(dst_addr, ipaddress.IPv4Address)
          for cur_prefix in self.get_node_prefixes(node, is_ipv4):
              if dst_addr in ipaddress.ip_network(cur_prefix):
                  cur_len = int(cur_prefix.split("/")[1])
                  cur_lpm_len = max(cur_lpm_len, cur_len)
          return cur_lpm_len
function_tokens: def get_lpm_len_from_node ( self , node , dst_addr ) : cur_lpm_len = 0 dst_addr = ipaddress . ip_address ( dst_addr ) is_ipv4 = isinstance ( dst_addr , ipaddress . IPv4Address ) for cur_prefix in self . get_node_prefixes ( node , is_ipv4 ) : if dst_addr in ipaddress . ip_network ( cur_prefix ) : cur_len = int ( cur_prefix . split ( "/" ) [ 1 ] ) cur_lpm_len = max ( cur_lpm_len , cur_len ) return cur_lpm_len