2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2017-10-27 06:22:04 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* \section COPYRIGHT
|
2017-10-27 06:22:04 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* Copyright 2013-2020 Software Radio Systems Limited
|
2017-10-27 06:22:04 -07:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* 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.
|
2017-10-27 06:22:04 -07:00
|
|
|
*
|
|
|
|
*/
|
2018-03-31 10:04:04 -07:00
|
|
|
#ifndef SRSEPC_S1AP_NAS_TRANSPORT_H
|
|
|
|
#define SRSEPC_S1AP_NAS_TRANSPORT_H
|
2017-10-27 06:22:04 -07:00
|
|
|
|
2019-03-19 06:53:58 -07:00
|
|
|
#include "mme_gtpc.h"
|
2018-04-01 09:08:24 -07:00
|
|
|
#include "s1ap_common.h"
|
|
|
|
#include "srsepc/hdr/hss/hss.h"
|
2019-03-19 06:53:58 -07:00
|
|
|
#include "srslte/asn1/gtpc.h"
|
2020-11-04 11:31:49 -08:00
|
|
|
#include "srslte/asn1/s1ap.h"
|
2019-03-19 06:53:58 -07:00
|
|
|
#include "srslte/common/buffer_pool.h"
|
2017-10-27 06:22:04 -07:00
|
|
|
|
2019-03-19 06:53:58 -07:00
|
|
|
namespace srsepc {
|
2017-10-27 06:22:04 -07:00
|
|
|
|
|
|
|
class s1ap_nas_transport
|
|
|
|
{
|
|
|
|
public:
|
2017-12-19 10:12:12 -08:00
|
|
|
static s1ap_nas_transport* m_instance;
|
2019-03-19 06:53:58 -07:00
|
|
|
static s1ap_nas_transport* get_instance();
|
|
|
|
static void cleanup();
|
|
|
|
void init();
|
2017-10-27 06:22:04 -07:00
|
|
|
|
2020-02-26 11:25:49 -08:00
|
|
|
bool handle_initial_ue_message(const asn1::s1ap::init_ue_msg_s& init_ue, struct sctp_sndrcvinfo* enb_sri);
|
|
|
|
bool handle_uplink_nas_transport(const asn1::s1ap::ul_nas_transport_s& ul_xport, struct sctp_sndrcvinfo* enb_sri);
|
2019-03-19 06:53:58 -07:00
|
|
|
bool send_downlink_nas_transport(uint32_t enb_ue_s1ap_id,
|
|
|
|
uint32_t mme_ue_s1ap_id,
|
|
|
|
srslte::byte_buffer_t* nas_msg,
|
2018-12-18 04:03:52 -08:00
|
|
|
struct sctp_sndrcvinfo enb_sri);
|
2018-07-16 11:05:53 -07:00
|
|
|
|
2018-04-28 12:26:27 -07:00
|
|
|
private:
|
|
|
|
s1ap_nas_transport();
|
|
|
|
virtual ~s1ap_nas_transport();
|
|
|
|
|
2021-02-05 13:11:49 -08:00
|
|
|
srslog::basic_logger& m_logger = srslog::fetch_basic_logger("S1AP");
|
2018-04-28 12:26:27 -07:00
|
|
|
|
2020-05-21 11:40:15 -07:00
|
|
|
s1ap* m_s1ap;
|
2019-03-19 09:10:38 -07:00
|
|
|
|
|
|
|
nas_init_t m_nas_init;
|
|
|
|
nas_if_t m_nas_if;
|
2017-10-27 06:22:04 -07:00
|
|
|
};
|
2019-03-19 06:53:58 -07:00
|
|
|
|
|
|
|
} // namespace srsepc
|
2018-03-31 10:04:04 -07:00
|
|
|
#endif // SRSEPC_S1AP_NAS_TRANSPORT_H
|