/* Version */
if (version != PB_TNC_VERSION)
{
- DBG1(DBG_TNC, "Unsupported TNCCS Batch Version 0x%01x", version);
+ DBG1(DBG_TNC, "unsupported TNCCS Batch Version 0x%01x", version);
msg = pb_error_message_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_VERSION_NOT_SUPPORTED);
err_msg = (pb_error_message_t*)msg;
directionality = (flags & PB_TNC_BATCH_FLAG_D) != PB_TNC_BATCH_FLAG_NONE;
if (directionality == this->is_server)
{
- DBG1(DBG_TNC, "Wrong Directionality: Batch is from a PB %s",
+ DBG1(DBG_TNC, "wrong Directionality: Batch is from a PB %s",
directionality ? "Server" : "Client");
msg = pb_error_message_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER);
this->type = type & 0x0F;
if (this->type > PB_BATCH_ROOF)
{
- DBG1(DBG_TNC, "Unknown PB-TNC Batch Type: %d", this->type);
+ DBG1(DBG_TNC, "unknown PB-TNC Batch Type: %d", this->type);
msg = pb_error_message_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER);
err_msg = (pb_error_message_t*)msg;
if (!state_transition_upon_receive(state, this->type, this->is_server))
{
- DBG1(DBG_TNC, "Unexpected PB-TNC Batch Type: %N",
+ DBG1(DBG_TNC, "unexpected PB-TNC Batch Type: %N",
pb_tnc_batch_type_names, this->type);
msg = pb_error_message_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_UNEXPECTED_BATCH_TYPE);
{
return FAILED;
}
-
+ DBG1(DBG_TNC, "processing PB-TNC %N Batch", pb_tnc_batch_type_names,
+ this->type);
while (this->offset < this->encoding.len)
{
status = process_tnc_message(this);
if (vendor_id == IETF_VENDOR_ID)
{
- DBG1(DBG_TNC, "%s PB-TNC Error: %N",
- fatal ? "fatal" : "non-fatal",
- pb_tnc_error_code_names, error_code);
-
switch (error_code)
{
case PB_ERROR_INVALID_PARAMETER:
case PB_ERROR_UNSUPPORTED_MANDATORY_MESSAGE:
- DBG1(DBG_TNC, " at an offset of %u bytes",
+ DBG1(DBG_TNC, "received %s PB-TNC Error '%N' "
+ "(offset %u bytes)",
+ fatal ? "fatal" : "non-fatal",
+ pb_tnc_error_code_names, error_code,
err_msg->get_offset(err_msg));
break;
case PB_ERROR_VERSION_NOT_SUPPORTED:
- DBG1(DBG_TNC, " with bad version 0x%02x",
+ DBG1(DBG_TNC, "received %s PB-TNC Error '%N' "
+ "caused by bad version 0x%02x",
+ fatal ? "fatal" : "non-fatal",
+ pb_tnc_error_code_names, error_code,
err_msg->get_bad_version(err_msg));
break;
case PB_ERROR_UNEXPECTED_BATCH_TYPE:
case PB_ERROR_LOCAL_ERROR:
default:
+ DBG1(DBG_TNC, "received %s PB-TNC Error '%N'",
+ fatal ? "fatal" : "non-fatal",
+ pb_tnc_error_code_names, error_code);
break;
}
}
else
{
- DBG1(DBG_TNC, "%s PB-TNC Error (%u) with Vendor ID 0x%06x",
- fatal ? "fatal" : "non-fatal", error_code, vendor_id);
+ DBG1(DBG_TNC, "received %s PB-TNC Error (%u) "
+ "with Vendor ID 0x%06x",
+ fatal ? "fatal" : "non-fatal",
+ error_code, vendor_id);
}
break;
}