libosmogsm  0.9.6.311-c977
Osmocom GSM library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Oap

Osmocom Authentication Protocol. More...

Functions

int osmo_oap_decode (struct osmo_oap_message *oap_msg, const uint8_t *const_data, size_t data_len)
 Decode OAP message data. More...
 
void osmo_oap_encode (struct msgb *msg, const struct osmo_oap_message *oap_msg)
 Compose OAP message data. More...
 

Detailed Description

Osmocom Authentication Protocol.

Function Documentation

int osmo_oap_decode ( struct osmo_oap_message oap_msg,
const uint8_t *  const_data,
size_t  data_len 
)

Decode OAP message data.

Parameters
[out]oap_msgParsed data is written to this instance.
[in]dataPointer to the data buffer containing the OAP message.
[in]data_lenLength of the OAP message data.
Returns
0 on success, a negative cause value on failure.

References osmo_oap_message::autn, osmo_oap_message::autn_present, osmo_oap_message::auts, osmo_oap_message::auts_present, osmo_oap_message::cause, osmo_oap_message::client_id, osmo_oap_message::message_type, OAP_AUTN_IE, OAP_AUTS_IE, OAP_CAUSE_IE, OAP_CLIENT_ID_IE, OAP_RAND_IE, OAP_XRES_IE, osmo_shift_tlv(), osmo_shift_v_fixed(), osmo_oap_message::rand, osmo_oap_message::rand_present, osmo_oap_message::xres, and osmo_oap_message::xres_present.

void osmo_oap_encode ( struct msgb *  msg,
const struct osmo_oap_message oap_msg 
)