Commit 496e81ef authored by Cedric Roux's avatar Cedric Roux

- Fix dependencies in S1AP Makefile

- Added xer print for initial context setup request message

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4449 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 73df1c88
...@@ -84,15 +84,13 @@ $(S1AP_OBJDIR)/s1ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-CommonDataTyp ...@@ -84,15 +84,13 @@ $(S1AP_OBJDIR)/s1ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-CommonDataTyp
(cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER $^) (cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER $^)
echo Timestamp > $@ echo Timestamp > $@
.INTERMEDIATE = $(S1AP_OBJDIR)/s1ap_ieregen.stamp $(S1AP_OBJDIR)/s1ap_asn1regen.stamp
libs1ap.a: $(S1AP_OBJDIR)/s1ap_ieregen.stamp $(S1AP_OBJDIR)/s1ap_asn1regen.stamp $(libs1ap_OBJECTS) libs1ap.a: $(S1AP_OBJDIR)/s1ap_ieregen.stamp $(S1AP_OBJDIR)/s1ap_asn1regen.stamp $(libs1ap_OBJECTS)
@echo Creating S1AP archive @echo Creating S1AP archive
@$(AR) rcs $@ $(libs1ap_OBJECTS) @$(AR) rcs $@ $(libs1ap_OBJECTS)
clean: clean:
@$(RM_F_V) $(libs1ap_OBJECTS) @$(RM_F_V) $(libs1ap_OBJECTS)
@$(RM_F_V) .*.d @$(RM_F_V) *.d
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES)) @$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES))
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9)) @$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9))
@$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10)) @$(RM_F_V) $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10))
......
...@@ -48,14 +48,22 @@ ...@@ -48,14 +48,22 @@
static int s1ap_eNB_decode_initiating_message(s1ap_message *message, static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
S1ap_InitiatingMessage_t *initiating_p) S1ap_InitiatingMessage_t *initiating_p)
{ {
char message_string[10000];
int ret = -1; int ret = -1;
MessageDef *message_p;
char *message_string = NULL;
size_t message_string_size;
DevAssert(initiating_p != NULL); DevAssert(initiating_p != NULL);
message_string = calloc(10000, sizeof(char));
s1ap_string_total_size = 0;
message->procedureCode = initiating_p->procedureCode; message->procedureCode = initiating_p->procedureCode;
message->criticality = initiating_p->criticality; message->criticality = initiating_p->criticality;
switch(initiating_p->procedureCode) { switch(initiating_p->procedureCode)
{
case S1ap_ProcedureCode_id_downlinkNASTransport: case S1ap_ProcedureCode_id_downlinkNASTransport:
ret = s1ap_decode_s1ap_downlinknastransporties( ret = s1ap_decode_s1ap_downlinknastransporties(
&message->msg.s1ap_DownlinkNASTransportIEs, &initiating_p->value); &message->msg.s1ap_DownlinkNASTransportIEs, &initiating_p->value);
...@@ -63,14 +71,26 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message, ...@@ -63,14 +71,26 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
break; break;
case S1ap_ProcedureCode_id_InitialContextSetup: case S1ap_ProcedureCode_id_InitialContextSetup:
return s1ap_decode_s1ap_initialcontextsetuprequesties( ret = s1ap_decode_s1ap_initialcontextsetuprequesties(
&message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value); &message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value);
s1ap_xer_print_s1ap_initialcontextsetuprequest(s1ap_xer__print2sp, message_string, message);
break;
default: default:
S1AP_DEBUG("Unknown procedure ID (%d) for initiating message\n", S1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode); (int)initiating_p->procedureCode);
break; return -1;
} }
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP, GENERIC_LOG, message_string_size);
memcpy(&message_p->msg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
return ret; return ret;
} }
...@@ -84,18 +104,23 @@ static int s1ap_eNB_decode_successful_outcome(s1ap_message *message, ...@@ -84,18 +104,23 @@ static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
DevAssert(successfullOutcome_p != NULL); DevAssert(successfullOutcome_p != NULL);
message_string = malloc(sizeof(char) * 10000);
s1ap_string_total_size = 0;
message->procedureCode = successfullOutcome_p->procedureCode; message->procedureCode = successfullOutcome_p->procedureCode;
message->criticality = successfullOutcome_p->criticality; message->criticality = successfullOutcome_p->criticality;
switch(successfullOutcome_p->procedureCode) { switch(successfullOutcome_p->procedureCode)
{
case S1ap_ProcedureCode_id_S1Setup: case S1ap_ProcedureCode_id_S1Setup:
message_string = malloc(sizeof(char) * 10000);
ret = s1ap_decode_s1ap_s1setupresponseies( ret = s1ap_decode_s1ap_s1setupresponseies(
&message->msg.s1ap_S1SetupResponseIEs, &successfullOutcome_p->value); &message->msg.s1ap_S1SetupResponseIEs, &successfullOutcome_p->value);
s1ap_xer_print_s1ap_s1setupresponse(s1ap_xer__print2sp, message_string, message); s1ap_xer_print_s1ap_s1setupresponse(s1ap_xer__print2sp, message_string, message);
break; break;
default: default:
S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n", S1AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
(int)successfullOutcome_p->procedureCode); (int)successfullOutcome_p->procedureCode);
return -1; return -1;
} }
...@@ -127,7 +152,7 @@ static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message, ...@@ -127,7 +152,7 @@ static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message,
&message->msg.s1ap_S1SetupFailureIEs, &unSuccessfullOutcome_p->value); &message->msg.s1ap_S1SetupFailureIEs, &unSuccessfullOutcome_p->value);
default: default:
S1AP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n", S1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)unSuccessfullOutcome_p->procedureCode); (int)unSuccessfullOutcome_p->procedureCode);
break; break;
} }
......
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