Commit b3960e9c authored by winckel's avatar winckel

Differentiated EMM and ESM RAW NAS messages.

Added an ITTI filters example for UE and eNB.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4990 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent a18a4206
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<messages>
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<ACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<DEACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<DEBUG_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<GENERIC_LOG enabled="1" foreground_color="#246b24" background_color="#ffffff"/>
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_DEACTIVATE_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_FIND_NEXT_CELL_REQ enabled="1" foreground_color="#000000" background_color="#bef2ff"/>
<PHY_MEAS_THRESHOLD_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_FIND_CELL_IND enabled="1" foreground_color="#585858" background_color="#bef2ff"/>
<PHY_MEAS_THRESHOLD_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<PHY_MEAS_REPORT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_IN_SYNC_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_OUT_OF_SYNC_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_BCCH_DATA_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_CNF enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_CCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#dfb9fc"/>
<RRC_MAC_MCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_MAC_MCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_DATA_PDU_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_DATA_PDU_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_STATUS_PDU_IND enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_AM_STATUS_PDU_REQ enabled="0" foreground_color="#585858" background_color="#ffffff"/>
<RLC_UM_DATA_PDU_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RLC_UM_DATA_PDU_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DCCH_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DCCH_DATA_IND enabled="1" foreground_color="#585858" background_color="#a7b1de"/>
<RRC_DL_BCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_CCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_DCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_DL_MCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UE_EUTRA_CAPABILITY enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UL_CCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_UL_DCCH enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_STATE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_CONFIGURATION_REQ enabled="1" foreground_color="#ffffff" background_color="#4d2a73"/>
<NAS_CELL_SELECTION_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_UPLINK_DATA_REQ enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_RAB_ESTABLI_RSP enabled="1" foreground_color="#ffffff" background_color="#2d315c"/>
<NAS_CELL_SELECTION_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CELL_SELECTION_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CONN_ESTABLI_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_CONN_RELEASE_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_UPLINK_DATA_CNF enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_DOWNLINK_DATA_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
<NAS_DL_EMM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_UL_EMM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_DL_EMM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_UL_EMM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_DL_EMM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
<NAS_UL_EMM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
<NAS_DL_ESM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_UL_ESM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_DL_ESM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_UL_ESM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<NAS_DL_ESM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
<NAS_UL_ESM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
<RRC_RAL_SYSTEM_CONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SYSTEM_INFORMATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_SCAN_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONFIGURE_THRESHOLD_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_MEASUREMENT_REPORT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_REESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_CONF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<RRC_RAL_CONNECTION_RELEASE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UPLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CAPABILITY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_CONTEXT_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_NAS_NON_DELIVERY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_DOWNLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_S1_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_INITIAL_UE_MESSAGE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_REQ_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_UE_CONTEXT_RELEASE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
<S1AP_REGISTER_ENB_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_REGISTER_ENB_CNF enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DEREGISTERED_ENB_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_NAS_FIRST_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UPLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_RESP enabled="1" foreground_color="#19431e" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_NAS_NON_DELIVERY_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_RESP enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_FAIL enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_DOWNLINK_NAS enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_INITIAL_CONTEXT_SETUP_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_UE_CTXT_MODIFICATION_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<S1AP_PAGING_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
<S1AP_UE_CONTEXT_RELEASE_REQ enabled="1" foreground_color="#000000" background_color="#cbffb1"/>
<SCTP_NEW_ASSOCIATION_REQ enabled="0" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_RESP enabled="0" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_NEW_ASSOCIATION_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_REGISTER_UPPER_LAYER enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
</messages>
<origin_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</origin_tasks>
<destination_tasks>
<TASK_UNKNOWN enabled="1"/>
<TASK_TIMER enabled="1"/>
<TASK_L2L1 enabled="1"/>
<TASK_BM enabled="1"/>
<TASK_PHY_ENB enabled="1"/>
<TASK_MAC_ENB enabled="1"/>
<TASK_RLC_ENB enabled="1"/>
<TASK_PDCP_ENB enabled="1"/>
<TASK_RRC_ENB enabled="1"/>
<TASK_RAL_ENB enabled="1"/>
<TASK_S1AP enabled="1"/>
<TASK_X2AP enabled="1"/>
<TASK_SCTP enabled="1"/>
<TASK_ENB_APP enabled="1"/>
<TASK_PHY_UE enabled="1"/>
<TASK_MAC_UE enabled="1"/>
<TASK_RLC_UE enabled="1"/>
<TASK_PDCP_UE enabled="1"/>
<TASK_RRC_UE enabled="1"/>
<TASK_NAS_UE enabled="1"/>
<TASK_RAL_UE enabled="1"/>
</destination_tasks>
</filters>
//WARNING: Do not include this header directly. Use intertask_interface.h instead. //WARNING: Do not include this header directly. Use intertask_interface.h instead.
// Messages for NAS logging // Messages for NAS logging
MESSAGE_DEF(NAS_DL_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_raw_msg) MESSAGE_DEF(NAS_DL_EMM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_emm_raw_msg)
MESSAGE_DEF(NAS_UL_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_raw_msg) MESSAGE_DEF(NAS_UL_EMM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_emm_raw_msg)
MESSAGE_DEF(NAS_DL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_dl_emm_plain_msg) MESSAGE_DEF(NAS_DL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_dl_emm_plain_msg)
MESSAGE_DEF(NAS_UL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_ul_emm_plain_msg) MESSAGE_DEF(NAS_UL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_ul_emm_plain_msg)
MESSAGE_DEF(NAS_DL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_dl_emm_protected_msg) MESSAGE_DEF(NAS_DL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_dl_emm_protected_msg)
MESSAGE_DEF(NAS_UL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_ul_emm_protected_msg) MESSAGE_DEF(NAS_UL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_ul_emm_protected_msg)
MESSAGE_DEF(NAS_DL_ESM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_esm_raw_msg)
MESSAGE_DEF(NAS_UL_ESM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_esm_raw_msg)
MESSAGE_DEF(NAS_DL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_dl_esm_plain_msg) MESSAGE_DEF(NAS_DL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_dl_esm_plain_msg)
MESSAGE_DEF(NAS_UL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_ul_esm_plain_msg) MESSAGE_DEF(NAS_UL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_ul_esm_plain_msg)
MESSAGE_DEF(NAS_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_dl_esm_protected_msg) MESSAGE_DEF(NAS_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_dl_esm_protected_msg)
......
...@@ -4,14 +4,17 @@ ...@@ -4,14 +4,17 @@
#ifndef NAS_MESSAGES_TYPES_H_ #ifndef NAS_MESSAGES_TYPES_H_
#define NAS_MESSAGES_TYPES_H_ #define NAS_MESSAGES_TYPES_H_
#define NAS_DL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_raw_msg #define NAS_DL_EMM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_raw_msg
#define NAS_UL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_raw_msg #define NAS_UL_EMM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_raw_msg
#define NAS_DL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_protected_msg #define NAS_DL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_protected_msg
#define NAS_UL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_protected_msg #define NAS_UL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_protected_msg
#define NAS_DL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_plain_msg #define NAS_DL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_plain_msg
#define NAS_UL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_plain_msg #define NAS_UL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_plain_msg
#define NAS_DL_ESM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_raw_msg
#define NAS_UL_ESM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_raw_msg
#define NAS_DL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_protected_msg #define NAS_DL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_protected_msg
#define NAS_UL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_protected_msg #define NAS_UL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_protected_msg
#define NAS_DL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_plain_msg #define NAS_DL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_plain_msg
......
...@@ -120,36 +120,53 @@ int nas_itti_plain_msg(const char* buffer, const nas_message_t* msg, const int l ...@@ -120,36 +120,53 @@ int nas_itti_plain_msg(const char* buffer, const nas_message_t* msg, const int l
{ {
MessageDef *message_p; MessageDef *message_p;
int data_length = length < NAS_DATA_LENGHT_MAX ? length : NAS_DATA_LENGHT_MAX; int data_length = length < NAS_DATA_LENGHT_MAX ? length : NAS_DATA_LENGHT_MAX;
int message_type = -1;
MessagesIds messageId_raw = -1;
MessagesIds messageId_plain = -1;
/* Define message ids */
if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE)
{
message_type = 0;
messageId_raw = down_link ? NAS_DL_EMM_RAW_MSG : NAS_UL_EMM_RAW_MSG;
messageId_plain = down_link ? NAS_DL_EMM_PLAIN_MSG : NAS_UL_EMM_PLAIN_MSG;
}
else
{
if (msg->header.protocol_discriminator == EPS_SESSION_MANAGEMENT_MESSAGE)
{
message_type = 1;
messageId_raw = down_link ? NAS_DL_ESM_RAW_MSG : NAS_UL_ESM_RAW_MSG;
messageId_plain = down_link ? NAS_DL_ESM_PLAIN_MSG : NAS_UL_ESM_PLAIN_MSG;
}
}
if (message_type >= 0)
{ {
message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_RAW_MSG : NAS_UL_RAW_MSG); /* Create and send the RAW message */
message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_raw);
NAS_DL_RAW_MSG(message_p).lenght = length; NAS_DL_EMM_RAW_MSG(message_p).lenght = length;
memset ((void *) &(NAS_DL_RAW_MSG(message_p).data), 0, NAS_DATA_LENGHT_MAX); memset ((void *) &(NAS_DL_EMM_RAW_MSG(message_p).data), 0, NAS_DATA_LENGHT_MAX);
memcpy ((void *) &(NAS_DL_RAW_MSG(message_p).data), buffer, data_length); memcpy ((void *) &(NAS_DL_EMM_RAW_MSG(message_p).data), buffer, data_length);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
message_p = NULL;
}
if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE) /* Create and send the plain message */
if (message_type == 0)
{ {
message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_EMM_PLAIN_MSG : NAS_UL_EMM_PLAIN_MSG); message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_plain);
NAS_DL_EMM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.emm.header.message_type, emm_message_ids, sizeof(emm_message_ids) / sizeof(emm_message_ids[0])); NAS_DL_EMM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.emm.header.message_type, emm_message_ids, sizeof(emm_message_ids) / sizeof(emm_message_ids[0]));
memcpy ((void *) &(NAS_DL_EMM_PLAIN_MSG(message_p).choice), &msg->plain.emm, sizeof (EMM_msg)); memcpy ((void *) &(NAS_DL_EMM_PLAIN_MSG(message_p).choice), &msg->plain.emm, sizeof (EMM_msg));
} }
else { else {
if (msg->header.protocol_discriminator == EPS_SESSION_MANAGEMENT_MESSAGE) message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_plain);
{
message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_ESM_PLAIN_MSG : NAS_UL_ESM_PLAIN_MSG);
NAS_DL_ESM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.esm.header.message_type, esm_message_ids, sizeof(esm_message_ids) / sizeof(esm_message_ids[0])); NAS_DL_ESM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.esm.header.message_type, esm_message_ids, sizeof(esm_message_ids) / sizeof(esm_message_ids[0]));
memcpy ((void *) &(NAS_DL_ESM_PLAIN_MSG(message_p).choice), &msg->plain.emm, sizeof (ESM_msg)); memcpy ((void *) &(NAS_DL_ESM_PLAIN_MSG(message_p).choice), &msg->plain.esm, sizeof (ESM_msg));
}
} }
if (message_p != NULL) {
return itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); return itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
} }
...@@ -158,19 +175,7 @@ int nas_itti_plain_msg(const char* buffer, const nas_message_t* msg, const int l ...@@ -158,19 +175,7 @@ int nas_itti_plain_msg(const char* buffer, const nas_message_t* msg, const int l
int nas_itti_protected_msg(const char* buffer, const nas_message_t* msg, const int length, const int down_link) int nas_itti_protected_msg(const char* buffer, const nas_message_t* msg, const int length, const int down_link)
{ {
MessageDef *message_p; MessageDef *message_p = NULL;
int data_length = length < NAS_DATA_LENGHT_MAX ? length : NAS_DATA_LENGHT_MAX;
{
message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_RAW_MSG : NAS_UL_RAW_MSG);
NAS_DL_RAW_MSG(message_p).lenght = length;
memset ((void *) &(NAS_DL_RAW_MSG(message_p).data), 0, NAS_DATA_LENGHT_MAX);
memcpy ((void *) &(NAS_DL_RAW_MSG(message_p).data), buffer, data_length);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
message_p = NULL;
}
if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE) if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE)
{ {
......
...@@ -8,14 +8,17 @@ ...@@ -8,14 +8,17 @@
#if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_LOGGING) #if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_LOGGING)
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages for NAS logging // Messages for NAS logging
MESSAGE_DEF(NAS_DL_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_raw_msg) MESSAGE_DEF(NAS_DL_EMM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_emm_raw_msg)
MESSAGE_DEF(NAS_UL_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_raw_msg) MESSAGE_DEF(NAS_UL_EMM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_emm_raw_msg)
MESSAGE_DEF(NAS_DL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_dl_emm_plain_msg) MESSAGE_DEF(NAS_DL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_dl_emm_plain_msg)
MESSAGE_DEF(NAS_UL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_ul_emm_plain_msg) MESSAGE_DEF(NAS_UL_EMM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_emm_plain_msg_t, nas_ul_emm_plain_msg)
MESSAGE_DEF(NAS_DL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_dl_emm_protected_msg) MESSAGE_DEF(NAS_DL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_dl_emm_protected_msg)
MESSAGE_DEF(NAS_UL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_ul_emm_protected_msg) MESSAGE_DEF(NAS_UL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_ul_emm_protected_msg)
MESSAGE_DEF(NAS_DL_ESM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_dl_esm_raw_msg)
MESSAGE_DEF(NAS_UL_ESM_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_esm_raw_msg)
MESSAGE_DEF(NAS_DL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_dl_esm_plain_msg) MESSAGE_DEF(NAS_DL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_dl_esm_plain_msg)
MESSAGE_DEF(NAS_UL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_ul_esm_plain_msg) MESSAGE_DEF(NAS_UL_ESM_PLAIN_MSG, MESSAGE_PRIORITY_MED, nas_esm_plain_msg_t, nas_ul_esm_plain_msg)
MESSAGE_DEF(NAS_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_dl_esm_protected_msg) MESSAGE_DEF(NAS_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_dl_esm_protected_msg)
......
...@@ -14,14 +14,17 @@ ...@@ -14,14 +14,17 @@
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Defines to access message fields. // Defines to access message fields.
#define NAS_DL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_raw_msg #define NAS_DL_EMM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_raw_msg
#define NAS_UL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_raw_msg #define NAS_UL_EMM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_raw_msg
#define NAS_DL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_protected_msg #define NAS_DL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_protected_msg
#define NAS_UL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_protected_msg #define NAS_UL_EMM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_protected_msg
#define NAS_DL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_plain_msg #define NAS_DL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_emm_plain_msg
#define NAS_UL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_plain_msg #define NAS_UL_EMM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_emm_plain_msg
#define NAS_DL_ESM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_raw_msg
#define NAS_UL_ESM_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_raw_msg
#define NAS_DL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_protected_msg #define NAS_DL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_protected_msg
#define NAS_UL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_protected_msg #define NAS_UL_ESM_PROTECTED_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_protected_msg
#define NAS_DL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_plain_msg #define NAS_DL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_plain_msg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment