Clang-formated the EPC in preperation for PR.

This commit is contained in:
Pedro Alvarez 2020-02-25 14:27:37 +00:00
parent 3d4f300b6f
commit 38411a8417
3 changed files with 26 additions and 21 deletions

View File

@ -98,7 +98,8 @@ private:
void gen_rand(uint8_t rand_[16]);
bool get_k_amf_opc_sqn(uint64_t imsi, uint8_t* k, uint8_t* amf, uint8_t* opc, uint8_t* sqn);
void gen_auth_info_answer_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres);
void
gen_auth_info_answer_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres);
void gen_auth_info_answer_xor(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres);
void resync_sqn_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* auts);

View File

@ -277,13 +277,17 @@ bool hss::gen_auth_info_answer(uint64_t imsi, uint8_t* k_asme, uint8_t* autn, ui
return true;
}
void hss::gen_auth_info_answer_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres)
void hss::gen_auth_info_answer_milenage(hss_ue_ctx_t* ue_ctx,
uint8_t* k_asme,
uint8_t* autn,
uint8_t* rand,
uint8_t* xres)
{
// Get K, AMF, OPC and SQN
uint8_t *k = ue_ctx->key;
uint8_t *amf = ue_ctx->amf;
uint8_t *opc = ue_ctx->opc;
uint8_t *sqn = ue_ctx->sqn;
uint8_t* k = ue_ctx->key;
uint8_t* amf = ue_ctx->amf;
uint8_t* opc = ue_ctx->opc;
uint8_t* sqn = ue_ctx->sqn;
// Temp variables
uint8_t xdout[16];
@ -335,10 +339,10 @@ void hss::gen_auth_info_answer_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, u
void hss::gen_auth_info_answer_xor(hss_ue_ctx_t* ue_ctx, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres)
{
// Get K, AMF, OPC and SQN
uint8_t *k = ue_ctx->key;
uint8_t *amf = ue_ctx->amf;
uint8_t *opc = ue_ctx->opc;
uint8_t *sqn = ue_ctx->sqn;
uint8_t* k = ue_ctx->key;
uint8_t* amf = ue_ctx->amf;
uint8_t* opc = ue_ctx->opc;
uint8_t* sqn = ue_ctx->sqn;
// Temp variables
uint8_t xdout[16];
@ -491,10 +495,10 @@ void hss::resync_sqn_xor(hss_ue_ctx_t* ue_ctx, uint8_t* auts)
void hss::resync_sqn_milenage(hss_ue_ctx_t* ue_ctx, uint8_t* auts)
{
// Get K, AMF, OPC and SQN
uint8_t *k = ue_ctx->key;
uint8_t *amf = ue_ctx->amf;
uint8_t *opc = ue_ctx->opc;
uint8_t *sqn = ue_ctx->sqn;
uint8_t* k = ue_ctx->key;
uint8_t* amf = ue_ctx->amf;
uint8_t* opc = ue_ctx->opc;
uint8_t* sqn = ue_ctx->sqn;
// Temp variables
uint8_t last_rand[16];

View File

@ -1584,8 +1584,8 @@ bool nas::pack_tracking_area_update_reject(srslte::byte_buffer_t* nas_buffer, ui
m_nas_log->error("Tracking Area Update Reject EMM Cause set to \"CONGESTION\", but back-off timer not set.\n");
}
LIBLTE_ERROR_ENUM err = liblte_mme_pack_tracking_area_update_reject_msg(&tau_rej, LIBLTE_MME_SECURITY_HDR_TYPE_PLAIN_NAS, 0,
(LIBLTE_BYTE_MSG_STRUCT*)nas_buffer);
LIBLTE_ERROR_ENUM err = liblte_mme_pack_tracking_area_update_reject_msg(
&tau_rej, LIBLTE_MME_SECURITY_HDR_TYPE_PLAIN_NAS, 0, (LIBLTE_BYTE_MSG_STRUCT*)nas_buffer);
if (err != LIBLTE_SUCCESS) {
m_nas_log->error("Error packing Tracking Area Update Reject\n");
m_nas_log->console("Error packing Tracking Area Update Reject\n");