static upper size limit for PA-TNC messages
[strongswan.git] / src / libimcv / imc / imc_agent.h
index a00f3db..33335d1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <tncifimc.h>
 #include <pen/pen.h>
+#include <utils/linked_list.h>
 
 #include <library.h>
 
@@ -104,13 +105,13 @@ struct imc_agent_t {
         * @param excl                          exclusive flag
         * @param src_imc_id            IMC ID to be set as source
         * @param dst_imv_id            IMV ID to be set as destination
-        * @param msg                           message to send
+        * @param attr_list                     list of PA-TNC attributes to send
         * @return                                      TNC result code
         */
        TNC_Result (*send_message)(imc_agent_t *this,
                                                           TNC_ConnectionID connection_id, bool excl,
                                                           TNC_UInt32 src_imc_id, TNC_UInt32 dst_imv_id,
-                                                          chunk_t msg);
+                                                          linked_list_t *attr_list);
 
        /**
         * Call when a PA-TNC message was received
@@ -133,12 +134,24 @@ struct imc_agent_t {
                                                                  pa_tnc_msg_t **pa_tnc_msg);
 
        /**
-        * Reserve an additional IMC ID
+        * Reserve additional IMC IDs from TNCC
         *
-        * @param id                            additional IMC ID assigned by TNCC
+        * @param count                         number of additional IMC IDs to be assigned
         * @return                                      TNC result code
         */
-       TNC_Result (*reserve_additional_id)(imc_agent_t *this, TNC_UInt32 *id);
+       TNC_Result (*reserve_additional_ids)(imc_agent_t *this, int count);
+
+       /**
+        * Return the number of additional IMC IDs assigned by the TNCC
+        *
+        * @return                                      number of additional IMC IDs
+        */
+       int (*count_additional_ids)(imc_agent_t *this);
+
+       /**
+        * Create an enumerator for the additional IMC IDs
+        */
+       enumerator_t* (*create_id_enumerator)(imc_agent_t *this);
 
        /**
         * Destroys an imc_agent_t object