28 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 return (VNET_API_ERROR_INVALID_ADDRESS_FAMILY);
49 vl_api_address_family_t
72 #define ip_protocol(n,s) \ 73 case IP_PROTOCOL_##s: \ 74 *out = IP_PROTOCOL_##s; \ 79 return (VNET_API_ERROR_INVALID_PROTOCOL);
87 #define ip_protocol(n,s) \ 88 case IP_PROTOCOL_##s: \ 89 return ((vl_api_ip_proto_t) IP_PROTOCOL_##s); 107 return ((vl_api_ip_dscp_t) dscp);
136 vl_api_address_family_t af, ip46_address_t * out)
144 clib_memcpy (&out->ip4, &in->ip4, sizeof (out->ip4));
148 clib_memcpy (&out->ip6, &in->ip6, sizeof (out->ip6));
184 vl_api_address_family_t af,
185 vl_api_address_union_t * out)
235 switch (in->address.af)
245 out->___fp___pad = 0;
256 return (VNET_API_ERROR_IP_PREFIX_INVALID);
295 out->grp_address_length = clib_host_to_net_u16 (in->
fp_len);
306 out->
fp_len = clib_net_to_host_u16 (in->grp_address_length);
307 out->___fp___pad = 0;
int ip_address_family_decode(vl_api_address_family_t af, ip_address_family_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
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_address_encode2(const ip_address_t *in, vl_api_address_t *out)
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
bool ip_prefix_validate(const ip_prefix_t *ip)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
void ip_prefix_encode2(const ip_prefix_t *in, vl_api_prefix_t *out)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
ip_dscp_t ip_dscp_decode(vl_api_ip_dscp_t in)
#define clib_memcpy(d, s, n)
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)
Decode/Encode for struct/union types.
vl_api_fib_path_type_t type
enum ip_protocol ip_protocol_t
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
void ip_address_decode2(const vl_api_address_t *in, ip_address_t *out)
int ip_prefix_decode2(const vl_api_prefix_t *in, ip_prefix_t *out)
vl_api_ip_proto_t ip_proto_encode(ip_protocol_t ipp)
void ip_mprefix_encode(const mfib_prefix_t *in, vl_api_mprefix_t *out)
vl_api_address_family_t ip_address_family_encode(ip_address_family_t af)
Aggregate type for a prefix.
vl_api_ip_dscp_t ip_dscp_encode(ip_dscp_t dscp)
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)
ip_address_family_t version
void ip6_address_encode(const ip6_address_t *in, vl_api_ip6_address_t out)
enum ip_address_family_t_ ip_address_family_t
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)
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)
int ip_proto_decode(vl_api_ip_proto_t ipp, ip_protocol_t *out)
ip46_address_t fp_grp_addr
The address type is not deriveable from the fp_addr member.