aboutsummaryrefslogtreecommitdiffstats
path: root/nsh-plugin/nsh
diff options
context:
space:
mode:
Diffstat (limited to 'nsh-plugin/nsh')
-rw-r--r--nsh-plugin/nsh/nsh.api22
-rw-r--r--nsh-plugin/nsh/nsh.c17
-rw-r--r--nsh-plugin/nsh/nsh_test.c39
3 files changed, 2 insertions, 76 deletions
diff --git a/nsh-plugin/nsh/nsh.api b/nsh-plugin/nsh/nsh.api
index 9434ba5..8ee4943 100644
--- a/nsh-plugin/nsh/nsh.api
+++ b/nsh-plugin/nsh/nsh.api
@@ -116,25 +116,3 @@ define nsh_map_details {
u32 sw_if_index;
u32 next_node;
};
-
-/** \brief Control ping from client to api server request
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
-*/
-define nsh_control_ping {
- u32 client_index;
- u32 context;
-};
-
-/** \brief Control ping from the client to the server response
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
- @param retval - return code for the request
- @param vpe_pid - the pid of the vpe, returned by the server
-*/
-define nsh_control_ping_reply {
- u32 context;
- i32 retval;
- u32 client_index;
- u32 vpe_pid;
-};
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c
index 780b385..ae440b8 100644
--- a/nsh-plugin/nsh/nsh.c
+++ b/nsh-plugin/nsh/nsh.c
@@ -98,8 +98,7 @@
_(NSH_ADD_DEL_ENTRY, nsh_add_del_entry) \
_(NSH_ENTRY_DUMP, nsh_entry_dump) \
_(NSH_ADD_DEL_MAP, nsh_add_del_map) \
- _(NSH_MAP_DUMP, nsh_map_dump) \
- _(NSH_CONTROL_PING, nsh_control_ping)
+ _(NSH_MAP_DUMP, nsh_map_dump)
clib_error_t *
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
@@ -118,20 +117,6 @@ typedef struct {
nsh_header_t nsh_header;
} nsh_input_trace_t;
-
-static void vl_api_nsh_control_ping_t_handler
-(vl_api_nsh_control_ping_t *mp)
-{
- nsh_main_t * nm = &nsh_main;
- vl_api_nsh_control_ping_reply_t * rmp;
- int rv = 0;
-
- REPLY_MACRO2(VL_API_NSH_CONTROL_PING_REPLY,
- ({
- rmp->vpe_pid = ntohl (getpid());
- }));
-}
-
u8 * format_nsh_header (u8 * s, va_list * args)
{
nsh_header_t * nsh = va_arg (*args, nsh_header_t *);
diff --git a/nsh-plugin/nsh/nsh_test.c b/nsh-plugin/nsh/nsh_test.c
index 08f7ddf..c5d30ef 100644
--- a/nsh-plugin/nsh/nsh_test.c
+++ b/nsh-plugin/nsh/nsh_test.c
@@ -85,8 +85,7 @@ foreach_standard_reply_retval_handler;
_(NSH_ADD_DEL_ENTRY_REPLY, nsh_add_del_entry_reply) \
_(NSH_ENTRY_DETAILS, nsh_entry_details) \
_(NSH_ADD_DEL_MAP_REPLY, nsh_add_del_map_reply) \
-_(NSH_MAP_DETAILS, nsh_map_details) \
-_(NSH_CONTROL_PING_REPLY, nsh_control_ping_reply)
+_(NSH_MAP_DETAILS, nsh_map_details)
/* M: construct, but don't yet send a message */
@@ -125,42 +124,6 @@ do { \
return -99; \
} while(0);
-
-static void vl_api_nsh_control_ping_reply_t_handler
-(vl_api_nsh_control_ping_reply_t * mp)
-{
- vat_main_t * vam = &vat_main;
- i32 retval = ntohl(mp->retval);
- if (vam->async_mode) {
- vam->async_errors += (retval < 0);
- } else {
- vam->retval = retval;
- vam->result_ready = 1;
- }
-}
-
-static void vl_api_nsh_control_ping_reply_t_handler_json
-(vl_api_nsh_control_ping_reply_t * mp)
-{
- vat_main_t * vam = &vat_main;
- i32 retval = ntohl(mp->retval);
-
- if (VAT_JSON_NONE != vam->json_tree.type) {
- vat_json_print(vam->ofp, &vam->json_tree);
- vat_json_free(&vam->json_tree);
- vam->json_tree.type = VAT_JSON_NONE;
- } else {
- /* just print [] */
- vat_json_init_array(&vam->json_tree);
- vat_json_print(vam->ofp, &vam->json_tree);
- vam->json_tree.type = VAT_JSON_NONE;
- }
-
- vam->retval = retval;
- vam->result_ready = 1;
-}
-
-
static int api_nsh_add_del_entry (vat_main_t * vam)
{
nsh_test_main_t * sm = &nsh_test_main;