27 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 34 vl_api_address_family_t af, ip46_address_t * out)
38 switch (clib_net_to_host_u32 (af))
42 clib_memcpy (&out->ip4, &in->ip4, sizeof (out->ip4));
46 clib_memcpy (&out->ip6, &in->ip6, sizeof (out->ip6));
50 ASSERT (!
"Unkown address family in API address type");
66 vl_api_address_family_t af,
67 vl_api_address_union_t * out)
70 memcpy (&out->ip6, &in->ip6, sizeof (out->ip6));
72 memcpy (&out->ip4, &in->ip4, sizeof (out->ip4));
100 switch (clib_net_to_host_u32 (in->address.af))
109 out->
fp_len = in->address_length;
110 out->___fp___pad = 0;
117 out->address_length = in->
fp_len;
126 out->af = clib_host_to_net_u32 (out->af);
127 out->grp_address_length = clib_host_to_net_u16 (in->
fp_len);
138 out->
fp_len = clib_net_to_host_u16 (in->grp_address_length);
fib_protocol_t fp_proto
protocol type
ip46_address_t fp_src_addr
static ip46_type_t ip_address_union_decode(const vl_api_address_union_t *in, vl_api_address_family_t af, ip46_address_t *out)
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
ip46_type_t fib_proto_to_ip46(fib_protocol_t fproto)
Convert from fib_protocol to ip46_type.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define clib_memcpy(d, s, n)
Aggregrate type for a prefix.
u16 fp_len
The mask length.
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
#define ip46_address_is_ip4(ip46)
void ip_mprefix_encode(const mfib_prefix_t *in, vl_api_mprefix_t *out)
Aggregrate type for a prefix.
static void ip_address_union_encode(const ip46_address_t *in, vl_api_address_family_t af, vl_api_address_union_t *out)
void ip_prefix_encode(const fib_prefix_t *in, vl_api_prefix_t *out)
fib_protocol_t fp_proto
protocol type
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
u16 fp_len
The mask length.
void ip_mprefix_decode(const vl_api_mprefix_t *in, mfib_prefix_t *out)
ip46_address_t fp_grp_addr
The address type is not deriveable from the fp_addr member.