Commit e2cf0d01 authored by winckel's avatar winckel

Added the possibility to log NAS messages in UE (ENABLE_NAS_UE_LOGGING must be...

Added the possibility to log NAS messages in UE (ENABLE_NAS_UE_LOGGING must be added in the build file and "opennair-cn" directory must be available to access NAS header files).

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4975 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f7af8d0e
......@@ -5,11 +5,12 @@
// Messages files used between tasks
#include "phy_messages_def.h"
#include "mac_messages_def.h"
#include "rlc_messages_def.h"
#include "pdcp_messages_def.h"
#include "rrc_messages_def.h"
#include "nas_messages_def.h"
#include "ral_messages_def.h"
#include "s1ap_messages_def.h"
#include "sctp_messages_def.h"
#include "x2ap_messages_def.h"
#include "ral_messages_def.h"
#include "rlc_messages_def.h"
#include "sctp_messages_def.h"
......@@ -13,12 +13,13 @@
#include "phy_messages_types.h"
#include "mac_messages_types.h"
#include "rlc_messages_types.h"
#include "pdcp_messages_types.h"
#include "rrc_messages_types.h"
#include "nas_messages_types.h"
#include "ral_messages_types.h"
#include "s1ap_messages_types.h"
#include "sctp_messages_types.h"
#include "x2ap_messages_types.h"
#include "ral_messages_types.h"
#include "rlc_messages_types.h"
#include "sctp_messages_types.h"
#endif /* MESSAGES_TYPES_H_ */
/*
* nas_messages_def.h
*
* Created on: Jan 07, 2014
* Author: winckel
*/
#if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_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_UL_RAW_MSG, MESSAGE_PRIORITY_MED, nas_raw_msg_t, nas_ul_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_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_UL_EMM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_emm_protected_msg_t, nas_ul_emm_protected_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_DL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_dl_esm_protected_msg)
MESSAGE_DEF(NAS_UL_ESM_PROTECTED_MSG, MESSAGE_PRIORITY_MED, nas_esm_protected_msg_t, nas_ul_esm_protected_msg)
//-------------------------------------------------------------------------------------------//
#endif /* ENABLE_USE_MME */
/*
* nas_messages_types.h
*
* Created on: Jan 07, 2014
* Author: winckel
*/
#ifndef NAS_MESSAGES_TYPES_H_
#define NAS_MESSAGES_TYPES_H_
# if defined(ENABLE_USE_MME) && defined(ENABLE_NAS_UE_LOGGING)
#include "nas_message.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define NAS_DL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_raw_msg
#define NAS_UL_RAW_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_raw_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_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_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_DL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_esm_plain_msg
#define NAS_UL_ESM_PLAIN_MSG(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_esm_plain_msg
//-------------------------------------------------------------------------------------------//
#define NAS_DATA_LENGHT_MAX 256
typedef enum {
EMM_MSG_HEADER = 1,
EMM_MSG_ATTACH_REQUEST,
EMM_MSG_ATTACH_ACCEPT,
EMM_MSG_ATTACH_COMPLETE,
EMM_MSG_ATTACH_REJECT,
EMM_MSG_DETACH_REQUEST,
EMM_MSG_DETACH_ACCEPT,
EMM_MSG_TRACKING_AREA_UPDATE_REQUEST,
EMM_MSG_TRACKING_AREA_UPDATE_ACCEPT,
EMM_MSG_TRACKING_AREA_UPDATE_COMPLETE,
EMM_MSG_TRACKING_AREA_UPDATE_REJECT,
EMM_MSG_EXTENDED_SERVICE_REQUEST,
EMM_MSG_SERVICE_REQUEST,
EMM_MSG_SERVICE_REJECT,
EMM_MSG_GUTI_REALLOCATION_COMMAND,
EMM_MSG_GUTI_REALLOCATION_COMPLETE,
EMM_MSG_AUTHENTICATION_REQUEST,
EMM_MSG_AUTHENTICATION_RESPONSE,
EMM_MSG_AUTHENTICATION_REJECT,
EMM_MSG_AUTHENTICATION_FAILURE,
EMM_MSG_IDENTITY_REQUEST,
EMM_MSG_IDENTITY_RESPONSE,
EMM_MSG_SECURITY_MODE_COMMAND,
EMM_MSG_SECURITY_MODE_COMPLETE,
EMM_MSG_SECURITY_MODE_REJECT,
EMM_MSG_EMM_STATUS,
EMM_MSG_EMM_INFORMATION,
EMM_MSG_DOWNLINK_NAS_TRANSPORT,
EMM_MSG_UPLINK_NAS_TRANSPORT,
EMM_MSG_CS_SERVICE_NOTIFICATION,
} emm_message_ids_t;
typedef enum {
ESM_MSG_HEADER = 1,
ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST,
ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT,
ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT,
ESM_MSG_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST,
ESM_MSG_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT,
ESM_MSG_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT,
ESM_MSG_MODIFY_EPS_BEARER_CONTEXT_REQUEST,
ESM_MSG_MODIFY_EPS_BEARER_CONTEXT_ACCEPT,
ESM_MSG_MODIFY_EPS_BEARER_CONTEXT_REJECT,
ESM_MSG_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST,
ESM_MSG_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT,
ESM_MSG_PDN_CONNECTIVITY_REQUEST,
ESM_MSG_PDN_CONNECTIVITY_REJECT,
ESM_MSG_PDN_DISCONNECT_REQUEST,
ESM_MSG_PDN_DISCONNECT_REJECT,
ESM_MSG_BEARER_RESOURCE_ALLOCATION_REQUEST,
ESM_MSG_BEARER_RESOURCE_ALLOCATION_REJECT,
ESM_MSG_BEARER_RESOURCE_MODIFICATION_REQUEST,
ESM_MSG_BEARER_RESOURCE_MODIFICATION_REJECT,
ESM_MSG_ESM_INFORMATION_REQUEST,
ESM_MSG_ESM_INFORMATION_RESPONSE,
ESM_MSG_ESM_STATUS,
} esm_message_ids_t;
typedef struct nas_raw_msg_s {
uint32_t lenght;
uint8_t data[NAS_DATA_LENGHT_MAX];
} nas_raw_msg_t;
typedef struct nas_emm_plain_msg_s {
emm_message_ids_t present;
EMM_msg choice;
} nas_emm_plain_msg_t;
typedef struct nas_emm_protected_msg_s {
nas_message_security_header_t header;
emm_message_ids_t present;
EMM_msg choice;
} nas_emm_protected_msg_t;
typedef struct nas_esm_plain_msg_s {
esm_message_ids_t present;
ESM_msg choice;
} nas_esm_plain_msg_t;
typedef struct nas_esm_protected_msg_s {
nas_message_security_header_t header;
esm_message_ids_t present;
ESM_msg choice;
} nas_esm_protected_msg_t;
# endif /* ENABLE_USE_MME */
#endif /* NAS_MESSAGES_TYPES_H_ */
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