aboutsummaryrefslogtreecommitdiffstats
path: root/nsh-plugin/nsh/nsh.h
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2017-03-18 00:57:55 +0800
committerHongjun Ni <hongjun.ni@intel.com>2017-03-22 19:12:09 +0800
commit48473a840103b7f75a0749d371d0493337bd173b (patch)
treeb9fd2407a8c376dd7f279fbdb0b6583008c57daa /nsh-plugin/nsh/nsh.h
parentf126e1c375fb63ba6ae8121dce3ea86bc6cf1809 (diff)
NSHSFC-17 Enable NSH-aware SNAT
Configuration: set interface snat in nsh_tunnel0 out nsh_tunnel1 snat add static mapping local 192.168.50.72 external 10.0.35.1 Change-Id: I8e1bd5e3bea1ccaad03a1bba86eca3e98316df17 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh-plugin/nsh/nsh.h')
-rw-r--r--nsh-plugin/nsh/nsh.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/nsh-plugin/nsh/nsh.h b/nsh-plugin/nsh/nsh.h
index ee6982b..501f756 100644
--- a/nsh-plugin/nsh/nsh.h
+++ b/nsh-plugin/nsh/nsh.h
@@ -66,7 +66,13 @@ typedef struct {
u32 mapped_nsp_nsi;
/* NSH Header action: swap, push and pop */
u32 nsh_action;
+
+ /** vnet intfc hw_if_index */
+ u32 nsh_hw_if;
/* vnet intfc sw_if_index */
+ u32 nsh_sw_if;
+
+ /* encap if index */
u32 sw_if_index;
u32 next_node;
} nsh_map_t;
@@ -111,6 +117,11 @@ typedef struct {
/* hash lookup nsh_proxy by key */
uword * nsh_proxy_session_by_key;
+ /** Free vlib hw_if_indices */
+ u32 * free_nsh_tunnel_hw_if_indices;
+ /** Mapping from sw_if_index to tunnel index */
+ u32 * tunnel_index_by_sw_if_index;
+
/* vector of nsh_option_map */
nsh_option_map_t * nsh_option_mappings;
/* hash lookup nsh_option_map by key */
@@ -142,6 +153,8 @@ typedef struct {
nsh_main_t nsh_main;
+extern vlib_node_registration_t nsh_aware_vnf_proxy_node;
+
u8 * format_nsh_input_map_trace (u8 * s, va_list * args);
u8 * format_nsh_header_with_length (u8 * s, va_list * args);
@@ -200,8 +213,11 @@ typedef enum {
NSH_INPUT_TYPE,
NSH_PROXY_TYPE,
NSH_CLASSIFIER_TYPE,
+ NSH_AWARE_VNF_PROXY_TYPE,
} nsh_entity_type;
+#define VNET_SW_INTERFACE_FLAG_ADMIN_DOWN 0
+
/* md2 class and type definition */
#define NSH_MD2_IOAM_CLASS 0x9
#define NSH_MD2_IOAM_OPTION_TYPE_TRACE 0x3B