diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-12-07 11:44:29 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-12-07 11:44:29 +0100 |
commit | dcb5c5906e1b967794f7927ffbde126ca2417954 (patch) | |
tree | 1c0f20eb9ec9953441699bf4a07961acea6532a9 /src/libcharon/plugins/tnccs_20/tnccs_20.c | |
parent | 3506554804874a2aeac48d7d36bb537a90c0f8de (diff) | |
download | strongswan-dcb5c5906e1b967794f7927ffbde126ca2417954.tar.bz2 strongswan-dcb5c5906e1b967794f7927ffbde126ca2417954.tar.xz |
added TNC_TNCC_SendMessageLong() and TNC_TNCS_SendMessageLong() functions
Diffstat (limited to 'src/libcharon/plugins/tnccs_20/tnccs_20.c')
-rw-r--r-- | src/libcharon/plugins/tnccs_20/tnccs_20.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libcharon/plugins/tnccs_20/tnccs_20.c b/src/libcharon/plugins/tnccs_20/tnccs_20.c index b65e68b10..fe0ba985b 100644 --- a/src/libcharon/plugins/tnccs_20/tnccs_20.c +++ b/src/libcharon/plugins/tnccs_20/tnccs_20.c @@ -99,15 +99,16 @@ struct private_tnccs_20_t { METHOD(tnccs_t, send_msg, TNC_Result, private_tnccs_20_t* this, TNC_IMCID imc_id, TNC_IMVID imv_id, + TNC_UInt32 msg_flags, TNC_BufferReference msg, TNC_UInt32 msg_len, - TNC_MessageType msg_type) + TNC_VendorID msg_vid, + TNC_MessageSubtype msg_subtype) { - TNC_MessageSubtype msg_sub_type; - TNC_VendorID msg_vendor_id; pb_tnc_msg_t *pb_tnc_msg; pb_tnc_batch_type_t batch_type; enum_name_t *pa_subtype_names; + bool excl; if (!this->send_msg) { @@ -116,24 +117,22 @@ METHOD(tnccs_t, send_msg, TNC_Result, this->is_server ? imv_id : imc_id); return TNC_RESULT_ILLEGAL_OPERATION; } + excl = (msg_flags & TNC_MESSAGE_FLAGS_EXCLUSIVE) != 0; - msg_sub_type = msg_type & TNC_SUBTYPE_ANY; - msg_vendor_id = (msg_type >> 8) & TNC_VENDORID_ANY; + pb_tnc_msg = pb_pa_msg_create(msg_vid, msg_subtype, imc_id, imv_id, + excl, chunk_create(msg, msg_len)); - pb_tnc_msg = pb_pa_msg_create(msg_vendor_id, msg_sub_type, imc_id, imv_id, - chunk_create(msg, msg_len)); - - pa_subtype_names = get_pa_subtype_names(msg_vendor_id); + pa_subtype_names = get_pa_subtype_names(msg_vid); if (pa_subtype_names) { DBG2(DBG_TNC, "creating PB-PA message type '%N/%N' 0x%06x/0x%08x", - pen_names, msg_vendor_id, pa_subtype_names, msg_sub_type, - msg_vendor_id, msg_sub_type); + pen_names, msg_vid, pa_subtype_names, msg_subtype, + msg_vid, msg_subtype); } else { DBG2(DBG_TNC, "creating PB-PA message type '%N' 0x%06x/0x%08x", - pen_names, msg_vendor_id, msg_vendor_id, msg_sub_type); + pen_names, msg_vid, msg_vid, msg_subtype); } /* adding PA message to SDATA or CDATA batch only */ |