store the long and excl flags in the connection state

This commit is contained in:
Andreas Steffen
2011-12-09 11:25:53 +01:00
parent 1ab8dff7fa
commit e4e291d499
10 changed files with 245 additions and 1 deletions
+2
View File
@@ -328,6 +328,8 @@ METHOD(imv_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_IMV, "IMV %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:"?",
+23
View File
@@ -39,6 +39,29 @@ struct imv_state_t {
*/
TNC_ConnectionID (*get_connection_id)(imv_state_t *this);
/**
* Checks if long message types are supported for this TNCCS connection
*
* @return TRUE if set, FALSE otherwise
*/
bool (*has_long)(imv_state_t *this);
/**
* Checks if the exclusive delivery is supported for this TNCCS connection
*
* @return TRUE if set, FALSE otherwise
*/
bool (*has_excl)(imv_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)(imv_state_t *this, bool has_long, bool has_excl);
/**
* Change the connection state
*