return 1;
}
-/**
- * convert from a LISP address to a FIB prefix
- */
-void
-ip_address_to_fib_prefix (const ip_address_t * addr, fib_prefix_t * prefix)
-{
- if (addr->version == AF_IP4)
- {
- prefix->fp_len = 32;
- prefix->fp_proto = FIB_PROTOCOL_IP4;
- clib_memset (&prefix->fp_addr.pad, 0, sizeof (prefix->fp_addr.pad));
- memcpy (&prefix->fp_addr.ip4, &addr->ip.ip4,
- sizeof (prefix->fp_addr.ip4));
- }
- else
- {
- prefix->fp_len = 128;
- prefix->fp_proto = FIB_PROTOCOL_IP6;
- memcpy (&prefix->fp_addr.ip6, &addr->ip.ip6,
- sizeof (prefix->fp_addr.ip6));
- }
- prefix->___fp___pad = 0;
-}
-
-/**
- * convert from a LISP to a FIB prefix
- */
-void
-ip_prefix_to_fib_prefix (const ip_prefix_t * ip_prefix,
- fib_prefix_t * fib_prefix)
-{
- ip_address_to_fib_prefix (&ip_prefix->addr, fib_prefix);
- fib_prefix->fp_len = ip_prefix->len;
-}
-
/**
* Find the sw_if_index of the interface that would be used to egress towards
* dst.