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 "acl/jvpp/io_fd_vpp_jvpp_acl_JVppAclImpl.h" 51 #include "acl/jvpp/jvpp_acl_gen.h" 59 (JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index) {
62 clib_warning (
"Java_io_fd_vpp_jvpp_acl_JVppAclImpl_init0");
67 name =
format (0,
"acl_%08x%c", api_version, 0);
71 jclass exClass = (*env)->FindClass(env,
"java/lang/IllegalStateException");
72 (*env)->ThrowNew(env, exClass,
"acl 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);
unix_shared_memory_queue_t * vl_input_queue
void JNI_OnUnload(JavaVM *vm, void *reserved)
#define clib_warning(format, args...)
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_acl_JVppAclImpl_close0(JNIEnv *env, jclass clazz)
JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_acl_JVppAclImpl_init0(JNIEnv *env, jclass clazz, jobject callback, jlong queue_address, jint my_client_index)
u16 vl_client_get_first_plugin_msg_id(char *plugin_name)
jint JNI_OnLoad(JavaVM *vm, void *reserved)
struct _unix_shared_memory_queue unix_shared_memory_queue_t