aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/imc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/imc')
-rw-r--r--src/libimcv/imc/imc_agent.c2
-rw-r--r--src/libimcv/imc/imc_state.h26
2 files changed, 27 insertions, 1 deletions
diff --git a/src/libimcv/imc/imc_agent.c b/src/libimcv/imc/imc_agent.c
index d1d4073fe..a39b4b7cc 100644
--- a/src/libimcv/imc/imc_agent.c
+++ b/src/libimcv/imc/imc_agent.c
@@ -309,6 +309,8 @@ METHOD(imc_agent_t, create_state, TNC_Result,
t_p = get_str_attribute(this, conn_id, TNC_ATTRIBUTEID_IFT_PROTOCOL);
t_v = get_str_attribute(this, conn_id, TNC_ATTRIBUTEID_IFT_VERSION);
+ state->set_flags(state, has_long, has_excl);
+
DBG2(DBG_IMC, "IMC %u \"%s\" created a state for Connection ID %u: "
"%s %s with %slong %sexcl %ssoh over %s %s",
this->id, this->name, conn_id, tnccs_p ? tnccs_p:"?",
diff --git a/src/libimcv/imc/imc_state.h b/src/libimcv/imc/imc_state.h
index 73013f8ce..f1b0358c9 100644
--- a/src/libimcv/imc/imc_state.h
+++ b/src/libimcv/imc/imc_state.h
@@ -33,13 +33,37 @@ typedef struct imc_state_t imc_state_t;
struct imc_state_t {
/**
- * Get the TNCS connection ID attached to the state
+ * Get the TNCS connection I
+D attached to the state
*
* @return TNCS connection ID of the state
*/
TNC_ConnectionID (*get_connection_id)(imc_state_t *this);
/**
+ * Checks if long message types are supported for this TNCCS connection
+ *
+ * @return TRUE if set, FALSE otherwise
+ */
+ bool (*has_long)(imc_state_t *this);
+
+ /**
+ * Checks if the exclusive delivery is supported for this TNCCS connection
+ *
+ * @return TRUE if set, FALSE otherwise
+ */
+ bool (*has_excl)(imc_state_t *this);
+
+ /**
+ * Sets the long message types and exclusive flags for this TNCCS connection
+ *
+ * @param has_long TNCCS connection supports long message types
+ * @param has_excl TNCCS connection supports exclusive delivery
+ * @return TRUE if set, FALSE otherwise
+ */
+ void (*set_flags)(imc_state_t *this, bool has_long, bool has_excl);
+
+ /**
* Change the connection state
*
* @param new_state new connection state