mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
5.4 KiB
C
123 lines
5.4 KiB
C
4 years ago
|
/**
|
||
7 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
7 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
7 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
7 years ago
|
*
|
||
|
*/
|
||
6 years ago
|
|
||
4 years ago
|
#ifndef SRSRAN_EPC_INTERFACES_H
|
||
|
#define SRSRAN_EPC_INTERFACES_H
|
||
6 years ago
|
|
||
4 years ago
|
#include "srsran/asn1/gtpc_ies.h"
|
||
|
#include "srsran/common/common.h"
|
||
6 years ago
|
#include <netinet/sctp.h>
|
||
6 years ago
|
#include <queue>
|
||
7 years ago
|
|
||
|
namespace srsepc {
|
||
|
|
||
7 years ago
|
class nas;
|
||
|
|
||
6 years ago
|
enum nas_timer_type {
|
||
|
T_3413,
|
||
|
};
|
||
|
|
||
6 years ago
|
/******************
|
||
|
* MME Interfaces *
|
||
|
******************/
|
||
6 years ago
|
class gtpc_interface_nas // NAS -> GTP-C
|
||
7 years ago
|
{
|
||
|
public:
|
||
6 years ago
|
virtual bool send_create_session_request(uint64_t imsi) = 0;
|
||
4 years ago
|
virtual bool send_modify_bearer_request(uint64_t imsi, uint16_t erab_to_modify, srsran::gtp_fteid_t* enb_fteid) = 0;
|
||
6 years ago
|
virtual bool send_delete_session_request(uint64_t imsi) = 0;
|
||
6 years ago
|
virtual bool send_downlink_data_notification_failure_indication(uint64_t imsi,
|
||
4 years ago
|
enum srsran::gtpc_cause_value cause) = 0;
|
||
7 years ago
|
};
|
||
|
|
||
6 years ago
|
class s1ap_interface_gtpc // GTP-C -> S1AP
|
||
7 years ago
|
{
|
||
|
public:
|
||
7 years ago
|
virtual bool send_initial_context_setup_request(uint64_t imsi, uint16_t erab_to_setup) = 0;
|
||
7 years ago
|
};
|
||
|
|
||
6 years ago
|
class s1ap_interface_nas // NAS -> S1AP
|
||
7 years ago
|
{
|
||
|
public:
|
||
6 years ago
|
virtual uint32_t allocate_m_tmsi(uint64_t imsi) = 0;
|
||
|
virtual uint32_t get_next_mme_ue_s1ap_id() = 0;
|
||
|
virtual bool add_nas_ctx_to_imsi_map(nas* nas_ctx) = 0;
|
||
|
virtual bool add_nas_ctx_to_mme_ue_s1ap_id_map(nas* nas_ctx) = 0;
|
||
|
virtual bool add_ue_to_enb_set(int32_t enb_assoc, uint32_t mme_ue_s1ap_id) = 0;
|
||
|
virtual bool release_ue_ecm_ctx(uint32_t mme_ue_s1ap_id) = 0;
|
||
|
virtual bool delete_ue_ctx(uint64_t imsi) = 0;
|
||
|
virtual uint64_t find_imsi_from_m_tmsi(uint32_t m_tmsi) = 0;
|
||
|
virtual nas* find_nas_ctx_from_imsi(uint64_t imsi) = 0;
|
||
7 years ago
|
virtual bool send_initial_context_setup_request(uint64_t imsi, uint16_t erab_to_setup) = 0;
|
||
6 years ago
|
virtual bool send_ue_context_release_command(uint32_t mme_ue_s1ap_id) = 0;
|
||
4 years ago
|
virtual bool send_erab_release_command(uint32_t enb_ue_s1ap_id,
|
||
|
uint32_t mme_ue_s1ap_id,
|
||
|
std::vector<uint16_t> erabs_to_release,
|
||
|
struct sctp_sndrcvinfo enb_sri) = 0;
|
||
4 years ago
|
virtual bool send_erab_modify_request(uint32_t enb_ue_s1ap_id,
|
||
|
uint32_t mme_ue_s1ap_id,
|
||
|
std::map<uint16_t, uint16_t> erabs_to_modify,
|
||
4 years ago
|
srsran::byte_buffer_t* nas_msg,
|
||
4 years ago
|
struct sctp_sndrcvinfo enb_sri) = 0;
|
||
6 years ago
|
virtual bool send_downlink_nas_transport(uint32_t enb_ue_s1ap_id,
|
||
|
uint32_t mme_ue_s1ap_id,
|
||
4 years ago
|
srsran::byte_buffer_t* nas_msg,
|
||
6 years ago
|
struct sctp_sndrcvinfo enb_sri) = 0;
|
||
7 years ago
|
};
|
||
|
|
||
6 years ago
|
class hss_interface_nas // NAS -> HSS
|
||
7 years ago
|
{
|
||
|
public:
|
||
6 years ago
|
virtual bool gen_auth_info_answer(uint64_t imsi, uint8_t* k_asme, uint8_t* autn, uint8_t* rand, uint8_t* xres) = 0;
|
||
|
virtual bool gen_update_loc_answer(uint64_t imsi, uint8_t* qci) = 0;
|
||
|
virtual bool resync_sqn(uint64_t imsi, uint8_t* auts) = 0;
|
||
7 years ago
|
};
|
||
|
|
||
5 years ago
|
class mme_interface_nas // NAS -> MME
|
||
6 years ago
|
{
|
||
|
public:
|
||
|
virtual bool add_nas_timer(int timer_fd, enum nas_timer_type type, uint64_t imsi) = 0;
|
||
|
virtual bool is_nas_timer_running(enum nas_timer_type type, uint64_t imsi) = 0;
|
||
|
virtual bool remove_nas_timer(enum nas_timer_type type, uint64_t imsi) = 0;
|
||
|
};
|
||
|
|
||
5 years ago
|
class s1ap_interface_mme // MME -> S1AP
|
||
6 years ago
|
{
|
||
|
public:
|
||
|
virtual bool expire_nas_timer(enum nas_timer_type type, uint64_t imsi) = 0;
|
||
|
};
|
||
|
|
||
6 years ago
|
/*******************
|
||
|
* SPGW Interfaces *
|
||
|
*******************/
|
||
6 years ago
|
class gtpu_interface_gtpc // GTP-C -> GTP-U
|
||
6 years ago
|
{
|
||
|
public:
|
||
|
virtual in_addr_t get_s1u_addr() = 0;
|
||
|
|
||
4 years ago
|
virtual bool modify_gtpu_tunnel(in_addr_t ue_ipv4, srsran::gtpc_f_teid_ie dw_user_fteid, uint32_t up_ctrl_teid) = 0;
|
||
6 years ago
|
virtual bool delete_gtpu_tunnel(in_addr_t ue_ipv4) = 0;
|
||
6 years ago
|
virtual bool delete_gtpc_tunnel(in_addr_t ue_ipv4) = 0;
|
||
4 years ago
|
virtual void send_all_queued_packets(srsran::gtp_fteid_t dw_user_fteid,
|
||
|
std::queue<srsran::unique_byte_buffer_t>& pkt_queue) = 0;
|
||
6 years ago
|
};
|
||
|
|
||
5 years ago
|
class gtpc_interface_gtpu // GTP-U -> GTP-C
|
||
6 years ago
|
{
|
||
|
public:
|
||
4 years ago
|
virtual bool queue_downlink_packet(uint32_t spgw_ctr_teid, srsran::unique_byte_buffer_t msg) = 0;
|
||
4 years ago
|
virtual bool send_downlink_data_notification(uint32_t spgw_ctr_teid) = 0;
|
||
6 years ago
|
};
|
||
|
|
||
6 years ago
|
} // namespace srsepc
|
||
4 years ago
|
#endif // SRSRAN_EPC_INTERFACES_H
|