|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
|
|
|
|
|
#include "srsgnb/hdr/stack/ric/e2ap.h"
|
|
|
|
|
#include "srsran/common/network_utils.h"
|
|
|
|
|
#include "srsran/common/task_scheduler.h"
|
|
|
|
|
#include "srsran/common/threads.h"
|
|
|
|
|
#include "srsran/srsran.h"
|
|
|
|
|
static const int e2ap_ppid = 70;
|
|
|
|
@ -30,13 +31,22 @@ public:
|
|
|
|
|
void run_thread();
|
|
|
|
|
bool send_sctp(srsran::unique_byte_buffer_t& buf);
|
|
|
|
|
bool send_e2_setup_request();
|
|
|
|
|
bool
|
|
|
|
|
handle_e2_rx_msg(srsran::unique_byte_buffer_t pdu, const sockaddr_in& from, const sctp_sndrcvinfo& sri, int flags);
|
|
|
|
|
bool handle_e2_init_msg(asn1::e2ap::init_msg_s& init_msg);
|
|
|
|
|
bool handle_e2_successful_outcome(asn1::e2ap::successful_outcome_s& successful_outcome);
|
|
|
|
|
bool handle_e2_unsuccessful_outcome(asn1::e2ap::unsuccessful_outcome_s& unsuccessful_outcome);
|
|
|
|
|
bool handle_e2_setup_response(e2setup_resp_s setup_response);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
e2ap e2ap_;
|
|
|
|
|
srsran::unique_socket ric_socket;
|
|
|
|
|
struct sockaddr_in ric_addr = {}; // RIC address
|
|
|
|
|
bool running = false;
|
|
|
|
|
srslog::basic_logger& logger;
|
|
|
|
|
e2ap e2ap_;
|
|
|
|
|
srsran::unique_socket ric_socket;
|
|
|
|
|
srsran::task_queue_handle ric_rece_task_queue;
|
|
|
|
|
srsran::task_scheduler task_sched;
|
|
|
|
|
srsran::socket_manager rx_sockets;
|
|
|
|
|
srslog::basic_logger& logger;
|
|
|
|
|
struct sockaddr_in ric_addr = {}; // RIC address
|
|
|
|
|
bool running = false;
|
|
|
|
|
};
|
|
|
|
|
} // namespace srsenb
|
|
|
|
|
|
|
|
|
|