Use standard unsigned integer types
This commit is contained in:
@@ -77,7 +77,7 @@ struct private_aggressive_mode_t {
|
||||
/**
|
||||
* Negotiated SA lifetime
|
||||
*/
|
||||
u_int32_t lifetime;
|
||||
uint32_t lifetime;
|
||||
|
||||
/**
|
||||
* Negotiated authentication method
|
||||
@@ -164,7 +164,7 @@ static status_t send_notify(private_aggressive_mode_t *this, notify_type_t type)
|
||||
{
|
||||
notify_payload_t *notify;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
u_int64_t spi_i, spi_r;
|
||||
uint64_t spi_i, spi_r;
|
||||
chunk_t spi;
|
||||
|
||||
notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
|
||||
@@ -219,7 +219,7 @@ METHOD(task_t, build_i, status_t,
|
||||
linked_list_t *proposals;
|
||||
identification_t *id;
|
||||
packet_t *packet;
|
||||
u_int16_t group;
|
||||
uint16_t group;
|
||||
|
||||
DBG0(DBG_IKE, "initiating Aggressive Mode IKE_SA %s[%d] to %H",
|
||||
this->ike_sa->get_name(this->ike_sa),
|
||||
@@ -377,7 +377,7 @@ METHOD(task_t, process_r, status_t,
|
||||
id_payload_t *id_payload;
|
||||
identification_t *id;
|
||||
linked_list_t *list;
|
||||
u_int16_t group;
|
||||
uint16_t group;
|
||||
|
||||
this->ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||
DBG0(DBG_IKE, "%H is initiating a Aggressive Mode IKE_SA",
|
||||
@@ -629,7 +629,7 @@ METHOD(task_t, process_i, status_t,
|
||||
id_payload_t *id_payload;
|
||||
identification_t *id, *cid;
|
||||
linked_list_t *list;
|
||||
u_int32_t lifetime;
|
||||
uint32_t lifetime;
|
||||
|
||||
sa_payload = (sa_payload_t*)message->get_payload(message,
|
||||
PLV1_SECURITY_ASSOCIATION);
|
||||
|
||||
@@ -81,7 +81,7 @@ METHOD(task_t, process_r, status_t,
|
||||
payload_t *payload;
|
||||
delete_payload_t *delete_payload;
|
||||
ike_sa_id_t *id;
|
||||
u_int64_t spi_i, spi_r;
|
||||
uint64_t spi_i, spi_r;
|
||||
bool found = FALSE;
|
||||
|
||||
/* some peers send DELETE payloads for other IKE_SAs, e.g. those for expired
|
||||
|
||||
@@ -33,7 +33,7 @@ struct private_isakmp_dpd_t {
|
||||
/**
|
||||
* Sequence number.
|
||||
*/
|
||||
u_int32_t seqnr;
|
||||
uint32_t seqnr;
|
||||
|
||||
/**
|
||||
* DPD notify type
|
||||
@@ -51,8 +51,8 @@ METHOD(task_t, build, status_t,
|
||||
{
|
||||
notify_payload_t *notify;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
u_int64_t spi_i, spi_r;
|
||||
u_int32_t seqnr;
|
||||
uint64_t spi_i, spi_r;
|
||||
uint32_t seqnr;
|
||||
chunk_t spi;
|
||||
|
||||
notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
|
||||
@@ -100,7 +100,7 @@ METHOD(task_t, destroy, void,
|
||||
* Described in header.
|
||||
*/
|
||||
isakmp_dpd_t *isakmp_dpd_create(ike_sa_t *ike_sa, notify_type_t type,
|
||||
u_int32_t seqnr)
|
||||
uint32_t seqnr)
|
||||
{
|
||||
private_isakmp_dpd_t *this;
|
||||
|
||||
|
||||
@@ -47,6 +47,6 @@ struct isakmp_dpd_t {
|
||||
* @return ISAKMP_DPD task to handle by the task_manager
|
||||
*/
|
||||
isakmp_dpd_t *isakmp_dpd_create(ike_sa_t *ike_sa, notify_type_t type,
|
||||
u_int32_t seqnr);
|
||||
uint32_t seqnr);
|
||||
|
||||
#endif /** ISAKMP_DPD_H_ @}*/
|
||||
|
||||
@@ -129,8 +129,8 @@ static chunk_t generate_natd_hash(private_isakmp_natd_t *this,
|
||||
{
|
||||
hasher_t *hasher;
|
||||
chunk_t natd_chunk, natd_hash;
|
||||
u_int64_t spi_i, spi_r;
|
||||
u_int16_t port;
|
||||
uint64_t spi_i, spi_r;
|
||||
uint16_t port;
|
||||
|
||||
hasher = this->keymat->get_hasher(this->keymat);
|
||||
if (!hasher)
|
||||
|
||||
@@ -170,7 +170,7 @@ static struct {
|
||||
* for fragmentation of base ISAKMP messages (Cisco adds that and thus sends
|
||||
* 0xc0000000)
|
||||
*/
|
||||
static const u_int32_t fragmentation_ike = 0x80000000;
|
||||
static const uint32_t fragmentation_ike = 0x80000000;
|
||||
|
||||
static bool is_known_vid(chunk_t data, int i)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ struct private_main_mode_t {
|
||||
/**
|
||||
* Negotiated SA lifetime
|
||||
*/
|
||||
u_int32_t lifetime;
|
||||
uint32_t lifetime;
|
||||
|
||||
/**
|
||||
* Negotiated authentication method
|
||||
@@ -173,7 +173,7 @@ static status_t send_notify(private_main_mode_t *this, notify_type_t type)
|
||||
{
|
||||
notify_payload_t *notify;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
u_int64_t spi_i, spi_r;
|
||||
uint64_t spi_i, spi_r;
|
||||
chunk_t spi;
|
||||
|
||||
notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
|
||||
@@ -215,7 +215,7 @@ static void add_initial_contact(private_main_mode_t *this, message_t *message,
|
||||
host_t *host;
|
||||
notify_payload_t *notify;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
u_int64_t spi_i, spi_r;
|
||||
uint64_t spi_i, spi_r;
|
||||
chunk_t spi;
|
||||
|
||||
idr = this->ph1->get_id(this->ph1, this->peer_cfg, FALSE);
|
||||
@@ -303,7 +303,7 @@ METHOD(task_t, build_i, status_t,
|
||||
}
|
||||
case MM_SA:
|
||||
{
|
||||
u_int16_t group;
|
||||
uint16_t group;
|
||||
|
||||
if (!this->ph1->create_hasher(this->ph1))
|
||||
{
|
||||
@@ -411,7 +411,7 @@ METHOD(task_t, process_r, status_t,
|
||||
}
|
||||
case MM_SA:
|
||||
{
|
||||
u_int16_t group;
|
||||
uint16_t group;
|
||||
|
||||
if (!this->ph1->create_hasher(this->ph1))
|
||||
{
|
||||
@@ -627,7 +627,7 @@ METHOD(task_t, process_i, status_t,
|
||||
linked_list_t *list;
|
||||
sa_payload_t *sa_payload;
|
||||
auth_method_t method;
|
||||
u_int32_t lifetime;
|
||||
uint32_t lifetime;
|
||||
bool private;
|
||||
|
||||
sa_payload = (sa_payload_t*)message->get_payload(message,
|
||||
|
||||
@@ -58,7 +58,7 @@ struct private_mode_config_t {
|
||||
/**
|
||||
* Identifier to include in response
|
||||
*/
|
||||
u_int16_t identifier;
|
||||
uint16_t identifier;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,7 @@ struct private_quick_delete_t {
|
||||
/**
|
||||
* Inbound SPI of CHILD_SA to delete
|
||||
*/
|
||||
u_int32_t spi;
|
||||
uint32_t spi;
|
||||
|
||||
/**
|
||||
* Send delete even if SA does not exist
|
||||
@@ -86,9 +86,9 @@ struct private_quick_delete_t {
|
||||
* Delete the specified CHILD_SA, if found
|
||||
*/
|
||||
static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
|
||||
u_int32_t spi, bool remote_close)
|
||||
uint32_t spi, bool remote_close)
|
||||
{
|
||||
u_int64_t bytes_in, bytes_out;
|
||||
uint64_t bytes_in, bytes_out;
|
||||
child_sa_t *child_sa;
|
||||
linked_list_t *my_ts, *other_ts;
|
||||
child_cfg_t *child_cfg;
|
||||
@@ -200,7 +200,7 @@ METHOD(task_t, process_r, status_t,
|
||||
payload_t *payload;
|
||||
delete_payload_t *delete_payload;
|
||||
protocol_id_t protocol;
|
||||
u_int32_t spi;
|
||||
uint32_t spi;
|
||||
|
||||
payloads = message->create_payload_enumerator(message);
|
||||
while (payloads->enumerate(payloads, &payload))
|
||||
@@ -260,7 +260,7 @@ METHOD(task_t, destroy, void,
|
||||
* Described in header.
|
||||
*/
|
||||
quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
|
||||
u_int32_t spi, bool force, bool expired)
|
||||
uint32_t spi, bool force, bool expired)
|
||||
{
|
||||
private_quick_delete_t *this;
|
||||
|
||||
|
||||
@@ -50,6 +50,6 @@ struct quick_delete_t {
|
||||
* @return quick_delete task to handle by the task_manager
|
||||
*/
|
||||
quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
|
||||
u_int32_t spi, bool force, bool expired);
|
||||
uint32_t spi, bool force, bool expired);
|
||||
|
||||
#endif /** QUICK_DELETE_H_ @}*/
|
||||
|
||||
@@ -98,22 +98,22 @@ struct private_quick_mode_t {
|
||||
/**
|
||||
* Initiators ESP SPI
|
||||
*/
|
||||
u_int32_t spi_i;
|
||||
uint32_t spi_i;
|
||||
|
||||
/**
|
||||
* Responder ESP SPI
|
||||
*/
|
||||
u_int32_t spi_r;
|
||||
uint32_t spi_r;
|
||||
|
||||
/**
|
||||
* Initiators IPComp CPI
|
||||
*/
|
||||
u_int16_t cpi_i;
|
||||
uint16_t cpi_i;
|
||||
|
||||
/**
|
||||
* Responders IPComp CPI
|
||||
*/
|
||||
u_int16_t cpi_r;
|
||||
uint16_t cpi_r;
|
||||
|
||||
/**
|
||||
* selected CHILD_SA proposal
|
||||
@@ -143,17 +143,17 @@ struct private_quick_mode_t {
|
||||
/**
|
||||
* Negotiated lifetime of new SA
|
||||
*/
|
||||
u_int32_t lifetime;
|
||||
uint32_t lifetime;
|
||||
|
||||
/**
|
||||
* Negotaited lifebytes of new SA
|
||||
*/
|
||||
u_int64_t lifebytes;
|
||||
uint64_t lifebytes;
|
||||
|
||||
/**
|
||||
* Reqid to use, 0 for auto-allocate
|
||||
*/
|
||||
u_int32_t reqid;
|
||||
uint32_t reqid;
|
||||
|
||||
/**
|
||||
* Explicit inbound mark value to use, if any
|
||||
@@ -168,7 +168,7 @@ struct private_quick_mode_t {
|
||||
/**
|
||||
* SPI of SA we rekey
|
||||
*/
|
||||
u_int32_t rekey;
|
||||
uint32_t rekey;
|
||||
|
||||
/**
|
||||
* Delete old child after successful rekey
|
||||
@@ -193,7 +193,7 @@ struct private_quick_mode_t {
|
||||
/**
|
||||
* Message ID of handled quick mode exchange
|
||||
*/
|
||||
u_int32_t mid;
|
||||
uint32_t mid;
|
||||
|
||||
/** states of quick mode */
|
||||
enum {
|
||||
@@ -207,7 +207,7 @@ struct private_quick_mode_t {
|
||||
*/
|
||||
static void schedule_inactivity_timeout(private_quick_mode_t *this)
|
||||
{
|
||||
u_int32_t timeout;
|
||||
uint32_t timeout;
|
||||
bool close_ike;
|
||||
|
||||
timeout = this->config->get_inactivity(this->config);
|
||||
@@ -739,8 +739,8 @@ static void get_lifetimes(private_quick_mode_t *this)
|
||||
*/
|
||||
static void apply_lifetimes(private_quick_mode_t *this, sa_payload_t *sa_payload)
|
||||
{
|
||||
u_int32_t lifetime;
|
||||
u_int64_t lifebytes;
|
||||
uint32_t lifetime;
|
||||
uint64_t lifebytes;
|
||||
|
||||
lifetime = sa_payload->get_lifetime(sa_payload);
|
||||
lifebytes = sa_payload->get_lifebytes(sa_payload);
|
||||
@@ -863,7 +863,7 @@ METHOD(task_t, build_i, status_t,
|
||||
if (group != MODP_NONE)
|
||||
{
|
||||
proposal_t *proposal;
|
||||
u_int16_t preferred_group;
|
||||
uint16_t preferred_group;
|
||||
|
||||
proposal = this->ike_sa->get_proposal(this->ike_sa);
|
||||
proposal->get_algorithm(proposal, DIFFIE_HELLMAN_GROUP,
|
||||
@@ -1050,7 +1050,7 @@ METHOD(task_t, process_r, status_t,
|
||||
sa_payload_t *sa_payload;
|
||||
linked_list_t *tsi, *tsr, *hostsi, *hostsr, *list = NULL;
|
||||
peer_cfg_t *peer_cfg;
|
||||
u_int16_t group;
|
||||
uint16_t group;
|
||||
bool private;
|
||||
|
||||
sa_payload = (sa_payload_t*)message->get_payload(message,
|
||||
@@ -1365,14 +1365,14 @@ METHOD(task_t, get_type, task_type_t,
|
||||
return TASK_QUICK_MODE;
|
||||
}
|
||||
|
||||
METHOD(quick_mode_t, get_mid, u_int32_t,
|
||||
METHOD(quick_mode_t, get_mid, uint32_t,
|
||||
private_quick_mode_t *this)
|
||||
{
|
||||
return this->mid;
|
||||
}
|
||||
|
||||
METHOD(quick_mode_t, use_reqid, void,
|
||||
private_quick_mode_t *this, u_int32_t reqid)
|
||||
private_quick_mode_t *this, uint32_t reqid)
|
||||
{
|
||||
this->reqid = reqid;
|
||||
}
|
||||
@@ -1385,7 +1385,7 @@ METHOD(quick_mode_t, use_marks, void,
|
||||
}
|
||||
|
||||
METHOD(quick_mode_t, rekey, void,
|
||||
private_quick_mode_t *this, u_int32_t spi)
|
||||
private_quick_mode_t *this, uint32_t spi)
|
||||
{
|
||||
this->rekey = spi;
|
||||
}
|
||||
|
||||
@@ -46,14 +46,14 @@ struct quick_mode_t {
|
||||
*
|
||||
* @return message ID, or 0 (not defined yet or as initiator)
|
||||
*/
|
||||
u_int32_t (*get_mid)(quick_mode_t *this);
|
||||
uint32_t (*get_mid)(quick_mode_t *this);
|
||||
|
||||
/**
|
||||
* Use a specific reqid to install this CHILD_SA.
|
||||
*
|
||||
* @param reqid reqid to use
|
||||
*/
|
||||
void (*use_reqid)(quick_mode_t *this, u_int32_t reqid);
|
||||
void (*use_reqid)(quick_mode_t *this, uint32_t reqid);
|
||||
|
||||
/**
|
||||
* Use specific mark values, overriding configuration.
|
||||
@@ -68,7 +68,7 @@ struct quick_mode_t {
|
||||
*
|
||||
* @param spi spi of SA to rekey
|
||||
*/
|
||||
void (*rekey)(quick_mode_t *this, u_int32_t spi);
|
||||
void (*rekey)(quick_mode_t *this, uint32_t spi);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,7 +68,7 @@ struct private_xauth_t {
|
||||
/**
|
||||
* received identifier
|
||||
*/
|
||||
u_int16_t identifier;
|
||||
uint16_t identifier;
|
||||
|
||||
/**
|
||||
* status of Xauth exchange
|
||||
|
||||
Reference in New Issue
Block a user