aboutsummaryrefslogtreecommitdiffstats
path: root/nsh-plugin/java/jvpp
diff options
context:
space:
mode:
Diffstat (limited to 'nsh-plugin/java/jvpp')
-rw-r--r--nsh-plugin/java/jvpp/jvpp_nsh.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nsh-plugin/java/jvpp/jvpp_nsh.c b/nsh-plugin/java/jvpp/jvpp_nsh.c
index cc8bcb7..9dd5bf7 100644
--- a/nsh-plugin/java/jvpp/jvpp_nsh.c
+++ b/nsh-plugin/java/jvpp/jvpp_nsh.c
@@ -69,8 +69,14 @@ JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_nsh_JVppNshImpl_init0
plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback);
plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
+ // verify API has not changed since jar generation
+ #define _(N) \
+ get_message_id(env, #N);
+ foreach_supported_api_message;
+ #undef _
+
#define _(N,n) \
- vl_msg_api_set_handlers(VL_API_##N + plugin_main->msg_id_base, #n, \
+ vl_msg_api_set_handlers(get_message_id(env, #N), #n, \
vl_api_##n##_t_handler, \
vl_noop_handler, \
vl_api_##n##_t_endian, \