19 #include <nsh/nsh.api.h> 27 #define DEBUG_LOG(...) clib_warning(__VA_ARGS__) 29 #define DEBUG_LOG(...) 34 #include "jvpp-nsh/io_fd_vpp_jvpp_nsh_JVppNshImpl.h" 36 #include "jvpp-nsh/jvpp_nsh_gen.h" 44 (JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index) {
46 clib_warning (
"Java_io_fd_vpp_jvpp_nsh_JVppNshImpl_init0");
52 plugin_main->
callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
56 if (get_message_id(env, #N) == 0) return; 57 foreach_supported_api_message;
61 vl_msg_api_set_handlers(get_message_id(env, #N), #n, \ 62 vl_api_##n##_t_handler, \ 66 sizeof(vl_api_##n##_t), 1); 67 foreach_api_reply_handler;
72 (JNIEnv *env, jclass clazz) {
87 if ((*vm)->GetEnv(vm, (
void**) &env, JNI_VERSION_1_8) != JNI_OK) {
91 if (cache_class_references(env) != 0) {
96 return JNI_VERSION_1_8;
102 if ((*vm)->GetEnv(vm, (
void**) &env, JNI_VERSION_1_8) != JNI_OK) {
105 delete_class_references(env);
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_nsh_JVppNshImpl_close0(JNIEnv *env, jclass clazz)
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_nsh_JVppNshImpl_init0(JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index)
jint JNI_OnLoad(JavaVM *vm, void *reserved)
svm_queue_t * vl_input_queue
#define clib_warning(format, args...)
void JNI_OnUnload(JavaVM *vm, void *reserved)
struct _svm_queue svm_queue_t