Use standard unsigned integer types
This commit is contained in:
@@ -55,12 +55,12 @@ struct private_eap_radius_t {
|
||||
/**
|
||||
* EAP vendor, if any
|
||||
*/
|
||||
u_int32_t vendor;
|
||||
uint32_t vendor;
|
||||
|
||||
/**
|
||||
* EAP message identifier
|
||||
*/
|
||||
u_int8_t identifier;
|
||||
uint8_t identifier;
|
||||
|
||||
/**
|
||||
* RADIUS client instance
|
||||
@@ -86,15 +86,15 @@ static void add_eap_identity(private_eap_radius_t *this,
|
||||
{
|
||||
struct {
|
||||
/** EAP code (REQUEST/RESPONSE) */
|
||||
u_int8_t code;
|
||||
uint8_t code;
|
||||
/** unique message identifier */
|
||||
u_int8_t identifier;
|
||||
uint8_t identifier;
|
||||
/** length of whole message */
|
||||
u_int16_t length;
|
||||
uint16_t length;
|
||||
/** EAP type */
|
||||
u_int8_t type;
|
||||
uint8_t type;
|
||||
/** identity data */
|
||||
u_int8_t data[];
|
||||
uint8_t data[];
|
||||
} __attribute__((__packed__)) *hdr;
|
||||
chunk_t id, prefix;
|
||||
size_t len;
|
||||
@@ -156,7 +156,7 @@ void eap_radius_build_attributes(radius_message_t *request)
|
||||
ike_sa_t *ike_sa;
|
||||
host_t *host;
|
||||
char buf[40], *station_id_fmt;;
|
||||
u_int32_t value;
|
||||
uint32_t value;
|
||||
chunk_t chunk;
|
||||
|
||||
/* virtual NAS-Port-Type */
|
||||
@@ -314,8 +314,8 @@ static void process_filter_id(radius_message_t *msg)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
int type;
|
||||
u_int8_t tunnel_tag;
|
||||
u_int32_t tunnel_type;
|
||||
uint8_t tunnel_tag;
|
||||
uint32_t tunnel_type;
|
||||
chunk_t filter_id = chunk_empty, data;
|
||||
bool is_esp_tunnel = FALSE;
|
||||
|
||||
@@ -395,7 +395,7 @@ static void process_timeout(radius_message_t *msg)
|
||||
/**
|
||||
* Add a Cisco Unity configuration attribute
|
||||
*/
|
||||
static void add_unity_attribute(eap_radius_provider_t *provider, u_int32_t id,
|
||||
static void add_unity_attribute(eap_radius_provider_t *provider, uint32_t id,
|
||||
int type, chunk_t data)
|
||||
{
|
||||
switch (type)
|
||||
@@ -417,7 +417,7 @@ static void add_unity_attribute(eap_radius_provider_t *provider, u_int32_t id,
|
||||
* Add a DNS/NBNS configuration attribute
|
||||
*/
|
||||
static void add_nameserver_attribute(eap_radius_provider_t *provider,
|
||||
u_int32_t id, int type, chunk_t data)
|
||||
uint32_t id, int type, chunk_t data)
|
||||
{
|
||||
/* these are from different vendors, but there is currently no conflict */
|
||||
switch (type)
|
||||
@@ -444,7 +444,7 @@ static void add_nameserver_attribute(eap_radius_provider_t *provider,
|
||||
* Add a UNITY_LOCAL_LAN or UNITY_SPLIT_INCLUDE attribute
|
||||
*/
|
||||
static void add_unity_split_attribute(eap_radius_provider_t *provider,
|
||||
u_int32_t id, configuration_attribute_type_t type,
|
||||
uint32_t id, configuration_attribute_type_t type,
|
||||
chunk_t data)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
@@ -701,7 +701,7 @@ METHOD(eap_method_t, process, status_t,
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_type, eap_type_t,
|
||||
private_eap_radius_t *this, u_int32_t *vendor)
|
||||
private_eap_radius_t *this, uint32_t *vendor)
|
||||
{
|
||||
*vendor = this->vendor;
|
||||
return this->type;
|
||||
@@ -721,14 +721,14 @@ METHOD(eap_method_t, get_msk, status_t,
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_identifier, u_int8_t,
|
||||
METHOD(eap_method_t, get_identifier, uint8_t,
|
||||
private_eap_radius_t *this)
|
||||
{
|
||||
return this->identifier;
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, set_identifier, void,
|
||||
private_eap_radius_t *this, u_int8_t identifier)
|
||||
private_eap_radius_t *this, uint8_t identifier)
|
||||
{
|
||||
this->identifier = identifier;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ struct private_eap_radius_accounting_t {
|
||||
/**
|
||||
* Session ID prefix
|
||||
*/
|
||||
u_int32_t prefix;
|
||||
uint32_t prefix;
|
||||
|
||||
/**
|
||||
* Format string we use for Called/Calling-Station-Id for a host
|
||||
@@ -101,8 +101,8 @@ typedef enum {
|
||||
*/
|
||||
typedef struct {
|
||||
struct {
|
||||
u_int64_t sent;
|
||||
u_int64_t received;
|
||||
uint64_t sent;
|
||||
uint64_t received;
|
||||
} bytes, packets;
|
||||
} usage_t;
|
||||
|
||||
@@ -133,7 +133,7 @@ static inline void sub_usage(usage_t *a, usage_t b)
|
||||
*/
|
||||
typedef struct {
|
||||
/** unique CHILD_SA identifier */
|
||||
u_int32_t id;
|
||||
uint32_t id;
|
||||
/** usage stats for this SA */
|
||||
usage_t usage;
|
||||
} sa_entry_t;
|
||||
@@ -172,7 +172,7 @@ typedef struct {
|
||||
radius_acct_terminate_cause_t cause;
|
||||
/* interim interval and timestamp of last update */
|
||||
struct {
|
||||
u_int32_t interval;
|
||||
uint32_t interval;
|
||||
time_t last;
|
||||
} interim;
|
||||
/** did we send Accounting-Start */
|
||||
@@ -237,7 +237,7 @@ static int sa_find(const void *a, const void *b)
|
||||
/**
|
||||
* Update or create usage counters of a cached SA
|
||||
*/
|
||||
static void update_sa(entry_t *entry, u_int32_t id, usage_t usage)
|
||||
static void update_sa(entry_t *entry, uint32_t id, usage_t usage)
|
||||
{
|
||||
sa_entry_t *sa, lookup;
|
||||
|
||||
@@ -402,7 +402,7 @@ static void add_ike_sa_parameters(private_eap_radius_accounting_t *this,
|
||||
host_t *vip, *host;
|
||||
char buf[MAX_RADIUS_ATTRIBUTE_SIZE + 1];
|
||||
chunk_t data;
|
||||
u_int32_t value;
|
||||
uint32_t value;
|
||||
|
||||
/* virtual NAS-Port-Type */
|
||||
value = htonl(5);
|
||||
@@ -461,7 +461,7 @@ static void add_ike_sa_parameters(private_eap_radius_accounting_t *this,
|
||||
* Get an existing or create a new entry from the locked session table
|
||||
*/
|
||||
static entry_t* get_or_create_entry(private_eap_radius_accounting_t *this,
|
||||
ike_sa_id_t *id, u_int32_t unique)
|
||||
ike_sa_id_t *id, uint32_t unique)
|
||||
{
|
||||
entry_t *entry;
|
||||
time_t now;
|
||||
@@ -520,7 +520,7 @@ static job_requeue_t send_interim(interim_data_t *data)
|
||||
enumerator_t *enumerator;
|
||||
ike_sa_t *ike_sa;
|
||||
entry_t *entry;
|
||||
u_int32_t value;
|
||||
uint32_t value;
|
||||
array_t *stats;
|
||||
sa_entry_t *sa, *found;
|
||||
|
||||
@@ -681,7 +681,7 @@ static void send_start(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa)
|
||||
{
|
||||
radius_message_t *message;
|
||||
entry_t *entry;
|
||||
u_int32_t value;
|
||||
uint32_t value;
|
||||
|
||||
if (this->acct_req_vip && !has_vip(ike_sa))
|
||||
{
|
||||
@@ -735,7 +735,7 @@ static void send_stop(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa)
|
||||
enumerator_t *enumerator;
|
||||
entry_t *entry;
|
||||
sa_entry_t *sa;
|
||||
u_int32_t value;
|
||||
uint32_t value;
|
||||
|
||||
this->mutex->lock(this->mutex);
|
||||
entry = this->sessions->remove(this->sessions, ike_sa->get_id(ike_sa));
|
||||
@@ -931,7 +931,7 @@ METHOD(listener_t, child_rekey, bool,
|
||||
|
||||
METHOD(listener_t, children_migrate, bool,
|
||||
private_eap_radius_accounting_t *this, ike_sa_t *ike_sa, ike_sa_id_t *new,
|
||||
u_int32_t unique)
|
||||
uint32_t unique)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
sa_entry_t *sa, *sa_new, *cached;
|
||||
@@ -1020,7 +1020,7 @@ eap_radius_accounting_t *eap_radius_accounting_create()
|
||||
.destroy = _destroy,
|
||||
},
|
||||
/* use system time as Session ID prefix */
|
||||
.prefix = (u_int32_t)time(NULL),
|
||||
.prefix = (uint32_t)time(NULL),
|
||||
.sessions = hashtable_create((hashtable_hash_t)hash,
|
||||
(hashtable_equals_t)equals, 32),
|
||||
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
|
||||
@@ -1050,7 +1050,7 @@ eap_radius_accounting_t *eap_radius_accounting_create()
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, u_int32_t interval)
|
||||
void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, uint32_t interval)
|
||||
{
|
||||
if (singleton)
|
||||
{
|
||||
|
||||
@@ -52,6 +52,6 @@ eap_radius_accounting_t *eap_radius_accounting_create();
|
||||
* @param ike_sa IKE_SA to send updates for
|
||||
* @param interval interval for interim updates
|
||||
*/
|
||||
void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, u_int32_t interval);
|
||||
void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, uint32_t interval);
|
||||
|
||||
#endif /** EAP_RADIUS_ACCOUNTING_H_ @}*/
|
||||
|
||||
@@ -293,7 +293,7 @@ static void process_disconnect(private_eap_radius_dae_t *this,
|
||||
* Apply a new lifetime to an IKE_SA
|
||||
*/
|
||||
static void apply_lifetime(private_eap_radius_dae_t *this, ike_sa_id_t *id,
|
||||
u_int32_t lifetime)
|
||||
uint32_t lifetime)
|
||||
{
|
||||
ike_sa_t *ike_sa;
|
||||
|
||||
@@ -323,7 +323,7 @@ static void process_coa(private_eap_radius_dae_t *this,
|
||||
ike_sa_id_t *id;
|
||||
chunk_t data;
|
||||
int type;
|
||||
u_int32_t lifetime = 0;
|
||||
uint32_t lifetime = 0;
|
||||
bool lifetime_seen = FALSE;
|
||||
|
||||
ids = get_matching_ike_sas(this, request, client);
|
||||
|
||||
@@ -63,9 +63,9 @@ struct private_eap_radius_forward_t {
|
||||
*/
|
||||
typedef struct {
|
||||
/** vendor ID, 0 for standard attributes */
|
||||
u_int32_t vendor;
|
||||
uint32_t vendor;
|
||||
/** attribute type */
|
||||
u_int8_t type;
|
||||
uint8_t type;
|
||||
} attr_t;
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ static bool is_attribute_selected(linked_list_t *selector,
|
||||
radius_attribute_type_t type, chunk_t data)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
u_int32_t vendor = 0;
|
||||
uint32_t vendor = 0;
|
||||
attr_t *sel;
|
||||
bool found = FALSE;
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
|
||||
}
|
||||
|
||||
METHOD(eap_radius_provider_t, add_framed_ip, void,
|
||||
private_eap_radius_provider_t *this, u_int32_t id, host_t *ip)
|
||||
private_eap_radius_provider_t *this, uint32_t id, host_t *ip)
|
||||
{
|
||||
this->listener.mutex->lock(this->listener.mutex);
|
||||
add_addr(this, this->listener.unclaimed, id, ip);
|
||||
@@ -477,7 +477,7 @@ METHOD(eap_radius_provider_t, add_framed_ip, void,
|
||||
}
|
||||
|
||||
METHOD(eap_radius_provider_t, add_attribute, void,
|
||||
private_eap_radius_provider_t *this, u_int32_t id,
|
||||
private_eap_radius_provider_t *this, uint32_t id,
|
||||
configuration_attribute_type_t type, chunk_t data)
|
||||
{
|
||||
attr_t *attr;
|
||||
|
||||
@@ -42,7 +42,7 @@ struct eap_radius_provider_t {
|
||||
* @param id IKE_SA unique identifier
|
||||
* @param ip IP address received from RADIUS server, gets owned
|
||||
*/
|
||||
void (*add_framed_ip)(eap_radius_provider_t *this, u_int32_t id,
|
||||
void (*add_framed_ip)(eap_radius_provider_t *this, uint32_t id,
|
||||
host_t *ip);
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@ struct eap_radius_provider_t {
|
||||
* @param type attribute type
|
||||
* @param data attribute data
|
||||
*/
|
||||
void (*add_attribute)(eap_radius_provider_t *this, u_int32_t id,
|
||||
void (*add_attribute)(eap_radius_provider_t *this, uint32_t id,
|
||||
configuration_attribute_type_t type, chunk_t data);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user