aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2011-06-05 15:46:01 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-06-05 15:46:01 +0200
commiteeef48224281b30267d5060b2df6510043835176 (patch)
tree7eb826c1143374aba623528f6c120a58eab31cc1 /src/libcharon/plugins
parentc722ab035c23c8f496fb5611a12fe926c5482996 (diff)
downloadstrongswan-eeef48224281b30267d5060b2df6510043835176.tar.bz2
strongswan-eeef48224281b30267d5060b2df6510043835176.tar.xz
show PB-PA message type/subtype
Diffstat (limited to 'src/libcharon/plugins')
-rw-r--r--src/libcharon/plugins/tnccs_20/tnccs_20.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/libcharon/plugins/tnccs_20/tnccs_20.c b/src/libcharon/plugins/tnccs_20/tnccs_20.c
index 849789252..cc81b967c 100644
--- a/src/libcharon/plugins/tnccs_20/tnccs_20.c
+++ b/src/libcharon/plugins/tnccs_20/tnccs_20.c
@@ -114,8 +114,18 @@ METHOD(tnccs_t, send_msg, TNC_Result,
pb_tnc_msg = pb_pa_msg_create(msg_vendor_id, msg_sub_type, imc_id, imv_id,
chunk_create(msg, msg_len));
- DBG2(DBG_TNC, "creating PB-PA message type 0x%06x(%N)/0x%02x",
- msg_vendor_id, pen_names, msg_vendor_id, msg_sub_type);
+
+ if (msg_vendor_id == PEN_IETF)
+ {
+ DBG2(DBG_TNC, "creating PB-PA message type '%N/%N' 0x%06x/0x%02x",
+ pen_names, msg_vendor_id, pa_tnc_subtype_names, msg_sub_type,
+ msg_vendor_id, msg_sub_type);
+ }
+ else
+ {
+ DBG2(DBG_TNC, "creating PB-PA message type '%N' 0x%06x/0x%02x",
+ pen_names, msg_vendor_id, msg_vendor_id, msg_sub_type);
+ }
/* adding PA message to SDATA or CDATA batch only */
batch_type = this->is_server ? PB_BATCH_SDATA : PB_BATCH_CDATA;
@@ -158,8 +168,17 @@ static void handle_message(private_tnccs_20_t *this, pb_tnc_msg_t *msg)
msg_type = (vendor_id << 8) | (subtype & 0xff);
msg_body = pa_msg->get_body(pa_msg);
- DBG2(DBG_TNC, "handling PB-PA message type 0x%06x(%N)/0x%02x",
- vendor_id, pen_names, vendor_id, subtype);
+ if (vendor_id == PEN_IETF)
+ {
+ DBG2(DBG_TNC, "handling PB-PA message type '%N/%N' 0x%06x/0x%02x",
+ pen_names, vendor_id, pa_tnc_subtype_names, subtype,
+ vendor_id, subtype);
+ }
+ else
+ {
+ DBG2(DBG_TNC, "handling PB-PA message type '%N' 0x%06x/0x%02x",
+ pen_names, vendor_id, vendor_id, subtype);
+ }
this->send_msg = TRUE;
if (this->is_server)