Commit 0341ca40 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5440 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 35d6bc81
...@@ -8,6 +8,9 @@ include Makefile.inc ...@@ -8,6 +8,9 @@ include Makefile.inc
export PROJDIR = $(CURDIR) export PROJDIR = $(CURDIR)
all: all:
ifeq ($(PROCESS), UE)
@$(CD) $(SECUDIR) && $(MAKE)
endif
@$(CD) $(UTILDIR) && $(MAKE) @$(CD) $(UTILDIR) && $(MAKE)
@$(CD) $(APIDIR) && $(MAKE) @$(CD) $(APIDIR) && $(MAKE)
@$(CD) $(IESDIR) && $(MAKE) @$(CD) $(IESDIR) && $(MAKE)
...@@ -23,7 +26,7 @@ ifeq ($(PROCESS), MME) ...@@ -23,7 +26,7 @@ ifeq ($(PROCESS), MME)
@$(CD) $(ASSIMUDIR) && $(MAKE) @$(CD) $(ASSIMUDIR) && $(MAKE)
endif endif
# SR include all objects in a single archive # SR include all objects in a single archive
$(AR) rcs libUE/libNasUE.a `find . -name *.o` $(AR) rcs libUE/libNasUE.a `find . -name *.o` `find $(OPENAIRCN_DIR)/SECU -name *.o`
clean: clean:
@$(CD) $(SRCDIR) && $(MAKE) $@ @$(CD) $(SRCDIR) && $(MAKE) $@
......
...@@ -13,7 +13,8 @@ LIBDIR = $(PROJDIR)/lib ...@@ -13,7 +13,8 @@ LIBDIR = $(PROJDIR)/lib
LIBPROCESS = $(LIBDIR)$(PROCESS) LIBPROCESS = $(LIBDIR)$(PROCESS)
# Source directories # Source directories
SRCDIR = $(PROJDIR)/src SECUDIR = $(OPENAIRCN_DIR)/SECU
SRCDIR = $(PROJDIR)/src
INCDIR = $(SRCDIR)/include INCDIR = $(SRCDIR)/include
UTILDIR = $(SRCDIR)/util UTILDIR = $(SRCDIR)/util
APIDIR = $(SRCDIR)/api APIDIR = $(SRCDIR)/api
......
...@@ -2,7 +2,7 @@ CC = gcc ...@@ -2,7 +2,7 @@ CC = gcc
RM = rm -f RM = rm -f
CP = cp -p CP = cp -p
LD = /usr/bin/ld LD = /usr/bin/ld
AR = /usr/bin/ar AR = /usr/bin/ar
CD = cd CD = cd
MAKE = make MAKE = make
......
...@@ -19,11 +19,11 @@ ifeq ($(TARGET), UEprocess) ...@@ -19,11 +19,11 @@ ifeq ($(TARGET), UEprocess)
SRCS = UEprocess.c nas_network.c nas_parser.c nas_proc.c nas_user.c SRCS = UEprocess.c nas_network.c nas_parser.c nas_proc.c nas_user.c
endif endif
LIBS = -lutil -lapi -lEMMmsg -lESMmsg -lEMMsap -lESMsap -lies -lrt LIBS = -lutil -lapi -lEMMmsg -lESMmsg -lEMMsap -lESMsap -lies -lrt -lnettle -lcrypto
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USERAPIDIR) -I$(NETAPIDIR) \ INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USERAPIDIR) -I$(NETAPIDIR) \
-I$(EMMDIR) -I$(EMMMSGDIR) -I$(EMMSAPDIR) \ -I$(EMMDIR) -I$(EMMMSGDIR) -I$(EMMSAPDIR) \
-I$(ESMDIR) -I$(ESMMSGDIR) -I$(ESMSAPDIR) \ -I$(ESMDIR) -I$(ESMMSGDIR) -I$(ESMSAPDIR) \
-I$(IESDIR) -I$(MMEAPIDIR) -I$(IESDIR) -I$(MMEAPIDIR)
.PHONY: $(TARGET) .PHONY: $(TARGET)
...@@ -32,7 +32,7 @@ INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USERAPIDIR) -I$(NETAPIDIR) \ ...@@ -32,7 +32,7 @@ INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USERAPIDIR) -I$(NETAPIDIR) \
@$(CC) $(CFLAGS) -c $< -o $@ @$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(EMMDIR)/*.o $(ESMDIR)/*.o $(LIBS) $(CC) $(LDFLAGS) -o $@ $^ $(EMMDIR)/*.o $(ESMDIR)/*.o $(SECUDIR)/*.o $(LIBS)
@echo Replacing $@ to $(BINDIR) @echo Replacing $@ to $(BINDIR)
@$(RM) $(BINDIR)/$@ @$(RM) $(BINDIR)/$@
@$(CP) $@ $(BINDIR) @$(CP) $@ $(BINDIR)
......
...@@ -5,7 +5,14 @@ endif ...@@ -5,7 +5,14 @@ endif
include $(PROJDIR)/Makerules include $(PROJDIR)/Makerules
include $(PROJDIR)/Makefile.inc include $(PROJDIR)/Makefile.inc
export INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR) -I$(SRCDIR) export INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) \
-I$(EMMDIR) \
-I$(ESMDIR) \
-I$(EMMMSGDIR) \
-I$(ESMMSGDIR) \
-I$(SRCDIR) \
-I$(OPENAIRCN_DIR)/COMMON \
-I$(OPENAIRCN_DIR)/SECU
TARGET = $(LIBAPI) TARGET = $(LIBAPI)
TARGETS = $(TARGET).a $(TARGET).so TARGETS = $(TARGET).a $(TARGET).so
......
ifndef PROJDIR ifndef PROJDIR
PROJDIR = $(PWD)/../../.. PROJDIR = $(PWD)/../../..
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR) INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR)
endif endif
include $(PROJDIR)/Makerules include $(PROJDIR)/Makerules
...@@ -10,7 +10,7 @@ all: $(OBJS) ...@@ -10,7 +10,7 @@ all: $(OBJS)
%.o: %.c Makefile %.o: %.c Makefile
@echo Compiling $< @echo Compiling $<
@$(CC) $(CFLAGS) -c $< -o $@ @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean: clean:
$(RM) $(OBJS) *.bak *~ $(RM) $(OBJS) *.bak *~
......
...@@ -32,6 +32,7 @@ Description Defines the layer 3 messages supported by the NAS sublayer ...@@ -32,6 +32,7 @@ Description Defines the layer 3 messages supported by the NAS sublayer
# include "nas_itti_messaging.h" # include "nas_itti_messaging.h"
#endif #endif
#include "secu_defs.h" #include "secu_defs.h"
#include "emmData.h"
/****************************************************************************/ /****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/ /**************** E X T E R N A L D E F I N I T I O N S ****************/
...@@ -895,7 +896,7 @@ static UInt32_t _nas_message_get_mac( ...@@ -895,7 +896,7 @@ static UInt32_t _nas_message_get_mac(
switch (emm_security_context->selected_algorithms.integrity) { switch (emm_security_context->selected_algorithms.integrity) {
case NAS_SECURITY_ALGORITHMS_EIA1: case NAS_SECURITY_ALGORITHMS_EIA1:
AssertFatal(0 , LOG_TRACE(ERROR,
"EIA1_128_ALG_ID not implemented"); "EIA1_128_ALG_ID not implemented");
break; break;
...@@ -942,7 +943,7 @@ static UInt32_t _nas_message_get_mac( ...@@ -942,7 +943,7 @@ static UInt32_t _nas_message_get_mac(
break; break;
default: default:
AssertFatal(0 , LOG_TRACE(ERROR,
"Unknown integrity protection algorithm %d", "Unknown integrity protection algorithm %d",
emm_security_context->selected_algorithms.integrity); emm_security_context->selected_algorithms.integrity);
} }
......
...@@ -9,7 +9,7 @@ include $(PROJDIR)/Makefile.inc ...@@ -9,7 +9,7 @@ include $(PROJDIR)/Makefile.inc
export LD_RUN_PATH = $(LIBDIR):$(LIBPROCESS) export LD_RUN_PATH = $(LIBDIR):$(LIBPROCESS)
LIBS = -lapi -lutil -lEMMmsg -lESMmsg -lies -lrt LIBS = -lapi -lutil -lEMMmsg -lESMmsg -lies -lrt
INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USIMAPIDIR) -I$(EMMDIR) -I$(ESMDIR) -I$(IESDIR) INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(USIMAPIDIR) -I$(EMMDIR) -I$(ESMDIR) -I$(IESDIR)
LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so
...@@ -28,13 +28,13 @@ all: $(TARGETS) ...@@ -28,13 +28,13 @@ all: $(TARGETS)
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
$(USIM_TARGET): $(USIM_OBJ) $(LIBSUTIL) $(USIM_TARGET): $(USIM_OBJ) $(LIBSUTIL)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SECUDIR)/*.o -lnettle -lcrypto
@echo Replacing $@ to $(BINDIR) @echo Replacing $@ to $(BINDIR)
@$(RM) $(BINDIR)/$@ @$(RM) $(BINDIR)/$@
@$(CP) $@ $(BINDIR) @$(CP) $@ $(BINDIR)
$(UE_TARGET): $(UE_OBJ) $(LIBSUTIL) $(UE_TARGET): $(UE_OBJ) $(LIBSUTIL)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SECUDIR)/*.o -lnettle -lcrypto
@echo Replacing $@ to $(BINDIR) @echo Replacing $@ to $(BINDIR)
@$(RM) $(BINDIR)/$@ @$(RM) $(BINDIR)/$@
@$(CP) $@ $(BINDIR) @$(CP) $@ $(BINDIR)
......
...@@ -299,7 +299,6 @@ int main (int argc, const char* argv[]) ...@@ -299,7 +299,6 @@ int main (int argc, const char* argv[])
usim_data.nasconfig.NMO_I_Behaviour.value[0] = 0x00; usim_data.nasconfig.NMO_I_Behaviour.value[0] = 0x00;
usim_data.nasconfig.AttachWithImsi.type = USIM_ATTACH_WITH_IMSI_TAG; usim_data.nasconfig.AttachWithImsi.type = USIM_ATTACH_WITH_IMSI_TAG;
usim_data.nasconfig.AttachWithImsi.length = 1; usim_data.nasconfig.AttachWithImsi.length = 1;
#undefine START_WITH_GUTI
#if defined(START_WITH_GUTI) #if defined(START_WITH_GUTI)
usim_data.nasconfig.AttachWithImsi.value[0] = 0x00; usim_data.nasconfig.AttachWithImsi.value[0] = 0x00;
#else #else
......
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