|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
31 #include <vnet/gre/gre.api_enum.h>
32 #include <vnet/gre/gre.api_types.h>
34 #define REPLY_MSG_ID_BASE gre_main.msg_id_base
43 case GRE_API_TUNNEL_TYPE_##n: \
44 *out = GRE_TUNNEL_TYPE_##n; \
50 return (VNET_API_ERROR_INVALID_VALUE);
53 static vl_api_gre_tunnel_type_t
61 case GRE_TUNNEL_TYPE_##n: \
62 out = GRE_API_TUNNEL_TYPE_##n; \
84 if (itype[0] != itype[1])
86 rv = VNET_API_ERROR_INVALID_PROTOCOL;
92 rv = VNET_API_ERROR_SAME_SRC_DST;
113 a->instance = ntohl (mp->
tunnel.instance);
115 a->outer_table_id = ntohl (mp->
tunnel.outer_table_id);
141 rmp->
tunnel.outer_table_id =
199 #include <vnet/gre/gre.api.c>
static vl_api_gre_tunnel_type_t gre_tunnel_type_encode(gre_tunnel_type_t in)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
vl_api_tunnel_mode_t tunnel_mode_encode(tunnel_mode_t in)
enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
vl_api_interface_index_t sw_if_index
#define REPLY_MACRO2(t, body)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static clib_error_t * gre_api_hookup(vlib_main_t *vm)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_interface_index_t sw_if_index
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
fib_prefix_t tunnel_dst
The tunnel's destination/remote address.
static void setup_message_id_table(api_main_t *am)
VLIB_API_INIT_FUNCTION(gre_api_hookup)
Details response for one of the requested GRE tunnels.
#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.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
Add or delete a single GRE tunnel.
enum gre_tunnel_type_t_ gre_tunnel_type_t
The GRE tunnel type.
static void send_gre_tunnel_details(gre_tunnel_t *t, vl_api_gre_tunnel_dump_t *mp)
static void vl_api_gre_tunnel_dump_t_handler(vl_api_gre_tunnel_dump_t *mp)
An API client registration, only in vpp/vlib.
A representation of a GRE tunnel.
u16 session_id
ERSPAN type 2 session ID, least significant 10 bits of u16.
static void vl_api_gre_tunnel_add_del_t_handler(vl_api_gre_tunnel_add_del_t *mp)
ip46_address_t tunnel_src
The tunnel's source/local address.
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
Add or delete a single GRE tunnel.
#define REPLY_MACRO_DETAILS2(t, body)
vl_api_gre_tunnel_t tunnel
int vnet_gre_tunnel_add_del(vnet_gre_tunnel_add_del_args_t *a, u32 *sw_if_indexp)
@ foreach_gre_tunnel_type
fib_protocol_t fp_proto
protocol type
Dump details of all or just a single GRE tunnel.
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
int tunnel_mode_decode(vl_api_tunnel_mode_t in, tunnel_mode_t *out)
u32 outer_fib_index
The FIB in which the src.dst address are present.
static int gre_tunnel_type_decode(vl_api_gre_tunnel_type_t in, gre_tunnel_type_t *out)
vl_api_interface_index_t sw_if_index
vl_api_gre_tunnel_t tunnel
vl_api_wireguard_peer_flags_t flags