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);
180 #define foreach_copy_nsh_base_hdr_field \ 188 #define foreach_nsh_node_error \ 189 _(MAPPED, "NSH header found and mapped") \ 190 _(NO_MAPPING, "no mapping for nsh key") \ 191 _(NO_ENTRY, "no entry for nsh key") \ 192 _(NO_PROXY, "no proxy for transport key") \ 193 _(INVALID_NEXT_PROTOCOL, "invalid next protocol") \ 194 _(INVALID_OPTIONS, "invalid md2 options") \ 195 _(INVALID_TTL, "ttl equals zero") \ 198 #define _(sym,str) NSH_NODE_ERROR_##sym, 205 #define foreach_nsh_node_next \ 206 _(DROP, "error-drop") \ 207 _(ENCAP_GRE4, "gre4-input" ) \ 208 _(ENCAP_GRE6, "gre6-input" ) \ 209 _(ENCAP_VXLANGPE, "vxlan-gpe-encap" ) \ 210 _(ENCAP_VXLAN4, "vxlan4-encap" ) \ 211 _(ENCAP_VXLAN6, "vxlan6-encap" ) \ 212 _(DECAP_ETH_INPUT, "ethernet-input" ) \ 213 _(ENCAP_LISP_GPE, "interface-output" ) \ 214 _(ENCAP_ETHERNET, "nsh-eth-output") \ 219 #define _(s,n) NSH_NODE_NEXT_##s, 238 #define VNET_SW_INTERFACE_FLAG_ADMIN_DOWN 0 241 #define NSH_MD2_IOAM_CLASS 0x9 242 #define NSH_MD2_IOAM_OPTION_TYPE_TRACE 0x3B 243 #define NSH_MD2_IOAM_OPTION_TYPE_PROOF_OF_TRANSIT 0x3C 245 #define NSH_MD2_IOAM_TRACE_DUMMY_LEN 0x8 247 #define MAX_NSH_HEADER_LEN 256 248 #define MAX_NSH_OPTION_LEN 128 254 int add_options (
u8 * opt,
257 nsh_tlv_header_t * opt),
259 nsh_tlv_header_t * old_opt,
260 nsh_tlv_header_t * new_opt),
262 nsh_tlv_header_t * opt),
264 nsh_tlv_header_t * opt));
266 typedef struct _nsh_main_dummy
268 u8 output_feature_arc_index;
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
u32 * tunnel_index_by_sw_if_index
Mapping from sw_if_index to tunnel index.
#define foreach_nsh_node_next
vlib_node_registration_t nsh_eth_output_node
(constructor) VLIB_REGISTER_NODE (nsh_eth_output_node)
struct _nsh_main_dummy nsh_main_dummy_t
vlib_node_registration_t nsh_aware_vnf_proxy_node
(constructor) VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node)
u8 output_feature_arc_index
nsh_base_header_t nsh_base
nsh_proxy_session_t * nsh_proxy_sessions
u8 input_feature_arc_index
nsh_entry_t * nsh_entries
u32 * free_nsh_tunnel_hw_if_indices
Free vlib hw_if_indices.
u8 * format_nsh_input_map_trace(u8 *s, va_list *args)
u8 * rewrite
Rewrite string.
nsh_option_map_t * nsh_option_mappings
uword decap_v4_next_override
u8 * format_nsh_header_with_length(u8 *s, va_list *args)
uword * nsh_proxy_session_by_key
u32 nsp_nsi
Key for nsh_header_t entry: 24bit NSP 8bit NSI.
u32 nsh_hw_if
vnet intfc hw_if_index
#define foreach_nsh_node_error
nsh_tlv_header_t nsh_md2_data_t
u32 mapped_nsp_nsi
Key for nsh_header_t entry to map to.
struct _vlib_node_registration vlib_node_registration_t
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))
uword * nsh_option_map_by_key
uword * nsh_mapping_by_mapped_key
Note: rewrite and rewrite_size used to support varied nsh header.
uword * nsh_mapping_by_key