|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
15 #ifndef included_nsh_h
16 #define included_nsh_h
32 #define MAX_METADATA_LEN 62
103 #define MAX_MD2_OPTIONS 256
149 nsh_tlv_header_t * opt);
151 nsh_tlv_header_t * old_opt,
152 nsh_tlv_header_t * new_opt);
154 nsh_tlv_header_t * opt);
183 #define foreach_copy_nsh_base_hdr_field \
191 #define foreach_nsh_node_error \
192 _(MAPPED, "NSH header found and mapped") \
193 _(NO_MAPPING, "no mapping for nsh key") \
194 _(NO_ENTRY, "no entry for nsh key") \
195 _(NO_PROXY, "no proxy for transport key") \
196 _(INVALID_NEXT_PROTOCOL, "invalid next protocol") \
197 _(INVALID_OPTIONS, "invalid md2 options") \
198 _(INVALID_TTL, "ttl equals zero") \
201 #define _(sym,str) NSH_NODE_ERROR_##sym,
208 #define foreach_nsh_node_next \
209 _(DROP, "error-drop") \
210 _(ENCAP_GRE4, "gre4-input" ) \
211 _(ENCAP_GRE6, "gre6-input" ) \
212 _(ENCAP_VXLANGPE, "vxlan-gpe-encap" ) \
213 _(ENCAP_VXLAN4, "vxlan4-encap" ) \
214 _(ENCAP_VXLAN6, "vxlan6-encap" ) \
215 _(DECAP_ETH_INPUT, "ethernet-input" ) \
216 _(ENCAP_LISP_GPE, "interface-output" ) \
217 _(ENCAP_ETHERNET, "nsh-eth-output") \
222 #define _(s,n) NSH_NODE_NEXT_##s,
241 #define VNET_SW_INTERFACE_FLAG_ADMIN_DOWN 0
244 #define NSH_MD2_IOAM_CLASS 0x9
245 #define NSH_MD2_IOAM_OPTION_TYPE_TRACE 0x3B
246 #define NSH_MD2_IOAM_OPTION_TYPE_PROOF_OF_TRANSIT 0x3C
248 #define NSH_MD2_IOAM_TRACE_DUMMY_LEN 0x8
250 #define MAX_NSH_HEADER_LEN 256
251 #define MAX_NSH_OPTION_LEN 128
257 int add_options (
u8 * opt,
260 nsh_tlv_header_t * opt),
262 nsh_tlv_header_t * old_opt,
263 nsh_tlv_header_t * new_opt),
265 nsh_tlv_header_t * opt),
267 nsh_tlv_header_t * opt));
269 typedef struct _nsh_main_placeholder
271 u8 output_feature_arc_index;
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
clib_error_t * nsh_api_init(vlib_main_t *vm, nsh_main_t *nm)
u8 input_feature_arc_index
u8 * format_nsh_header_with_length(u8 *s, va_list *args)
Note: rewrite and rewrite_size used to support varied nsh header.
vlib_node_registration_t nsh_eth_output_node
(constructor) VLIB_REGISTER_NODE (nsh_eth_output_node)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
int nsh_add_del_entry(nsh_add_del_entry_args_t *a, u32 *entry_indexp)
Action function for adding an NSH entry nsh_add_del_entry_args_t *a: host order.
u32 nsp_nsi
Key for nsh_header_t entry: 24bit NSP 8bit NSI.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u8 output_feature_arc_index
nsh_tlv_header_t nsh_md2_data_t
u32 nsh_classifier_node_index
u8 * format_nsh_header(u8 *s, va_list *args)
nsh_option_map_t * nsh_md2_lookup_option(u16 class, u8 type)
uword * nsh_option_map_by_key
nsh_entry_t * nsh_entries
int nsh_add_del_map(nsh_add_del_map_args_t *a, u32 *map_indexp)
Action function to add or del an nsh map.
uword * nsh_mapping_by_key
struct _vlib_node_registration vlib_node_registration_t
uword * nsh_proxy_session_by_key
nsh_base_header_t nsh_base
int nsh_add_del_proxy_session(nsh_add_del_map_args_t *a)
Action function to add or del an nsh-proxy-session.
nsh_proxy_session_t * nsh_proxy_sessions
static struct option options[]
nsh_option_map_t * nsh_option_mappings
uword * nsh_mapping_by_mapped_key
uword decap_v4_next_override
u8 * rewrite
Rewrite string.
u32 nsh_hw_if
vnet intfc hw_if_index
int nsh_md2_register_option(u16 class, u8 type, u8 option_size, int add_options(u8 *opt, u8 *opt_size), int options(vlib_buffer_t *b, nsh_tlv_header_t *opt), int swap_options(vlib_buffer_t *b, nsh_tlv_header_t *old_opt, nsh_tlv_header_t *new_opt), int pop_options(vlib_buffer_t *b, nsh_tlv_header_t *opt), u8 *trace(u8 *s, nsh_tlv_header_t *opt))
u32 mapped_nsp_nsi
Key for nsh_header_t entry to map to.
#define foreach_nsh_node_next
#define foreach_nsh_node_error
u8 * format_nsh_input_map_trace(u8 *s, va_list *args)
vlib_node_registration_t nsh_aware_vnf_proxy_node
(constructor) VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node)
u32 * tunnel_index_by_sw_if_index
Mapping from sw_if_index to tunnel index.
struct _nsh_main_placeholder nsh_main_placeholder_t
u8 * format_nsh_node_map_trace(u8 *s, va_list *args)
u32 * free_nsh_tunnel_hw_if_indices
Free vlib hw_if_indices.
vl_api_fib_path_type_t type
@ NSH_AWARE_VNF_PROXY_TYPE
VLIB buffer representation.