FD.io VPP  v18.10-32-g1161dda
Vector Packet Processing
nsh.h File Reference
+ Include dependency graph for nsh.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nsh_option_map_by_key_t
 
struct  nsh_option_map_t
 
struct  nsh_entry_t
 Note: rewrite and rewrite_size used to support varied nsh header. More...
 
struct  nsh_add_del_entry_args_t
 
struct  nsh_map_t
 
struct  nsh_add_del_map_args_t
 
struct  nsh_proxy_session_by_key_t
 
struct  nsh_proxy_session_t
 
struct  nsh_main_t
 
struct  nsh_input_trace_t
 

Macros

#define MAX_METADATA_LEN   62
 
#define MAX_MD2_OPTIONS   256
 
#define foreach_copy_nsh_base_hdr_field
 
#define foreach_nsh_node_error
 
#define foreach_nsh_node_next
 
#define VNET_SW_INTERFACE_FLAG_ADMIN_DOWN   0
 
#define NSH_MD2_IOAM_CLASS   0x9
 
#define NSH_MD2_IOAM_OPTION_TYPE_TRACE   0x3B
 
#define NSH_MD2_IOAM_OPTION_TYPE_PROOF_OF_TRANSIT   0x3C
 
#define NSH_MD2_IOAM_TRACE_DUMMY_LEN   0x8
 
#define MAX_NSH_HEADER_LEN   256
 
#define MAX_NSH_OPTION_LEN   128
 

Typedefs

typedef struct _nsh_main_dummy nsh_main_dummy_t
 

Enumerations

enum  nsh_input_error_t { NSH_NODE_N_ERROR }
 
enum  nsh_node_next_t { NSH_NODE_N_NEXT }
 
enum  nsh_action_type { NSH_ACTION_SWAP, NSH_ACTION_PUSH, NSH_ACTION_POP }
 
enum  nsh_entity_type { NSH_INPUT_TYPE, NSH_PROXY_TYPE, NSH_CLASSIFIER_TYPE, NSH_AWARE_VNF_PROXY_TYPE }
 

Functions

u8format_nsh_input_map_trace (u8 *s, va_list *args)
 
u8format_nsh_header_with_length (u8 *s, va_list *args)
 
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))
 

Variables

nsh_main_t nsh_main
 
vlib_node_registration_t nsh_aware_vnf_proxy_node
 (constructor) VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node) More...
 
vlib_node_registration_t nsh_eth_output_node
 (constructor) VLIB_REGISTER_NODE (nsh_eth_output_node) More...
 

Macro Definition Documentation

#define foreach_copy_nsh_base_hdr_field
Value:
_(ver_o_c) \
_(length) \
_(md_type) \
_(next_protocol) \
_(nsp_nsi)

Definition at line 180 of file nsh.h.

#define foreach_nsh_node_error
Value:
_(MAPPED, "NSH header found and mapped") \
_(NO_MAPPING, "no mapping for nsh key") \
_(NO_ENTRY, "no entry for nsh key") \
_(NO_PROXY, "no proxy for transport key") \
_(INVALID_NEXT_PROTOCOL, "invalid next protocol") \
_(INVALID_OPTIONS, "invalid md2 options") \
_(INVALID_TTL, "ttl equals zero") \

Definition at line 188 of file nsh.h.

#define foreach_nsh_node_next
Value:
_(DROP, "error-drop") \
_(ENCAP_GRE4, "gre4-input" ) \
_(ENCAP_GRE6, "gre6-input" ) \
_(ENCAP_VXLANGPE, "vxlan-gpe-encap" ) \
_(ENCAP_VXLAN4, "vxlan4-encap" ) \
_(ENCAP_VXLAN6, "vxlan6-encap" ) \
_(DECAP_ETH_INPUT, "ethernet-input" ) \
_(ENCAP_LISP_GPE, "interface-output" ) \
_(ENCAP_ETHERNET, "nsh-eth-output") \
/* _(DECAP_IP4_INPUT, "ip4-input") \ */
DROP
Definition: error.def:41

Definition at line 205 of file nsh.h.

#define MAX_MD2_OPTIONS   256

Definition at line 103 of file nsh.h.

#define MAX_METADATA_LEN   62

Definition at line 32 of file nsh.h.

#define MAX_NSH_HEADER_LEN   256

Definition at line 247 of file nsh.h.

#define MAX_NSH_OPTION_LEN   128

Definition at line 248 of file nsh.h.

#define NSH_MD2_IOAM_CLASS   0x9

Definition at line 241 of file nsh.h.

#define NSH_MD2_IOAM_OPTION_TYPE_PROOF_OF_TRANSIT   0x3C

Definition at line 243 of file nsh.h.

#define NSH_MD2_IOAM_OPTION_TYPE_TRACE   0x3B

Definition at line 242 of file nsh.h.

#define NSH_MD2_IOAM_TRACE_DUMMY_LEN   0x8

Definition at line 245 of file nsh.h.

#define VNET_SW_INTERFACE_FLAG_ADMIN_DOWN   0

Definition at line 238 of file nsh.h.

Typedef Documentation

typedef struct _nsh_main_dummy nsh_main_dummy_t

Enumeration Type Documentation

Enumerator
NSH_ACTION_SWAP 
NSH_ACTION_PUSH 
NSH_ACTION_POP 

Definition at line 225 of file nsh.h.

Enumerator
NSH_INPUT_TYPE 
NSH_PROXY_TYPE 
NSH_CLASSIFIER_TYPE 
NSH_AWARE_VNF_PROXY_TYPE 

Definition at line 231 of file nsh.h.

Enumerator
NSH_NODE_N_ERROR 

Definition at line 197 of file nsh.h.

Enumerator
NSH_NODE_N_NEXT 

Definition at line 218 of file nsh.h.

Function Documentation

u8* format_nsh_header_with_length ( u8 s,
va_list *  args 
)
u8* format_nsh_input_map_trace ( u8 s,
va_list *  args 
)
int nsh_md2_register_option ( u16  class,
u8  type,
u8  option_size,
int   add_optionsu8 *opt, u8 *opt_size,
int   optionsvlib_buffer_t *b, nsh_tlv_header_t *opt,
int   swap_optionsvlib_buffer_t *b, nsh_tlv_header_t *old_opt, nsh_tlv_header_t *new_opt,
int   pop_optionsvlib_buffer_t *b, nsh_tlv_header_t *opt,
u8 traceu8 *s, nsh_tlv_header_t *opt 
)

Definition at line 125 of file nsh.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t nsh_aware_vnf_proxy_node

(constructor) VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node)

Definition at line 2425 of file nsh.c.

vlib_node_registration_t nsh_eth_output_node

(constructor) VLIB_REGISTER_NODE (nsh_eth_output_node)

Definition at line 334 of file nsh_output.c.

nsh_main_t nsh_main

Definition at line 167 of file nsh.h.