aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/plugins/imc_test/imc_test_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/plugins/imc_test/imc_test_state.c')
-rw-r--r--src/libimcv/plugins/imc_test/imc_test_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libimcv/plugins/imc_test/imc_test_state.c b/src/libimcv/plugins/imc_test/imc_test_state.c
index 76631969d..28fd00387 100644
--- a/src/libimcv/plugins/imc_test/imc_test_state.c
+++ b/src/libimcv/plugins/imc_test/imc_test_state.c
@@ -50,6 +50,11 @@ struct private_imc_test_state_t {
bool has_excl;
/**
+ * Maximum PA-TNC message size for this TNCCS connection
+ */
+ u_int32_t max_msg_len;
+
+ /**
* Command to transmit to IMV
*/
char *command;
@@ -96,6 +101,18 @@ METHOD(imc_state_t, set_flags, void,
this->has_excl = has_excl;
}
+METHOD(imc_state_t, set_max_msg_len, void,
+ private_imc_test_state_t *this, u_int32_t max_msg_len)
+{
+ this->max_msg_len = max_msg_len;
+}
+
+METHOD(imc_state_t, get_max_msg_len, u_int32_t,
+ private_imc_test_state_t *this)
+{
+ return this->max_msg_len;
+}
+
METHOD(imc_state_t, change_state, void,
private_imc_test_state_t *this, TNC_ConnectionState new_state)
{
@@ -169,6 +186,8 @@ imc_state_t *imc_test_state_create(TNC_ConnectionID connection_id,
.has_long = _has_long,
.has_excl = _has_excl,
.set_flags = _set_flags,
+ .set_max_msg_len = _set_max_msg_len,
+ .get_max_msg_len = _get_max_msg_len,
.change_state = _change_state,
.destroy = _destroy,
},