27 #define vl_print(handle, ...) 33 #define vl_api_version(n,v) static u32 api_version=(v); 42 #define DEBUG_LOG(...) clib_warning(__VA_ARGS__) 44 #define DEBUG_LOG(...) 49 #include "ioam/jvpp/io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl.h" 51 #include "ioam/jvpp/jvpp_ioam_trace_gen.h" 59 (JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index) {
62 clib_warning (
"Java_io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl_init0");
67 name =
format (0,
"ioam_trace_%08x%c", api_version, 0);
71 jclass exClass = (*env)->FindClass(env,
"java/lang/IllegalStateException");
72 (*env)->ThrowNew(env, exClass,
"ioam_trace plugin is not loaded in VPP");
75 plugin_main->
callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback));
78 vl_msg_api_set_handlers(VL_API_##N + plugin_main->msg_id_base, #n, \ 79 vl_api_##n##_t_handler, \ 81 vl_api_##n##_t_endian, \ 82 vl_api_##n##_t_print, \ 83 sizeof(vl_api_##n##_t), 1); 84 foreach_api_reply_handler;
90 (JNIEnv *env, jclass clazz) {
105 if ((*vm)->GetEnv(vm, (
void**) &env, JNI_VERSION_1_8) != JNI_OK) {
109 if (cache_class_references(env) != 0) {
114 return JNI_VERSION_1_8;
120 if ((*vm)->GetEnv(vm, (
void**) &env, JNI_VERSION_1_8) != JNI_OK) {
123 delete_class_references(env);
ioamtrace_main_t ioamtrace_main
jint JNI_OnLoad(JavaVM *vm, void *reserved)
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl_init0(JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index)
#define clib_warning(format, args...)
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_ioamtrace_JVppIoamtraceImpl_close0(JNIEnv *env, jclass clazz)
u16 vl_client_get_first_plugin_msg_id(char *plugin_name)
void JNI_OnUnload(JavaVM *vm, void *reserved)
unix_shared_memory_queue_t * vl_input_queue
struct _unix_shared_memory_queue unix_shared_memory_queue_t