jvpp: utilize per-message CRCs (VPP-544)
[vpp.git] / src / vpp-api / java / jvpp-common / jvpp_common.h
index bbb203e..34502d0 100644 (file)
@@ -37,6 +37,7 @@ typedef struct {
     /* Convenience */
     unix_shared_memory_queue_t * vl_input_queue;
     u32 my_client_index;
+    uword *messages_hash;
 } jvpp_main_t;
 
 extern jvpp_main_t jvpp_main __attribute__((aligned (64)));
@@ -64,4 +65,10 @@ void call_on_error(const char* callName, int contextId, int retval,
         jclass callbackClass, jobject callbackObject,
         jclass callbackExceptionClass);
 
+/**
+ * Retrieves message id based on message name and crc (key format: name_crc).
+ * Throws java/lang/IllegalStateException on failure.
+ */
+u32 get_message_id(JNIEnv *env, const char* key);
+
 #endif /* __included_jvpp_common_h__ */