Add wrappers to IMC/IMV managers loading IMC/IMVs from function pointers
[strongswan.git] / src / libtnccs / tnc / imc / imc_manager.h
index 25e0efe..db033c4 100644 (file)
@@ -55,7 +55,31 @@ struct imc_manager_t {
         * @param path                          path of the IMC dynamic library file
         * @return                                      TRUE if loading succeeded
         */
-        bool (*load)(imc_manager_t *this, char *name, char *path);
+       bool (*load)(imc_manager_t *this, char *name, char *path);
+
+       /**
+        * Load and initialize an IMC from a set of TNC IMC functions.
+        *
+        * @param name                                          name of the IMC
+        * @param initialize                            TNC_IMC_InitializePointer
+        * @param notify_connection_change      TNC_IMC_NotifyConnectionChangePointer
+        * @param begin_handshake                       TNC_IMC_BeginHandshakePointer
+        * @param receive_message                       TNC_IMC_ReceiveMessagePointer
+        * @param receive_message_long          TNC_IMC_ReceiveMessageLongPointer
+        * @param batch_ending                          TNC_IMC_BatchEndingPointer
+        * @param terminate                                     TNC_IMC_TerminatePointer
+        * @param provide_bind_function         TNC_IMC_ProvideBindFunctionPointer
+        * @return                                                      TRUE if loading succeeded
+        */
+       bool (*load_from_functions)(imc_manager_t *this, char *name,
+                               TNC_IMC_InitializePointer initialize,
+                               TNC_IMC_NotifyConnectionChangePointer notify_connection_change,
+                               TNC_IMC_BeginHandshakePointer begin_handshake,
+                               TNC_IMC_ReceiveMessagePointer receive_message,
+                               TNC_IMC_ReceiveMessageLongPointer receive_message_long,
+                               TNC_IMC_BatchEndingPointer batch_ending,
+                               TNC_IMC_TerminatePointer terminate,
+                               TNC_IMC_ProvideBindFunctionPointer provide_bind_function);
 
        /**
         * Check if an IMC with a given ID is registered with the IMC manager