METHOD(pb_tnc_batch_t, add_msg, void,
private_pb_tnc_batch_t *this, pb_tnc_msg_t* msg)
{
- DBG2(DBG_TNC, "adding %N Message", pb_tnc_msg_type_names,
+ DBG2(DBG_TNC, "adding %N message", pb_tnc_msg_type_names,
msg->get_type(msg));
this->messages->insert_last(this->messages, msg);
}
/* 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_msg_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_VERSION_NOT_SUPPORTED);
err_msg = (pb_error_msg_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",
- directionality ? "Server" : "Client");
+ DBG1(DBG_TNC, "wrong Directionality: batch is from a PB %s",
+ directionality ? "server" : "client");
msg = pb_error_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER, 1);
goto fatal;
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_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER, 3);
goto fatal;
if (!state_machine->receive_batch(state_machine, this->type))
{
- 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_msg_create(TRUE, IETF_VENDOR_ID,
PB_ERROR_UNEXPECTED_BATCH_TYPE);
if (msg_type == PB_TNC_RESERVED_MSG_TYPE)
{
- DBG1(DBG_TNC, "PB-TNC Message Type 0x%08x is reserved",
+ DBG1(DBG_TNC, "PB-TNC message Type 0x%08x is reserved",
PB_TNC_RESERVED_MSG_TYPE);
msg = pb_error_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER, this->offset + 4);
if (noskip_flag)
{
- DBG1(DBG_TNC, "reject PB-TNC Message (Vendor ID 0x%06x / "
+ DBG1(DBG_TNC, "reject PB-TNC message (Vendor ID 0x%06x / "
"Type 0x%08x)", vendor_id, msg_type);
msg = pb_error_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
PB_ERROR_UNSUPPORTED_MANDATORY_MSG, this->offset);
}
else
{
- DBG1(DBG_TNC, "ignore PB-TNC Message (Vendor ID 0x%06x / "
+ DBG1(DBG_TNC, "ignore PB-TNC message (Vendor ID 0x%06x / "
"Type 0x%08x)", vendor_id, msg_type);
this->offset += msg_len;
return SUCCESS;
if (pb_tnc_msg_infos[msg_type].has_noskip_flag != TRUE_OR_FALSE &&
pb_tnc_msg_infos[msg_type].has_noskip_flag != noskip_flag)
{
- DBG1(DBG_TNC, "%N Message must%s have NOSKIP flag set",
+ DBG1(DBG_TNC, "%N message must%s have NOSKIP flag set",
pb_tnc_msg_type_names, msg_type,
pb_tnc_msg_infos[msg_type].has_noskip_flag ? "" : " not");
msg = pb_error_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
(pb_tnc_msg_infos[msg_type].exact_size &&
msg_len != pb_tnc_msg_infos[msg_type].min_size))
{
- DBG1(DBG_TNC, "%N Message length must be %s %u bytes but is %u bytes",
+ DBG1(DBG_TNC, "%N message length must be %s %u bytes but is %u bytes",
pb_tnc_msg_type_names, msg_type,
pb_tnc_msg_infos[msg_type].exact_size ? "exactly" : "at least",
pb_tnc_msg_infos[msg_type].min_size, msg_len);
{
if (this->is_server)
{
- DBG1(DBG_TNC,"reject %N Message received from a PB-TNC Client",
+ DBG1(DBG_TNC,"reject %N message received from a PB-TNC client",
pb_tnc_msg_type_names, msg_type);
msg = pb_error_msg_create_with_offset(TRUE, IETF_VENDOR_ID,
PB_ERROR_INVALID_PARAMETER, this->offset);
}
else
{
- DBG1(DBG_TNC,"ignore %N Message not received within RESULT batch",
+ DBG1(DBG_TNC,"ignore %N message not received within RESULT batch",
pb_tnc_msg_type_names, msg_type);
this->offset += msg_len;
return SUCCESS;
}
}
- DBG2(DBG_TNC, "processing %N Message (%u bytes)", pb_tnc_msg_type_names,
+ DBG2(DBG_TNC, "processing %N message (%u bytes)", pb_tnc_msg_type_names,
msg_type, msg_len);
data.len = msg_len;
- DBG3(DBG_TNC, "%B", &data);
msg_value = chunk_skip(data, PB_TNC_HEADER_SIZE);
pb_tnc_msg = pb_tnc_msg_create_from_data(msg_type, msg_value);
{
return FAILED;
}
- DBG1(DBG_TNC, "processing PB-TNC %N Batch", pb_tnc_batch_type_names,
+ DBG1(DBG_TNC, "processing PB-TNC %N batch", pb_tnc_batch_type_names,
this->type);
while (this->offset < this->encoding.len)
{
.errors = linked_list_create(),
);
- DBG2(DBG_TNC, "creating PB-TNC %N Batch", pb_tnc_batch_type_names, type);
+ DBG2(DBG_TNC, "creating PB-TNC %N batch", pb_tnc_batch_type_names, type);
return &this->public;
}
assess_msg = (pb_assessment_result_msg_t*)msg;
result = assess_msg->get_assessment_result(assess_msg);
- DBG1(DBG_TNC, "assessment result is '%N'",
+ DBG1(DBG_TNC, "PB-TNC assessment result is '%N'",
evaluation_result_names, result);
break;
}
rec_msg = (pb_access_recommendation_msg_t*)msg;
rec = rec_msg->get_access_recommendation(rec_msg);
- DBG1(DBG_TNC, "access recommendation is '%N'",
+ DBG1(DBG_TNC, "PB-TNC access recommendation is '%N'",
pb_access_recommendation_code_names, rec);
break;
}
}
/**
- * Build a CRETRY or SRETRY Batch
+ * Build a CRETRY or SRETRY batch
*/
static void build_retry_batch(private_tnccs_20_t *this)
{
if (this->batch)
{
- DBG1(DBG_TNC, "cancelling PB-TNC %N Batch",
+ DBG1(DBG_TNC, "cancelling PB-TNC %N batch",
pb_tnc_batch_type_names, this->batch->get_type(this->batch));
this->batch->destroy(this->batch);
}
}
data = chunk_create(buf, buflen);
- DBG1(DBG_TNC, "received TNCCS Batch (%u bytes) for Connection ID %u",
+ DBG1(DBG_TNC, "received TNCCS batch (%u bytes) for connection ID %u",
data.len, this->connection_id);
DBG3(DBG_TNC, "%B", &data);
batch = pb_tnc_batch_create_from_data(this->is_server, data);
if (batch_type == PB_BATCH_CRETRY)
{
- /* Send an SRETRY Batch in response */
+ /* Send an SRETRY batch in response */
this->mutex->lock(this->mutex);
build_retry_batch(this);
this->mutex->unlock(this->mutex);
}
enumerator->destroy(enumerator);
- /* received an empty CLOSE Batch from PB-TNC Client */
+ /* received an empty CLOSE batch from PB-TNC client */
if (this->is_server && batch_type == PB_BATCH_CLOSE && empty)
{
batch->destroy(batch);
this->mutex->lock(this->mutex);
if (this->batch)
{
- DBG1(DBG_TNC, "cancelling PB-TNC %N Batch",
+ DBG1(DBG_TNC, "cancelling PB-TNC %N batch",
pb_tnc_batch_type_names, this->batch->get_type(this->batch));
this->batch->destroy(this->batch);
}
}
/**
- * Build a RESULT Batch if a final recommendation is available
+ * Build a RESULT batch if a final recommendation is available
*/
static void check_and_build_recommendation(private_tnccs_20_t *this)
{
return FAILED;
}
- /* Create PB-TNC Language Preference Message */
+ /* Create PB-TNC Language Preference message */
pref_lang = charon->imcs->get_preferred_language(charon->imcs);
msg = pb_language_preference_msg_create(chunk_create(pref_lang,
strlen(pref_lang)));
/**
* if the DECIDED state has been reached and no CRETRY is under way
* or if a CLOSE batch with error messages has been received,
- * reply with an empty CLOSE batch.
+ * a PB-TNC client replies with an empty CLOSE batch.
*/
if (state == PB_STATE_DECIDED || state == PB_STATE_END)
{
{
this->batch->build(this->batch);
data = this->batch->get_encoding(this->batch);
- DBG1(DBG_TNC, "sending PB-TNC %N Batch (%d bytes) for Connection ID %u",
+ DBG1(DBG_TNC, "sending PB-TNC %N batch (%d bytes) for connection ID %u",
pb_tnc_batch_type_names, batch_type, data.len,
this->connection_id);
DBG3(DBG_TNC, "%B", &data);
}
else
{
- DBG1(DBG_TNC, "cancelling unexpected PB-TNC Batch Type: %N",
+ DBG1(DBG_TNC, "cancelling unexpected PB-TNC batch type: %N",
pb_tnc_batch_type_names, batch_type);
status = INVALID_STATE;
}
}
else
{
- DBG1(DBG_TNC, "no TNCCS Batch to send");
+ DBG1(DBG_TNC, "no TNCCS batch to send");
status = INVALID_STATE;
}
this->mutex->unlock(this->mutex);