Use standard unsigned integer types
This commit is contained in:
@@ -225,9 +225,9 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
|
||||
{
|
||||
tcg_pts_attr_req_file_meas_t *attr_cast;
|
||||
char *pathname;
|
||||
u_int16_t request_id;
|
||||
uint16_t request_id;
|
||||
bool is_directory;
|
||||
u_int32_t delimiter;
|
||||
uint32_t delimiter;
|
||||
pts_file_meas_t *measurements;
|
||||
pen_type_t error_code;
|
||||
|
||||
@@ -282,7 +282,7 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
|
||||
tcg_pts_attr_req_file_meta_t *attr_cast;
|
||||
char *pathname;
|
||||
bool is_directory;
|
||||
u_int8_t delimiter;
|
||||
uint8_t delimiter;
|
||||
pts_file_meta_t *metadata;
|
||||
pen_type_t error_code;
|
||||
|
||||
@@ -336,8 +336,8 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
|
||||
pts_comp_evidence_t *evid;
|
||||
pts_component_t *comp;
|
||||
pen_type_t error_code;
|
||||
u_int32_t depth;
|
||||
u_int8_t flags;
|
||||
uint32_t depth;
|
||||
uint8_t flags;
|
||||
status_t status;
|
||||
enumerator_t *e;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ struct private_imc_attestation_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -114,12 +114,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_attestation_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_attestation_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_attestation_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
@@ -175,7 +175,7 @@ METHOD(imc_attestation_state_t, get_pts, pts_t*,
|
||||
|
||||
METHOD(imc_attestation_state_t, create_component, pts_component_t*,
|
||||
private_imc_attestation_state_t *this, pts_comp_func_name_t *name,
|
||||
u_int32_t depth)
|
||||
uint32_t depth)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
pts_component_t *component;
|
||||
|
||||
@@ -57,7 +57,7 @@ struct imc_attestation_state_t {
|
||||
* @return created functional component instance or NULL
|
||||
*/
|
||||
pts_component_t* (*create_component)(imc_attestation_state_t *this,
|
||||
pts_comp_func_name_t *name, u_int32_t depth);
|
||||
pts_comp_func_name_t *name, uint32_t depth);
|
||||
|
||||
/**
|
||||
* Add an entry to the Component Evidence cache list
|
||||
|
||||
@@ -59,7 +59,7 @@ struct private_imc_hcd_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_hcd_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_hcd_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_hcd_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
|
||||
@@ -162,7 +162,7 @@ static void add_product_info(imc_msg_t *msg)
|
||||
static void add_numeric_version(imc_msg_t *msg)
|
||||
{
|
||||
pa_tnc_attr_t *attr;
|
||||
u_int32_t major, minor;
|
||||
uint32_t major, minor;
|
||||
|
||||
os->get_numeric_version(os, &major, &minor);
|
||||
DBG1(DBG_IMC, "operating system numeric version is %d.%d",
|
||||
|
||||
@@ -59,7 +59,7 @@ struct private_imc_os_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_os_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_os_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_os_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
|
||||
@@ -128,8 +128,8 @@ static bool do_netstat(ietf_attr_port_filter_t *attr)
|
||||
while (fgets(buf, sizeof(buf), file))
|
||||
{
|
||||
u_char *pos;
|
||||
u_int8_t new_protocol, protocol;
|
||||
u_int16_t new_port, port;
|
||||
uint8_t new_protocol, protocol;
|
||||
uint16_t new_port, port;
|
||||
int i;
|
||||
enumerator_t *enumerator;
|
||||
bool allowed, found = FALSE;
|
||||
|
||||
@@ -59,7 +59,7 @@ struct private_imc_scanner_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_scanner_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_scanner_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_scanner_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
|
||||
@@ -59,7 +59,7 @@ struct private_imc_swid_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -69,7 +69,7 @@ struct private_imc_swid_state_t {
|
||||
/**
|
||||
* Event ID Epoch
|
||||
*/
|
||||
u_int32_t eid_epoch;
|
||||
uint32_t eid_epoch;
|
||||
};
|
||||
|
||||
METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
|
||||
@@ -98,12 +98,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_swid_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_swid_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_swid_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
@@ -146,7 +146,7 @@ METHOD(imc_state_t, destroy, void,
|
||||
free(this);
|
||||
}
|
||||
|
||||
METHOD(imc_swid_state_t, get_eid_epoch, u_int32_t,
|
||||
METHOD(imc_swid_state_t, get_eid_epoch, uint32_t,
|
||||
private_imc_swid_state_t *this)
|
||||
{
|
||||
return this->eid_epoch;
|
||||
@@ -158,11 +158,11 @@ METHOD(imc_swid_state_t, get_eid_epoch, u_int32_t,
|
||||
imc_state_t *imc_swid_state_create(TNC_ConnectionID connection_id)
|
||||
{
|
||||
private_imc_swid_state_t *this;
|
||||
u_int32_t eid_epoch;
|
||||
uint32_t eid_epoch;
|
||||
nonce_gen_t *ng;
|
||||
|
||||
ng = lib->crypto->create_nonce_gen(lib->crypto);
|
||||
if (!ng || !ng->get_nonce(ng, 4, (u_int8_t*)&eid_epoch))
|
||||
if (!ng || !ng->get_nonce(ng, 4, (uint8_t*)&eid_epoch))
|
||||
{
|
||||
DBG1(DBG_TNC, "failed to generate random EID epoch value");
|
||||
DESTROY_IF(ng);
|
||||
|
||||
@@ -43,7 +43,7 @@ struct imc_swid_state_t {
|
||||
*
|
||||
* @return Event ID Epoch
|
||||
*/
|
||||
u_int32_t (*get_eid_epoch)(imc_swid_state_t *this);
|
||||
uint32_t (*get_eid_epoch)(imc_swid_state_t *this);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ struct private_imc_test_state_t {
|
||||
/**
|
||||
* Maximum PA-TNC message size for this TNCCS connection
|
||||
*/
|
||||
u_int32_t max_msg_len;
|
||||
uint32_t max_msg_len;
|
||||
|
||||
/**
|
||||
* PA-TNC attribute segmentation contracts associated with TNCCS connection
|
||||
@@ -124,12 +124,12 @@ METHOD(imc_state_t, set_flags, void,
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, set_max_msg_len, void,
|
||||
private_imc_test_state_t *this, u_int32_t max_msg_len)
|
||||
private_imc_test_state_t *this, uint32_t max_msg_len)
|
||||
{
|
||||
this->max_msg_len = max_msg_len;
|
||||
}
|
||||
|
||||
METHOD(imc_state_t, get_max_msg_len, u_int32_t,
|
||||
METHOD(imc_state_t, get_max_msg_len, uint32_t,
|
||||
private_imc_test_state_t *this)
|
||||
{
|
||||
return this->max_msg_len;
|
||||
|
||||
@@ -853,7 +853,7 @@ METHOD(attest_db_t, list_devices, void,
|
||||
time_t timestamp;
|
||||
int id, last_id = 0, ar_id = 0, last_ar_id = 0, device_count = 0, trusted;
|
||||
int session_id, rec;
|
||||
u_int32_t ar_id_type;
|
||||
uint32_t ar_id_type;
|
||||
u_int tstamp;
|
||||
|
||||
e = this->db->query(this->db,
|
||||
|
||||
@@ -185,13 +185,13 @@ METHOD(imv_agent_if_t, receive_message_long, TNC_Result,
|
||||
typedef struct port_range_t port_range_t;
|
||||
|
||||
struct port_range_t {
|
||||
u_int16_t start, stop;
|
||||
uint16_t start, stop;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse a TCP or UDP port list from an argument string
|
||||
*/
|
||||
static linked_list_t* get_port_list(u_int8_t protocol_family,
|
||||
static linked_list_t* get_port_list(uint8_t protocol_family,
|
||||
bool closed_port_policy, char *arg_str)
|
||||
{
|
||||
chunk_t port_list, port_item, port_start;
|
||||
@@ -336,8 +336,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
|
||||
{
|
||||
TNC_IMV_Evaluation_Result eval;
|
||||
TNC_IMV_Action_Recommendation rec;
|
||||
u_int8_t protocol_family, protocol;
|
||||
u_int16_t port;
|
||||
uint8_t protocol_family, protocol;
|
||||
uint16_t port;
|
||||
bool closed_port_policy, blocked, first;
|
||||
char result_str[BUF_LEN], *pos, *protocol_str;
|
||||
size_t len;
|
||||
|
||||
Reference in New Issue
Block a user