#!/usr/bin/env bash
NSH_PLUGIN_DIR=$(dirname $0)
-NSH_INSTALL_PREFIX=${NSH_INSTALL_PREFIX:-/usr}
+NSH_INSTALL_PREFIX=${NSH_INSTALL_PREFIX:-/usr/local}
cd ${NSH_PLUGIN_DIR}
autoreconf -i -f
[ -d build ] || mkdir build
u8 ver_o_c;
u8 length;
u8 next_protocol;
- u32 c1;
+ u32 c1;
u32 c2;
- u32 c3;
+ u32 c3;
u32 c4;
- u32 tlvs[0];
};
/** \brief Reply from adding NSH entry (nsh_add_del_entry)
u8 ver_o_c;
u8 length;
u8 next_protocol;
- u32 c1;
+ u32 c1;
u32 c2;
- u32 c3;
+ u32 c3;
u32 c4;
- u32 tlvs[0];
};
/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param is_add - add address if non-zero, else delete
- @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
- @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
+ @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
+ @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
if next action is to decap to NSH next protocol
Note the following heuristic:
- if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
u32 c2 = 0;
u32 c3 = 0;
u32 c4 = 0;
- u32 *tlvs = 0;
u32 tmp;
int rv;
nsh_add_del_entry_args_t _a, * a = &_a;
nsp_set = 1;
else if (unformat (line_input, "nsi %d", &nsi))
nsi_set = 1;
- else if (unformat (line_input, "tlv %x"))
- vec_add1 (tlvs, tmp);
else
return clib_error_return (0, "parse error: '%U'",
format_unformat_error, line_input);
foreach_copy_nshhdr_field;
#undef _
- a->nsh.tlvs[0] = 0 ; // TODO FIXME this shouldn't be set 0 - in NSH_SFC project
-
rv = nsh_add_del_entry (a);
switch(rv)
u32 c2 = 0;
u32 c3 = 0;
u32 c4 = 0;
- u32 *tlvs = 0;
u32 tmp;
vl_api_nsh_add_del_entry_t * mp;
nsp_set = 1;
else if (unformat (line_input, "nsi %d", &nsi))
nsi_set = 1;
- else if (unformat (line_input, "tlv %x"))
- vec_add1 (tlvs, tmp);
else
return -99; // PARSE ERROR;
}
foreach_copy_nshhdr_field;
#undef _
- mp->tlvs[0] = 0 ; // TODO FIXME this shouldn't be set 0 - in NSH_SFC project
/* send it... */
S;