moved management of additional IMC/IMV IDs to agent
[strongswan.git] / src / libimcv / plugins / imc_test / imc_test_state.h
index 6d2dc5e..d9160df 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef IMC_TEST_STATE_H_
 #define IMC_TEST_STATE_H_
 
+#include <tncifimc.h>
 #include <imc/imc_state.h>
 #include <library.h>
 
@@ -35,14 +36,45 @@ struct imc_test_state_t {
         * imc_state_t interface
         */
        imc_state_t interface;
+
+       /**
+        * get the command to send to IMV
+        *
+        * @return                              commmand to send to IMV
+        */
+       char* (*get_command)(imc_test_state_t *this);
+
+       /**
+        * set the command to send to IMV
+        *
+        * @param command               commmand to send to IMV
+        */
+       void (*set_command)(imc_test_state_t *this, char *command);
+
+       /**
+        * Test and reset the first handshake flag
+        *
+        * @return                              TRUE if first handshake
+        */
+       bool (*is_first_handshake)(imc_test_state_t *this);
+
+       /**
+        * Test and reset the retry handshake flag
+        *
+        * @return                              TRUE if a handshake retry should be done
+        */
+       bool (*do_handshake_retry)(imc_test_state_t *this);
+
 };
 
 /**
  * Create an imc_test_state_t instance
  *
  * @param id           connection ID
- * @param rounds       total number of IMC re-measurements
+ * @param command      command to send to IMV
+ * @param retry                TRUE if a handshake retry should be done
  */
-imc_state_t* imc_test_state_create(TNC_ConnectionID id);
+imc_state_t* imc_test_state_create(TNC_ConnectionID id, char* command,
+                                                                  bool retry);
 
 #endif /** IMC_TEST_STATE_H_ @}*/