2020-06-04 18:12:05 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019,2020 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/>.
|
|
|
|
*/
|
|
|
|
|
2020-06-17 05:22:28 +00:00
|
|
|
#ifndef AMF_NAS_5GS_PATH_H
|
|
|
|
#define AMF_NAS_5GS_PATH_H
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2020-07-09 21:34:41 +00:00
|
|
|
#include "gmm-build.h"
|
2020-06-04 18:12:05 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-06-17 05:22:28 +00:00
|
|
|
#define AMF_NAS_BACKOFF_TIME 6 /* 6 seconds */
|
|
|
|
|
2020-06-04 18:12:05 +00:00
|
|
|
int nas_5gs_send_to_gnb(amf_ue_t *amf_ue, ogs_pkbuf_t *pkbuf);
|
|
|
|
int nas_5gs_send_to_downlink_nas_transport(
|
2024-03-16 13:59:36 +00:00
|
|
|
ran_ue_t *ran_ue, ogs_pkbuf_t *pkbuf);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_registration_accept(amf_ue_t *amf_ue);
|
|
|
|
int nas_5gs_send_registration_reject(
|
2024-01-13 14:10:17 +00:00
|
|
|
ran_ue_t *ran_ue, amf_ue_t *amf_ue, ogs_nas_5gmm_cause_t gmm_cause);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_service_accept(amf_ue_t *amf_ue);
|
|
|
|
int nas_5gs_send_service_reject(
|
2024-01-13 14:10:17 +00:00
|
|
|
ran_ue_t *ran_ue, amf_ue_t *amf_ue, ogs_nas_5gmm_cause_t gmm_cause);
|
2020-06-25 04:37:29 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_de_registration_accept(amf_ue_t *amf_ue);
|
2023-01-29 13:44:44 +00:00
|
|
|
int nas_5gs_send_de_registration_request(
|
|
|
|
amf_ue_t *amf_ue,
|
|
|
|
OpenAPI_deregistration_reason_e dereg_reason,
|
|
|
|
ogs_nas_5gmm_cause_t gmm_cause);
|
2020-06-25 04:37:29 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_identity_request(amf_ue_t *amf_ue);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_authentication_request(amf_ue_t *amf_ue);
|
|
|
|
int nas_5gs_send_authentication_reject(amf_ue_t *amf_ue);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_security_mode_command(amf_ue_t *amf_ue);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_configuration_update_command(
|
2020-07-09 21:34:41 +00:00
|
|
|
amf_ue_t *amf_ue, gmm_configuration_update_command_param_t *param);
|
2020-06-17 05:22:28 +00:00
|
|
|
|
2022-12-04 05:32:19 +00:00
|
|
|
int nas_send_pdu_session_setup_request(amf_sess_t *sess,
|
|
|
|
ogs_pkbuf_t *n1smbuf, ogs_pkbuf_t *n2smbuf);
|
2021-11-14 12:07:56 +00:00
|
|
|
int nas_send_pdu_session_modification_command(amf_sess_t *sess,
|
|
|
|
ogs_pkbuf_t *n1smbuf, ogs_pkbuf_t *n2smbuf);
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_send_pdu_session_release_command(amf_sess_t *sess,
|
2020-07-02 05:50:23 +00:00
|
|
|
ogs_pkbuf_t *n1smbuf, ogs_pkbuf_t *n2smbuf);
|
2020-06-17 05:22:28 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_gmm_status(amf_ue_t *amf_ue, ogs_nas_5gmm_cause_t cause);
|
2020-06-17 05:22:28 +00:00
|
|
|
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_gmm_reject(
|
2024-01-13 14:10:17 +00:00
|
|
|
ran_ue_t *ran_ue, amf_ue_t *amf_ue, ogs_nas_5gmm_cause_t gmm_cause);
|
2021-05-16 03:22:10 +00:00
|
|
|
int nas_5gs_send_gmm_reject_from_sbi(amf_ue_t *amf_ue, int status);
|
2020-06-17 05:22:28 +00:00
|
|
|
|
2024-01-13 14:10:17 +00:00
|
|
|
int nas_5gs_send_dl_nas_transport(ran_ue_t *ran_ue, amf_sess_t *sess,
|
2020-06-17 05:22:28 +00:00
|
|
|
uint8_t payload_container_type, ogs_pkbuf_t *payload_container,
|
|
|
|
ogs_nas_5gmm_cause_t cause, uint8_t backoff_time);
|
2021-08-14 03:01:13 +00:00
|
|
|
|
2024-01-13 14:10:17 +00:00
|
|
|
int nas_5gs_send_gsm_reject(ran_ue_t *ran_ue, amf_sess_t *sess,
|
2021-08-14 03:01:13 +00:00
|
|
|
uint8_t payload_container_type, ogs_pkbuf_t *payload_container);
|
|
|
|
int nas_5gs_send_back_gsm_message(
|
2024-01-13 14:10:17 +00:00
|
|
|
ran_ue_t *ran_ue, amf_sess_t *sess,
|
|
|
|
ogs_nas_5gmm_cause_t cause, uint8_t backoff_time);
|
2020-06-04 18:12:05 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2021-08-14 03:01:13 +00:00
|
|
|
#endif /* AMF_NAS_5GS_PATH_H */
|