diff options
author | 2016-08-03 00:01:09 +0800 | |
---|---|---|
committer | 2016-08-02 07:26:45 +0000 | |
commit | b28084459ee629a79a5c447e75e9a340b7de9e48 (patch) | |
tree | 90efe1c01bf5e8f1897bffc705745b50e77b9a06 /nsh-plugin/nsh/nsh.c | |
parent | 59d02208a630c634699f6c55d0513afc4aa9cbf1 (diff) |
Change control_ping to nsh_control_ping
PatchSet 3: rebuild
PatchSet 2: add msg_id_base
Change-Id: I3a52acced0f85e5799560926fa8f4eb65e674009
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh-plugin/nsh/nsh.c')
-rw-r--r-- | nsh-plugin/nsh/nsh.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c index 99e4ac3..f6c45e7 100644 --- a/nsh-plugin/nsh/nsh.c +++ b/nsh-plugin/nsh/nsh.c @@ -79,7 +79,7 @@ return; \ \ rmp = vl_msg_api_alloc (sizeof (*rmp)); \ - rmp->_vl_msg_id = ntohs((t)); \ + rmp->_vl_msg_id = ntohs((t)+nm->msg_id_base); \ rmp->context = mp->context; \ rmp->retval = ntohl(rv); \ do {body;} while (0); \ @@ -99,7 +99,7 @@ _(NSH_ENTRY_DUMP, nsh_entry_dump) \ _(NSH_ADD_DEL_MAP, nsh_add_del_map) \ _(NSH_MAP_DUMP, nsh_map_dump) \ - _(CONTROL_PING, control_ping) + _(NSH_CONTROL_PING, nsh_control_ping) clib_error_t * vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h, @@ -119,13 +119,14 @@ typedef struct { } nsh_input_trace_t; -static void vl_api_control_ping_t_handler -(vl_api_control_ping_t *mp) +static void vl_api_nsh_control_ping_t_handler +(vl_api_nsh_control_ping_t *mp) { - vl_api_control_ping_reply_t * rmp; + nsh_main_t * nm = &nsh_main; + vl_api_nsh_control_ping_reply_t * rmp; int rv = 0; - REPLY_MACRO2(VL_API_CONTROL_PING_REPLY, + REPLY_MACRO2(VL_API_NSH_CONTROL_PING_REPLY, ({ rmp->vpe_pid = ntohl (getpid()); })); |