aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorKeith Burns (alagalah) <alagalah@gmail.com>2016-05-04 16:11:38 -0700
committerDave Barach <openvpp@barachs.net>2016-05-05 11:45:22 +0000
commitfdff1e6ed540f2a04792fb64e04b0c7862dc2b8c (patch)
treee846f70e89a3992ca98c82759bd9d36dc7ed3fdb /vpp
parent8f15e922f7f32c1beca5baa9a1a7f187ff5bdc4f (diff)
VPP-39 - refactoring of NSH into own folder
- common header files and structs used in both GRE and VXLAN-GPE Change-Id: I06d0b773e936fb011408817237059f24a4beb412 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/api/api.c46
-rw-r--r--vpp/api/custom_dump.c8
2 files changed, 27 insertions, 27 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index 724bcf91..e33e24d2 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -4543,7 +4543,7 @@ vl_api_nsh_gre_add_del_tunnel_t_handler
decap_next_index = ntohl(mp->decap_next_index);
/* Interpret decap_vrf_id as an opaque if sending to other-than-ip4-input */
- if (decap_next_index == NSH_INPUT_NEXT_IP4_INPUT) {
+ if (decap_next_index == NSH_GRE_INPUT_NEXT_IP4_INPUT) {
p = hash_get (im->fib_index_by_table_id, ntohl(mp->decap_vrf_id));
if (! p) {
rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
@@ -4563,20 +4563,20 @@ vl_api_nsh_gre_add_del_tunnel_t_handler
a->encap_fib_index = encap_fib_index;
a->decap_fib_index = decap_fib_index;
a->decap_next_index = decap_next_index;
- a->ver_o_c = mp->ver_o_c;
- a->length = mp->length;
- a->md_type = mp->md_type;
- a->next_protocol = mp->next_protocol;
- a->spi_si = ntohl(mp->spi_si);
- a->c1 = ntohl(mp->c1);
- a->c2 = ntohl(mp->c2);
- a->c3 = ntohl(mp->c3);
- a->c4 = ntohl(mp->c4);
+ a->nsh_hdr.ver_o_c = mp->ver_o_c;
+ a->nsh_hdr.length = mp->length;
+ a->nsh_hdr.md_type = mp->md_type;
+ a->nsh_hdr.next_protocol = mp->next_protocol;
+ a->nsh_hdr.spi_si = ntohl(mp->spi_si);
+ a->nsh_hdr.c1 = ntohl(mp->c1);
+ a->nsh_hdr.c2 = ntohl(mp->c2);
+ a->nsh_hdr.c3 = ntohl(mp->c3);
+ a->nsh_hdr.c4 = ntohl(mp->c4);
for (i = 0; i < mp->tlv_len_in_words; i++)
vec_add1 (tlvs, ntohl(mp->tlvs[i]));
- a->tlvs = tlvs;
+ a->nsh_hdr.tlvs = tlvs;
rv = vnet_nsh_gre_add_del_tunnel (a, &sw_if_index);
@@ -4612,7 +4612,7 @@ vl_api_nsh_vxlan_gpe_add_del_tunnel_t_handler
decap_next_index = ntohl(mp->decap_next_index);
/* Interpret decap_vrf_id as an opaque if sending to other-than-ip4-input */
- if (decap_next_index == NSH_INPUT_NEXT_IP4_INPUT) {
+ if (decap_next_index == NSH_GRE_INPUT_NEXT_IP4_INPUT) {
p = hash_get (im->fib_index_by_table_id, ntohl(mp->decap_vrf_id));
if (! p) {
rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
@@ -4633,20 +4633,20 @@ vl_api_nsh_vxlan_gpe_add_del_tunnel_t_handler
a->decap_fib_index = decap_fib_index;
a->decap_next_index = decap_next_index;
a->vni = ntohl(mp->vni);
- a->ver_o_c = mp->ver_o_c;
- a->length = mp->length;
- a->md_type = mp->md_type;
- a->next_protocol = mp->next_protocol;
- a->spi_si = ntohl(mp->spi_si);
- a->c1 = ntohl(mp->c1);
- a->c2 = ntohl(mp->c2);
- a->c3 = ntohl(mp->c3);
- a->c4 = ntohl(mp->c4);
+ a->nsh_hdr.ver_o_c = mp->ver_o_c;
+ a->nsh_hdr.length = mp->length;
+ a->nsh_hdr.md_type = mp->md_type;
+ a->nsh_hdr.next_protocol = mp->next_protocol;
+ a->nsh_hdr.spi_si = ntohl(mp->spi_si);
+ a->nsh_hdr.c1 = ntohl(mp->c1);
+ a->nsh_hdr.c2 = ntohl(mp->c2);
+ a->nsh_hdr.c3 = ntohl(mp->c3);
+ a->nsh_hdr.c4 = ntohl(mp->c4);
for (i = 0; i < mp->tlv_len_in_words; i++)
vec_add1 (tlvs, ntohl(mp->tlvs[i]));
- a->tlvs = tlvs;
+ a->nsh_hdr.tlvs = tlvs;
rv = vnet_nsh_vxlan_gpe_add_del_tunnel (a, &sw_if_index);
@@ -4680,7 +4680,7 @@ vl_api_lisp_gpe_add_del_tunnel_t_handler
decap_next_index = ntohl(mp->decap_next_index);
/* Interpret decap_vrf_id as an opaque if sending to other-than-ip4-input */
- if (decap_next_index == NSH_INPUT_NEXT_IP4_INPUT) {
+ if (decap_next_index == NSH_GRE_INPUT_NEXT_IP4_INPUT) {
p = hash_get (im->fib_index_by_table_id, ntohl(mp->decap_vrf_id));
if (! p) {
rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
diff --git a/vpp/api/custom_dump.c b/vpp/api/custom_dump.c
index 6ae8c76d..574e102f 100644
--- a/vpp/api/custom_dump.c
+++ b/vpp/api/custom_dump.c
@@ -1603,9 +1603,9 @@ static void *vl_api_nsh_gre_add_del_tunnel_t_print
if (mp->ver_o_c & 0xc)
s = format (s, "version %d ", mp->ver_o_c>>6);
- if (mp->ver_o_c & NSH_GRE_O_BIT)
+ if (mp->ver_o_c & NSH_O_BIT)
s = format (s, "o-bit 1 ");
- if (mp->ver_o_c & NSH_GRE_C_BIT)
+ if (mp->ver_o_c & NSH_C_BIT)
s = format (s, "c-bit 1 ");
if (mp->md_type)
s = format (s, "md-type %d ", mp->md_type);
@@ -1659,9 +1659,9 @@ static void *vl_api_nsh_vxlan_gpe_add_del_tunnel_t_print
if (mp->ver_o_c & 0xc)
s = format (s, "version %d ", mp->ver_o_c>>6);
- if (mp->ver_o_c & NSH_GRE_O_BIT)
+ if (mp->ver_o_c & NSH_O_BIT)
s = format (s, "o-bit 1 ");
- if (mp->ver_o_c & NSH_GRE_C_BIT)
+ if (mp->ver_o_c & NSH_C_BIT)
s = format (s, "c-bit 1 ");
if (mp->md_type)
s = format (s, "md-type %d ", mp->md_type);