|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
27 #include <vnet/ipip/ipip.api_enum.h>
28 #include <vnet/ipip/ipip.api_types.h>
30 #define REPLY_MSG_ID_BASE im->msg_id_base
48 if (itype[0] != itype[1])
50 rv = VNET_API_ERROR_INVALID_PROTOCOL;
56 rv = VNET_API_ERROR_SAME_SRC_DST;
71 ntohl (mp->
tunnel.table_id));
75 rv = VNET_API_ERROR_NO_SUCH_FIB;
101 vl_api_ipip_del_tunnel_reply_t *rmp;
165 u32 sixrd_tunnel_index, ip4_fib_index, ip6_fib_index;
168 sixrd_tunnel_index = ~0;
172 if (~0 == ip4_fib_index || ~0 == ip6_fib_index)
175 rv = VNET_API_ERROR_NO_SUCH_FIB;
185 ip4_fib_index, ip6_fib_index,
186 &sixrd_tunnel_index);
201 vl_api_ipip_6rd_del_tunnel_reply_t *rmp;
217 #include <vnet/ipip/ipip.api.c>
static void vl_api_ipip_del_tunnel_t_handler(vl_api_ipip_del_tunnel_t *mp)
fib_protocol_t fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
vnet_interface_main_t * im
enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
#define REPLY_MACRO2(t, body)
vl_api_ip4_address_t ip4_src
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
vl_api_ip_dscp_t ip_dscp_encode(ip_dscp_t dscp)
ipip_tunnel_t * ipip_tunnel_db_find_by_sw_if_index(u32 sw_if_index)
int sixrd_del_tunnel(u32 sw_if_index)
vl_api_tunnel_mode_t mode
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void send_ipip_tunnel_details(ipip_tunnel_t *t, vl_api_ipip_tunnel_dump_t *mp)
ipip_transport_t transport
static void vl_api_ipip_6rd_add_tunnel_t_handler(vl_api_ipip_6rd_add_tunnel_t *mp)
A representation of a IPIP tunnel.
static void vl_api_ipip_add_tunnel_t_handler(vl_api_ipip_add_tunnel_t *mp)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
static void setup_message_id_table(api_main_t *am)
A protocol Independent FIB table.
#define pool_foreach(VAR, POOL)
Iterate through pool.
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.
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
static void vl_api_ipip_6rd_del_tunnel_t_handler(vl_api_ipip_6rd_del_tunnel_t *mp)
u32 ft_table_id
Table ID (hash key) for this FIB.
ip_dscp_t ip_dscp_decode(vl_api_ip_dscp_t in)
static void vl_api_ipip_tunnel_dump_t_handler(vl_api_ipip_tunnel_dump_t *mp)
ip46_address_t tunnel_dst
int ipip_del_tunnel(u32 sw_if_index)
Delete an IPv4 over IPv6 automatic tunnel (6RD)
#define REPLY_MACRO_DETAILS2(t, body)
Create an IPv4 over IPv6 automatic tunnel (6RD)
vl_api_interface_index_t sw_if_index
ip46_address_t tunnel_src
vl_api_ip4_prefix_t ip4_prefix
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
int sixrd_add_tunnel(ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip4_address_t *ip4_src, bool security_check, u32 ip4_fib_index, u32 ip6_fib_index, u32 *sw_if_index)
vl_api_interface_index_t sw_if_index
Create an IP{v4,v6} over IP{v4,v6} tunnel.
enum tunnel_mode_t_ tunnel_mode_t
VLIB_API_INIT_FUNCTION(ipip_api_hookup)
vl_api_ipip_tunnel_t tunnel
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
vl_api_tunnel_encap_decap_flags_t tunnel_encap_decap_flags_encode(tunnel_encap_decap_flags_t f)
int tunnel_mode_decode(vl_api_tunnel_mode_t in, tunnel_mode_t *out)
vl_api_ipip_tunnel_t tunnel
tunnel_encap_decap_flags_t flags
static clib_error_t * ipip_api_hookup(vlib_main_t *vm)
vl_api_ip6_prefix_t ip6_prefix
Delete an IP{v4,v6} over IP{v4,v6} tunnel.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vl_api_interface_index_t sw_if_index
int ipip_add_tunnel(ipip_transport_t transport, u32 instance, ip46_address_t *src, ip46_address_t *dst, u32 fib_index, tunnel_encap_decap_flags_t flags, ip_dscp_t dscp, tunnel_mode_t tmode, u32 *sw_if_indexp)
vl_api_wireguard_peer_flags_t flags