|
|
|
@ -193,6 +193,7 @@ s1ap::enb_listen()
|
|
|
|
|
evnts.sctp_data_io_event = 1;
|
|
|
|
|
evnts.sctp_shutdown_event=1;
|
|
|
|
|
if(setsockopt(sock_fd, IPPROTO_SCTP, SCTP_EVENTS, &evnts, sizeof (evnts))){
|
|
|
|
|
close(sock_fd);
|
|
|
|
|
m_s1ap_log->console("Subscribing to sctp_data_io_events failed\n");
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
@ -204,6 +205,7 @@ s1ap::enb_listen()
|
|
|
|
|
s1mme_addr.sin_port = htons(S1MME_PORT);
|
|
|
|
|
err = bind(sock_fd, (struct sockaddr*) &s1mme_addr, sizeof (s1mme_addr));
|
|
|
|
|
if (err != 0){
|
|
|
|
|
close(sock_fd);
|
|
|
|
|
m_s1ap_log->error("Error binding SCTP socket\n");
|
|
|
|
|
m_s1ap_log->console("Error binding SCTP socket\n");
|
|
|
|
|
return -1;
|
|
|
|
@ -212,6 +214,7 @@ s1ap::enb_listen()
|
|
|
|
|
//Listen for connections
|
|
|
|
|
err = listen(sock_fd,SOMAXCONN);
|
|
|
|
|
if (err != 0){
|
|
|
|
|
close(sock_fd);
|
|
|
|
|
m_s1ap_log->error("Error in SCTP socket listen\n");
|
|
|
|
|
m_s1ap_log->console("Error in SCTP socket listen\n");
|
|
|
|
|
return -1;
|
|
|
|
|