Clean up whitespaces in IMC/IMV messages
This commit is contained in:
parent
fdce28c49c
commit
2a433075e2
|
@ -39,24 +39,24 @@ struct private_imc_msg_t {
|
|||
imc_msg_t public;
|
||||
|
||||
/**
|
||||
* Connection ID
|
||||
* Connection ID
|
||||
*/
|
||||
TNC_ConnectionID connection_id;
|
||||
|
||||
/**
|
||||
* source ID
|
||||
* source ID
|
||||
*/
|
||||
TNC_UInt32 src_id;
|
||||
TNC_UInt32 src_id;
|
||||
|
||||
/**
|
||||
* destination ID
|
||||
* destination ID
|
||||
*/
|
||||
TNC_UInt32 dst_id;
|
||||
TNC_UInt32 dst_id;
|
||||
|
||||
/**
|
||||
* PA-TNC message type
|
||||
* PA-TNC message type
|
||||
*/
|
||||
pen_type_t msg_type;
|
||||
pen_type_t msg_type;
|
||||
|
||||
/**
|
||||
* List of PA-TNC attributes to be sent
|
||||
|
@ -64,17 +64,17 @@ struct private_imc_msg_t {
|
|||
linked_list_t *attr_list;
|
||||
|
||||
/**
|
||||
* PA-TNC message
|
||||
* PA-TNC message
|
||||
*/
|
||||
pa_tnc_msg_t *pa_msg;
|
||||
|
||||
/**
|
||||
* Assigned IMC agent
|
||||
* Assigned IMC agent
|
||||
*/
|
||||
imc_agent_t *agent;
|
||||
|
||||
/**
|
||||
* Assigned IMC state
|
||||
* Assigned IMC state
|
||||
*/
|
||||
imc_state_t *state;
|
||||
};
|
||||
|
@ -142,7 +142,7 @@ METHOD(imc_msg_t, send_, TNC_Result,
|
|||
|
||||
if (this->state->has_long(this->state) && this->agent->send_message_long)
|
||||
{
|
||||
excl = excl && this->state->has_excl(this->state) &&
|
||||
excl = excl && this->state->has_excl(this->state) &&
|
||||
this->dst_id != TNC_IMVID_ANY;
|
||||
msg_flags = excl ? TNC_MESSAGE_FLAGS_EXCLUSIVE : 0;
|
||||
result = this->agent->send_message_long(this->src_id,
|
||||
|
@ -248,7 +248,7 @@ METHOD(imc_msg_t, receive, TNC_Result,
|
|||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
/*
|
||||
/*
|
||||
* send the PA-TNC message containing all error attributes
|
||||
* with the excl flag set
|
||||
*/
|
||||
|
@ -273,7 +273,7 @@ METHOD(imc_msg_t, receive, TNC_Result,
|
|||
while (enumerator->enumerate(enumerator, &attr))
|
||||
{
|
||||
attr_type = attr->get_type(attr);
|
||||
|
||||
|
||||
if (attr_type.vendor_id != PEN_IETF)
|
||||
{
|
||||
continue;
|
||||
|
@ -331,7 +331,7 @@ METHOD(imc_msg_t, receive, TNC_Result,
|
|||
enumerator->destroy(enumerator);
|
||||
|
||||
print_assessment_trailer(first);
|
||||
|
||||
|
||||
return TNC_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ imc_msg_t* imc_msg_create_as_reply(imc_msg_t *msg)
|
|||
TNC_UInt32 src_id;
|
||||
|
||||
in = (private_imc_msg_t*)msg;
|
||||
src_id = (in->dst_id != TNC_IMCID_ANY) ?
|
||||
src_id = (in->dst_id != TNC_IMCID_ANY) ?
|
||||
in->dst_id : in->agent->get_id(in->agent);
|
||||
|
||||
return imc_msg_create(in->agent, in->state, in->connection_id, src_id,
|
||||
|
@ -419,7 +419,7 @@ imc_msg_t *imc_msg_create_from_data(imc_agent_t *agent, imc_state_t *state,
|
|||
msg_subtype = msg_type & TNC_SUBTYPE_ANY;
|
||||
|
||||
return imc_msg_create_from_long_data(agent, state, connection_id,
|
||||
TNC_IMVID_ANY, agent->get_id(agent),
|
||||
TNC_IMVID_ANY, agent->get_id(agent),
|
||||
msg_vid, msg_subtype, msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ struct imc_msg_t {
|
|||
* @param attr PA-TNC attribute to be added
|
||||
*/
|
||||
void (*add_attribute)(imc_msg_t *this, pa_tnc_attr_t *attr);
|
||||
|
||||
|
||||
/**
|
||||
* Enumerator over PA-TNC attributes contained in the PA-TNC message
|
||||
*
|
||||
|
@ -117,7 +117,7 @@ imc_msg_t* imc_msg_create_as_reply(imc_msg_t *msg);
|
|||
imc_msg_t* imc_msg_create_from_data(imc_agent_t *agent, imc_state_t *state,
|
||||
TNC_ConnectionID connection_id,
|
||||
TNC_MessageType msg_type,
|
||||
chunk_t msg);
|
||||
chunk_t msg);
|
||||
|
||||
/**
|
||||
* Create a wrapper around message data received via the long IF-IMC interface
|
||||
|
@ -137,6 +137,6 @@ imc_msg_t* imc_msg_create_from_long_data(imc_agent_t *agent, imc_state_t *state,
|
|||
TNC_UInt32 src_id, TNC_UInt32 dst_id,
|
||||
TNC_VendorID msg_vid,
|
||||
TNC_MessageSubtype msg_subtype,
|
||||
chunk_t msg);
|
||||
chunk_t msg);
|
||||
|
||||
#endif /** IMC_MSG_H_ @}*/
|
||||
|
|
|
@ -39,24 +39,24 @@ struct private_imv_msg_t {
|
|||
imv_msg_t public;
|
||||
|
||||
/**
|
||||
* Connection ID
|
||||
* Connection ID
|
||||
*/
|
||||
TNC_ConnectionID connection_id;
|
||||
|
||||
/**
|
||||
* source ID
|
||||
* source ID
|
||||
*/
|
||||
TNC_UInt32 src_id;
|
||||
TNC_UInt32 src_id;
|
||||
|
||||
/**
|
||||
* destination ID
|
||||
* destination ID
|
||||
*/
|
||||
TNC_UInt32 dst_id;
|
||||
TNC_UInt32 dst_id;
|
||||
|
||||
/**
|
||||
* PA-TNC message type
|
||||
* PA-TNC message type
|
||||
*/
|
||||
pen_type_t msg_type;
|
||||
pen_type_t msg_type;
|
||||
|
||||
/**
|
||||
* List of PA-TNC attributes to be sent
|
||||
|
@ -64,17 +64,17 @@ struct private_imv_msg_t {
|
|||
linked_list_t *attr_list;
|
||||
|
||||
/**
|
||||
* PA-TNC message
|
||||
* PA-TNC message
|
||||
*/
|
||||
pa_tnc_msg_t *pa_msg;
|
||||
|
||||
/**
|
||||
* Assigned IMV agent
|
||||
* Assigned IMV agent
|
||||
*/
|
||||
imv_agent_t *agent;
|
||||
|
||||
/**
|
||||
* Assigned IMV state
|
||||
* Assigned IMV state
|
||||
*/
|
||||
imv_state_t *state;
|
||||
};
|
||||
|
@ -159,7 +159,7 @@ METHOD(imv_msg_t, send_, TNC_Result,
|
|||
|
||||
if (this->state->has_long(this->state) && this->agent->send_message_long)
|
||||
{
|
||||
excl = excl && this->state->has_excl(this->state) &&
|
||||
excl = excl && this->state->has_excl(this->state) &&
|
||||
this->dst_id != TNC_IMCID_ANY;
|
||||
msg_flags = excl ? TNC_MESSAGE_FLAGS_EXCLUSIVE : 0;
|
||||
result = this->agent->send_message_long(this->src_id,
|
||||
|
@ -287,7 +287,7 @@ METHOD(imv_msg_t, receive, TNC_Result,
|
|||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
/*
|
||||
/*
|
||||
* send the PA-TNC message containing all error attributes
|
||||
* with the excl flag set
|
||||
*/
|
||||
|
@ -302,7 +302,7 @@ METHOD(imv_msg_t, receive, TNC_Result,
|
|||
|
||||
/* preprocess any received IETF standard error attributes */
|
||||
*fatal_error = this->pa_msg->process_ietf_std_errors(this->pa_msg);
|
||||
|
||||
|
||||
return TNC_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ imv_msg_t* imv_msg_create_as_reply(imv_msg_t *msg)
|
|||
TNC_UInt32 src_id;
|
||||
|
||||
in = (private_imv_msg_t*)msg;
|
||||
src_id = (in->dst_id != TNC_IMVID_ANY) ?
|
||||
src_id = (in->dst_id != TNC_IMVID_ANY) ?
|
||||
in->dst_id : in->agent->get_id(in->agent);
|
||||
|
||||
return imv_msg_create(in->agent, in->state, in->connection_id, src_id,
|
||||
|
@ -398,7 +398,7 @@ imv_msg_t *imv_msg_create_from_data(imv_agent_t *agent, imv_state_t *state,
|
|||
msg_subtype = msg_type & TNC_SUBTYPE_ANY;
|
||||
|
||||
return imv_msg_create_from_long_data(agent, state, connection_id,
|
||||
TNC_IMCID_ANY, agent->get_id(agent),
|
||||
TNC_IMCID_ANY, agent->get_id(agent),
|
||||
msg_vid, msg_subtype, msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ struct imv_msg_t {
|
|||
* @param attr PA-TNC attribute to be added
|
||||
*/
|
||||
void (*add_attribute)(imv_msg_t *this, pa_tnc_attr_t *attr);
|
||||
|
||||
|
||||
/**
|
||||
* Delete all PA-TNC attributes in the send queue
|
||||
*
|
||||
|
@ -137,7 +137,7 @@ imv_msg_t* imv_msg_create_as_reply(imv_msg_t *msg);
|
|||
imv_msg_t* imv_msg_create_from_data(imv_agent_t *agent, imv_state_t *state,
|
||||
TNC_ConnectionID connection_id,
|
||||
TNC_MessageType msg_type,
|
||||
chunk_t msg);
|
||||
chunk_t msg);
|
||||
|
||||
/**
|
||||
* Create a wrapper around message data received via the long IF-IMV interface
|
||||
|
@ -157,6 +157,6 @@ imv_msg_t* imv_msg_create_from_long_data(imv_agent_t *agent, imv_state_t *state,
|
|||
TNC_UInt32 src_id, TNC_UInt32 dst_id,
|
||||
TNC_VendorID msg_vid,
|
||||
TNC_MessageSubtype msg_subtype,
|
||||
chunk_t msg);
|
||||
chunk_t msg);
|
||||
|
||||
#endif /** IMV_MSG_H_ @}*/
|
||||
|
|
Loading…
Reference in New Issue