|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 #include <vpp/app/version.h>
42 return (
format (s,
"SR: dynamic_proxy_index:[%u]",
index));
69 "Transit function with decapsulation for IPv4/GTP tunnel";
71 "<sr-prefix>/<sr-prefixlen> v6src_prefix <v6src_prefix>/<prefixlen> [nhtype <nhtype>]";
78 s =
format (s,
"SRv6 T.M.GTP4.D\n\t");
91 s =
format (s,
", NHType IPv4\n");
93 s =
format (s,
", NHType IPv6\n");
95 s =
format (s,
", NHType Non-IP\n");
108 void **plugin_mem_p = va_arg (*args,
void **);
110 ip6_address_t sr_prefix;
112 ip6_address_t v6src_prefix;
116 if (
unformat (input,
"t.m.gtp4.d %U/%d v6src_prefix %U/%d nhtype ipv4",
124 (input,
"t.m.gtp4.d %U/%d v6src_prefix %U/%d nhtype ipv6",
132 (input,
"t.m.gtp4.d %U/%d v6src_prefix %U/%d nhtype non-ip",
138 else if (
unformat (input,
"t.m.gtp4.d %U/%d v6src_prefix %U/%d",
151 *plugin_mem_p = ls_mem;
205 ip6->ip_version_traffic_class_and_flow_label = 0x60;
207 ip6->protocol = IP_PROTOCOL_IPV6;
219 "couldn't be registered");
226 .arc_name =
"ip4-unicast",
227 .node_name =
"srv6-t-m-gtp4-d",
static u8 * clb_dpo_format_srv6_t_m_gtp4_d(u8 *s, va_list *args)
static u8 * clb_format_srv6_t_m_gtp4_d(u8 *s, va_list *args)
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_FEATURE_INIT(srv6_t_m_gtp4_d, static)
const static dpo_vft_t dpo_vft
static clib_error_t * srv6_t_m_gtp4_d_init(vlib_main_t *vm)
u32 t_m_gtp4_d_node_index
static void clib_mem_free(void *p)
vlib_main_t vlib_node_runtime_t * node
#define clib_error_return(e, args...)
#define SRV6_NHTYPE_NON_IP
const static char *const *const dpo_nodes[DPO_PROTO_NUM]
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
ip6_address_t v6src_prefix
const static char *const srv6_t_m_gtp4_d_v6_nodes[]
vnet_main_t * vnet_get_main(void)
static int clb_creation_srv6_t_m_gtp4_d(ip6_sr_policy_t *sr_policy)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static void clb_dpo_lock_srv6_t_m_gtp4_d(dpo_id_t *dpo)
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type()
int sr_policy_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_p_plugin_callback_t *creation_fn, sr_p_plugin_callback_t *removal_fn)
SR Policy plugin registry.
dpo_lock_fn_t dv_lock
A reference counting lock function.
static_always_inline void clib_memset_u8(void *p, u8 val, uword count)
vlib_node_registration_t srv6_t_m_gtp4_d
(constructor) VLIB_REGISTER_NODE (srv6_t_m_gtp4_d)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
static int clb_removal_srv6_t_m_gtp4_d(ip6_sr_policy_t *sr_policy)
static uword clb_unformat_srv6_t_m_gtp4_d(unformat_input_t *input, va_list *args)
srv6_t_main_v4_decap_t srv6_t_main_v4_decap
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
const static char *const srv6_t_m_gtp4_d_nodes[]
A virtual function table regisitered for a DPO type.
static void clb_dpo_unlock_srv6_t_m_gtp4_d(dpo_id_t *dpo)
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...