|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 #include <vpp/app/version.h>
29 unsigned char def_str[] =
"Endpoint to SR-unaware appliance via masquerading";
30 unsigned char params_str[] =
"nh <next-hop> oif <iface-out> iif <iface-in>";
52 localsid->
nh_adj = nh_adj_index;
110 "\tOutgoing iface: %U\n"
111 "\tIncoming iface: %U",
127 void **plugin_mem_p = va_arg (*args,
void **);
136 if (
unformat (input,
"end.am nh %U oif %U iif %U",
149 sizeof (ip6_address_t));
154 *plugin_mem_p = ls_mem;
168 return (
format (s,
"SR: dynamic_proxy_index:[%u]",
index));
232 .arc_name =
"ip6-unicast",
233 .node_name =
"srv6-am-rewrite",
240 .version = VPP_BUILD_VER,
241 .description =
"Masquerading Segment Routing for IPv6 (SRv6) Proxy",
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
vnet_sw_interface_type_t type
#define clib_memcpy(d, s, n)
adj_index_t adj_nbr_add_or_lock(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index)
Neighbour Adjacency sub-type.
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
int sr_localsid_register_function(vlib_main_t *vm, u8 *fn_name, u8 *keyword_str, u8 *def_str, u8 *params_str, u8 prefix_length, dpo_type_t *dpo, format_function_t *ls_format, unformat_function_t *ls_unformat, sr_plugin_callback_t *creation_fn, sr_plugin_callback_t *removal_fn)
SR LocalSID plugin registry.
u32 sw_if_index_out
Outgoing iface to proxied device.
static void clib_mem_free(void *p)
void * plugin_mem
Memory to be used by the plugin callback functions.
unsigned char keyword_str[]
const static char *const srv6_am_ip6_nodes[]
#define clib_error_return(e, args...)
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
VNET_FEATURE_INIT(srv6_am_rewrite, static)
u32 sw_if_index_in
Incoming iface from proxied device.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
void srv6_am_dpo_unlock(dpo_id_t *dpo)
static u8 * format_srv6_am_dpo(u8 *s, va_list *args)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
uword unformat_srv6_am_localsid(unformat_input_t *input, va_list *args)
ip46_address_t nh_addr
Proxied device address.
vnet_main_t * vnet_main
[convenience] vnet main
vnet_main_t * vnet_get_main(void)
unsigned char params_str[]
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
srv6_am_main_t srv6_am_main
u8 * format_srv6_am_localsid(u8 *s, va_list *args)
static int srv6_am_localsid_removal_fn(ip6_sr_localsid_t *localsid)
dpo_lock_fn_t dv_lock
A reference counting lock function.
u32 nh_adj
Next_adj for xconnect usage only.
vnet_sw_interface_t * sw_interfaces
const static char *const *const srv6_am_nodes[DPO_PROTO_NUM]
const static dpo_vft_t srv6_am_vft
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
static int srv6_am_localsid_creation_fn(ip6_sr_localsid_t *localsid)
void srv6_am_dpo_lock(dpo_id_t *dpo)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
u32 adj_index_t
An index for adjacencies.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static clib_error_t * srv6_am_init(vlib_main_t *vm)
A virtual function table regisitered for a DPO type.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static void * clib_mem_alloc_aligned_at_offset(uword size, uword align, uword align_offset, int os_out_of_memory_on_failure)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
dpo_type_t srv6_am_dpo_type
DPO type.
@ VNET_SW_INTERFACE_TYPE_HARDWARE
vlib_main_t * vlib_main
[convenience] vlib main
u32 srv6_localsid_behavior_id
SRv6 LocalSID behavior number.
unsigned char function_name[]
vnet_interface_main_t interface_main