23 #include <vnet/tunnel/tunnel_types.api_enum.h> 24 #include <vnet/tunnel/tunnel_types.api_types.h> 29 "tunnel API and internal flags enum size differ");
31 "tunnel API and internal flags enum size differ");
39 return (VNET_API_ERROR_INVALID_VALUE_2);
45 vl_api_tunnel_encap_decap_flags_t
48 return ((vl_api_tunnel_encap_decap_flags_t) f);
56 return (VNET_API_ERROR_INVALID_VALUE_2);
65 return ((vl_api_tunnel_flags_t) f);
74 case TUNNEL_API_MODE_##n: \ 75 *out = TUNNEL_MODE_##n; \ 81 return (VNET_API_ERROR_INVALID_VALUE_2);
92 case TUNNEL_MODE_##n: \ 93 out = TUNNEL_API_MODE_##n; \ 111 return (VNET_API_ERROR_INVALID_PROTOCOL);
114 return (VNET_API_ERROR_SAME_SRC_DST);
132 out->
t_table_id = clib_net_to_host_u32 (in->table_id);
138 return (VNET_API_ERROR_NO_SUCH_FIB);
152 out->encap_decap_flags =
156 out->table_id = clib_host_to_net_u32 (in->
t_table_id);
u32 t_fib_index
derived data
void ip_address_encode2(const ip_address_t *in, vl_api_address_t *out)
A representation of an IP tunnel config.
vl_api_tunnel_encap_decap_flags_t tunnel_encap_decap_flags_encode(tunnel_encap_decap_flags_t f)
#define ip_addr_version(_a)
void tunnel_encode(const tunnel_t *in, vl_api_tunnel_t *out)
int tunnel_decode(const vl_api_tunnel_t *in, tunnel_t *out)
ip_dscp_t ip_dscp_decode(vl_api_ip_dscp_t in)
int tunnel_flags_decode(vl_api_tunnel_flags_t f, tunnel_flags_t *o)
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
enum tunnel_flags_t_ tunnel_flags_t
vl_api_tunnel_flags_t tunnel_flags_encode(tunnel_flags_t f)
const u8 TUNNEL_ENCAP_DECAP_FLAG_MASK
STATIC_ASSERT(sizeof(vl_api_tunnel_encap_decap_flags_t)==sizeof(tunnel_encap_decap_flags_t), "tunnel API and internal flags enum size differ")
int tunnel_mode_decode(vl_api_tunnel_mode_t in, tunnel_mode_t *out)
enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
void ip_address_decode2(const vl_api_address_t *in, ip_address_t *out)
tunnel_encap_decap_flags_t t_encap_decap_flags
fib_protocol_t ip_address_family_to_fib_proto(ip_address_family_t af)
vl_api_ip_dscp_t ip_dscp_encode(ip_dscp_t dscp)
vl_api_tunnel_mode_t tunnel_mode_encode(tunnel_mode_t in)
int ip_address_cmp(const ip_address_t *ip1, const ip_address_t *ip2)
int tunnel_encap_decap_flags_decode(vl_api_tunnel_encap_decap_flags_t f, tunnel_encap_decap_flags_t *o)
Conversion functions to/from (decode/encode) API types to VPP internal types.
enum tunnel_mode_t_ tunnel_mode_t
const u8 TUNNEL_FLAG_MASK