2019-06-16 06:40:26 +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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MME_EVENT_H
|
|
|
|
#define MME_EVENT_H
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
#include "ogs-core.h"
|
2017-03-26 06:34:34 +00:00
|
|
|
|
2017-02-13 00:58:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
2019-06-16 06:40:26 +00:00
|
|
|
#endif
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2017-04-04 01:49:19 +00:00
|
|
|
/* forward declaration */
|
2017-02-13 00:58:55 +00:00
|
|
|
typedef enum {
|
2019-04-27 14:54:30 +00:00
|
|
|
MME_EVT_BASE = OGS_FSM_USER_SIG,
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_S1AP_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_S1AP_TIMER,
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_S1AP_LO_ACCEPT,
|
2018-05-30 08:45:14 +00:00
|
|
|
MME_EVT_S1AP_LO_SCTP_COMM_UP,
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_S1AP_LO_CONNREFUSED,
|
2017-04-12 23:48:11 +00:00
|
|
|
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_EMM_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_EMM_TIMER,
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_ESM_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_ESM_TIMER,
|
2017-08-25 15:25:55 +00:00
|
|
|
MME_EVT_S11_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_S11_TIMER,
|
2017-08-25 15:11:46 +00:00
|
|
|
MME_EVT_S6A_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_S6A_TIMER,
|
2017-08-25 15:11:46 +00:00
|
|
|
|
2019-06-16 06:40:26 +00:00
|
|
|
MME_EVT_SGSAP_MESSAGE,
|
2019-07-20 04:07:40 +00:00
|
|
|
MME_EVT_SGSAP_TIMER,
|
2019-06-16 12:26:22 +00:00
|
|
|
MME_EVT_SGSAP_LO_SCTP_COMM_UP,
|
|
|
|
MME_EVT_SGSAP_LO_CONNREFUSED,
|
2019-06-16 06:40:26 +00:00
|
|
|
|
2017-03-24 09:47:05 +00:00
|
|
|
MME_EVT_TOP,
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
} mme_event_e;
|
|
|
|
|
|
|
|
typedef long S1AP_ProcedureCode_t;
|
|
|
|
typedef struct S1AP_S1AP_PDU s1ap_message_t;
|
2020-05-23 02:24:48 +00:00
|
|
|
typedef struct ogs_nas_eps_message_s ogs_nas_eps_message_t;
|
2019-06-16 08:33:45 +00:00
|
|
|
typedef struct mme_vlr_s mme_vlr_t;
|
2019-05-18 15:24:15 +00:00
|
|
|
typedef struct mme_enb_s mme_enb_t;
|
|
|
|
typedef struct enb_ue_s enb_ue_t;
|
|
|
|
typedef struct mme_ue_s mme_ue_t;
|
|
|
|
typedef struct mme_sess_s mme_sess_t;
|
|
|
|
typedef struct mme_bearer_s mme_bearer_t;
|
2019-11-15 14:56:55 +00:00
|
|
|
typedef struct ogs_gtp_node_s ogs_gtp_node_t;
|
2019-04-27 14:54:30 +00:00
|
|
|
|
|
|
|
typedef struct mme_event_s {
|
|
|
|
int id;
|
2019-11-07 14:07:29 +00:00
|
|
|
ogs_pkbuf_t *pkbuf;
|
2019-07-20 04:07:40 +00:00
|
|
|
int timer_id;
|
2019-04-27 14:54:30 +00:00
|
|
|
|
2019-11-07 14:07:29 +00:00
|
|
|
ogs_sock_t *sock;
|
|
|
|
ogs_sockaddr_t *addr;
|
|
|
|
|
2019-06-16 07:47:20 +00:00
|
|
|
uint16_t max_num_of_istreams;
|
|
|
|
uint16_t max_num_of_ostreams;
|
2019-04-27 14:54:30 +00:00
|
|
|
|
|
|
|
S1AP_ProcedureCode_t s1ap_code;
|
|
|
|
s1ap_message_t *s1ap_message;
|
|
|
|
|
2019-11-15 14:56:55 +00:00
|
|
|
ogs_gtp_node_t *gnode;
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
uint8_t nas_type;
|
2020-05-23 02:24:48 +00:00
|
|
|
ogs_nas_eps_message_t *nas_message;
|
2019-04-27 14:54:30 +00:00
|
|
|
|
2019-06-16 08:33:45 +00:00
|
|
|
mme_vlr_t *vlr;
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_enb_t *enb;
|
|
|
|
enb_ue_t *enb_ue;
|
|
|
|
mme_ue_t *mme_ue;
|
|
|
|
mme_sess_t *sess;
|
|
|
|
mme_bearer_t *bearer;
|
|
|
|
|
|
|
|
ogs_timer_t *timer;
|
|
|
|
} mme_event_t;
|
|
|
|
|
|
|
|
void mme_event_init(void);
|
|
|
|
void mme_event_term(void);
|
|
|
|
void mme_event_final(void);
|
|
|
|
|
|
|
|
mme_event_t *mme_event_new(mme_event_e id);
|
|
|
|
void mme_event_free(mme_event_t *e);
|
|
|
|
|
|
|
|
void mme_event_timeout(void *data);
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
const char *mme_event_get_name(mme_event_t *e);
|
2017-03-24 09:47:05 +00:00
|
|
|
|
2019-06-23 04:22:22 +00:00
|
|
|
void mme_sctp_event_push(mme_event_e id,
|
|
|
|
void *sock, ogs_sockaddr_t *addr, ogs_pkbuf_t *pkbuf,
|
|
|
|
uint16_t max_num_of_istreams, uint16_t max_num_of_ostreams);
|
|
|
|
|
2017-02-13 00:58:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2019-06-16 06:40:26 +00:00
|
|
|
#endif
|
2017-02-13 00:58:55 +00:00
|
|
|
|
2019-06-16 06:40:26 +00:00
|
|
|
#endif /* MME_EVENT_H */
|