|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
23 #include <srv6-localsid/srv6_localsid_sample.h>
30 unsigned char def_str[64] =
"This is a definition of a sample new_srv6_localsid";
88 void **plugin_mem = va_arg (*args,
void **);
104 *plugin_mem = ls_mem;
118 return (
format (s,
"SR: localsid_sample_index:[%u]",
index));
138 "srv6-localsid-sample",
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
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.
void srv6_localsid_sample_dpo_lock(dpo_id_t *dpo)
static void clib_mem_free(void *p)
void * plugin_mem
Memory to be used by the plugin callback functions.
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
const static dpo_vft_t srv6_localsid_sample_vft
unsigned char def_str[64]
void srv6_localsid_sample_dpo_unlock(dpo_id_t *dpo)
u8 * format_srv6_localsid_sample(u8 *s, va_list *args)
dpo_type_t srv6_localsid_sample_dpo_type
static int srv6_localsid_creation_fn(ip6_sr_localsid_t *localsid)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
dpo_lock_fn_t dv_lock
A reference counting lock function.
static u8 * format_srv6_localsid_sample_dpo(u8 *s, va_list *args)
unsigned char params_str[32]
unsigned char keyword_str[32]
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
static clib_error_t * srv6_localsid_sample_init(vlib_main_t *vm)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
A virtual function table regisitered for a DPO type.
uword unformat_srv6_localsid_sample(unformat_input_t *input, va_list *args)
const static char *const srv6_localsid_sample_ip6_nodes[]
unsigned char srv6_localsid_name[32]
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...
const static char *const *const srv6_localsid_sample_nodes[DPO_PROTO_NUM]
u32 srv6_localsid_behavior_id
static int srv6_localsid_removal_fn(ip6_sr_localsid_t *localsid)
srv6_localsid_sample_main_t srv6_localsid_sample_main