28 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 36 vl_api_address_family_t af = clib_host_to_net_u32 (_af);
72 #define ip_protocol(n,s) \ 73 case IP_PROTOCOL_##s: \ 74 *out = IP_PROTOCOL_##s; \ 87 #define ip_protocol(n,s) \ 88 case IP_PROTOCOL_##s: \ 89 return (clib_host_to_net_u32 (IP_PROTOCOL_##s)); 136 vl_api_address_family_t af, ip46_address_t * out)
140 switch (clib_net_to_host_u32 (af))
144 clib_memcpy (&out->ip4, &in->ip4, sizeof (out->ip4));
148 clib_memcpy (&out->ip6, &in->ip6, sizeof (out->ip6));
152 ASSERT (!
"Unknown address family in API address type");
168 vl_api_address_family_t af,
169 vl_api_address_union_t * out)
202 switch (clib_net_to_host_u32 (in->address.af))
212 out->___fp___pad = 0;
244 out->af = clib_host_to_net_u32 (out->af);
245 out->grp_address_length = clib_host_to_net_u16 (in->
fp_len);
256 out->
fp_len = clib_net_to_host_u16 (in->grp_address_length);
257 out->___fp___pad = 0;
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)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u8 vl_api_ip6_address_t[16]
Conversion functions to/from (decode/encode) API types to VPP internal types.
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
enum ip_address_family_t_ ip_address_family_t
#define clib_memcpy(d, s, n)
int ip_proto_decode(int _ipp, ip_protocol_t *out)
Aggregate 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)
ip_dscp_t ip_dscp_decode(u8 in)
vl_api_fib_path_type_t type
int ip_address_family_encode(ip_address_family_t af)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
enum ip_protocol ip_protocol_t
#define ip46_address_is_ip4(ip46)
u8 vl_api_ip4_address_t[4]
void ip_mprefix_encode(const mfib_prefix_t *in, vl_api_mprefix_t *out)
Aggregate type for a prefix.
int ip_proto_encode(ip_protocol_t ipp)
enum ip_dscp_t_ ip_dscp_t
static void ip_address_union_encode(const ip46_address_t *in, vl_api_address_family_t af, vl_api_address_union_t *out)
void ip6_address_encode(const ip6_address_t *in, vl_api_ip6_address_t out)
void ip_prefix_encode(const fib_prefix_t *in, vl_api_prefix_t *out)
fib_protocol_t fp_proto
protocol type
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
int ip_address_family_decode(int _af, ip_address_family_t *out)
These enum decode/encodes use 'int' as the type for the enum because one cannot forward declare an en...
u8 ip_dscp_encode(ip_dscp_t dscp)
void ip4_address_encode(const ip4_address_t *in, vl_api_ip4_address_t out)
u16 fp_len
The mask length.
void ip_mprefix_decode(const vl_api_mprefix_t *in, mfib_prefix_t *out)
#define ip46_address_is_zero(ip46)
ip46_address_t fp_grp_addr
The address type is not deriveable from the fp_addr member.