aboutsummaryrefslogtreecommitdiffstats
path: root/src/libsimaka
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsimaka')
-rw-r--r--src/libsimaka/simaka_card.h4
-rw-r--r--src/libsimaka/simaka_manager.c6
-rw-r--r--src/libsimaka/simaka_manager.h6
-rw-r--r--src/libsimaka/simaka_message.c26
-rw-r--r--src/libsimaka/simaka_message.h4
-rw-r--r--src/libsimaka/simaka_provider.h2
6 files changed, 24 insertions, 24 deletions
diff --git a/src/libsimaka/simaka_card.h b/src/libsimaka/simaka_card.h
index 52cb32514..da98b172f 100644
--- a/src/libsimaka/simaka_card.h
+++ b/src/libsimaka/simaka_card.h
@@ -112,7 +112,7 @@ struct simaka_card_t {
*/
void (*set_reauth)(simaka_card_t *this, identification_t *id,
identification_t *next, char mk[HASH_SIZE_SHA1],
- u_int16_t counter);
+ uint16_t counter);
/**
* Retrieve parameters for fast reauthentication stored via set_reauth().
@@ -123,7 +123,7 @@ struct simaka_card_t {
* @return fast reauthentication identity, NULL if not found
*/
identification_t* (*get_reauth)(simaka_card_t *this, identification_t *id,
- char mk[HASH_SIZE_SHA1], u_int16_t *counter);
+ char mk[HASH_SIZE_SHA1], uint16_t *counter);
};
#endif /** SIMAKA_CARD_H_ @}*/
diff --git a/src/libsimaka/simaka_manager.c b/src/libsimaka/simaka_manager.c
index e85dd660b..47f1f6f8a 100644
--- a/src/libsimaka/simaka_manager.c
+++ b/src/libsimaka/simaka_manager.c
@@ -207,7 +207,7 @@ METHOD(simaka_manager_t, card_get_pseudonym, identification_t*,
METHOD(simaka_manager_t, card_set_reauth, void,
private_simaka_manager_t *this, identification_t *id, identification_t *next,
- char mk[HASH_SIZE_SHA1], u_int16_t counter)
+ char mk[HASH_SIZE_SHA1], uint16_t counter)
{
enumerator_t *enumerator;
simaka_card_t *card;
@@ -227,7 +227,7 @@ METHOD(simaka_manager_t, card_set_reauth, void,
METHOD(simaka_manager_t, card_get_reauth, identification_t*,
private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
- u_int16_t *counter)
+ uint16_t *counter)
{
enumerator_t *enumerator;
simaka_card_t *card;
@@ -393,7 +393,7 @@ METHOD(simaka_manager_t, provider_gen_pseudonym, identification_t*,
METHOD(simaka_manager_t, provider_is_reauth, identification_t*,
private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
- u_int16_t *counter)
+ uint16_t *counter)
{
enumerator_t *enumerator;
simaka_provider_t *provider;
diff --git a/src/libsimaka/simaka_manager.h b/src/libsimaka/simaka_manager.h
index bdd50296e..045bed4d5 100644
--- a/src/libsimaka/simaka_manager.h
+++ b/src/libsimaka/simaka_manager.h
@@ -131,7 +131,7 @@ struct simaka_manager_t {
*/
void (*card_set_reauth)(simaka_manager_t *this, identification_t *id,
identification_t *next, char mk[HASH_SIZE_SHA1],
- u_int16_t counter);
+ uint16_t counter);
/**
* Retrieve fast reauthentication parameters from one of the registered cards.
@@ -143,7 +143,7 @@ struct simaka_manager_t {
*/
identification_t* (*card_get_reauth)(simaka_manager_t *this,
identification_t *id, char mk[HASH_SIZE_SHA1],
- u_int16_t *counter);
+ uint16_t *counter);
/**
* Register a triplet provider (server) at the manager.
@@ -228,7 +228,7 @@ struct simaka_manager_t {
*/
identification_t* (*provider_is_reauth)(simaka_manager_t *this,
identification_t *id, char mk[HASH_SIZE_SHA1],
- u_int16_t *counter);
+ uint16_t *counter);
/**
* Generate a fast reauth id using one of the registered providers.
diff --git a/src/libsimaka/simaka_message.c b/src/libsimaka/simaka_message.c
index 7dd15480b..234d7ef2a 100644
--- a/src/libsimaka/simaka_message.c
+++ b/src/libsimaka/simaka_message.c
@@ -30,17 +30,17 @@ typedef struct attr_t attr_t;
*/
struct hdr_t {
/** 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 => EAP_SIM/EAP_AKA */
- u_int8_t type;
+ uint8_t type;
/** SIM subtype */
- u_int8_t subtype;
+ uint8_t subtype;
/** reserved bytes */
- u_int16_t reserved;
+ uint16_t reserved;
} __attribute__((__packed__));
/**
@@ -48,9 +48,9 @@ struct hdr_t {
*/
struct attr_hdr_t {
/** attribute type */
- u_int8_t type;
+ uint8_t type;
/** attibute length */
- u_int8_t length;
+ uint8_t length;
} __attribute__((__packed__));
/**
@@ -204,7 +204,7 @@ METHOD(simaka_message_t, is_request, bool,
return this->hdr->code == EAP_REQUEST;
}
-METHOD(simaka_message_t, get_identifier, u_int8_t,
+METHOD(simaka_message_t, get_identifier, uint8_t,
private_simaka_message_t *this)
{
return this->hdr->identifier;
@@ -366,7 +366,7 @@ static bool parse_attributes(private_simaka_message_t *this, chunk_t in)
case AT_IDENTITY:
case AT_VERSION_LIST:
{
- u_int16_t len;
+ uint16_t len;
if (hdr->length < 1 || in.len < 4)
{
@@ -610,7 +610,7 @@ METHOD(simaka_message_t, generate, bool,
chunk_t out, encr, data, *target, mac = chunk_empty;
simaka_attribute_t type;
attr_hdr_t *hdr;
- u_int16_t len;
+ uint16_t len;
signer_t *signer;
call_hook(this, FALSE, TRUE);
@@ -684,7 +684,7 @@ METHOD(simaka_message_t, generate, bool,
case AT_VERSION_LIST:
case AT_RES:
{
- u_int16_t len, padding;
+ uint16_t len, padding;
len = htons(data.len);
if (type == AT_RES)
@@ -912,7 +912,7 @@ simaka_message_t *simaka_message_create_from_payload(chunk_t data,
/**
* See header.
*/
-simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
+simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
eap_type_t type, simaka_subtype_t subtype,
simaka_crypto_t *crypto)
{
diff --git a/src/libsimaka/simaka_message.h b/src/libsimaka/simaka_message.h
index 9e2c7dea9..2393d3450 100644
--- a/src/libsimaka/simaka_message.h
+++ b/src/libsimaka/simaka_message.h
@@ -176,7 +176,7 @@ struct simaka_message_t {
*
* @return EAP message identifier
*/
- u_int8_t (*get_identifier)(simaka_message_t *this);
+ uint8_t (*get_identifier)(simaka_message_t *this);
/**
* Get the EAP type of the message.
@@ -257,7 +257,7 @@ struct simaka_message_t {
* @param crypto EAP-SIM/AKA crypto helper
* @return empty message of requested kind, NULL on error
*/
-simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
+simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
eap_type_t type, simaka_subtype_t subtype,
simaka_crypto_t *crypto);
diff --git a/src/libsimaka/simaka_provider.h b/src/libsimaka/simaka_provider.h
index f1bf80049..f4faba8d1 100644
--- a/src/libsimaka/simaka_provider.h
+++ b/src/libsimaka/simaka_provider.h
@@ -112,7 +112,7 @@ struct simaka_provider_t {
* @return permanent identity, NULL if id not a reauth identity
*/
identification_t* (*is_reauth)(simaka_provider_t *this, identification_t *id,
- char mk[HASH_SIZE_SHA1], u_int16_t *counter);
+ char mk[HASH_SIZE_SHA1], uint16_t *counter);
/**
* Generate a fast reauthentication identity, associated to a master key.