compilation OK for UE+eNB virtualized
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5318 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -10,7 +10,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#if 0
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SECURITY_TYPES_H_
|
#ifndef SECURITY_TYPES_H_
|
||||||
#define SECURITY_TYPES_H_
|
#define SECURITY_TYPES_H_
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ int lowerlayer_data_ind(unsigned int ueid, const OctetString *data)
|
|||||||
esm_sap_t esm_sap;
|
esm_sap_t esm_sap;
|
||||||
int rc;
|
int rc;
|
||||||
#if defined(NAS_MME)
|
#if defined(NAS_MME)
|
||||||
emm_data_context_t *emm_ctx;
|
emm_data_context_t *emm_ctx = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_FUNC_IN;
|
LOG_FUNC_IN;
|
||||||
|
|||||||
+3
-3
@@ -11,8 +11,8 @@
|
|||||||
#include "ImeisvRequest.h"
|
#include "ImeisvRequest.h"
|
||||||
#include "Nonce.h"
|
#include "Nonce.h"
|
||||||
|
|
||||||
#ifndef SECURITY_MODE_COMMAND_H_
|
#ifndef NAS_SECURITY_MODE_COMMAND_H_
|
||||||
#define SECURITY_MODE_COMMAND_H_
|
#define NAS_SECURITY_MODE_COMMAND_H_
|
||||||
|
|
||||||
/* Minimum length macro. Formed by minimum length of each mandatory field */
|
/* Minimum length macro. Formed by minimum length of each mandatory field */
|
||||||
#define SECURITY_MODE_COMMAND_MINIMUM_LENGTH ( \
|
#define SECURITY_MODE_COMMAND_MINIMUM_LENGTH ( \
|
||||||
@@ -68,5 +68,5 @@ int decode_security_mode_command(security_mode_command_msg *securitymodecommand,
|
|||||||
|
|
||||||
int encode_security_mode_command(security_mode_command_msg *securitymodecommand, uint8_t *buffer, uint32_t len);
|
int encode_security_mode_command(security_mode_command_msg *securitymodecommand, uint8_t *buffer, uint32_t len);
|
||||||
|
|
||||||
#endif /* ! defined(SECURITY_MODE_COMMAND_H_) */
|
#endif /* ! defined(NAS_SECURITY_MODE_COMMAND_H_) */
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "TLVEncoder.h"
|
#include "TLVEncoder.h"
|
||||||
#include "TLVDecoder.h"
|
#include "TLVDecoder.h"
|
||||||
#include "SecurityModeCommand.h"
|
#include "NASSecurityModeCommand.h"
|
||||||
|
|
||||||
int decode_security_mode_command(security_mode_command_msg *security_mode_command, uint8_t *buffer, uint32_t len)
|
int decode_security_mode_command(security_mode_command_msg *security_mode_command, uint8_t *buffer, uint32_t len)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "TLVEncoder.h"
|
#include "TLVEncoder.h"
|
||||||
#include "TLVDecoder.h"
|
#include "TLVDecoder.h"
|
||||||
#include "SecurityModeComplete.h"
|
#include "NASSecurityModeComplete.h"
|
||||||
|
|
||||||
int decode_security_mode_complete(security_mode_complete_msg *security_mode_complete, uint8_t *buffer, uint32_t len)
|
int decode_security_mode_complete(security_mode_complete_msg *security_mode_complete, uint8_t *buffer, uint32_t len)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ Description Defines EPS Mobility Management messages and functions used
|
|||||||
#include "AuthenticationFailure.h"
|
#include "AuthenticationFailure.h"
|
||||||
#include "IdentityRequest.h"
|
#include "IdentityRequest.h"
|
||||||
#include "IdentityResponse.h"
|
#include "IdentityResponse.h"
|
||||||
#include "SecurityModeCommand.h"
|
#include "NASSecurityModeCommand.h"
|
||||||
#include "SecurityModeComplete.h"
|
#include "NASSecurityModeComplete.h"
|
||||||
#include "SecurityModeReject.h"
|
#include "SecurityModeReject.h"
|
||||||
#include "EmmStatus.h"
|
#include "EmmStatus.h"
|
||||||
#include "EmmInformation.h"
|
#include "EmmInformation.h"
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Description Defines the EMMAS Service Access Point that provides
|
|||||||
#include "emm_as.h"
|
#include "emm_as.h"
|
||||||
#include "emm_recv.h"
|
#include "emm_recv.h"
|
||||||
#include "emm_send.h"
|
#include "emm_send.h"
|
||||||
|
#include "emmData.h"
|
||||||
#include "commonDef.h"
|
#include "commonDef.h"
|
||||||
#include "nas_log.h"
|
#include "nas_log.h"
|
||||||
|
|
||||||
@@ -321,8 +322,11 @@ static int _emm_as_recv(unsigned int ueid, const char *msg, int len,
|
|||||||
nas_message_t nas_msg;
|
nas_message_t nas_msg;
|
||||||
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
||||||
|
|
||||||
emm_data_context_t *emm_ctx = NULL;
|
|
||||||
emm_security_context_t *security = NULL; /* Current EPS NAS security context */
|
emm_security_context_t *security = NULL; /* Current EPS NAS security context */
|
||||||
|
#if defined(NAS_MME)
|
||||||
|
#if defined(EPC_BUILD)
|
||||||
|
emm_data_context_t *emm_ctx = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(EPC_BUILD)
|
#if defined(EPC_BUILD)
|
||||||
emm_ctx = emm_data_context_get(&_emm_data, ueid);
|
emm_ctx = emm_data_context_get(&_emm_data, ueid);
|
||||||
@@ -332,7 +336,13 @@ static int _emm_as_recv(unsigned int ueid, const char *msg, int len,
|
|||||||
#else
|
#else
|
||||||
if (ueid < EMM_DATA_NB_UE_MAX) {
|
if (ueid < EMM_DATA_NB_UE_MAX) {
|
||||||
emm_ctx = _emm_data.ctx[ueid];
|
emm_ctx = _emm_data.ctx[ueid];
|
||||||
|
if (emm_ctx) {
|
||||||
|
security = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#else /* NAS_MME */
|
||||||
|
security = _emm_data.security;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Decode the received message */
|
/* Decode the received message */
|
||||||
@@ -494,11 +504,12 @@ static int _emm_as_data_ind(const emm_as_data_t *msg, int *emm_cause)
|
|||||||
char *plain_msg = (char *)malloc(msg->NASmsg.length);
|
char *plain_msg = (char *)malloc(msg->NASmsg.length);
|
||||||
if (plain_msg) {
|
if (plain_msg) {
|
||||||
nas_message_security_header_t header;
|
nas_message_security_header_t header;
|
||||||
emm_data_context_t *emm_ctx = NULL;
|
|
||||||
emm_security_context_t *security = NULL; /* Current EPS NAS security context */
|
emm_security_context_t *security = NULL; /* Current EPS NAS security context */
|
||||||
|
|
||||||
memset(&header, 0, sizeof(header));
|
memset(&header, 0, sizeof(header));
|
||||||
/* Decrypt the received security protected message */
|
/* Decrypt the received security protected message */
|
||||||
|
#if defined(NAS_MME)
|
||||||
|
emm_data_context_t *emm_ctx = NULL;
|
||||||
#if defined(EPC_BUILD)
|
#if defined(EPC_BUILD)
|
||||||
if (msg->ueid > 0) {
|
if (msg->ueid > 0) {
|
||||||
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
||||||
@@ -513,6 +524,9 @@ static int _emm_as_data_ind(const emm_as_data_t *msg, int *emm_cause)
|
|||||||
security = emm_ctx->security;
|
security = emm_ctx->security;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
security = _emm_data.security;
|
||||||
#endif
|
#endif
|
||||||
int bytes = nas_message_decrypt((char *)(msg->NASmsg.value),
|
int bytes = nas_message_decrypt((char *)(msg->NASmsg.value),
|
||||||
plain_msg,
|
plain_msg,
|
||||||
@@ -590,8 +604,11 @@ static int _emm_as_establish_cnf(const emm_as_establish_t *msg,
|
|||||||
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
||||||
|
|
||||||
/* Decode initial NAS message */
|
/* Decode initial NAS message */
|
||||||
decoder_rc = nas_message_decode((char *)(msg->NASmsg.value), &nas_msg,
|
decoder_rc = nas_message_decode((char *)(msg->NASmsg.value),
|
||||||
msg->NASmsg.length);
|
&nas_msg,
|
||||||
|
msg->NASmsg.length,
|
||||||
|
_emm_data.security);
|
||||||
|
|
||||||
if (decoder_rc < 0) {
|
if (decoder_rc < 0) {
|
||||||
LOG_TRACE(WARNING, "EMMAS-SAP - Failed to decode initial NAS message"
|
LOG_TRACE(WARNING, "EMMAS-SAP - Failed to decode initial NAS message"
|
||||||
"(err=%d)", decoder_rc);
|
"(err=%d)", decoder_rc);
|
||||||
@@ -756,6 +773,7 @@ static int _emm_as_establish_req(const emm_as_establish_t *msg, int *emm_cause)
|
|||||||
nas_message_t nas_msg;
|
nas_message_t nas_msg;
|
||||||
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
memset(&nas_msg, 0 , sizeof(nas_message_t));
|
||||||
|
|
||||||
|
#if defined(NAS_MME)
|
||||||
#if defined(EPC_BUILD)
|
#if defined(EPC_BUILD)
|
||||||
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
||||||
#else
|
#else
|
||||||
@@ -766,6 +784,10 @@ static int _emm_as_establish_req(const emm_as_establish_t *msg, int *emm_cause)
|
|||||||
if (emm_ctx) {
|
if (emm_ctx) {
|
||||||
emm_security_context = emm_ctx->security;
|
emm_security_context = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
#else /* NAS_MME */
|
||||||
|
security = _emm_data.security;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Decode initial NAS message */
|
/* Decode initial NAS message */
|
||||||
decoder_rc = nas_message_decode(
|
decoder_rc = nas_message_decode(
|
||||||
@@ -1353,8 +1375,9 @@ static int _emm_as_data_req(const emm_as_data_t *msg,
|
|||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
int bytes;
|
int bytes;
|
||||||
struct emm_data_context_s *emm_ctx = NULL;
|
|
||||||
emm_security_context_t *emm_security_context = NULL;
|
emm_security_context_t *emm_security_context = NULL;
|
||||||
|
#if defined(NAS_MME)
|
||||||
|
struct emm_data_context_s *emm_ctx = NULL;
|
||||||
#if defined(EPC_BUILD)
|
#if defined(EPC_BUILD)
|
||||||
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
||||||
#else
|
#else
|
||||||
@@ -1365,6 +1388,9 @@ static int _emm_as_data_req(const emm_as_data_t *msg,
|
|||||||
if (emm_ctx) {
|
if (emm_ctx) {
|
||||||
emm_security_context = emm_ctx->security;
|
emm_security_context = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
emm_security_context = _emm_data.security;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!is_encoded) {
|
if (!is_encoded) {
|
||||||
/* Encode the NAS information message */
|
/* Encode the NAS information message */
|
||||||
@@ -1438,8 +1464,9 @@ static int _emm_as_status_ind(const emm_as_status_t *msg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
struct emm_data_context_s *emm_ctx = NULL;
|
|
||||||
emm_security_context_t *emm_security_context = NULL;
|
emm_security_context_t *emm_security_context = NULL;
|
||||||
|
#if defined(NAS_MME)
|
||||||
|
struct emm_data_context_s *emm_ctx = NULL;
|
||||||
#if defined(EPC_BUILD)
|
#if defined(EPC_BUILD)
|
||||||
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
emm_ctx = emm_data_context_get(&_emm_data, msg->ueid);
|
||||||
#else
|
#else
|
||||||
@@ -1450,6 +1477,9 @@ static int _emm_as_status_ind(const emm_as_status_t *msg,
|
|||||||
if (emm_ctx) {
|
if (emm_ctx) {
|
||||||
emm_security_context = emm_ctx->security;
|
emm_security_context = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
emm_security_context = _emm_data.security;
|
||||||
|
#endif
|
||||||
/* Encode the NAS information message */
|
/* Encode the NAS information message */
|
||||||
int bytes = _emm_as_encode(
|
int bytes = _emm_as_encode(
|
||||||
&as_msg->nasMsg,
|
&as_msg->nasMsg,
|
||||||
@@ -1587,7 +1617,11 @@ static int _emm_as_security_res(const emm_as_security_t *msg,
|
|||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
/* Encode the NAS security message */
|
/* Encode the NAS security message */
|
||||||
int bytes = _emm_as_encode(&as_msg->nasMsg, &nas_msg, size);
|
int bytes = _emm_as_encode(&as_msg->nasMsg,
|
||||||
|
&nas_msg,
|
||||||
|
size,
|
||||||
|
_emm_data.security);
|
||||||
|
|
||||||
if (bytes > 0) {
|
if (bytes > 0) {
|
||||||
LOG_FUNC_RETURN (AS_UL_INFO_TRANSFER_REQ);
|
LOG_FUNC_RETURN (AS_UL_INFO_TRANSFER_REQ);
|
||||||
}
|
}
|
||||||
@@ -1673,7 +1707,12 @@ static int _emm_as_establish_req(const emm_as_establish_t *msg,
|
|||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
/* Encode the initial NAS information message */
|
/* Encode the initial NAS information message */
|
||||||
int bytes = _emm_as_encode(&as_msg->initialNasMsg, &nas_msg, size);
|
int bytes = _emm_as_encode(
|
||||||
|
&as_msg->initialNasMsg,
|
||||||
|
&nas_msg,
|
||||||
|
size,
|
||||||
|
_emm_data.security);
|
||||||
|
|
||||||
if (bytes > 0) {
|
if (bytes > 0) {
|
||||||
LOG_FUNC_RETURN (AS_NAS_ESTABLISH_REQ);
|
LOG_FUNC_RETURN (AS_NAS_ESTABLISH_REQ);
|
||||||
}
|
}
|
||||||
@@ -1757,6 +1796,7 @@ static int _emm_as_security_req(const emm_as_security_t *msg,
|
|||||||
if (emm_ctx) {
|
if (emm_ctx) {
|
||||||
emm_security_context = emm_ctx->security;
|
emm_security_context = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encode the NAS security message */
|
/* Encode the NAS security message */
|
||||||
int bytes = _emm_as_encode(
|
int bytes = _emm_as_encode(
|
||||||
&as_msg->nasMsg,
|
&as_msg->nasMsg,
|
||||||
@@ -1835,6 +1875,7 @@ static int _emm_as_security_rej(const emm_as_security_t *msg,
|
|||||||
if (emm_ctx) {
|
if (emm_ctx) {
|
||||||
emm_security_context = emm_ctx->security;
|
emm_security_context = emm_ctx->security;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encode the NAS security message */
|
/* Encode the NAS security message */
|
||||||
int bytes = _emm_as_encode(
|
int bytes = _emm_as_encode(
|
||||||
&as_msg->nasMsg,
|
&as_msg->nasMsg,
|
||||||
@@ -1926,6 +1967,7 @@ static int _emm_as_establish_cnf(const emm_as_establish_t *msg,
|
|||||||
as_msg->nas_ul_count);
|
as_msg->nas_ul_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encode the initial NAS information message */
|
/* Encode the initial NAS information message */
|
||||||
int bytes = _emm_as_encode(
|
int bytes = _emm_as_encode(
|
||||||
&as_msg->nasMsg,
|
&as_msg->nasMsg,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Description Defines functions executed at the EMMAS Service Access
|
|||||||
#include "AuthenticationRequest.h"
|
#include "AuthenticationRequest.h"
|
||||||
#include "AuthenticationReject.h"
|
#include "AuthenticationReject.h"
|
||||||
#include "IdentityRequest.h"
|
#include "IdentityRequest.h"
|
||||||
#include "SecurityModeCommand.h"
|
#include "NASSecurityModeCommand.h"
|
||||||
#include "EmmInformation.h"
|
#include "EmmInformation.h"
|
||||||
#include "DownlinkNasTransport.h"
|
#include "DownlinkNasTransport.h"
|
||||||
#include "CsServiceNotification.h"
|
#include "CsServiceNotification.h"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Description Defines functions executed at the EMMAS Service Access
|
|||||||
#include "AuthenticationResponse.h"
|
#include "AuthenticationResponse.h"
|
||||||
#include "AuthenticationFailure.h"
|
#include "AuthenticationFailure.h"
|
||||||
#include "IdentityResponse.h"
|
#include "IdentityResponse.h"
|
||||||
#include "SecurityModeComplete.h"
|
#include "NASSecurityModeComplete.h"
|
||||||
#include "SecurityModeReject.h"
|
#include "SecurityModeReject.h"
|
||||||
#include "UplinkNasTransport.h"
|
#include "UplinkNasTransport.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -53,7 +53,7 @@ Description Defines functions executed at the EMMAS Service Access
|
|||||||
#include "AuthenticationRequest.h"
|
#include "AuthenticationRequest.h"
|
||||||
#include "AuthenticationReject.h"
|
#include "AuthenticationReject.h"
|
||||||
#include "IdentityRequest.h"
|
#include "IdentityRequest.h"
|
||||||
#include "SecurityModeCommand.h"
|
#include "NASSecurityModeCommand.h"
|
||||||
#include "EmmInformation.h"
|
#include "EmmInformation.h"
|
||||||
#include "DownlinkNasTransport.h"
|
#include "DownlinkNasTransport.h"
|
||||||
#include "CsServiceNotification.h"
|
#include "CsServiceNotification.h"
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ libnas_INCLUDES = \
|
|||||||
-I$(ESMSAPDIR) \
|
-I$(ESMSAPDIR) \
|
||||||
-I$(MMEAPIDIR) \
|
-I$(MMEAPIDIR) \
|
||||||
-I$(USIMAPIDIR) \
|
-I$(USIMAPIDIR) \
|
||||||
-I$(IESDIR)
|
-I$(IESDIR) \
|
||||||
|
-I$(SECU_DIR) \
|
||||||
|
-I$(OPENAIRCN_DIR)/COMMON \
|
||||||
|
-I$(OPENAIRCN_DIR)/UTILS
|
||||||
|
|
||||||
OUTDIR = $(UE_NAS_DIR)/ue_objs
|
OUTDIR = $(UE_NAS_DIR)/ue_objs
|
||||||
|
|
||||||
@@ -277,8 +280,8 @@ CFLAGS = \
|
|||||||
-DUE_BUILD \
|
-DUE_BUILD \
|
||||||
-Wuninitialized \
|
-Wuninitialized \
|
||||||
-Werror=implicit-function-declaration \
|
-Werror=implicit-function-declaration \
|
||||||
$(libnas_INCLUDES) \
|
$(UENAS_CFLAGS) \
|
||||||
$(UENAS_CFLAGS)
|
$(libnas_INCLUDES)
|
||||||
|
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
$(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c)
|
$(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ libnas_emm_msg_SRCS = \
|
|||||||
EURECOM-NAS/src/emm/msg/DetachRequest.c \
|
EURECOM-NAS/src/emm/msg/DetachRequest.c \
|
||||||
EURECOM-NAS/src/emm/msg/emm_msgDef.h \
|
EURECOM-NAS/src/emm/msg/emm_msgDef.h \
|
||||||
EURECOM-NAS/src/emm/msg/GutiReallocationComplete.c \
|
EURECOM-NAS/src/emm/msg/GutiReallocationComplete.c \
|
||||||
EURECOM-NAS/src/emm/msg/SecurityModeCommand.h \
|
EURECOM-NAS/src/emm/msg/NASSecurityModeCommand.h \
|
||||||
EURECOM-NAS/src/emm/msg/ServiceRequest.h \
|
EURECOM-NAS/src/emm/msg/ServiceRequest.h \
|
||||||
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.h \
|
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.h \
|
||||||
EURECOM-NAS/src/emm/msg/AttachReject.h \
|
EURECOM-NAS/src/emm/msg/AttachReject.h \
|
||||||
@@ -78,7 +78,7 @@ libnas_emm_msg_SRCS = \
|
|||||||
EURECOM-NAS/src/emm/msg/DownlinkNasTransport.c \
|
EURECOM-NAS/src/emm/msg/DownlinkNasTransport.c \
|
||||||
EURECOM-NAS/src/emm/msg/EmmStatus.c \
|
EURECOM-NAS/src/emm/msg/EmmStatus.c \
|
||||||
EURECOM-NAS/src/emm/msg/IdentityRequest.c \
|
EURECOM-NAS/src/emm/msg/IdentityRequest.c \
|
||||||
EURECOM-NAS/src/emm/msg/SecurityModeComplete.h \
|
EURECOM-NAS/src/emm/msg/NASSecurityModeComplete.h \
|
||||||
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.h \
|
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.h \
|
||||||
EURECOM-NAS/src/emm/msg/UplinkNasTransport.h \
|
EURECOM-NAS/src/emm/msg/UplinkNasTransport.h \
|
||||||
EURECOM-NAS/src/emm/msg/AttachRequest.h \
|
EURECOM-NAS/src/emm/msg/AttachRequest.h \
|
||||||
|
|||||||
@@ -1,38 +1,45 @@
|
|||||||
|
# include $(OPENAIR_TARGETS)/SIMU/USER/Makerules
|
||||||
|
|
||||||
|
OUTDIR = .
|
||||||
|
|
||||||
|
|
||||||
libsecu_OBJECTS = \
|
libsecu_OBJECTS = \
|
||||||
kdf.o \
|
kdf.o \
|
||||||
key_nas_deriver.o \
|
key_nas_deriver.o \
|
||||||
nas_stream_eea2.o \
|
nas_stream_eea2.o \
|
||||||
nas_stream_eia2.o
|
nas_stream_eia2.o
|
||||||
|
|
||||||
-include .deps/*.d
|
# pull in dependency info for *existing* .o files
|
||||||
|
-include $(OUTDIR)/*.d
|
||||||
.PHONY = depdir
|
|
||||||
|
|
||||||
CFLAGS = \
|
CFLAGS = \
|
||||||
-I../COMMON \
|
|
||||||
-I../UTILS \
|
|
||||||
-DENB_MODE \
|
|
||||||
-DENABLE_USE_MME \
|
|
||||||
-DUSER_MODE \
|
|
||||||
-O2 \
|
|
||||||
-g \
|
|
||||||
-Wall \
|
-Wall \
|
||||||
|
$(SECU_CFLAGS) \
|
||||||
|
-DENB_MODE \
|
||||||
|
-Werror=uninitialized \
|
||||||
-Werror=implicit-function-declaration
|
-Werror=implicit-function-declaration
|
||||||
|
|
||||||
$(libsecu_OBJECTS): %.o : %.c
|
$(OUTDIR)/%.o : %.c
|
||||||
$(CC) -c $(CFLAGS) -o $@ $<
|
@echo "Compiling $<"
|
||||||
@if ! test -d ".deps/" ; then mkdir -p .deps; fi
|
@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
|
||||||
@$(CC) -MM $(CFLAGS) $*.c > .deps/$*.d
|
@$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
@mv -f .deps/$*.d .deps/$*.d.tmp
|
@$(CC) -MM $(CFLAGS) $< > $(basename $@).d
|
||||||
@sed -e 's|.*:|$*.o:|' < .deps/$*.d.tmp > .deps/$*.d
|
@mv -f $(basename $@).d $(basename $@).d.tmp
|
||||||
@sed -e 's/.*://' -e 's/\\$$//' < .deps/$*.d.tmp | fmt -1 | \
|
@sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d
|
||||||
sed -e 's/^ *//' -e 's/$$/:/' >> .deps/$*.d
|
@sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \
|
||||||
@rm -f .deps/$*.d.tmp
|
sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
|
||||||
|
@rm -f $(basename $@).d.tmp
|
||||||
|
|
||||||
libsecu.a: $(libsecu_OBJECTS)
|
objsdir:
|
||||||
$(AR) rcvs $@ $(libsecu_OBJECTS)
|
@if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi;
|
||||||
|
|
||||||
|
$(OUTDIR)/libsecu.a: $(addprefix $(OUTDIR)/,$(libsecu_OBJECTS))
|
||||||
|
@echo Creating SECU archive
|
||||||
|
@$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libsecu_OBJECTS))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(libsecu_OBJECTS)
|
@$(RM_F_V) $(OUTDIR)/*.o
|
||||||
rm -rf .deps/
|
@$(RM_F_V) $(OUTDIR)/*.d
|
||||||
rm -f libsecu.a
|
@$(RM_F_V) $(OUTDIR)/libsecu.a
|
||||||
|
|
||||||
|
cleanall: clean
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#include "security_types.h"
|
|
||||||
|
|
||||||
#ifndef SECU_DEFS_H_
|
#ifndef SECU_DEFS_H_
|
||||||
#define SECU_DEFS_H_
|
#define SECU_DEFS_H_
|
||||||
|
|
||||||
|
#include "security_types.h"
|
||||||
|
|
||||||
#define EIA0_ALG_ID 0x00
|
#define EIA0_ALG_ID 0x00
|
||||||
#define EIA1_128_ALG_ID 0x01
|
#define EIA1_128_ALG_ID 0x01
|
||||||
#define EIA2_128_ALG_ID 0x02
|
#define EIA2_128_ALG_ID 0x02
|
||||||
|
|||||||
+23
-10
@@ -6,9 +6,10 @@ X2AP_DIR = $(OPENAIR_HOME)/openair2/X2AP
|
|||||||
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
|
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
|
||||||
UDP_DIR = $(OPENAIR_HOME)/openair-cn/UDP
|
UDP_DIR = $(OPENAIR_HOME)/openair-cn/UDP
|
||||||
GTPV1U_DIR = $(OPENAIR_HOME)/openair-cn/GTPV1-U
|
GTPV1U_DIR = $(OPENAIR_HOME)/openair-cn/GTPV1-U
|
||||||
CN_SECU_DIR = $(OPENAIR_HOME)/openair-cn/SECU
|
SECU_DIR = $(OPENAIR_HOME)/openair-cn/SECU
|
||||||
|
|
||||||
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
|
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
|
||||||
|
SECU_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SECU_DIR))
|
||||||
S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR))
|
S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR))
|
||||||
X2AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(X2AP_DIR))
|
X2AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(X2AP_DIR))
|
||||||
SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
|
SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
|
||||||
@@ -22,7 +23,7 @@ export X2AP_DIR
|
|||||||
export SCTP_DIR
|
export SCTP_DIR
|
||||||
export UDP_DIR
|
export UDP_DIR
|
||||||
export GTPV1U_DIR
|
export GTPV1U_DIR
|
||||||
export CN_SECU_DIR
|
export SECU_DIR
|
||||||
|
|
||||||
#Export common cflags (between softmodem and oaisim)
|
#Export common cflags (between softmodem and oaisim)
|
||||||
COMMON_CFLAGS = \
|
COMMON_CFLAGS = \
|
||||||
@@ -62,12 +63,12 @@ SHARED_DEPENDENCIES += $(ITTI_MESSAGES_H)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef USE_MME
|
ifdef USE_MME
|
||||||
#LGLIBS += $(UE_NAS_OBJ_DIR)/libuenas.a $(X2AP_OBJ_DIR)/libx2ap.a
|
#LGLIBS += $(X2AP_OBJ_DIR)/libx2ap.a
|
||||||
LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a
|
LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a $(SECU_OBJ_DIR)/libsecu.a
|
||||||
LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt
|
LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt
|
||||||
LIBS += $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
LIBS += $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
||||||
#LG SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(X2AP_OBJ_DIR)/libx2ap.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
#LG SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(SECU_OBJ_DIR)/libsecu.a $(X2AP_OBJ_DIR)/libx2ap.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
||||||
SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(SECU_OBJ_DIR)/libsecu.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
|
||||||
|
|
||||||
COMMON_CFLAGS += -DLOG_NO_THREAD
|
COMMON_CFLAGS += -DLOG_NO_THREAD
|
||||||
#-DEMIT_ASN_DEBUG
|
#-DEMIT_ASN_DEBUG
|
||||||
@@ -84,12 +85,17 @@ COMMON_CFLAGS += -I$(OPENAIR_HOME)/openair-cn/NAS/EURECOM-NAS/src/util
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
UENAS_CFLAGS = $(COMMON_CFLAGS)
|
UENAS_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
UENAS_CFLAGS += -I$(SECU_DIR)
|
||||||
export UENAS_CFLAGS
|
export UENAS_CFLAGS
|
||||||
|
|
||||||
$(UE_NAS_OBJ_DIR)/libuenas.a: force_look
|
SECU_CFLAGS = $(COMMON_CFLAGS)
|
||||||
@$(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE $(UE_NAS_OBJ_DIR)/libuenas.a OUTDIR=$(UE_NAS_OBJ_DIR)
|
SECU_CFLAGS += -I$(OPENAIR_HOME)/openair-cn/COMMON
|
||||||
|
SECU_CFLAGS += -I$(OPENAIR_HOME)/openair-cn/UTILS
|
||||||
|
SECU_CFLAGS += -I$(SECU_DIR)
|
||||||
|
export SECU_CFLAGS
|
||||||
|
|
||||||
COMMON_MME_CFLAGS = -I$(SCTP_DIR)
|
COMMON_MME_CFLAGS = -I$(SECU_DIR)
|
||||||
|
COMMON_MME_CFLAGS += -I$(SCTP_DIR)
|
||||||
COMMON_MME_CFLAGS += -I$(X2AP_DIR)
|
COMMON_MME_CFLAGS += -I$(X2AP_DIR)
|
||||||
COMMON_MME_CFLAGS += -I$(S1AP_DIR)
|
COMMON_MME_CFLAGS += -I$(S1AP_DIR)
|
||||||
COMMON_MME_CFLAGS += -I$(UDP_DIR)
|
COMMON_MME_CFLAGS += -I$(UDP_DIR)
|
||||||
@@ -137,6 +143,11 @@ GTPV1U_ENB_CFLAGS += -I$(OPENAIR_HOME)/openair2/ENB_APP
|
|||||||
GTPV1U_ENB_CFLAGS += $(UTIL_incl) -I$(OPENAIRCN_DIR)/UTILS
|
GTPV1U_ENB_CFLAGS += $(UTIL_incl) -I$(OPENAIRCN_DIR)/UTILS
|
||||||
export GTPV1U_ENB_CFLAGS
|
export GTPV1U_ENB_CFLAGS
|
||||||
|
|
||||||
|
|
||||||
|
$(UE_NAS_OBJ_DIR)/libuenas.a: force_look
|
||||||
|
@$(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE $(UE_NAS_OBJ_DIR)/libuenas.a OUTDIR=$(UE_NAS_OBJ_DIR)
|
||||||
|
$(SECU_OBJ_DIR)/libsecu.a: force_look
|
||||||
|
@$(MAKE) -C $(SECU_DIR) -f Makefile.eNB $(SECU_OBJ_DIR)/libsecu.a OUTDIR=$(SECU_OBJ_DIR)
|
||||||
$(X2AP_OBJ_DIR)/libx2ap.a: force_look
|
$(X2AP_OBJ_DIR)/libx2ap.a: force_look
|
||||||
@$(MAKE) -C $(X2AP_DIR) -f Makefile.inc $(X2AP_OBJ_DIR)/libx2ap.a OUTDIR=$(X2AP_OBJ_DIR)
|
@$(MAKE) -C $(X2AP_DIR) -f Makefile.inc $(X2AP_OBJ_DIR)/libx2ap.a OUTDIR=$(X2AP_OBJ_DIR)
|
||||||
$(S1AP_OBJ_DIR)/libs1ap.a: force_look
|
$(S1AP_OBJ_DIR)/libs1ap.a: force_look
|
||||||
@@ -148,7 +159,7 @@ $(UDP_OBJ_DIR)/libudp.a: force_look
|
|||||||
$(GTPV1U_OBJ_DIR)/libgtpv1u.a: force_look
|
$(GTPV1U_OBJ_DIR)/libgtpv1u.a: force_look
|
||||||
@$(MAKE) -C $(GTPV1U_DIR) -f Makefile.eNB $(GTPV1U_OBJ_DIR)/libgtpv1u.a OUTDIR=$(GTPV1U_OBJ_DIR)
|
@$(MAKE) -C $(GTPV1U_DIR) -f Makefile.eNB $(GTPV1U_OBJ_DIR)/libgtpv1u.a OUTDIR=$(GTPV1U_OBJ_DIR)
|
||||||
|
|
||||||
OBJ = $(NAS_UE_OBJS)
|
OBJ = $(NAS_UE_OBJS) $(SECU_OBJS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export COMMON_CFLAGS
|
export COMMON_CFLAGS
|
||||||
@@ -188,6 +199,7 @@ common-clean:
|
|||||||
@$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d)
|
@$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d)
|
||||||
@$(MAKE) -C $(LFDS_DIR) -f makefile.linux clean OUTDIR=$(LFDS_OBJ_DIR)
|
@$(MAKE) -C $(LFDS_DIR) -f makefile.linux clean OUTDIR=$(LFDS_OBJ_DIR)
|
||||||
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE clean OUTDIR=$(UE_NAS_OBJ_DIR); fi
|
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE clean OUTDIR=$(UE_NAS_OBJ_DIR); fi
|
||||||
|
@if [ -d $(SECU_OBJ_DIR) ]; then $(MAKE) -C $(SECU_DIR) -f Makefile.eNB clean OUTDIR=$(SECU_OBJ_DIR); fi
|
||||||
@if [ -d $(X2AP_OBJ_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc clean OUTDIR=$(X2AP_OBJ_DIR); fi
|
@if [ -d $(X2AP_OBJ_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc clean OUTDIR=$(X2AP_OBJ_DIR); fi
|
||||||
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB clean OUTDIR=$(S1AP_OBJ_DIR); fi
|
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB clean OUTDIR=$(S1AP_OBJ_DIR); fi
|
||||||
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB clean OUTDIR=$(SCTP_OBJ_DIR); fi
|
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB clean OUTDIR=$(SCTP_OBJ_DIR); fi
|
||||||
@@ -196,6 +208,7 @@ common-clean:
|
|||||||
|
|
||||||
common-cleanall:
|
common-cleanall:
|
||||||
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE cleanall OUTDIR=$(UE_NAS_OBJ_DIR); fi
|
@if [ -d $(UE_NAS_OBJ_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE cleanall OUTDIR=$(UE_NAS_OBJ_DIR); fi
|
||||||
|
@if [ -d $(SECU_OBJ_DIR) ]; then $(MAKE) -C $(SECU_DIR) -f Makefile.eNB cleanall OUTDIR=$(SECU_OBJ_DIR); fi
|
||||||
@if [ -d $(X2AP_OBJ_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc cleanall OUTDIR=$(X2AP_OBJ_DIR); fi
|
@if [ -d $(X2AP_OBJ_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc cleanall OUTDIR=$(X2AP_OBJ_DIR); fi
|
||||||
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi
|
@if [ -d $(S1AP_OBJ_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi
|
||||||
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
|
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
###########################################################
|
###########################################################
|
||||||
# Parameters
|
# Parameters
|
||||||
###########################################################
|
###########################################################
|
||||||
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1"
|
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 SECU=1 Rel10=1"
|
||||||
declare MAKE_IP_DRIVER_TARGET="ue_ip.ko"
|
declare MAKE_IP_DRIVER_TARGET="ue_ip.ko"
|
||||||
declare IP_DRIVER_NAME="ue_ip"
|
declare IP_DRIVER_NAME="ue_ip"
|
||||||
declare LTEIF="oip1"
|
declare LTEIF="oip1"
|
||||||
|
|||||||
Reference in New Issue
Block a user