store the long and excl flags in the connection state
This commit is contained in:
@@ -37,6 +37,17 @@ struct private_imc_scanner_state_t {
|
||||
* TNCCS connection state
|
||||
*/
|
||||
TNC_ConnectionState state;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support long message types?
|
||||
*/
|
||||
bool has_long;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support exclusive delivery?
|
||||
*/
|
||||
bool has_excl;
|
||||
|
||||
};
|
||||
|
||||
METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
|
||||
@@ -45,6 +56,25 @@ METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
|
||||
return this->connection_id;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, has_long, bool,
|
||||
private_imc_scanner_state_t *this)
|
||||
{
|
||||
return this->has_long;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, has_excl, bool,
|
||||
private_imc_scanner_state_t *this)
|
||||
{
|
||||
return this->has_excl;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_flags, void,
|
||||
private_imc_scanner_state_t *this, bool has_long, bool has_excl)
|
||||
{
|
||||
this->has_long = has_long;
|
||||
this->has_excl = has_excl;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, change_state, void,
|
||||
private_imc_scanner_state_t *this, TNC_ConnectionState new_state)
|
||||
{
|
||||
@@ -68,6 +98,9 @@ imc_state_t *imc_scanner_state_create(TNC_ConnectionID connection_id)
|
||||
.public = {
|
||||
.interface = {
|
||||
.get_connection_id = _get_connection_id,
|
||||
.has_long = _has_long,
|
||||
.has_excl = _has_excl,
|
||||
.set_flags = _set_flags,
|
||||
.change_state = _change_state,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
|
||||
@@ -38,6 +38,16 @@ struct private_imc_test_state_t {
|
||||
*/
|
||||
TNC_ConnectionState state;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support long message types?
|
||||
*/
|
||||
bool has_long;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support exclusive delivery?
|
||||
*/
|
||||
bool has_excl;
|
||||
|
||||
/**
|
||||
* Command to transmit to IMV
|
||||
*/
|
||||
@@ -60,6 +70,25 @@ METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
|
||||
return this->connection_id;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, has_long, bool,
|
||||
private_imc_test_state_t *this)
|
||||
{
|
||||
return this->has_long;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, has_excl, bool,
|
||||
private_imc_test_state_t *this)
|
||||
{
|
||||
return this->has_excl;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_flags, void,
|
||||
private_imc_test_state_t *this, bool has_long, bool has_excl)
|
||||
{
|
||||
this->has_long = has_long;
|
||||
this->has_excl = has_excl;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, change_state, void,
|
||||
private_imc_test_state_t *this, TNC_ConnectionState new_state)
|
||||
{
|
||||
@@ -123,6 +152,9 @@ imc_state_t *imc_test_state_create(TNC_ConnectionID connection_id,
|
||||
.public = {
|
||||
.interface = {
|
||||
.get_connection_id = _get_connection_id,
|
||||
.has_long = _has_long,
|
||||
.has_excl = _has_excl,
|
||||
.set_flags = _set_flags,
|
||||
.change_state = _change_state,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
|
||||
@@ -39,6 +39,16 @@ struct private_imv_scanner_state_t {
|
||||
*/
|
||||
TNC_ConnectionState state;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support long message types?
|
||||
*/
|
||||
bool has_long;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support exclusive delivery?
|
||||
*/
|
||||
bool has_excl;
|
||||
|
||||
/**
|
||||
* IMV action recommendation
|
||||
*/
|
||||
@@ -86,6 +96,25 @@ METHOD(imv_state_t, get_connection_id, TNC_ConnectionID,
|
||||
return this->connection_id;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, has_long, bool,
|
||||
private_imv_scanner_state_t *this)
|
||||
{
|
||||
return this->has_long;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, has_excl, bool,
|
||||
private_imv_scanner_state_t *this)
|
||||
{
|
||||
return this->has_excl;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, set_flags, void,
|
||||
private_imv_scanner_state_t *this, bool has_long, bool has_excl)
|
||||
{
|
||||
this->has_long = has_long;
|
||||
this->has_excl = has_excl;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, change_state, void,
|
||||
private_imv_scanner_state_t *this, TNC_ConnectionState new_state)
|
||||
{
|
||||
@@ -191,6 +220,9 @@ imv_state_t *imv_scanner_state_create(TNC_ConnectionID connection_id)
|
||||
.public = {
|
||||
.interface = {
|
||||
.get_connection_id = _get_connection_id,
|
||||
.has_long = _has_long,
|
||||
.has_excl = _has_excl,
|
||||
.set_flags = _set_flags,
|
||||
.change_state = _change_state,
|
||||
.get_recommendation = _get_recommendation,
|
||||
.set_recommendation = _set_recommendation,
|
||||
|
||||
@@ -39,6 +39,16 @@ struct private_imv_test_state_t {
|
||||
*/
|
||||
TNC_ConnectionState state;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support long message types?
|
||||
*/
|
||||
bool has_long;
|
||||
|
||||
/**
|
||||
* Does the TNCCS connection support exclusive delivery?
|
||||
*/
|
||||
bool has_excl;
|
||||
|
||||
/**
|
||||
* IMV action recommendation
|
||||
*/
|
||||
@@ -82,6 +92,25 @@ METHOD(imv_state_t, get_connection_id, TNC_ConnectionID,
|
||||
return this->connection_id;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, has_long, bool,
|
||||
private_imv_test_state_t *this)
|
||||
{
|
||||
return this->has_long;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, has_excl, bool,
|
||||
private_imv_test_state_t *this)
|
||||
{
|
||||
return this->has_excl;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, set_flags, void,
|
||||
private_imv_test_state_t *this, bool has_long, bool has_excl)
|
||||
{
|
||||
this->has_long = has_long;
|
||||
this->has_excl = has_excl;
|
||||
}
|
||||
|
||||
METHOD(imv_state_t, change_state, void,
|
||||
private_imv_test_state_t *this, TNC_ConnectionState new_state)
|
||||
{
|
||||
@@ -177,6 +206,9 @@ imv_state_t *imv_test_state_create(TNC_ConnectionID connection_id)
|
||||
.public = {
|
||||
.interface = {
|
||||
.get_connection_id = _get_connection_id,
|
||||
.has_long = _has_long,
|
||||
.has_excl = _has_excl,
|
||||
.set_flags = _set_flags,
|
||||
.change_state = _change_state,
|
||||
.get_recommendation = _get_recommendation,
|
||||
.set_recommendation = _set_recommendation,
|
||||
|
||||
Reference in New Issue
Block a user