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;
187 if (~0 == sw_if_index)
204 #include <l3xc/l3xc.api.c> 218 .version = VPP_BUILD_VER,
219 .description =
"L3 Cross-Connect (L3XC)",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#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...
Reply to get the plugin version.
A representation of a path as described by a route producer.
vl_api_interface_index_t sw_if_index
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
#define REPLY_MACRO2(t, body)
static void vl_api_l3xc_plugin_get_version_t_handler(vl_api_l3xc_plugin_get_version_t *mp)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
int l3xc_delete(u32 sw_if_index, u8 is_ip6)
Delete an L3XC.
void * vl_msg_api_alloc(int nbytes)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
static_always_inline l3xc_t * l3xc_get(u32 index)
int l3xc_update(u32 sw_if_index, u8 is_ip6, const fib_route_path_t *rpaths)
Create or update an L3XC Policy.
static clib_error_t * l3xc_api_init(vlib_main_t *vm)
#define L3XC_PLUGIN_VERSION_MINOR
u32 l3xc_sw_if_index
The input interface.
static void vl_api_l3xc_update_t_handler(vl_api_l3xc_update_t *mp)
An API client registration, only in vpp/vlib.
#define BAD_SW_IF_INDEX_LABEL
#define vec_free(V)
Free vector's memory (no header).
static void vl_api_l3xc_dump_t_handler(vl_api_l3xc_dump_t *mp)
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
void l3xc_walk(l3xc_walk_cb_t cb, void *ctx)
Walk/visit each of the L3XC policies.
vl_api_fib_path_t paths[n_paths]
static int l3xc_send_details(u32 l3xci, void *args)
static u32 l3xc_base_msg_id
Base message ID fot the plugin.
index_t l3xc_find(u32 sw_if_index, fib_protocol_t fproto)
Find a L3 XC object from an interface and FIB protocol.
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
Path encode context to use when walking a path-list to encode paths.
fib_route_path_t * rpaths
struct l3xc_dump_walk_ctx_t_ l3xc_dump_walk_ctx_t
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_registration_t * rp
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
static void vl_api_l3xc_del_t_handler(vl_api_l3xc_del_t *mp)
vl_api_interface_index_t sw_if_index
#define vec_foreach(var, vec)
Vector iterator.
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
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)
description returned in the dump
fib_node_index_t l3xc_pl
The path-list describing how to forward in case of a match.
#define VALIDATE_SW_IF_INDEX(mp)
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)
typedef l3xc
A description of an L3XC policy.