diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-10-14 17:37:00 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-10-14 17:37:00 +0200 |
commit | 5f085d7e13f8247a918245fed89273e9f43381dd (patch) | |
tree | cc3a8ba05e4ebd8cefe306f54d95256c8a0b0038 /src/libimcv/plugins/imc_test/imc_test.c | |
parent | 07a3dee937b61dcd05e78dcd9e7a416bf944eb83 (diff) | |
download | strongswan-5f085d7e13f8247a918245fed89273e9f43381dd.tar.bz2 strongswan-5f085d7e13f8247a918245fed89273e9f43381dd.tar.xz |
allow registration of multiple message type
Diffstat (limited to 'src/libimcv/plugins/imc_test/imc_test.c')
-rw-r--r-- | src/libimcv/plugins/imc_test/imc_test.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libimcv/plugins/imc_test/imc_test.c b/src/libimcv/plugins/imc_test/imc_test.c index ee8e5b206..b8ee1371b 100644 --- a/src/libimcv/plugins/imc_test/imc_test.c +++ b/src/libimcv/plugins/imc_test/imc_test.c @@ -33,8 +33,9 @@ static const char imc_name[] = "Test"; -#define IMC_VENDOR_ID PEN_ITA -#define IMC_SUBTYPE PA_SUBTYPE_ITA_TEST +static pen_type_t msg_types[] = { + { PEN_ITA, PA_SUBTYPE_ITA_TEST } +}; static imc_agent_t *imc_test; @@ -51,8 +52,7 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id, DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name); return TNC_RESULT_ALREADY_INITIALIZED; } - imc_test = imc_agent_create(imc_name, IMC_VENDOR_ID, IMC_SUBTYPE, - imc_id, actual_version); + imc_test = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version); if (!imc_test) { return TNC_RESULT_FATAL; @@ -208,7 +208,8 @@ static TNC_Result send_message(imc_state_t *state, TNC_UInt32 src_imc_id, excl = dst_imv_id != TNC_IMVID_ANY; result = imc_test->send_message(imc_test, connection_id, excl, src_imc_id, - dst_imv_id, attr_list); + dst_imv_id, PEN_ITA, PA_SUBTYPE_ITA_TEST, + attr_list); attr_list->destroy(attr_list); return result; |