Remove MSC library, it is not used anywhere

This commit is contained in:
Robert Schmidt
2022-01-27 10:53:07 +01:00
parent 4d1bda01c6
commit 00e058537d
139 changed files with 65 additions and 4023 deletions
-98
View File
@@ -33,7 +33,6 @@
#include "assertions.h"
#include "intertask_interface.h"
#include "msc.h"
#include "gtpv1u.h"
#include "NwGtpv1u.h"
@@ -51,7 +50,6 @@
#include "gtpv1u_eNB_defs.h"
#include "gtpv1u_eNB_task.h"
#include "rrc_eNB_GTPV1U.h"
#include <common/utils/msc/msc.h>
#undef GTP_DUMP_SOCKET
@@ -146,11 +144,6 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) {
addr.s_addr = req->enb_ip_address_for_S1u_S12_S4_up;
UDP_INIT(message_p).address = inet_ntoa(addr);
LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,UDP_INIT(message_p).port);
MSC_LOG_EVENT(
MSC_GTPU_ENB,
"0 UDP bind %s:%u",
UDP_INIT(message_p).address,
UDP_INIT(message_p).port);
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
}
@@ -266,14 +259,6 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
#endif
//#warning "LG eps bearer mapping to DRB id to do (offset -4)"
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_PDCP_ENB,
NULL,0,
MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
0,0,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
buffer_len);
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id], ctxt.rnti);
if((ue_context_p != NULL) &&
@@ -736,14 +721,6 @@ gtpv1u_create_x2u_tunnel(
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
int i;
ebi_t eps_bearer_id = 0;
MSC_LOG_RX_MESSAGE(
MSC_GTPU_ENB,
MSC_RRC_ENB,
NULL,0,
MSC_AS_TIME_FMT" CREATE_X2U_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u enb-x2u teid %u",
0,0,create_tunnel_req_pP->rnti, instanceP,
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
create_tunnel_req_pP->tenb_X2u_teid[0]);
create_tunnel_resp_pP->rnti = create_tunnel_req_pP->rnti;
create_tunnel_resp_pP->status = 0;
create_tunnel_resp_pP->num_tunnels = 0;
@@ -795,13 +772,6 @@ gtpv1u_create_x2u_tunnel(
}
}
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_RRC_ENB,
NULL,0,
"0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
create_tunnel_resp_pP->rnti,
x2u_teid);
LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
create_tunnel_req_pP->rnti,
create_tunnel_resp_pP->status);
@@ -885,14 +855,6 @@ gtpv1u_create_s1u_tunnel(
int addrs_length_in_bytes= 0;
int loop_counter = 0;
int ret = 0;
MSC_LOG_RX_MESSAGE(
MSC_GTPU_ENB,
MSC_RRC_ENB,
NULL,0,
MSC_AS_TIME_FMT" CREATE_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u ebid %u sgw-s1u teid %u",
0,0,create_tunnel_req_pP->rnti, instanceP,
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
create_tunnel_req_pP->sgw_S1u_teid[0]);
create_tunnel_resp_pP->rnti = create_tunnel_req_pP->rnti;
create_tunnel_resp_pP->status = 0;
create_tunnel_resp_pP->num_tunnels = 0;
@@ -1005,13 +967,6 @@ gtpv1u_create_s1u_tunnel(
}
}
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_RRC_ENB,
NULL,0,
"0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
create_tunnel_resp_pP->rnti,
s1u_teid);
LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
create_tunnel_req_pP->rnti,
create_tunnel_resp_pP->status);
@@ -1175,13 +1130,6 @@ int gtpv1u_delete_s1u_tunnel(
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti,
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).enb_S1u_teid,
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status);
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_RRC_ENB,
NULL,0,
"0 GTPV1U_ENB_DELETE_TUNNEL_RESP rnti %x teid %x",
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti,
teid_eNB);
if (req_pP->from_gnb)
return itti_send_msg_to_task(TASK_RRC_GNB, instanceP, message_p);
else
@@ -1351,27 +1299,12 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
(void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
} else {
rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
} else {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_GTPU_SGW,
NULL,
0,
MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
0,0,
enb_s1u_teid,
sgw_s1u_teid,
data_req_p->length);
}
rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
@@ -1428,27 +1361,12 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
(void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
} else {
rc = nwGtpv1uProcessUlpReq(RC.gtpv1u_data_g->gtpv1u_stack, &stack_req);
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
} else {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_GTPU_SGW,
NULL,
0,
MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
0,0,
enb_s1u_teid,
tenb_x2u_teid,
data_req_p->length);
}
rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
@@ -1506,8 +1424,6 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
(void)enb_s1u_teid; /* avoid gcc warning "set but not used" */
} else {
pMsg = (NwGtpv1uMsgT *) stack_req.apiInfo.sendtoInfo.hMsg;
@@ -1516,19 +1432,6 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
enb_s1u_teid,tenb_x2u_teid,data_req_p->length);
} else {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_GTPU_SGW,
NULL,
0,
MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
0,0,
enb_s1u_teid,
tenb_x2u_teid,
data_req_p->length);
}
rc = nwGtpv1uMsgDelete(RC.gtpv1u_data_g->gtpv1u_stack,
@@ -1589,7 +1492,6 @@ void *gtpv1u_eNB_task(void *args) {
rc = gtpv1u_eNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE();
while(1) {
(void) gtpv1u_eNB_process_itti_msg (NULL);
-61
View File
@@ -30,7 +30,6 @@
#include "mme_config.h"
#include "intertask_interface.h"
#include "msc.h"
#include "gtpv1u.h"
#include "NwGtpv1u.h"
@@ -170,14 +169,6 @@ NwGtpv1uRcT gtpv1u_gNB_process_stack_req(
#endif
//warning "LG eps bearer mapping to DRB id to do (offset -4)"
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_PDCP_ENB,
NULL,0,
MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
0,0,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
buffer_len);
result = pdcp_data_req(
&ctxt,
@@ -300,7 +291,6 @@ void *gtpv1u_gNB_task(void *args) {
rc = gtpv1u_gNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE();
while(1) {
(void) gtpv1u_eNB_process_itti_msg (NULL);
@@ -366,14 +356,6 @@ NwGtpv1uRcT nr_gtpv1u_gNB_process_stack_req(
// #endif
//warning "LG eps bearer mapping to DRB id to do (offset -4)"
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->gnb_id, GNB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->gnb_id);
// MSC_LOG_TX_MESSAGE(
// MSC_GTPU_ENB,
// MSC_PDCP_ENB,
// NULL,0,
// MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
// 0,0,
// (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
// buffer_len);
result = pdcp_data_req(
&ctxt,
@@ -515,14 +497,6 @@ gtpv1u_create_ngu_tunnel(
int addrs_length_in_bytes= 0;
int loop_counter = 0;
int ret = 0;
MSC_LOG_RX_MESSAGE(
MSC_GTPU_GNB,
MSC_RRC_GNB,
NULL,0,
MSC_AS_TIME_FMT" CREATE_TUNNEL_REQ RNTI %"PRIx16" inst %u ntuns %u psid %u upf-ngu teid %u",
0,0,create_tunnel_req_pP->rnti, instanceP,
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->pdusession_id[0],
create_tunnel_req_pP->outgoing_teid[0]);
create_tunnel_resp_pP->rnti = create_tunnel_req_pP->rnti;
create_tunnel_resp_pP->status = 0;
create_tunnel_resp_pP->num_tunnels = 0;
@@ -634,13 +608,6 @@ gtpv1u_create_ngu_tunnel(
}
}
MSC_LOG_TX_MESSAGE(
MSC_GTPU_GNB,
MSC_RRC_GNB,
NULL,0,
"0 GTPV1U_GNB_CREATE_TUNNEL_RESP rnti %x teid %x",
create_tunnel_resp_pP->rnti,
ngu_teid);
LOG_D(GTPU, "Tx GTPV1U_GNB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
create_tunnel_req_pP->rnti,
create_tunnel_resp_pP->status);
@@ -805,13 +772,6 @@ int gtpv1u_delete_ngu_tunnel(
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti,
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).gnb_NGu_teid,
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status);
MSC_LOG_TX_MESSAGE(
MSC_GTPU_GNB,
MSC_RRC_GNB,
NULL,0,
"0 GTPV1U_GNB_DELETE_TUNNEL_RESP rnti %x teid %x",
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti,
teid_gNB);
return itti_send_msg_to_task(TASK_RRC_GNB, instanceP, message_p);
}
@@ -830,11 +790,6 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) {
addr.s_addr = req->gnb_ip_address_for_NGu_up;
UDP_INIT(message_p).address = inet_ntoa(addr);
LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,UDP_INIT(message_p).port);
MSC_LOG_EVENT(
MSC_GTPU_ENB,
"0 UDP bind %s:%u",
UDP_INIT(message_p).address,
UDP_INIT(message_p).port);
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
}
@@ -883,27 +838,12 @@ static int gtpv1u_gnb_tunnel_data_req(gtpv1u_gnb_tunnel_data_req_t *gnb_tunnel_d
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_GNB,"0 Failed send G-PDU ltid %u rtid %u size %u",
gnb_ngu_teid,outgoing_teid,data_req_p->length);
(void)gnb_ngu_teid; /* avoid gcc warning "set but not used" */
} else {
rc = nwGtpv1uProcessUlpReq(RC.nr_gtpv1u_data_g->gtpv1u_stack, &stack_req);
if (rc != NW_GTPV1U_OK) {
LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
MSC_LOG_EVENT(MSC_GTPU_GNB,"0 Failed send G-PDU ltid %u rtid %u size %u",
gnb_ngu_teid,outgoing_teid,data_req_p->length);
} else {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_GNB,
MSC_GTPU_SGW,
NULL,
0,
MSC_AS_TIME_FMT" G-PDU ltid %u rtid %u size %u",
0,0,
gnb_ngu_teid,
outgoing_teid,
data_req_p->length);
}
rc = nwGtpv1uMsgDelete(RC.nr_gtpv1u_data_g->gtpv1u_stack,
@@ -1002,7 +942,6 @@ void *nr_gtpv1u_gNB_task(void *args) {
rc = nr_gtpv1u_gNB_init();
AssertFatal(rc == 0, "gtpv1u_gNB_init Failed");
itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE();
while(1) {
(void) gtpv1u_gNB_process_itti_msg (NULL);
-31
View File
@@ -47,7 +47,6 @@
#include "assertions.h"
#include "intertask_interface.h"
#include "msc.h"
#include "gtpv1u.h"
#if defined(ENB_MODE)
@@ -563,26 +562,10 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (%u) (decapsulated %u)from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, pMsg->msgBufLen, NW_IPV4_ADDR_FORMAT((peerIp)));
#endif
MSC_LOG_RX_MESSAGE(
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
NULL,
0,
" G-PDU ltid %u size %u",
tunnelEndPointKey.teid,
gpduLen);
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
}
} else {
MSC_LOG_RX_DISCARDED_MESSAGE(
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
NULL,
0,
" G-PDU ltid %u size %u",
tunnelEndPointKey.teid,
gpduLen);
GTPU_DEBUG("Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp)));
}
@@ -614,13 +597,6 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
seqNum = ntohs(*(uint16_t *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
MSC_LOG_RX_MESSAGE(
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
NULL,
0,
MSC_AS_TIME_FMT" ECHO-REQ seq %u size %u",
0,0,seqNum, msgBufLen);
/* Send Echo Response */
rc = nwGtpv1uMsgNew( (NwGtpv1uStackHandleT)thiz,
@@ -661,13 +637,6 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
peerPort,
seqNum);
#endif
MSC_LOG_TX_MESSAGE(
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_SGW:MSC_GTPU_ENB,
NULL,
0,
MSC_AS_TIME_FMT" ECHO-RSP seq %u",
0,0,seqNum);
rc = nwGtpv1uCreateAndSendMsg(
thiz,
peerIp,
@@ -39,7 +39,6 @@
#include "m2ap_itti_messaging.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -169,14 +168,6 @@ int m2ap_eNB_generate_m2_setup_request(
LOG_W(M2AP,"pdu.present %d\n",pdu.present);
// MSC_LOG_TX_MESSAGE(
// MSC_M2AP_eNB,
// MSC_M2AP_MCE,
// (const char *)buffer,
// len,
// MSC_AS_TIME_FMT" M2_SETUP_REQUEST initiatingMessage MCEname %s",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// m2ap_eNB_data_p->ENBname);
m2ap_eNB_itti_send_sctp_data_req(instance_p, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
@@ -315,8 +306,6 @@ int m2ap_eNB_generate_m2_setup_request(
//
// m2ap_eNB_data_p->state = M2AP_ENB_STATE_READY;
//
// //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
//
// m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 0);
//
// return ret;
@@ -371,11 +360,6 @@ int m2ap_eNB_generate_m2_setup_request(
// return -1;
// }
//
// //MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB,
// // MSC_M2AP_TARGET_ENB, NULL, 0,
// // "0 M2Setup/unsuccessfulOutcome assoc_id %u cause %u value %u",
// // assoc_id, cause_type, cause_value);
//
// m2ap_eNB_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
//
// return ret;
@@ -561,8 +545,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
//
// m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -654,8 +636,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_eNB_data_p->assoc_id);
//
// m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -716,8 +696,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
//
// m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -800,8 +778,6 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_ENB, MSC_M2AP_TARGET_ENB, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_eNB_data_p->assoc_id);
//
// m2ap_eNB_itti_send_sctp_data_req(instance_p->instance, m2ap_eNB_data_p->assoc_id, buffer, len, 1);
//
// return ret;
-1
View File
@@ -44,7 +44,6 @@
//#include "m3ap_MME_interface_management.h"
#include "m3ap_MCE_interface_management.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
+1 -43
View File
@@ -44,7 +44,6 @@
#include "m3ap_itti_messaging.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -149,15 +148,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start
//
//
// LOG_W(M3AP,"pdu.present %d\n",pdu.present);
// // MSC_LOG_TX_MESSAGE(
// // MSC_M3AP_MCE,
// // MSC_M3AP_MCE,
// // (const char *)buffer,
// // len,
// // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
// // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// // m3ap_MCE_data_p->MCEname);
//
m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
return 0;
}
@@ -318,14 +309,6 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_
LOG_D(M3AP,"pdu.present %d\n",pdu.present);
// MSC_LOG_TX_MESSAGE(
// MSC_M3AP_MCE,
// MSC_M3AP_MCE,
// (const char *)buffer,
// len,
// MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// m3ap_MCE_data_p->MCEname);
m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
return 0;
@@ -425,14 +408,6 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session
LOG_D(M3AP,"pdu.present %d\n",pdu.present);
// MSC_LOG_TX_MESSAGE(
// MSC_M3AP_MCE,
// MSC_M3AP_MCE,
// (const char *)buffer,
// len,
// MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// m3ap_MCE_data_p->MCEname);
m3ap_MCE_itti_send_sctp_data_req(instance, m3ap_mce_data_g->assoc_id, buffer, len, 0);
return 0;
@@ -646,14 +621,6 @@ int MCE_send_M3_SETUP_REQUEST(m3ap_MCE_instance_t *instance_p, m3ap_MCE_data_t *
//
//
// LOG_W(M3AP,"pdu.present %d\n",pdu.present);
// // MSC_LOG_TX_MESSAGE(
// // MSC_M3AP_MCE,
// // MSC_M3AP_MCE,
// // (const char *)buffer,
// // len,
// // MSC_AS_TIME_FMT" M3_SETUP_REQUEST initiatingMessage MCEname %s",
// // 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// // m3ap_MCE_data_p->MCEname);
//
//
//// buffer = &bytes[0];
@@ -725,15 +692,6 @@ int MCE_handle_M3_SETUP_RESPONSE(instance_t instance,
//for (int i=0;i<num_cells_to_activate;i++)
// AssertFatal(M3AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
//MSC_LOG_RX_MESSAGE(
// MSC_M3AP_MCE,
// MSC_M3AP_CU,
// 0,
// 0,
// MSC_AS_TIME_FMT" MCE_handle_M3_SETUP_RESPONSE successfulOutcome assoc_id %d",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// assoc_id);
//LOG_D(M3AP, "Sending M3AP_SETUP_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
// assoc_id,MCE_MOMCELE_ID_TO_INSTANCE(assoc_id));
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
@@ -39,7 +39,6 @@
#include "m2ap_itti_messaging.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -174,8 +173,6 @@ int m2ap_MCE_generate_m2_setup_request(
return -1;
}
//MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
return ret;
@@ -311,8 +308,6 @@ int m2ap_MCE_generate_m2_setup_response(m2ap_MCE_instance_t *instance_p, m2ap_MC
m2ap_MCE_data_p->state = M2AP_MCE_STATE_READY;
//MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 M2Setup/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 0);
return ret;
@@ -367,11 +362,6 @@ int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
return -1;
}
//MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE,
// MSC_M2AP_TARGET_MCE, NULL, 0,
// "0 M2Setup/unsuccessfulOutcome assoc_id %u cause %u value %u",
// assoc_id, cause_type, cause_value);
m2ap_MCE_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0);
return ret;
@@ -557,8 +547,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
//
// m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -650,8 +638,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2Handover/successfulOutcome assoc_id %u", m2ap_MCE_data_p->assoc_id);
//
// m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -712,8 +698,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2UEContextRelease/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
//
// m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
//
// return ret;
@@ -796,8 +780,6 @@ int m2ap_MCE_set_cause (M2AP_Cause_t * cause_p,
// return -1;
// }
//
// MSC_LOG_TX_MESSAGE (MSC_M2AP_SRC_MCE, MSC_M2AP_TARGET_MCE, NULL, 0, "0 X2HandoverCancel/initiatingMessage assoc_id %u", m2ap_MCE_data_p->assoc_id);
//
// m2ap_MCE_itti_send_sctp_data_req(instance_p->instance, m2ap_MCE_data_p->assoc_id, buffer, len, 1);
//
// return ret;
-1
View File
@@ -43,7 +43,6 @@
#include "m3ap_MME_interface_management.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -296,16 +296,6 @@ int MME_handle_MBMS_SESSION_START_RESPONSE(instance_t instance,
//AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
//AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
////M3AP_SESSION_START_RESP(msg_p).
//// MSC_LOG_RX_MESSAGE(
//// MSC_M3AP_MME,
//// MSC_M3AP_MCE,
// //return 0;
//// 0,
//// 0,
//// MSC_AS_TIME_FMT" MME_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
//// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
//// assoc_id);
////
// LOG_W(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
// assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
@@ -434,14 +424,6 @@ int MME_handle_MBMS_SESSION_STOP_RESPONSE(instance_t instance,
//AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
//AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
// M3AP_SESSION_STOP_RESP(msg_p).
// MSC_LOG_RX_MESSAGE(
// MSC_M3AP_MME,
// MSC_M3AP_MCE,
// 0,
// 0,
// MSC_AS_TIME_FMT" MME_handle_M2_SESSION_STOP_RESPONSE successfulOutcome assoc_id %d",
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
// assoc_id);
// LOG_D(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
// assoc_id,MCE_MODULE_ID_TO_INSTANCE(assoc_id));
@@ -628,15 +610,6 @@ int MME_handle_M3_SETUP_REQUEST(instance_t instance,
*m3ap_mme_data_from_mce = M3AP_SETUP_REQ(message_p);
//printf("m3ap_mme_data_from_mce->assoc_id %d %d\n",m3ap_mme_data_from_mce->assoc_id,assoc_id);
//
//// MSC_LOG_TX_MESSAGE(
//// MSC_M3AP_MME,
//// MSC_RRC_MCE,
//// 0,
//// 0,
//// MSC_AS_TIME_FMT" MME_handle_M3_SETUP_REQUEST",
//// 0,0//MSC_AS_TIME_ARGS(ctxt_pP),
//// );
////
itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
// if (num_mbms_available > 0) {
// itti_send_msg_to_task(TASK_MME_APP, MCE_MODULE_ID_TO_INSTANCE(instance), message_p);
@@ -1086,16 +1059,6 @@ int MME_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
//AssertFatal(MME_MBMS_M3AP_ID!=-1,"MME_MBMS_M3AP_ID was not sent\n");
//AssertFatal(MCE_MBMS_M3AP_ID!=-1,"MCE_MBMS_M3AP_ID was not sent\n");
////M3AP_SESSION_START_RESP(msg_p).
//// MSC_LOG_RX_MESSAGE(
//// MSC_M3AP_MME,
//// MSC_M3AP_MCE,
// //return 0;
//// 0,
//// 0,
//// MSC_AS_TIME_FMT" MME_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
//// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
//// assoc_id);
////
// LOG_W(M3AP, "Sending M3AP_SESSION_START_RESP ITTI message to MCE_APP with assoc_id (%d->%d)\n",
// assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
itti_send_msg_to_task(TASK_MME_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
-1
View File
@@ -44,7 +44,6 @@
#include "m3ap_MME_interface_management.h"
#include "m3ap_MCE_interface_management.h"
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
-1
View File
@@ -46,7 +46,6 @@ Description Timer utilities
#include "intertask_interface.h"
#include "nas_timer.h"
#include "commonDef.h"
#include "msc.h"
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
-1
View File
@@ -812,7 +812,6 @@ void *nas_nrue_task(void *args_p)
ue_security_key=(ue_sa_security_key_t **)calloc(1,sizeof(ue_sa_security_key_t*)*NB_UE_INST);
itti_mark_task_ready (TASK_NAS_NRUE);
MSC_START_USE();
while(1) {
// Wait for a message or an event
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

-34
View File
@@ -1,34 +0,0 @@
================================================================================
Message Sequence Chart generation
================================================================================
Message Sequence Charts (MSCs) are a way of representing entities and
interactions to demonstrate how protocols operate between network elements.
The Access Stratum simulator generates MSC description file that can be
processed by the Python script msc_gen.py to generate a PNG (Portable
Network Graphic) file.
msc_gen.py use mscgen utility that is fully discribed at
http://www.mcternan.me.uk/mscgen/
--------------------------------------------------------------------------------
How to generate MSC description file ?
--------------------------------------------------------------------------------
Redirect stderr stream to a file that will be used as input by the Python
script msc_gen.py:
ASprocess 2> ASprocess.msc
--------------------------------------------------------------------------------
How to generate PNG file ?
--------------------------------------------------------------------------------
Parse the MSC description file using the Python script msc_gen.py:
./msc_gen.py ASprocess.msc
Warning: msc_gen.py needs mscgen utility to be installed. mscgen is a C
program that uses the GD graphics library for PNG output.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

-354
View File
@@ -1,354 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Lionel GAUTHIER
# This script is a downgrade of a python script written for the openair stack, generating sequence diagrams charts, displaying
# messages exchanged between LTE access stratum protocol entities.
# This script needs mscgen tool (http://www.mcternan.me.uk/mscgen/).
#
# The aim of this script is to collect some traces from oaisim stack and generate a mscgen script, then generate a sequence diagram
# image (png or jpeg) based on the scripts generated.
# An example of how it can be invoqued: msc_gen.py /tmp/msc_log.txt /tmp/msc_log2.txt msc_logx.txt are input text files,
# They/It are/is generated by the execution of executables in linux user space. May be it is better to operate on log files 'grepped' with MSC:
# ./my_exe.exe | grep \[MSC > /tmp/msc_log1.txt
# Now, examples of how to generate a mscgen trace in a C executable:
# -First you have to declare the instance(s) of the protocol(s) that will send or receive messages.
# This is done with the following line:
# [MSC_NEW][system time][protocol_name=instance_name]
# examples:
# printf("[MSC_NEW][%s][MIH-F=%s]\n", getTimeStamp4Log(), g_mihf_id); for declaring a new instance of a protocol entity of type MIH-F
# with an instance name g_mihf_id (of type char*)
# printf("[MSC_NEW][%s][NAS=%s]\n", getTimeStamp4Log(), "nas"); other example.
# This declaration of instances of protocols is mandatory to for this script to work.
#
# -Then for tracing a message you have to log a line following this format:
# [MSC_MSG][system time][source instance_name][--- message_name --->][destination instance_name]
# Note:
# ---> means a message that has been received correctly by destination
# ---x means a message lost by destination
# example
# NOTICE("[MSC_MSG][%s][%s][--- Link_Register.indication\\n%s ---x][%s]\n",getTimeStamp4Log(),g_link_id,g_msc_gen_buf,g_mihf_id);
#
import sys
import subprocess
import re
import socket
import datetime
import os.path
from datetime import date
MSCGEN_OUTPUT_TYPE = "png"
MAX_MESSAGES_PER_PAGE = 36
SYSTEM_FRAME_NUMBER_STR = 'FRAME'
MODULE_STR = 'MOD'
RADIO_BEARER_STR = 'RB'
MSC_NEW_STR = '[MSC_NEW]'
MSC_MSG_STR = '[MSC_MSG]'
MSC_NBOX_STR = '[MSC_NBOX]'
MSC_BOX_STR = '[MSC_BOX]'
MSC_ABOX_STR = '[MSC_ABOX]'
MSC_RBOX_STR = '[MSC_RBOX]'
# This dic is filled as follow : g_entities_dic[protocol_instance_name].append(protocol_name)
# where protocol_name can be any of the following MI-USER, MIH-F, RAL, LINK-SAP
g_entities_dic = {}
g_reverse_entities_dic = {}
# g_messages is filled with dictionnaries:
# message_dic['entity_src'] = protocol_entity_src
# message_dic['entity_dst'] = protocol_entity_dest
# message_dic['msg'] = message
# message_dic['line_color'] = g_display_color[entity_name]
# message_dic['text_color'] = g_display_color[entity_name]
# message_dic['time'] = system_frame_number
# message_dic['seq_no'] = sequence_number_generator()
# g_messages.append(message_dic)
g_messages = []
g_messages_dic = {}
# g_display_order_dic is a dictionnary where the order of the display of entities sharing the same module identifier is hardcoded
#MAC and PHY valus have to be above num max radio bearer value
#g_display_order_dic = {'MIH-USER': 0, 'MIH-F': 1, 'RAL': 3, 'NAS': 4}
g_display_order_dic = {'NAS-UE': 0, 'AS': 1, 'NAS-MME': 3}
# Display color of messages of sending entities
g_display_color = {'IP': '\"teal\"',
'RRC_UE': '\"red\"',
'MIH-USER': '\"black\"',
'MIH-F': '\"black\"',
'RAL': '\"black\"',
'RAL_M': '\"black\"',
'RLC_UM': '\"navy\"',
'RLC_TM': '\"navy\"',
'NAS': '\"black\"',
'MAC_eNB': '\"indigo\"',
'PHY': '\"purple\"',
'NAS-UE': '\"black\"',
'NAS-MME': '\"black\"',
'AS': '\"black\"'}
g_final_display_order_list = []
g_sequence_generator = 0
def sequence_number_generator():
global g_sequence_generator
l_seq = g_sequence_generator
g_sequence_generator = g_sequence_generator + 1
return l_seq
def parse_log_file_for_discovering_protocol_entities(filename):
global g_entities_dic
global g_entities
global g_messages
global g_final_display_order_list
#open TXT file that contain OAI filtered traces for mscgen
fhandle = open(filename, 'r')
fcontent = fhandle.read()
fhandle.close()
# split file content in lines
lines = fcontent.splitlines()
for line in lines:
system_time = 'unknown'
# if line is a trace of the creation of a new protocol instance
if MSC_NEW_STR in line:
partition = line.rpartition(MSC_NEW_STR)
msc_log_string = partition[2]
#print (" %s " % msc_log_string)
partition = msc_log_string.split('[')
print ("\n\n %s \n" % partition)
#if len(partition) == 2:
item = partition[1]
item = item.strip()
item = item.strip(']')
system_time = item.split(' ')[-1]
print ("NEW system_time %s " % system_time)
item = partition[2]
item = item.strip()
item = item.strip(']')
protocol_entity_type = item.split('=')[0]
protocol_entity_name = item.split('=')[-1]
print ("NEW protocol_entity_type %s " % protocol_entity_type)
print ("NEW protocol_entity_name %s " % protocol_entity_name)
if protocol_entity_name not in g_entities_dic:
g_entities_dic[protocol_entity_name] = protocol_entity_type
if protocol_entity_type not in g_reverse_entities_dic:
g_reverse_entities_dic[protocol_entity_type] = protocol_entity_name
else:
entity_name_list = g_reverse_entities_dic[protocol_entity_type]
entity_name_list.append(protocol_entity_name)
g_reverse_entities_dic[protocol_entity_type] = entity_name_list
#print (" g_entities_dic[%d][%d].append(%s)" % (module_id_int, radio_bearer_id_int, entity_name_src))
print (" g_entities_dic= %s\n\n" % (g_entities_dic))
print (" g_reverse_entities_dic= %s\n\n" % (g_reverse_entities_dic))
#g_entities.append(protocol_entity_type)
#print (" %s \n" % protocol_entity)
def parse_log_file(filename):
global g_entities_dic
global g_entities
global g_messages
global g_final_display_order_list
#open TXT file that contain OAI filtered traces for mscgen
fhandle = open(filename, 'r')
fcontent = fhandle.read()
fhandle.close()
# split file content in lines
lines = fcontent.splitlines()
for line in lines:
system_time = 'unknown'
message = 'unknown'
entity_name_src = 'unknown'
entity_name_dest = 'unknown'
# if line is a trace of the creation of a new protocol instance
if MSC_MSG_STR in line:
partition = line.strip().rpartition(MSC_MSG_STR)
msc_log_string = partition[2].strip()
print (" ++++ %s " % msc_log_string)
partition = msc_log_string.split('[')
print (" ++++ %s " % partition)
#if len(partition) == 9:
message_dic = {}
system_time = partition[1].strip().split(' ')[-1].strip(']')
message_dic['display_time'] = system_time
seconds_int = int(system_time.split(':')[0])
micro_seconds_int = int(system_time.split(':')[-1])
system_time_int = seconds_int*1000000 + micro_seconds_int
system_time=str(system_time_int)
print ('system_time %s' % system_time)
entity_name_src = partition[2].strip().split(' ')[-1].strip(']')
print ('entity_name_src %s' % entity_name_src)
message = partition[3].strip().strip(']').strip()
if (message[-1] == 'x') or (message[-1] == 'X'):
message_dic['arc'] = '-x'
elif message[-1] == '>':
message_dic['arc'] = '=>'
message = message.strip('<').strip('>').strip('x').strip('X').strip('-').strip('=').strip()
print ('message %s' % message)
entity_name_dest = partition[4].strip().split(' ')[-1].strip(']')
print ('entity_name_dest %s' % entity_name_dest)
message_dic['entity_src'] = entity_name_src
message_dic['entity_dst'] = entity_name_dest
message_dic['msg'] = message
message_dic['line_color'] = g_display_color[g_entities_dic[entity_name_src]]
message_dic['text_color'] = g_display_color[g_entities_dic[entity_name_src]]
message_dic['time'] = system_time
#message_dic['seq_no'] = sequence_number_generator()
print ('%s\n\n' % message_dic)
g_messages_dic[system_time_int] = message_dic
#g_messages.append(message_dic)
#TODO !!!
if MSC_RBOX_STR in line:
partition = line.strip().rpartition(MSC_RBOX_STR)
msc_log_string = partition[2].strip()
print (" ==== %s " % msc_log_string)
partition = msc_log_string.split('[')
print (" ==== %s " % partition)
#TODO !!!
def generate_sorted_message_list():
first_time_stamp = 0
for system_time_int in sorted(g_messages_dic.iterkeys()):
if first_time_stamp == 0:
first_time_stamp = system_time_int
message_dic = g_messages_dic[system_time_int]
message_dic['seq_no'] = sequence_number_generator()
message_dic['display_time'] = str(system_time_int - first_time_stamp)
g_messages.append(message_dic)
def generate_sorted_entity_display_list():
module_display_order_dic = {}
for entity_name in sorted(g_entities_dic.iterkeys()):
module_display_order_dic[g_display_order_dic[g_entities_dic[entity_name]]] = entity_name
print("------------------------------------")
print(" %s " % (module_display_order_dic))
for display_priority in sorted(module_display_order_dic.iterkeys()):
g_final_display_order_list.append(module_display_order_dic[display_priority])
def msc_chart_write_header(fileP):
global g_final_display_order_list
fileP.write("msc {\n")
fileP.write("width = \"2048\";\n")
entity_line_list_str = ''
for entity in g_final_display_order_list:
entity_line_list_str = entity_line_list_str + ' ' + entity + ','
entity_line_list_str = entity_line_list_str.rstrip().strip(',')
fileP.write(" %s;" % (entity_line_list_str))
def msc_chart_write_footer(fileP):
fileP.write("\n}\n")
def msc_chart_generate(file_nameP):
global MSCGEN_OUTPUT_TYPE
command_line = "mscgen -T " + MSCGEN_OUTPUT_TYPE + " -i " + file_nameP + "; chmod 777 " +file_nameP + ";"
print("Command Line: %s " % (command_line))
fi,fo,fe=os.popen3(command_line)
for i in fe.readlines():
print "error:",i
def get_nem_file_descriptor():
global g_base_file_name
global g_page_index
l_file_name = g_base_file_name + str(g_page_index)+'.txt'
l_file = open(l_file_name, "w", 0777)
return l_file
###### MAIN START HERE #################
num_args = len(sys.argv)
if num_args < 2: # the program name and the arguments
# stop the program and print an error message
sys.exit("Must provide at least one file to parse")
for i in range(1,num_args):
print sys.argv[i]
for i in range(1,num_args):
parse_log_file_for_discovering_protocol_entities(sys.argv[i])
for i in range(1,num_args):
parse_log_file(sys.argv[i])
generate_sorted_message_list()
generate_sorted_entity_display_list()
g_page_index = 0
g_message_index = 0
g_message_index_in_current_page = 0
g_now = datetime.datetime.now()
g_now_formated = g_now.strftime("%Y-%m-%d_%H.%M.%S")
g_currentdir = os.curdir
g_resultdir = os.path.join(g_currentdir, g_now_formated)
os.mkdir(g_resultdir, 0777)
os.chdir(g_resultdir)
g_base_file_name = 'mih_mscgen_page_'
g_file = get_nem_file_descriptor()
msc_chart_write_header(g_file)
for message in g_messages:
if 'msg' in message:
print ('message %s' % message)
g_file.write(" %s%s%s [ label = \"(%d) T%s %s\", linecolour=%s , textcolour=%s ] ;\n" % (message['entity_src'], message['arc'], message['entity_dst'], message['seq_no'], message['display_time'], message['msg'], message['line_color'], message['text_color']))
elif 'box' in message:
g_file.write(" %s %s %s [ label = \"%s\", textbgcolour=%s , textcolour=%s ] ;\n" % (message['entity_src'], message['box_type'], message['entity_dst'], message['box'], message['textbg_color'], message['text_color']))
g_message_index = g_message_index + 1
g_message_index_in_current_page = g_message_index_in_current_page + 1
if (g_message_index_in_current_page == MAX_MESSAGES_PER_PAGE):
msc_chart_write_footer(g_file)
g_file.close()
msc_chart_generate(g_file.name)
g_page_index = g_page_index + 1
g_message_index_in_current_page = 0
g_file = get_nem_file_descriptor()
msc_chart_write_header(g_file)
msc_chart_write_footer(g_file)
g_file.close()
if g_message_index_in_current_page >= 1:
msc_chart_generate(g_file.name)
else:
print("Removing empty seq diagram file: %s " % (g_file.name))
os.remove(g_file.name)
-1
View File
@@ -53,7 +53,6 @@ Description Defines the detach related EMM procedure executed by the
#include "emm_sap.h"
#include "esm_sap.h"
#include "msc.h"
#include <stdlib.h> // free
-1
View File
@@ -48,7 +48,6 @@ Description Defines the identification EMM procedure executed by the
#include "emmData.h"
#include "emm_sap.h"
#include "msc.h"
#include "user_defs.h"
#include <stdlib.h> // malloc, free
-1
View File
@@ -61,7 +61,6 @@ Description Defines the EMMAS Service Access Point that provides
#if defined(NAS_BUILT_IN_UE)
# include "nas_itti_messaging.h"
#endif
#include "msc.h"
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
@@ -63,7 +63,6 @@ Description Defines the security mode control EMM procedure executed by the
# include "assertions.h"
#include "secu_defs.h"
#include "msc.h"
#include "SecurityModeControl.h"
#if defined(NAS_BUILT_IN_UE)
-43
View File
@@ -23,7 +23,6 @@
#include "intertask_interface.h"
#include "nas_itti_messaging.h"
#include "msc.h"
# define TASK_ORIGIN TASK_NAS_UE
@@ -104,27 +103,6 @@ int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id) {
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_KENB_REFRESH_REQ);
memcpy(NAS_KENB_REFRESH_REQ(message_p).kenb, kenb, sizeof(NAS_KENB_REFRESH_REQ(message_p).kenb));
MSC_LOG_TX_MESSAGE(
MSC_NAS_UE,
MSC_RRC_UE,
NULL,0,
"0 NAS_KENB_REFRESH_REQ KeNB "
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x",
kenb[0], kenb[1], kenb[2], kenb[3],
kenb[4], kenb[5], kenb[6], kenb[7],
kenb[8], kenb[9], kenb[10], kenb[11],
kenb[12], kenb[13], kenb[14], kenb[15],
kenb[16], kenb[17], kenb[18], kenb[19],
kenb[20], kenb[21], kenb[22], kenb[23],
kenb[24], kenb[25], kenb[26], kenb[27],
kenb[28], kenb[29], kenb[30], kenb[31]);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
}
@@ -133,13 +111,6 @@ int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id) {
message_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_CELL_SELECTION_REQ);
NAS_CELL_SELECTION_REQ(message_p).plmnID = plmnID;
NAS_CELL_SELECTION_REQ(message_p).rat = rat;
MSC_LOG_TX_MESSAGE(
MSC_NAS_UE,
MSC_RRC_UE,
NULL,0,
"0 NAS_CELL_SELECTION_REQ PLMN %X%X%X.%X%X%X",
plmnID.MCCdigit1, plmnID.MCCdigit2, plmnID.MCCdigit3,
plmnID.MNCdigit1, plmnID.MNCdigit2, plmnID.MNCdigit3);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
}
@@ -152,14 +123,6 @@ int nas_itti_nas_establish_req(as_cause_t cause, as_call_type_t type, as_stmsi_t
NAS_CONN_ESTABLI_REQ(message_p).plmnID = plmnID;
NAS_CONN_ESTABLI_REQ(message_p).initialNasMsg.data = data;
NAS_CONN_ESTABLI_REQ(message_p).initialNasMsg.length = length;
MSC_LOG_TX_MESSAGE(
MSC_NAS_UE,
MSC_RRC_UE,
NULL,0,
"0 NAS_CONN_ESTABLI_REQ MME code %u m-TMSI %u PLMN %X%X%X.%X%X%X",
s_tmsi.MMEcode, s_tmsi.m_tmsi,
plmnID.MCCdigit1, plmnID.MCCdigit2, plmnID.MCCdigit3,
plmnID.MNCdigit1, plmnID.MNCdigit2, plmnID.MNCdigit3);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
}
@@ -178,11 +141,5 @@ int nas_itti_rab_establish_rsp(const as_stmsi_t s_tmsi, const as_rab_id_t rabID,
NAS_RAB_ESTABLI_RSP(message_p).s_tmsi = s_tmsi;
NAS_RAB_ESTABLI_RSP(message_p).rabID = rabID;
NAS_RAB_ESTABLI_RSP(message_p).errCode = errCode;
MSC_LOG_TX_MESSAGE(
MSC_NAS_UE,
MSC_RRC_UE,
NULL,0,
"0 NAS_RAB_ESTABLI_RSP MME code %u m-TMSI %u rb id %u status %u",
s_tmsi.MMEcode, s_tmsi.m_tmsi,rabID, errCode );
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
}
-1
View File
@@ -26,7 +26,6 @@
#include "assertions.h"
#include "intertask_interface.h"
#include "esm_proc.h"
#include "msc.h"
#ifndef NAS_ITTI_MESSAGING_H_
#define NAS_ITTI_MESSAGING_H_
-1
View File
@@ -46,7 +46,6 @@ Description NAS procedure call manager
#include "esm_main.h"
#include "esm_sap.h"
#include "msc.h"
#include <stdio.h> // sprintf
-4
View File
@@ -29,12 +29,9 @@
# include "user_api.h"
# include "nas_parser.h"
# include "nas_proc.h"
# include "msc.h"
# include "memory.h"
#include "nas_user.h"
#include <common/utils/msc/msc.h>
// FIXME make command line option for NAS_UE_AUTOSTART
# define NAS_UE_AUTOSTART 1
@@ -97,7 +94,6 @@ void *nas_ue_task(void *args_p)
nas_user_container_t *users=args_p;
itti_mark_task_ready (TASK_NAS_UE);
MSC_START_USE();
LOG_I(NAS, "ue_idx_standalone val:: %u\n", ue_idx_standalone);
/* Initialize UE NAS (EURECOM-NAS) */
// Intead of for loop for standalone mode
-2
View File
@@ -57,7 +57,6 @@
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_ue_context.h" // test, to be removed
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -273,7 +272,6 @@ void ngap_gNB_init(void) {
NGAP_DEBUG("Starting NGAP layer\n");
ngap_gNB_prepare_internal_data();
itti_mark_task_ready(TASK_NGAP);
MSC_START_USE();
}
void *ngap_gNB_process_itti_msg(void *notUsed) {
@@ -50,7 +50,6 @@
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_context_management_procedures.h"
#include "NGAP_PDUSessionResourceItemCxtRelReq.h"
#include "msc.h"
int ngap_ue_context_release_complete(instance_t instance,
@@ -116,16 +115,6 @@ int ngap_ue_context_release_complete(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
buffer,
length,
MSC_AS_TIME_FMT" UEContextRelease successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
ue_release_complete_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -267,16 +256,6 @@ int ngap_ue_context_release_req(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
buffer,
length,
MSC_AS_TIME_FMT" UEContextReleaseRequest initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_release_req_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
-15
View File
@@ -48,7 +48,6 @@
#include "assertions.h"
#include "conversions.h"
#include "msc.h"
#include "NGAP_NonDynamic5QIDescriptor.h"
static
@@ -1208,14 +1207,6 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id,
case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair:
gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->rAN_UE_NGAP_ID;
asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->aMF_UE_NGAP_ID), &amf_ue_ngap_id);
MSC_LOG_RX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
NULL,0,
"0 UEContextRelease/%s gNB_ue_ngap_id "NGAP_UE_ID_FMT" amf_ue_ngap_id "NGAP_UE_ID_FMT" len %u",
ngap_direction2String(pdu->present - 1),
gnb_ue_ngap_id,
amf_ue_ngap_id);
if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance,
gnb_ue_ngap_id)) == NULL) {
@@ -1225,12 +1216,6 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id,
gnb_ue_ngap_id);
return -1;
} else {
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_RRC_GNB,
NULL,0,
"0 NGAP_UE_CONTEXT_RELEASE_COMMAND/%d gNB_ue_ngap_id "NGAP_UE_ID_FMT" ",
gnb_ue_ngap_id);
message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_UE_CONTEXT_RELEASE_COMMAND);
if (ue_desc_p->amf_ue_ngap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode
-96
View File
@@ -48,7 +48,6 @@
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_management_procedures.h"
#include "msc.h"
//------------------------------------------------------------------------------
int ngap_gNB_handle_nas_first_req(
@@ -312,14 +311,6 @@ int ngap_gNB_handle_nas_first_req(
}
ue_desc_p->tx_stream = amf_desc_p->nextstream;
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" initialUEMessage initiatingMessage gNB_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_desc_p->gNB_ue_ngap_id);
/* Send encoded message over sctp */
ngap_gNB_itti_send_sctp_data_req(instance_p->instance, amf_desc_p->assoc_id,
buffer, length, ue_desc_p->tx_stream);
@@ -371,14 +362,6 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id,
if ((ue_desc_p = ngap_gNB_get_ue_context(ngap_gNB_instance,
gnb_ue_ngap_id)) == NULL) {
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
NULL,
0,
MSC_AS_TIME_FMT" downlinkNASTransport gNB_ue_ngap_id %u amf_ue_ngap_id %u",
gnb_ue_ngap_id,
amf_ue_ngap_id);
NGAP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context gNB_UE_NGAP_ID: 0x%lx\n",
assoc_id,
gnb_ue_ngap_id);
@@ -410,15 +393,6 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id,
}
}
MSC_LOG_RX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
NULL,
0,
MSC_AS_TIME_FMT" downlinkNASTransport gNB_ue_ngap_id %u amf_ue_ngap_id %u",
assoc_id,
amf_ue_ngap_id);
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNASTransport_IEs_t, ie, container,
NGAP_ProtocolIE_ID_id_NAS_PDU, true);
/* Forward the NAS PDU to NR-RRC */
@@ -532,15 +506,6 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" uplinkNASTransport initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -571,10 +536,6 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance,
/* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */
NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %08x\n",
ngap_nas_non_delivery_ind->gNB_ue_ngap_id);
MSC_LOG_EVENT(
MSC_NGAP_GNB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to AMF failed, no context for gNB_ue_ngap_id %08x",
ngap_nas_non_delivery_ind->gNB_ue_ngap_id);
return -1;
}
@@ -621,21 +582,9 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance,
if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) {
NGAP_ERROR("Failed to encode NAS NON delivery indication\n");
/* Encode procedure has failed... */
MSC_LOG_EVENT(
MSC_NGAP_GNB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to AMF failed (encoding)");
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" NASNonDeliveryIndication initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -868,15 +817,6 @@ int ngap_gNB_initial_ctxt_resp(
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" InitialContextSetup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ctxt_resp_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
LOG_I(NR_RRC,"Send message to sctp: NGAP_InitialContextSetupResponse\n");
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
@@ -961,15 +901,6 @@ int ngap_gNB_ue_capabilities(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" UECapabilityInfoIndication initiatingMessage gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_cap_info_ind_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -1179,15 +1110,6 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" PduSession Setup successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
pdusession_setup_resp_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -1353,15 +1275,6 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Modify successful Outcome gNB_ue_ngap_id %u amf_ue_ngap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
pdusession_modify_resp_p->gNB_ue_ngap_id,
ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
@@ -1464,15 +1377,6 @@ int ngap_gNB_pdusession_release_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_NGAP_GNB,
MSC_NGAP_AMF,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Release successfulOutcome gNB_ue_ngap_id %u amf_ue_ngap_id %lu",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
pdusession_release_resp_p->gNB_ue_ngap_id,
(uint64_t)ue_context_p->amf_ue_ngap_id);
/* UE associated signalling -> use the allocated stream */
ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance,
ue_context_p->amf_ref->assoc_id, buffer,
-2
View File
@@ -56,7 +56,6 @@
#include "s1ap_eNB_itti_messaging.h"
#include "s1ap_eNB_ue_context.h" // test, to be removed
#include "msc.h"
#include "assertions.h"
#include "conversions.h"
@@ -507,7 +506,6 @@ void s1ap_eNB_init(void) {
S1AP_DEBUG("Starting S1AP layer\n");
s1ap_eNB_prepare_internal_data();
itti_mark_task_ready(TASK_S1AP);
MSC_START_USE();
}
void *s1ap_eNB_process_itti_msg(void *notUsed) {
@@ -47,7 +47,6 @@
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_context_management_procedures.h"
#include "msc.h"
int s1ap_ue_context_release_complete(instance_t instance,
@@ -111,16 +110,6 @@ int s1ap_ue_context_release_complete(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
length,
MSC_AS_TIME_FMT" UEContextRelease successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0, //MSC_AS_TIME_ARGS(ctxt_pP),
ue_release_complete_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -246,16 +235,6 @@ int s1ap_ue_context_release_req(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
buffer,
length,
MSC_AS_TIME_FMT" UEContextReleaseRequest initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_release_req_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
-15
View File
@@ -51,7 +51,6 @@
#include "assertions.h"
#include "conversions.h"
#include "msc.h"
static
int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
@@ -1025,14 +1024,6 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
case S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair:
enb_ue_s1ap_id = ie->value.choice.UE_S1AP_IDs.choice.uE_S1AP_ID_pair.eNB_UE_S1AP_ID;
mme_ue_s1ap_id = ie->value.choice.UE_S1AP_IDs.choice.uE_S1AP_ID_pair.mME_UE_S1AP_ID;
MSC_LOG_RX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
NULL,0,
"0 UEContextRelease/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u",
s1ap_direction2String(pdu->present - 1),
enb_ue_s1ap_id,
mme_ue_s1ap_id);
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
enb_ue_s1ap_id)) == NULL) {
@@ -1042,12 +1033,6 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
enb_ue_s1ap_id);
return -1;
} else {
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_RRC_ENB,
NULL,0,
"0 S1AP_UE_CONTEXT_RELEASE_COMMAND/%d eNB_ue_s1ap_id "S1AP_UE_ID_FMT" ",
enb_ue_s1ap_id);
message_p = itti_alloc_new_message(TASK_S1AP, 0, S1AP_UE_CONTEXT_RELEASE_COMMAND);
if (ue_desc_p->mme_ue_s1ap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode
-106
View File
@@ -46,7 +46,6 @@
#include "s1ap_eNB_ue_context.h"
#include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h"
#include "msc.h"
//------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_first_req(
@@ -310,14 +309,6 @@ int s1ap_eNB_handle_nas_first_req(
}
ue_desc_p->tx_stream = mme_desc_p->nextstream;
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" initialUEMessage initiatingMessage eNB_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_desc_p->eNB_ue_s1ap_id);
/* Send encoded message over sctp */
s1ap_eNB_itti_send_sctp_data_req(instance_p->instance, mme_desc_p->assoc_id,
buffer, length, ue_desc_p->tx_stream);
@@ -374,14 +365,6 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
if ((ue_desc_p = s1ap_eNB_get_ue_context(s1ap_eNB_instance,
enb_ue_s1ap_id)) == NULL) {
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
NULL,
0,
MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
enb_ue_s1ap_id,
mme_ue_s1ap_id);
S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%lx\n",
assoc_id,
enb_ue_s1ap_id);
@@ -413,15 +396,6 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
}
}
MSC_LOG_RX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
NULL,
0,
MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
assoc_id,
mme_ue_s1ap_id);
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_DownlinkNASTransport_IEs_t, ie, container,
S1AP_ProtocolIE_ID_id_NAS_PDU, true);
if(ie == NULL)
@@ -536,15 +510,6 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)NULL,
0,
MSC_AS_TIME_FMT" uplinkNASTransport initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -574,10 +539,6 @@ int s1ap_eNB_nas_non_delivery_ind(instance_t instance,
/* The context for this eNB ue s1ap id doesn't exist in the map of eNB UEs */
S1AP_WARN("Failed to find ue context associated with eNB ue s1ap id: %06x\n",
s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
MSC_LOG_EVENT(
MSC_S1AP_ENB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed, no context for eNB_ue_s1ap_id %06x",
s1ap_nas_non_delivery_ind->eNB_ue_s1ap_id);
return -1;
}
@@ -623,21 +584,9 @@ int s1ap_eNB_nas_non_delivery_ind(instance_t instance,
if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode NAS NON delivery indication\n");
/* Encode procedure has failed... */
MSC_LOG_EVENT(
MSC_S1AP_ENB,
MSC_AS_TIME_FMT" Sent of NAS_NON_DELIVERY_IND to MME failed (encoding)");
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" NASNonDeliveryIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -802,15 +751,6 @@ int s1ap_eNB_initial_ctxt_resp(
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" InitialContextSetup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
initial_ctxt_resp_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -891,15 +831,6 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" UECapabilityInfoIndication initiatingMessage eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_cap_info_ind_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -1075,15 +1006,6 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Setup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
e_rab_setup_resp_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -1238,15 +1160,6 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Modify successful Outcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
e_rab_modify_resp_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -1378,15 +1291,6 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance,
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Release successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
e_rab_release_resp_p->eNB_ue_s1ap_id,
ue_context_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
ue_context_p->mme_ref->assoc_id, buffer,
@@ -1615,16 +1519,6 @@ int s1ap_eNB_path_switch_req(instance_t instance,
ue_context_p->tx_stream = mme_desc_p->nextstream;
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
(const char *)buffer,
length,
MSC_AS_TIME_FMT" E_RAN Setup successfulOutcome eNB_ue_s1ap_id %u mme_ue_s1ap_id %u",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_p->eNB_ue_s1ap_id,
path_switch_req_p->mme_ue_s1ap_id);
/* UE associated signalling -> use the allocated stream */
s1ap_eNB_itti_send_sctp_data_req(s1ap_eNB_instance_p->instance,
mme_desc_p->assoc_id, buffer,
-3
View File
@@ -48,7 +48,6 @@
#include "sctp_default_values.h"
#include "sctp_common.h"
#include "sctp_eNB_itti_messaging.h"
#include "msc.h"
/* Used to format an uint32_t containing an ipv4 address */
#define IPV4_ADDR "%u.%u.%u.%u"
@@ -1097,8 +1096,6 @@ void sctp_eNB_init(void)
STAILQ_INIT(&sctp_cnx_list);
itti_mark_task_ready(TASK_SCTP);
MSC_START_USE();
}
//------------------------------------------------------------------------------
@@ -44,7 +44,6 @@
#include "s1ap_common.h"
#include "play_scenario_s1ap_eNB_defs.h"
#include "play_scenario.h"
#include "msc.h"
//------------------------------------------------------------------------------
s1ap_eNB_internal_data_t s1ap_eNB_internal_data;
RB_GENERATE(s1ap_mme_map, s1ap_eNB_mme_data_s, entry, et_s1ap_eNB_compare_assoc_id);
@@ -1084,7 +1083,6 @@ void *et_s1ap_eNB_task(void *arg)
et_s1ap_eNB_prepare_internal_data();
itti_mark_task_ready(TASK_S1AP);
MSC_START_USE();
while (1) {
itti_receive_msg(TASK_S1AP, &received_msg);
@@ -49,7 +49,6 @@
#include "s1ap_common.h"
#include "play_scenario_s1ap_eNB_defs.h"
#include "play_scenario.h"
#include "msc.h"
//------------------------------------------------------------------------------
extern et_scenario_t *g_scenario;
extern uint32_t g_constraints;
-2
View File
@@ -44,7 +44,6 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "msc.h"
#define IPV4_ADDR "%u.%u.%u.%u"
@@ -309,7 +308,6 @@ void *udp_eNB_task(void *args_p)
udp_enb_init();
itti_mark_task_ready(TASK_UDP);
MSC_START_USE();
while(1) {
itti_receive_msg(TASK_UDP, &received_message_p);