diff --git a/lib/include/srslte/common/network_utils.h b/lib/include/srslte/common/network_utils.h index f1d5b8d1e..01eddd39e 100644 --- a/lib/include/srslte/common/network_utils.h +++ b/lib/include/srslte/common/network_utils.h @@ -44,7 +44,7 @@ enum class protocol_type : int { NONE = -1, SCTP = IPPROTO_SCTP, TCP = IPPROTO_T enum class ppid_values : uint32_t { S1AP = 18 }; const char* protocol_to_string(protocol_type p); -// Convenience methods +// Convenience functions bool set_sockaddr(sockaddr_in* addr, const char* ip_str, int port); std::string get_ip(const sockaddr_in& addr); int get_port(const sockaddr_in& addr); @@ -144,7 +144,7 @@ public: bool add_socket_handler(int fd, task_callback_t handler); // convenience methods for recv using buffer pool bool add_socket_pdu_handler(int fd, recv_callback_t pdu_task); - bool add_socket_sctp_handler(int fd, sctp_recv_callback_t task); + bool add_socket_sctp_pdu_handler(int fd, sctp_recv_callback_t task); void run_thread() override; diff --git a/lib/src/common/network_utils.cc b/lib/src/common/network_utils.cc index 29becd2ba..f2e85fa80 100644 --- a/lib/src/common/network_utils.cc +++ b/lib/src/common/network_utils.cc @@ -485,10 +485,10 @@ bool rx_multisocket_handler::add_socket_pdu_handler(int fd, recv_callback_t pdu_ /** * Convenience method for reading PDUs from SCTP socket */ -bool rx_multisocket_handler::add_socket_sctp_handler(int fd, sctp_recv_callback_t pdu_task) +bool rx_multisocket_handler::add_socket_sctp_pdu_handler(int fd, sctp_recv_callback_t task) { srslte::rx_multisocket_handler::task_callback_t task; - task.reset(new srslte::sctp_recvmsg_pdu_task(pool, log_h, std::move(pdu_task))); + task.reset(new srslte::sctp_recvmsg_pdu_task(pool, log_h, std::move(task))); return add_socket_handler(fd, std::move(task)); } diff --git a/lib/test/common/network_utils_test.cc b/lib/test/common/network_utils_test.cc index 0e6b7531f..f0c115d59 100644 --- a/lib/test/common/network_utils_test.cc +++ b/lib/test/common/network_utils_test.cc @@ -62,7 +62,7 @@ int test_socket_handler() counter++; } }; - sockhandler.add_socket_sctp_handler(server_socket.fd(), pdu_handler); + sockhandler.add_socket_sctp_pdu_handler(server_socket.fd(), pdu_handler); uint8_t buf[128] = {}; int32_t nof_counts = 5; diff --git a/srsenb/hdr/stack/upper/s1ap.h b/srsenb/hdr/stack/upper/s1ap.h index 283c66b05..32a358e13 100644 --- a/srsenb/hdr/stack/upper/s1ap.h +++ b/srsenb/hdr/stack/upper/s1ap.h @@ -75,7 +75,6 @@ public: // void ue_capabilities(uint16_t rnti, LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *caps); // Stack interface - // bool handle_mme_rx_msg(srslte::unique_byte_buffer_t pdu); bool handle_mme_rx_msg(srslte::unique_byte_buffer_t pdu, const sockaddr_in& from, const sctp_sndrcvinfo& sri, int flags); diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index e70a469f4..6261e9e43 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -233,7 +233,7 @@ void enb_stack_lte::add_mme_socket(int fd) [this](srslte::unique_byte_buffer_t pdu, const sockaddr_in& from, const sctp_sndrcvinfo& sri, int flags) { handle_mme_rx_packet(std::move(pdu), from, sri, flags); }; - rx_sockets->add_socket_sctp_handler(fd, mme_rx_handler); + rx_sockets->add_socket_sctp_pdu_handler(fd, mme_rx_handler); } void enb_stack_lte::remove_mme_socket(int fd)