open5gs/src/mme/mme-s6a-handler.c

58 lines
1.8 KiB
C
Raw Normal View History

2019-07-11 12:53:54 +00:00
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2019-06-11 09:28:25 +00:00
#include "fd/s6a/s6a-message.h"
2019-06-11 13:10:47 +00:00
#include "nas-path.h"
2019-06-01 09:52:38 +00:00
#include "s1ap-path.h"
2019-06-11 13:10:47 +00:00
#include "mme-sm.h"
#include "mme-s6a-handler.h"
void mme_s6a_handle_aia(mme_ue_t *mme_ue, s6a_aia_message_t *aia_message)
{
2019-04-27 14:54:30 +00:00
int rv;
e_utran_vector_t *e_utran_vector = NULL;
2019-04-27 14:54:30 +00:00
ogs_assert(mme_ue);
ogs_assert(aia_message);
e_utran_vector = &aia_message->e_utran_vector;
2019-04-27 14:54:30 +00:00
ogs_assert(e_utran_vector);
mme_ue->xres_len = e_utran_vector->xres_len;
memcpy(mme_ue->xres, e_utran_vector->xres, mme_ue->xres_len);
2019-04-27 14:54:30 +00:00
memcpy(mme_ue->kasme, e_utran_vector->kasme, OGS_SHA256_DIGEST_SIZE);
memcpy(mme_ue->rand, e_utran_vector->rand, RAND_LEN);
2017-08-25 15:25:55 +00:00
2017-09-11 09:41:14 +00:00
rv = nas_send_authentication_request(mme_ue, e_utran_vector);
2019-04-27 14:54:30 +00:00
ogs_assert(rv == OGS_OK);
}
void mme_s6a_handle_ula(mme_ue_t *mme_ue, s6a_ula_message_t *ula_message)
{
s6a_subscription_data_t *subscription_data = NULL;
2019-04-27 14:54:30 +00:00
ogs_assert(mme_ue);
ogs_assert(ula_message);
subscription_data = &ula_message->subscription_data;
2019-04-27 14:54:30 +00:00
ogs_assert(subscription_data);
memcpy(&mme_ue->subscription_data,
subscription_data, sizeof(s6a_subscription_data_t));
}