clean up some comments

master
Francisco Paisana 5 years ago
parent 76673d2d40
commit 2de0eee9c7

@ -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 }; enum class ppid_values : uint32_t { S1AP = 18 };
const char* protocol_to_string(protocol_type p); const char* protocol_to_string(protocol_type p);
// Convenience methods // Convenience functions
bool set_sockaddr(sockaddr_in* addr, const char* ip_str, int port); bool set_sockaddr(sockaddr_in* addr, const char* ip_str, int port);
std::string get_ip(const sockaddr_in& addr); std::string get_ip(const sockaddr_in& addr);
int get_port(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); bool add_socket_handler(int fd, task_callback_t handler);
// convenience methods for recv using buffer pool // convenience methods for recv using buffer pool
bool add_socket_pdu_handler(int fd, recv_callback_t pdu_task); 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; void run_thread() override;

@ -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 * 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; 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)); return add_socket_handler(fd, std::move(task));
} }

@ -62,7 +62,7 @@ int test_socket_handler()
counter++; 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] = {}; uint8_t buf[128] = {};
int32_t nof_counts = 5; int32_t nof_counts = 5;

@ -75,7 +75,6 @@ public:
// void ue_capabilities(uint16_t rnti, LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *caps); // void ue_capabilities(uint16_t rnti, LIBLTE_RRC_UE_EUTRA_CAPABILITY_STRUCT *caps);
// Stack interface // Stack interface
// bool handle_mme_rx_msg(srslte::unique_byte_buffer_t pdu);
bool bool
handle_mme_rx_msg(srslte::unique_byte_buffer_t pdu, const sockaddr_in& from, const sctp_sndrcvinfo& sri, int flags); handle_mme_rx_msg(srslte::unique_byte_buffer_t pdu, const sockaddr_in& from, const sctp_sndrcvinfo& sri, int flags);

@ -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) { [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); 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) void enb_stack_lte::remove_mme_socket(int fd)

Loading…
Cancel
Save