|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
25 #include <vpp/app/version.h>
32 #include <l3xc/l3xc.api_enum.h>
33 #include <l3xc/l3xc.api_types.h>
73 if (0 == mp->
l3xc.n_paths)
75 rv = VNET_API_ERROR_INVALID_VALUE;
81 for (pi = 0; pi < mp->
l3xc.n_paths; pi++)
110 vl_api_l3xc_del_reply_t *rmp;
137 vl_api_fib_path_t *fp;
145 msg_size =
sizeof (*mp) +
sizeof (mp->
l3xc.paths[0]) *
n_paths;
154 mp->
l3xc.sw_if_index = htonl (
l3xc->l3xc_sw_if_index);
204 #include <l3xc/l3xc.api.c>
218 .version = VPP_BUILD_VER,
219 .description =
"L3 Cross-Connect (L3XC)",
int l3xc_delete(u32 sw_if_index, u8 is_ip6)
Delete an L3XC.
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
#define REPLY_MACRO2(t, body)
Path encode context to use when walking a path-list to encode paths.
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
vl_api_interface_index_t sw_if_index
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
Encode and decode functions from the API types to internal types.
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
fib_route_path_t * rpaths
static void setup_message_id_table(api_main_t *am)
description returned in the dump
static void vl_api_l3xc_plugin_get_version_t_handler(vl_api_l3xc_plugin_get_version_t *mp)
void l3xc_walk(l3xc_walk_cb_t cb, void *ctx)
Walk/visit each of the L3XC policies.
#define L3XC_PLUGIN_VERSION_MAJOR
A L3 cross connect will send all traffic that is received on the input interface to the [set of] path...
static void vl_api_l3xc_dump_t_handler(vl_api_l3xc_dump_t *mp)
An API client registration, only in vpp/vlib.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
struct l3xc_dump_walk_ctx_t_ l3xc_dump_walk_ctx_t
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
static_always_inline l3xc_t * l3xc_get(u32 index)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
static u32 l3xc_base_msg_id
Base message ID fot the plugin.
#define BAD_SW_IF_INDEX_LABEL
void fib_path_list_walk_w_ext(fib_node_index_t path_list_index, const fib_path_ext_list_t *ext_list, fib_path_list_walk_w_ext_fn_t func, void *ctx)
typedef l3xc
A description of an L3XC policy.
#define vec_free(V)
Free vector's memory (no header).
int l3xc_update(u32 sw_if_index, u8 is_ip6, const fib_route_path_t *rpaths)
Create or update an L3XC Policy.
#define VLIB_INIT_FUNCTION(x)
A representation of a path as described by a route producer.
fib_path_list_walk_rc_t fib_path_encode(fib_node_index_t path_list_index, fib_node_index_t path_index, const fib_path_ext_t *path_ext, void *args)
static void vl_api_l3xc_del_t_handler(vl_api_l3xc_del_t *mp)
#define vec_foreach(var, vec)
Vector iterator.
Reply to get the plugin version.
vl_api_interface_index_t sw_if_index
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vl_api_registration_t * rp
#define L3XC_PLUGIN_VERSION_MINOR
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
index_t l3xc_find(u32 sw_if_index, fib_protocol_t fproto)
Find a L3 XC object from an interface and FIB protocol.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
vl_api_interface_index_t sw_if_index
static int l3xc_send_details(u32 l3xci, void *args)
static clib_error_t * l3xc_api_init(vlib_main_t *vm)
static void vl_api_l3xc_update_t_handler(vl_api_l3xc_update_t *mp)
void * vl_msg_api_alloc(int nbytes)