Use standard unsigned integer types
This commit is contained in:
@@ -87,7 +87,7 @@ struct tnccs_connection_entry_t {
|
||||
/**
|
||||
* Maximum size of a PA-TNC message
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* collection of IMV recommendations
|
||||
@@ -199,7 +199,7 @@ METHOD(tnccs_manager_t, create_instance, tnccs_t*,
|
||||
METHOD(tnccs_manager_t, create_connection, TNC_ConnectionID,
|
||||
private_tnc_tnccs_manager_t *this, tnccs_type_t type, tnccs_t *tnccs,
|
||||
tnccs_send_message_t send_message, bool* request_handshake_retry,
|
||||
u_int32_t max_msg_len, recommendations_t **recs)
|
||||
uint32_t max_msg_len, recommendations_t **recs)
|
||||
{
|
||||
tnccs_connection_entry_t *entry;
|
||||
|
||||
@@ -414,14 +414,14 @@ static TNC_Result bool_attribute(TNC_UInt32 buffer_len,
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the value of an u_int32_t attribute into the buffer
|
||||
* Write the value of an uint32_t attribute into the buffer
|
||||
*/
|
||||
static TNC_Result uint_attribute(TNC_UInt32 buffer_len,
|
||||
TNC_BufferReference buffer,
|
||||
TNC_UInt32 *value_len,
|
||||
u_int32_t value)
|
||||
uint32_t value)
|
||||
{
|
||||
*value_len = sizeof(u_int32_t);
|
||||
*value_len = sizeof(uint32_t);
|
||||
|
||||
if (buffer && buffer_len >= *value_len)
|
||||
{
|
||||
@@ -465,7 +465,7 @@ static TNC_Result identity_attribute(TNC_UInt32 buffer_len,
|
||||
{
|
||||
bio_writer_t *writer;
|
||||
enumerator_t *enumerator;
|
||||
u_int32_t count;
|
||||
uint32_t count;
|
||||
chunk_t value;
|
||||
tncif_identity_t *tnc_id;
|
||||
TNC_Result result = TNC_RESULT_INVALID_PARAMETER;
|
||||
@@ -721,7 +721,7 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
|
||||
host_t *peer_ip;
|
||||
tnccs_t *tnccs;
|
||||
tncif_identity_t *tnc_id;
|
||||
u_int32_t id_type, subject_type;
|
||||
uint32_t id_type, subject_type;
|
||||
chunk_t id_value;
|
||||
char *id_str;
|
||||
TNC_Result result;
|
||||
|
||||
@@ -79,7 +79,7 @@ struct private_tnccs_11_t {
|
||||
/**
|
||||
* Type of TNC client authentication
|
||||
*/
|
||||
u_int32_t auth_type;
|
||||
uint32_t auth_type;
|
||||
|
||||
/**
|
||||
* Connection ID assigned to this TNCCS connection
|
||||
@@ -205,7 +205,7 @@ static void handle_message(private_tnccs_11_t *this, tnccs_msg_t *msg)
|
||||
imc_imv_msg_t *imc_imv_msg;
|
||||
TNC_MessageType msg_type;
|
||||
chunk_t msg_body;
|
||||
u_int32_t msg_vid, msg_subtype;
|
||||
uint32_t msg_vid, msg_subtype;
|
||||
enum_name_t *pa_subtype_names;
|
||||
|
||||
imc_imv_msg = (imc_imv_msg_t*)msg;
|
||||
@@ -622,20 +622,20 @@ METHOD(tnccs_t, set_transport, void,
|
||||
this->transport = transport;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_auth_type, u_int32_t,
|
||||
METHOD(tnccs_t, get_auth_type, uint32_t,
|
||||
private_tnccs_11_t *this)
|
||||
{
|
||||
return this->auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, set_auth_type, void,
|
||||
private_tnccs_11_t *this, u_int32_t auth_type)
|
||||
private_tnccs_11_t *this, uint32_t auth_type)
|
||||
{
|
||||
this->auth_type = auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_pdp_server, chunk_t,
|
||||
private_tnccs_11_t *this, u_int16_t *port)
|
||||
private_tnccs_11_t *this, uint16_t *port)
|
||||
{
|
||||
*port = 0;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ struct private_pb_tnc_batch_t {
|
||||
/**
|
||||
* Offset into encoding (used for error reporting)
|
||||
*/
|
||||
u_int32_t offset;
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
METHOD(pb_tnc_batch_t, get_type, pb_tnc_batch_type_t,
|
||||
@@ -179,8 +179,8 @@ METHOD(pb_tnc_batch_t, add_msg, bool,
|
||||
METHOD(pb_tnc_batch_t, build, void,
|
||||
private_pb_tnc_batch_t *this)
|
||||
{
|
||||
u_int8_t version;
|
||||
u_int32_t msg_len;
|
||||
uint8_t version;
|
||||
uint32_t msg_len;
|
||||
chunk_t msg_value;
|
||||
enumerator_t *enumerator;
|
||||
pen_type_t msg_type;
|
||||
@@ -205,7 +205,7 @@ METHOD(pb_tnc_batch_t, build, void,
|
||||
enumerator = this->messages->create_enumerator(this->messages);
|
||||
while (enumerator->enumerate(enumerator, &msg))
|
||||
{
|
||||
u_int8_t flags = PB_TNC_FLAG_NONE;
|
||||
uint8_t flags = PB_TNC_FLAG_NONE;
|
||||
|
||||
/* build PB-TNC message */
|
||||
msg_value = msg->get_encoding(msg);
|
||||
@@ -247,8 +247,8 @@ METHOD(pb_tnc_batch_t, process_header, status_t,
|
||||
bio_reader_t *reader;
|
||||
pb_tnc_msg_t *msg;
|
||||
pb_error_msg_t *err_msg;
|
||||
u_int8_t version, flags, reserved, type;
|
||||
u_int32_t batch_len;
|
||||
uint8_t version, flags, reserved, type;
|
||||
uint32_t batch_len;
|
||||
|
||||
if (this->encoding.len < PB_TNC_BATCH_HEADER_SIZE)
|
||||
{
|
||||
@@ -324,8 +324,8 @@ static status_t process_tnc_msg(private_pb_tnc_batch_t *this)
|
||||
bio_reader_t *reader;
|
||||
pb_tnc_msg_t *pb_tnc_msg, *msg;
|
||||
pb_tnc_msg_info_t *msg_infos;
|
||||
u_int8_t flags;
|
||||
u_int32_t vendor_id, msg_type, msg_len, offset;
|
||||
uint8_t flags;
|
||||
uint32_t vendor_id, msg_type, msg_len, offset;
|
||||
chunk_t data, msg_value;
|
||||
bool noskip_flag;
|
||||
enum_name_t *msg_type_names;
|
||||
|
||||
@@ -57,7 +57,7 @@ struct private_pb_access_recommendation_msg_t {
|
||||
/**
|
||||
* Access recommendation code
|
||||
*/
|
||||
u_int16_t recommendation;
|
||||
uint16_t recommendation;
|
||||
|
||||
/**
|
||||
* Encoded message
|
||||
@@ -95,10 +95,10 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_access_recommendation_msg_t *this, u_int32_t *offset)
|
||||
private_pb_access_recommendation_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
u_int16_t reserved;
|
||||
uint16_t reserved;
|
||||
|
||||
reader = bio_reader_create(this->encoding);
|
||||
reader->read_uint16(reader, &reserved);
|
||||
@@ -124,7 +124,7 @@ METHOD(pb_tnc_msg_t, destroy, void,
|
||||
free(this);
|
||||
}
|
||||
|
||||
METHOD(pb_access_recommendation_msg_t, get_access_recommendation, u_int16_t,
|
||||
METHOD(pb_access_recommendation_msg_t, get_access_recommendation, uint16_t,
|
||||
private_pb_access_recommendation_msg_t *this)
|
||||
{
|
||||
return this->recommendation;
|
||||
@@ -158,7 +158,7 @@ pb_tnc_msg_t *pb_access_recommendation_msg_create_from_data(chunk_t data)
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t *pb_access_recommendation_msg_create(u_int16_t recommendation)
|
||||
pb_tnc_msg_t *pb_access_recommendation_msg_create(uint16_t recommendation)
|
||||
{
|
||||
private_pb_access_recommendation_msg_t *this;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ struct pb_access_recommendation_msg_t {
|
||||
*
|
||||
* @return PB Access Recommendation
|
||||
*/
|
||||
u_int16_t (*get_access_recommendation)(pb_access_recommendation_msg_t *this);
|
||||
uint16_t (*get_access_recommendation)(pb_access_recommendation_msg_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ struct pb_access_recommendation_msg_t {
|
||||
*
|
||||
* @param recommendation Access Recommendation code
|
||||
*/
|
||||
pb_tnc_msg_t* pb_access_recommendation_msg_create(u_int16_t recommendation);
|
||||
pb_tnc_msg_t* pb_access_recommendation_msg_create(uint16_t recommendation);
|
||||
|
||||
/**
|
||||
* Create an unprocessed PB-Access-Recommendation message from raw data
|
||||
|
||||
@@ -53,7 +53,7 @@ struct private_pb_assessment_result_msg_t {
|
||||
/**
|
||||
* Assessment result code
|
||||
*/
|
||||
u_int32_t assessment_result;
|
||||
uint32_t assessment_result;
|
||||
|
||||
/**
|
||||
* Encoded message
|
||||
@@ -90,7 +90,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_assessment_result_msg_t *this, u_int32_t *offset)
|
||||
private_pb_assessment_result_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
|
||||
@@ -117,7 +117,7 @@ METHOD(pb_tnc_msg_t, destroy, void,
|
||||
free(this);
|
||||
}
|
||||
|
||||
METHOD(pb_assessment_result_msg_t, get_assessment_result, u_int32_t,
|
||||
METHOD(pb_assessment_result_msg_t, get_assessment_result, uint32_t,
|
||||
private_pb_assessment_result_msg_t *this)
|
||||
{
|
||||
return this->assessment_result;
|
||||
@@ -151,7 +151,7 @@ pb_tnc_msg_t *pb_assessment_result_msg_create_from_data(chunk_t data)
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t *pb_assessment_result_msg_create(u_int32_t assessment_result)
|
||||
pb_tnc_msg_t *pb_assessment_result_msg_create(uint32_t assessment_result)
|
||||
{
|
||||
private_pb_assessment_result_msg_t *this;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ struct pb_assessment_result_msg_t {
|
||||
*
|
||||
* @return PB Assessment result
|
||||
*/
|
||||
u_int32_t (*get_assessment_result)(pb_assessment_result_msg_t *this);
|
||||
uint32_t (*get_assessment_result)(pb_assessment_result_msg_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ struct pb_assessment_result_msg_t {
|
||||
*
|
||||
* @param assessment_result Assessment result code
|
||||
*/
|
||||
pb_tnc_msg_t* pb_assessment_result_msg_create(u_int32_t assessment_result);
|
||||
pb_tnc_msg_t* pb_assessment_result_msg_create(uint32_t assessment_result);
|
||||
|
||||
/**
|
||||
* Create an unprocessed PB-Assessment-Result message from raw data
|
||||
|
||||
@@ -75,22 +75,22 @@ struct private_pb_error_msg_t {
|
||||
/**
|
||||
* PB Error Code Vendor ID
|
||||
*/
|
||||
u_int32_t vendor_id;
|
||||
uint32_t vendor_id;
|
||||
|
||||
/**
|
||||
* PB Error Code
|
||||
*/
|
||||
u_int16_t error_code;
|
||||
uint16_t error_code;
|
||||
|
||||
/**
|
||||
* PB Error Offset
|
||||
*/
|
||||
u_int32_t error_offset;
|
||||
uint32_t error_offset;
|
||||
|
||||
/**
|
||||
* Bad PB-TNC version received
|
||||
*/
|
||||
u_int8_t bad_version;
|
||||
uint8_t bad_version;
|
||||
|
||||
/**
|
||||
* Encoded message
|
||||
@@ -153,10 +153,10 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_error_msg_t *this, u_int32_t *offset)
|
||||
private_pb_error_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
u_int8_t flags, max_version, min_version;
|
||||
u_int16_t reserved;
|
||||
uint8_t flags, max_version, min_version;
|
||||
uint16_t reserved;
|
||||
bio_reader_t *reader;
|
||||
|
||||
if (this->encoding.len < ERROR_HEADER_SIZE)
|
||||
@@ -216,32 +216,32 @@ METHOD(pb_error_msg_t, get_fatal_flag, bool,
|
||||
return this->fatal;
|
||||
}
|
||||
|
||||
METHOD(pb_error_msg_t, get_vendor_id, u_int32_t,
|
||||
METHOD(pb_error_msg_t, get_vendor_id, uint32_t,
|
||||
private_pb_error_msg_t *this)
|
||||
{
|
||||
return this->vendor_id;
|
||||
}
|
||||
|
||||
METHOD(pb_error_msg_t, get_error_code, u_int16_t,
|
||||
METHOD(pb_error_msg_t, get_error_code, uint16_t,
|
||||
private_pb_error_msg_t *this)
|
||||
{
|
||||
return this->error_code;
|
||||
}
|
||||
|
||||
METHOD(pb_error_msg_t, get_offset, u_int32_t,
|
||||
METHOD(pb_error_msg_t, get_offset, uint32_t,
|
||||
private_pb_error_msg_t *this)
|
||||
{
|
||||
return this->error_offset;
|
||||
}
|
||||
|
||||
METHOD(pb_error_msg_t, get_bad_version, u_int8_t,
|
||||
METHOD(pb_error_msg_t, get_bad_version, uint8_t,
|
||||
private_pb_error_msg_t *this)
|
||||
{
|
||||
return this->bad_version;
|
||||
}
|
||||
|
||||
METHOD(pb_error_msg_t, set_bad_version, void,
|
||||
private_pb_error_msg_t *this, u_int8_t version)
|
||||
private_pb_error_msg_t *this, uint8_t version)
|
||||
{
|
||||
this->bad_version = version;
|
||||
}
|
||||
@@ -249,7 +249,7 @@ METHOD(pb_error_msg_t, set_bad_version, void,
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
|
||||
pb_tnc_msg_t* pb_error_msg_create(bool fatal, uint32_t vendor_id,
|
||||
pb_tnc_error_code_t error_code)
|
||||
{
|
||||
private_pb_error_msg_t *this;
|
||||
@@ -284,9 +284,9 @@ pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, u_int32_t vendor_id,
|
||||
pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, uint32_t vendor_id,
|
||||
pb_tnc_error_code_t error_code,
|
||||
u_int32_t error_offset)
|
||||
uint32_t error_offset)
|
||||
{
|
||||
private_pb_error_msg_t *this;
|
||||
|
||||
|
||||
@@ -64,35 +64,35 @@ struct pb_error_msg_t {
|
||||
*
|
||||
* @return PB Error Code Vendor ID
|
||||
*/
|
||||
u_int32_t (*get_vendor_id)(pb_error_msg_t *this);
|
||||
uint32_t (*get_vendor_id)(pb_error_msg_t *this);
|
||||
|
||||
/**
|
||||
* Get PB Error Code
|
||||
*
|
||||
* @return PB Error Code
|
||||
*/
|
||||
u_int16_t (*get_error_code)(pb_error_msg_t *this);
|
||||
uint16_t (*get_error_code)(pb_error_msg_t *this);
|
||||
|
||||
/**
|
||||
* Get the PB Error Offset
|
||||
*
|
||||
* @return PB Error Offset
|
||||
*/
|
||||
u_int32_t (*get_offset)(pb_error_msg_t *this);
|
||||
uint32_t (*get_offset)(pb_error_msg_t *this);
|
||||
|
||||
/**
|
||||
* Get the PB Bad Version
|
||||
*
|
||||
* @return PB Bad Version
|
||||
*/
|
||||
u_int8_t (*get_bad_version)(pb_error_msg_t *this);
|
||||
uint8_t (*get_bad_version)(pb_error_msg_t *this);
|
||||
|
||||
/**
|
||||
* Set the PB Bad Version
|
||||
*
|
||||
* @param version PB Bad Version
|
||||
*/
|
||||
void (*set_bad_version)(pb_error_msg_t *this, u_int8_t version);
|
||||
void (*set_bad_version)(pb_error_msg_t *this, uint8_t version);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ struct pb_error_msg_t {
|
||||
* @param vendor_id Error Code Vendor ID
|
||||
* @param error_code Error Code
|
||||
*/
|
||||
pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
|
||||
pb_tnc_msg_t* pb_error_msg_create(bool fatal, uint32_t vendor_id,
|
||||
pb_tnc_error_code_t error_code);
|
||||
|
||||
/**
|
||||
@@ -113,9 +113,9 @@ pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
|
||||
* @param error_code Error Code
|
||||
* @param error_offset Error Offset
|
||||
*/
|
||||
pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, u_int32_t vendor_id,
|
||||
pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, uint32_t vendor_id,
|
||||
pb_tnc_error_code_t error_code,
|
||||
u_int32_t error_offset);
|
||||
uint32_t error_offset);
|
||||
|
||||
/**
|
||||
* Create an unprocessed PB-Error message from raw data
|
||||
|
||||
@@ -57,7 +57,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_experimental_msg_t *this, u_int32_t *offset)
|
||||
private_pb_experimental_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_language_preference_msg_t *this, u_int32_t *offset)
|
||||
private_pb_language_preference_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
chunk_t lang;
|
||||
|
||||
|
||||
@@ -75,12 +75,12 @@ struct private_pb_pa_msg_t {
|
||||
/**
|
||||
* Posture Validator Identifier
|
||||
*/
|
||||
u_int16_t collector_id;
|
||||
uint16_t collector_id;
|
||||
|
||||
/**
|
||||
* Posture Validator Identifier
|
||||
*/
|
||||
u_int16_t validator_id;
|
||||
uint16_t validator_id;
|
||||
|
||||
/**
|
||||
* PA Message Body
|
||||
@@ -131,9 +131,9 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_pa_msg_t *this, u_int32_t *offset)
|
||||
private_pb_pa_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
u_int8_t flags;
|
||||
uint8_t flags;
|
||||
size_t msg_body_len;
|
||||
bio_reader_t *reader;
|
||||
|
||||
@@ -186,13 +186,13 @@ METHOD(pb_pa_msg_t, get_subtype, pen_type_t,
|
||||
return this->subtype;
|
||||
}
|
||||
|
||||
METHOD(pb_pa_msg_t, get_collector_id, u_int16_t,
|
||||
METHOD(pb_pa_msg_t, get_collector_id, uint16_t,
|
||||
private_pb_pa_msg_t *this)
|
||||
{
|
||||
return this->collector_id;
|
||||
}
|
||||
|
||||
METHOD(pb_pa_msg_t, get_validator_id, u_int16_t,
|
||||
METHOD(pb_pa_msg_t, get_validator_id, uint16_t,
|
||||
private_pb_pa_msg_t *this)
|
||||
{
|
||||
return this->validator_id;
|
||||
@@ -241,8 +241,8 @@ pb_tnc_msg_t *pb_pa_msg_create_from_data(chunk_t data)
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t *pb_pa_msg_create(u_int32_t vendor_id, u_int32_t subtype,
|
||||
u_int16_t collector_id, u_int16_t validator_id,
|
||||
pb_tnc_msg_t *pb_pa_msg_create(uint32_t vendor_id, uint32_t subtype,
|
||||
uint16_t collector_id, uint16_t validator_id,
|
||||
bool excl, chunk_t msg_body)
|
||||
{
|
||||
private_pb_pa_msg_t *this;
|
||||
|
||||
@@ -51,14 +51,14 @@ struct pb_pa_msg_t {
|
||||
*
|
||||
* @return Posture Collector ID
|
||||
*/
|
||||
u_int16_t (*get_collector_id)(pb_pa_msg_t *this);
|
||||
uint16_t (*get_collector_id)(pb_pa_msg_t *this);
|
||||
|
||||
/**
|
||||
* Get Posture Validator ID
|
||||
*
|
||||
* @return Posture Validator ID
|
||||
*/
|
||||
u_int16_t (*get_validator_id)(pb_pa_msg_t *this);
|
||||
uint16_t (*get_validator_id)(pb_pa_msg_t *this);
|
||||
|
||||
/**
|
||||
* Get the PA Message Body
|
||||
@@ -86,8 +86,8 @@ struct pb_pa_msg_t {
|
||||
* @param excl Exclusive Flag
|
||||
* @param msg_body PA Message Body
|
||||
*/
|
||||
pb_tnc_msg_t *pb_pa_msg_create(u_int32_t vendor_id, u_int32_t subtype,
|
||||
u_int16_t collector_id, u_int16_t validator_id,
|
||||
pb_tnc_msg_t *pb_pa_msg_create(uint32_t vendor_id, uint32_t subtype,
|
||||
uint16_t collector_id, uint16_t validator_id,
|
||||
bool excl, chunk_t msg_body);
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,7 +97,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_reason_string_msg_t *this, u_int32_t *offset)
|
||||
private_pb_reason_string_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_remediation_parameters_msg_t *this, u_int32_t *offset)
|
||||
private_pb_remediation_parameters_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
u_int8_t reserved;
|
||||
uint8_t reserved;
|
||||
status_t status = SUCCESS;
|
||||
u_char *pos;
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_mutual_capability_msg_t *this, u_int32_t *offset)
|
||||
private_pb_mutual_capability_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_noskip_test_msg_t *this, u_int32_t *offset)
|
||||
private_pb_noskip_test_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ extern enum_name_t *pb_tnc_ita_msg_type_names;
|
||||
* Information entry describing a PB-TNC Message Type
|
||||
*/
|
||||
struct pb_tnc_msg_info_t {
|
||||
u_int32_t min_size;
|
||||
uint32_t min_size;
|
||||
bool exact_size;
|
||||
bool in_result_batch;
|
||||
signed char has_noskip_flag;
|
||||
@@ -138,7 +138,7 @@ struct pb_tnc_msg_t {
|
||||
* @param relative offset where an error occurred
|
||||
* @return return processing status
|
||||
*/
|
||||
status_t (*process)(pb_tnc_msg_t *this, u_int32_t *offset);
|
||||
status_t (*process)(pb_tnc_msg_t *this, uint32_t *offset);
|
||||
|
||||
/**
|
||||
* Get a new reference to the message.
|
||||
|
||||
@@ -117,12 +117,12 @@ struct private_pb_pdp_referral_msg_t {
|
||||
/**
|
||||
* PT protocol the PDP is using
|
||||
*/
|
||||
u_int8_t protocol;
|
||||
uint8_t protocol;
|
||||
|
||||
/**
|
||||
* PT port the PDP is using
|
||||
*/
|
||||
u_int16_t port;
|
||||
uint16_t port;
|
||||
|
||||
/**
|
||||
* Encoded message
|
||||
@@ -163,10 +163,10 @@ METHOD(pb_tnc_msg_t, build, void,
|
||||
}
|
||||
|
||||
METHOD(pb_tnc_msg_t, process, status_t,
|
||||
private_pb_pdp_referral_msg_t *this, u_int32_t *offset)
|
||||
private_pb_pdp_referral_msg_t *this, uint32_t *offset)
|
||||
{
|
||||
bio_reader_t *reader;
|
||||
u_int8_t reserved;
|
||||
uint8_t reserved;
|
||||
|
||||
*offset = 0;
|
||||
|
||||
@@ -223,7 +223,7 @@ METHOD(pb_pdp_referral_msg_t, get_identifier, chunk_t,
|
||||
}
|
||||
|
||||
METHOD(pb_pdp_referral_msg_t, get_fqdn, chunk_t,
|
||||
private_pb_pdp_referral_msg_t *this, u_int8_t *protocol, u_int16_t *port)
|
||||
private_pb_pdp_referral_msg_t *this, uint8_t *protocol, uint16_t *port)
|
||||
{
|
||||
if (protocol)
|
||||
{
|
||||
@@ -267,7 +267,7 @@ pb_tnc_msg_t* pb_pdp_referral_msg_create(pen_type_t identifier_type,
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, u_int16_t port)
|
||||
pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, uint16_t port)
|
||||
{
|
||||
pb_tnc_msg_t *msg;
|
||||
bio_writer_t *writer;
|
||||
|
||||
@@ -74,8 +74,8 @@ struct pb_pdp_referral_msg_t {
|
||||
* @param port PT port the PDP is listening on
|
||||
* @return Fully Qualified Domain Name of PDP
|
||||
*/
|
||||
chunk_t (*get_fqdn)(pb_pdp_referral_msg_t *this, u_int8_t *protocol,
|
||||
u_int16_t *port);
|
||||
chunk_t (*get_fqdn)(pb_pdp_referral_msg_t *this, uint8_t *protocol,
|
||||
uint16_t *port);
|
||||
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ pb_tnc_msg_t* pb_pdp_referral_msg_create(pen_type_t identifier_type,
|
||||
* @param fqdn Fully Qualified Domain Name of PDP
|
||||
* @param port PT-TLS port the PDP is listening on
|
||||
*/
|
||||
pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, u_int16_t port);
|
||||
pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, uint16_t port);
|
||||
|
||||
/**
|
||||
* Create an unprocessed PB-PDP-Referral message from raw data
|
||||
|
||||
@@ -77,7 +77,7 @@ struct private_tnccs_20_t {
|
||||
/**
|
||||
* Type of TNC client authentication
|
||||
*/
|
||||
u_int32_t auth_type;
|
||||
uint32_t auth_type;
|
||||
|
||||
/**
|
||||
* Mutual PB-TNC protocol enabled
|
||||
@@ -423,20 +423,20 @@ METHOD(tnccs_t, set_transport, void,
|
||||
this->transport = transport;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_auth_type, u_int32_t,
|
||||
METHOD(tnccs_t, get_auth_type, uint32_t,
|
||||
private_tnccs_20_t *this)
|
||||
{
|
||||
return this->auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, set_auth_type, void,
|
||||
private_tnccs_20_t *this, u_int32_t auth_type)
|
||||
private_tnccs_20_t *this, uint32_t auth_type)
|
||||
{
|
||||
this->auth_type = auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_pdp_server, chunk_t,
|
||||
private_tnccs_20_t *this, u_int16_t *port)
|
||||
private_tnccs_20_t *this, uint16_t *port)
|
||||
{
|
||||
if (this->tnc_client)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ struct private_tnccs_20_client_t {
|
||||
/**
|
||||
* PDP server port
|
||||
*/
|
||||
u_int16_t pdp_port;
|
||||
uint16_t pdp_port;
|
||||
|
||||
/**
|
||||
* Mutual PB-TNC protocol enabled
|
||||
@@ -124,8 +124,8 @@ struct private_tnccs_20_client_t {
|
||||
void tnccs_20_handle_ietf_error_msg(pb_tnc_msg_t *msg, bool *fatal_error)
|
||||
{
|
||||
pb_error_msg_t *err_msg;
|
||||
u_int32_t vendor_id;
|
||||
u_int16_t error_code;
|
||||
uint32_t vendor_id;
|
||||
uint16_t error_code;
|
||||
bool fatal;
|
||||
|
||||
err_msg = (pb_error_msg_t*)msg;
|
||||
@@ -238,7 +238,7 @@ static void handle_ietf_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *m
|
||||
{
|
||||
pb_pa_msg_t *pa_msg;
|
||||
pen_type_t msg_subtype;
|
||||
u_int16_t imc_id, imv_id;
|
||||
uint16_t imc_id, imv_id;
|
||||
chunk_t msg_body;
|
||||
bool excl;
|
||||
enum_name_t *pa_subtype_names;
|
||||
@@ -274,7 +274,7 @@ static void handle_ietf_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *m
|
||||
case PB_MSG_ASSESSMENT_RESULT:
|
||||
{
|
||||
pb_assessment_result_msg_t *assess_msg;
|
||||
u_int32_t result;
|
||||
uint32_t result;
|
||||
|
||||
assess_msg = (pb_assessment_result_msg_t*)msg;
|
||||
result = assess_msg->get_assessment_result(assess_msg);
|
||||
@@ -375,7 +375,7 @@ static void handle_tcg_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *ms
|
||||
{
|
||||
pb_pdp_referral_msg_t *pdp_msg;
|
||||
pen_type_t pdp_id_type;
|
||||
u_int8_t pdp_protocol;
|
||||
uint8_t pdp_protocol;
|
||||
|
||||
pdp_msg = (pb_pdp_referral_msg_t*)msg;
|
||||
pdp_id_type = pdp_msg->get_identifier_type(pdp_msg);
|
||||
@@ -765,7 +765,7 @@ METHOD(tnccs_20_handler_t, destroy, void,
|
||||
}
|
||||
|
||||
METHOD(tnccs_20_client_t, get_pdp_server, chunk_t,
|
||||
private_tnccs_20_client_t *this, u_int16_t *port)
|
||||
private_tnccs_20_client_t *this, uint16_t *port)
|
||||
{
|
||||
*port = this->pdp_port;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ struct tnccs_20_client_t {
|
||||
* @param port PT-TLS port of the PDP server
|
||||
* @return FQDN of PDP server
|
||||
*/
|
||||
chunk_t (*get_pdp_server)(tnccs_20_client_t *this, u_int16_t *port);
|
||||
chunk_t (*get_pdp_server)(tnccs_20_client_t *this, uint16_t *port);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ static void handle_ietf_message(private_tnccs_20_server_t *this, pb_tnc_msg_t *m
|
||||
{
|
||||
pb_pa_msg_t *pa_msg;
|
||||
pen_type_t msg_subtype;
|
||||
u_int16_t imc_id, imv_id;
|
||||
uint16_t imc_id, imv_id;
|
||||
chunk_t msg_body;
|
||||
bool excl;
|
||||
enum_name_t *pa_subtype_names;
|
||||
@@ -531,14 +531,14 @@ METHOD(tnccs_20_handler_t, begin_handshake, void,
|
||||
{
|
||||
pb_tnc_msg_t *msg;
|
||||
identification_t *pdp_server;
|
||||
u_int16_t *pdp_port;
|
||||
uint16_t *pdp_port;
|
||||
|
||||
tnc->imvs->notify_connection_change(tnc->imvs, this->connection_id,
|
||||
TNC_CONNECTION_STATE_HANDSHAKE);
|
||||
|
||||
/* Send a PB-TNC TCG PDP Referral message if PDP is known */
|
||||
pdp_server = (identification_t*)lib->get(lib, "pt-tls-server");
|
||||
pdp_port = (u_int16_t*)lib->get(lib, "pt-tls-port");
|
||||
pdp_port = (uint16_t*)lib->get(lib, "pt-tls-port");
|
||||
|
||||
if (this->eap_transport && pdp_server && pdp_port)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ struct private_tnccs_dynamic_t {
|
||||
/**
|
||||
* Type of TNC client authentication
|
||||
*/
|
||||
u_int32_t auth_type;
|
||||
uint32_t auth_type;
|
||||
|
||||
/**
|
||||
* Callback function to communicate recommendation (TNC Server only)
|
||||
@@ -223,20 +223,20 @@ METHOD(tnccs_t, set_transport, void,
|
||||
this->transport = transport;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_auth_type, u_int32_t,
|
||||
METHOD(tnccs_t, get_auth_type, uint32_t,
|
||||
private_tnccs_dynamic_t *this)
|
||||
{
|
||||
return this->auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, set_auth_type, void,
|
||||
private_tnccs_dynamic_t *this, u_int32_t auth_type)
|
||||
private_tnccs_dynamic_t *this, uint32_t auth_type)
|
||||
{
|
||||
this->auth_type = auth_type;
|
||||
}
|
||||
|
||||
METHOD(tnccs_t, get_pdp_server, chunk_t,
|
||||
private_tnccs_dynamic_t *this, u_int16_t *port)
|
||||
private_tnccs_dynamic_t *this, uint16_t *port)
|
||||
{
|
||||
tnccs_t *tnccs = (tnccs_t*)this->tls;
|
||||
|
||||
|
||||
@@ -119,14 +119,14 @@ struct tnccs_t {
|
||||
*
|
||||
* @return TNC Client authentication type
|
||||
*/
|
||||
u_int32_t (*get_auth_type)(tnccs_t *this);
|
||||
uint32_t (*get_auth_type)(tnccs_t *this);
|
||||
|
||||
/**
|
||||
* Set type of TNC Client authentication
|
||||
*
|
||||
* @param auth_type TNC Client authentication type
|
||||
*/
|
||||
void (*set_auth_type)(tnccs_t *this, u_int32_t auth_type);
|
||||
void (*set_auth_type)(tnccs_t *this, uint32_t auth_type);
|
||||
|
||||
/**
|
||||
* Get PDP server name and port number
|
||||
@@ -134,7 +134,7 @@ struct tnccs_t {
|
||||
* @param port PDP port number
|
||||
* @return PDP server name
|
||||
*/
|
||||
chunk_t (*get_pdp_server)(tnccs_t *this, u_int16_t *port);
|
||||
chunk_t (*get_pdp_server)(tnccs_t *this, uint16_t *port);
|
||||
|
||||
/**
|
||||
* Get a new reference to the TNCCS object.
|
||||
|
||||
@@ -87,7 +87,7 @@ struct tnccs_manager_t {
|
||||
tnccs_type_t type, tnccs_t *tnccs,
|
||||
tnccs_send_message_t send_message,
|
||||
bool *request_handshake_retry,
|
||||
u_int32_t max_msg_len,
|
||||
uint32_t max_msg_len,
|
||||
recommendations_t **recs);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user