21 #include <vpp/app/version.h> 42 return (
format (s,
"SR: dynamic_proxy_index:[%u]", index));
52 "srv6-end-m-gtp6-d-di",
60 static u8 fn_name[] =
"SRv6-End.M.GTP6.D.DI-plugin";
63 "Endpoint function with drop-in dencapsulation for IPv6/GTP tunnel";
64 static u8 param_str[] =
"<sr-prefix>/<sr-prefixlen> [nhtype <nhtype>]";
71 s =
format (s,
"SRv6 End gtp6.d Drop-in\n\t");
80 s =
format (s,
", NHType IPv4\n");
82 s =
format (s,
", NHType IPv6\n");
84 s =
format (s,
", NHType Non-IP\n");
97 void **plugin_mem_p = va_arg (*args,
void **);
99 ip6_address_t sr_prefix;
100 u32 sr_prefixlen = 0;
103 if (
unformat (input,
"end.m.gtp6.d.di %U/%d nhtype ipv4",
108 else if (
unformat (input,
"end.m.gtp6.d.di %U/%d nhtype ipv6",
113 else if (
unformat (input,
"end.m.gtp6.d.di %U/%d nhtype non-ip",
118 else if (
unformat (input,
"end.m.gtp6.d.di %U/%d",
130 *plugin_mem_p = ls_mem;
197 "couldn't be registered");
204 .arc_name =
"ip6-unicast",
205 .node_name =
"srv6-end-m-gtp6-d-di",
dpo_lock_fn_t dv_lock
A reference counting lock function.
A virtual function table regisitered for a DPO type.
static uword clb_unformat_srv6_end_m_gtp6_d_di(unformat_input_t *input, va_list *args)
static void * clib_mem_alloc_aligned_at_offset(uword size, uword align, uword align_offset, int os_out_of_memory_on_failure)
vnet_main_t * vnet_get_main(void)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static u8 * clb_dpo_format_srv6_end_m_gtp6_d_di(u8 *s, va_list *args)
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.
static clib_error_t * srv6_end_m_gtp6_d_di_init(vlib_main_t *vm)
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
#define VLIB_INIT_FUNCTION(x)
description fragment has unexpected format
static int clb_creation_srv6_end_m_gtp6_d_di(ip6_sr_localsid_t *localsid)
#define clib_error_return(e, args...)
#define SRV6_NHTYPE_NON_IP
#define IPPROTO_IPV6_ROUTE
u32 end_m_gtp6_d_di_node_index
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static const char *const *const dpo_nodes[DPO_PROTO_NUM]
static u8 * clb_format_srv6_end_m_gtp6_d_di(u8 *s, va_list *args)
static int clb_removal_srv6_end_m_gtp6_d_di(ip6_sr_localsid_t *localsid)
srv6_end_main_v6_decap_di_t srv6_end_main_v6_decap_di
vlib_main_t vlib_node_runtime_t * node
void * plugin_mem
Memory to be used by the plugin callback functions.
vlib_node_registration_t srv6_end_m_gtp6_d_di
(constructor) VLIB_REGISTER_NODE (srv6_end_m_gtp6_d_di)
static void clib_mem_free(void *p)
static_always_inline void clib_memset_u8(void *p, u8 val, uword count)
static void clb_dpo_lock_srv6_end_m_gtp6_d_di(dpo_id_t *dpo)
VNET_FEATURE_INIT(srv6_end_m_gtp6_d_di, static)
static const char *const srv6_end_m_gtp6_d_di_nodes[]
static void clb_dpo_unlock_srv6_end_m_gtp6_d_di(dpo_id_t *dpo)
ip6srv_combo_header_t cache_hdr