23 return (ip46_address->ip4.as_u32 == 0);
25 return (ip46_address->as_u64[0] == 0 && ip46_address->as_u64[1] == 0);
32 return (ip46_address->ip4.as_u8[0] == 127);
34 return (ip46_address->as_u64[0] == 0 &&
35 clib_net_to_host_u64 (ip46_address->as_u64[1]) == 1);
41 return (ip4_address->
as_u8[0] == 127);
47 return (ip6_address->as_u64[0] == 0 &&
48 clib_net_to_host_u64 (ip6_address->as_u64[1]) == 1);
86 dst->ip4.as_u32 = src->ip4.as_u32;
102 sizeof (ip6_address_t));
113 return (
format (s,
"ip4"));
115 return (
format (s,
"ip6"));
118 return (
format (s,
"unknown"));
150 return (format (s, "%s", #v)); 155 return (
format (s,
"unknown"));
167 return (format (s, "%s", #v)); 172 return (
format (s,
"unknown"));
fib_protocol_t fp_proto
protocol type
void ip_copy(ip46_address_t *dst, ip46_address_t *src, u8 is_ip4)
vl_api_wireguard_peer_flags_t flags
static void ip46_address_mask_ip4(ip46_address_t *ip46)
u8 ip_is_local(u32 fib_index, ip46_address_t *ip46_address, u8 is_ip4)
Checks that an ip is local to the requested fib.
void ip_set(ip46_address_t *dst, void *src, u8 is_ip4)
#define clib_memcpy_fast(a, b, c)
manual_print typedef u8 ip4_address[4]
Aggregate type for a prefix.
u16 fp_len
The mask length.
fib_node_index_t fib_table_lookup(u32 fib_index, const fib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
u8 * format_ip_dscp(u8 *s, va_list *va)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
u8 * format_ip_address_family(u8 *s, va_list *args)
uword unformat_ip_address_family(unformat_input_t *input, va_list *args)
u8 * format_ip_ecn(u8 *s, va_list *va)
u8 ip4_is_local_host(ip4_address_t *ip4_address)
u32 fib_node_index_t
A typedef of a node index.
u8 ip6_is_local_host(ip6_address_t *ip6_address)
enum fib_entry_flag_t_ fib_entry_flag_t
manual_print typedef u8 ip6_address[16]
enum ip_dscp_t_ ip_dscp_t
enum ip_address_family_t_ ip_address_family_t
u8 ip_is_zero(ip46_address_t *ip46_address, u8 is_ip4)
u8 ip_is_local_host(ip46_address_t *ip46_address, u8 is_ip4)
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)