Commit 45f52474 authored by Cedric Roux's avatar Cedric Roux

- Prefix-ed Informations Elements for S1AP to avoid types redefinitions with RRC

EPC/eNB builds OK

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4373 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 55337aa6
......@@ -12,16 +12,16 @@ DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Criticality ::= ENUMERATED { reject, ignore, notify }
S1ap-Criticality ::= ENUMERATED { reject, ignore, notify }
Presence ::= ENUMERATED { optional, conditional, mandatory }
S1ap-Presence ::= ENUMERATED { optional, conditional, mandatory }
PrivateIE-ID ::= CHOICE {
S1ap-PrivateIE-ID ::= CHOICE {
local INTEGER (0..65535),
global OBJECT IDENTIFIER
}
ProcedureCode ::= INTEGER {
S1ap-ProcedureCode ::= INTEGER {
id-HandoverPreparation(0),
id-HandoverResourceAllocation(1),
id-HandoverNotification(2),
......@@ -72,9 +72,9 @@ ProcedureCode ::= INTEGER {
id-uplinkNonUEAssociatedLPPaTransport(47)
} (0..255)
ProtocolExtensionID ::= INTEGER (0..65535)
S1ap-ProtocolExtensionID ::= INTEGER (0..65535)
ProtocolIE-ID ::= INTEGER {
S1ap-ProtocolIE-ID ::= INTEGER {
id-MME-UE-S1AP-ID (0),
id-HandoverType (1),
id-Cause (2),
......@@ -227,6 +227,6 @@ ProtocolIE-ID ::= INTEGER {
id-PrivacyIndicator (166)
} (0..65535)
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
S1ap-TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome }
END
......@@ -19,16 +19,16 @@ BEGIN
-- **************************************************************
IMPORTS
Criticality,
Presence,
PrivateIE-ID,
ProtocolExtensionID,
ProtocolIE-ID
S1ap-Criticality,
S1ap-Presence,
S1ap-PrivateIE-ID,
S1ap-ProtocolExtensionID,
S1ap-ProtocolIE-ID
FROM S1AP-CommonDataTypes
maxPrivateIEs,
maxProtocolExtensions,
maxProtocolIEs
s1ap-maxPrivateIEs,
s1ap-maxProtocolExtensions,
s1ap-maxProtocolIEs
FROM S1AP-Constants;
-- **************************************************************
......@@ -38,10 +38,10 @@ FROM S1AP-Constants;
-- **************************************************************
S1AP-PROTOCOL-IES ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&criticality Criticality,
&id S1ap-ProtocolIE-ID UNIQUE,
&criticality S1ap-Criticality,
&Value,
&presence Presence
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
......@@ -57,12 +57,12 @@ WITH SYNTAX {
-- **************************************************************
S1AP-PROTOCOL-IES-PAIR ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&firstCriticality Criticality,
&id S1ap-ProtocolIE-ID UNIQUE,
&firstCriticality S1ap-Criticality,
&FirstValue,
&secondCriticality Criticality,
&secondCriticality S1ap-Criticality,
&SecondValue,
&presence Presence
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
......@@ -80,10 +80,10 @@ WITH SYNTAX {
-- **************************************************************
S1AP-PROTOCOL-EXTENSION ::= CLASS {
&id ProtocolExtensionID UNIQUE,
&criticality Criticality,
&id S1ap-ProtocolExtensionID UNIQUE,
&criticality S1ap-Criticality,
&Extension,
&presence Presence
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
......@@ -99,10 +99,10 @@ WITH SYNTAX {
-- **************************************************************
S1AP-PRIVATE-IES ::= CLASS {
&id PrivateIE-ID,
&criticality Criticality,
&id S1ap-PrivateIE-ID,
&criticality S1ap-Criticality,
&Value,
&presence Presence
&presence S1ap-Presence
}
WITH SYNTAX {
ID &id
......
......@@ -19,83 +19,82 @@ BEGIN
-- **************************************************************
IMPORTS
Criticality,
ProcedureCode
S1ap-Criticality,
S1ap-ProcedureCode
FROM S1AP-CommonDataTypes
CellTrafficTrace,
DeactivateTrace,
DownlinkUEAssociatedLPPaTransport,
DownlinkNASTransport,
DownlinkNonUEAssociatedLPPaTransport,
DownlinkS1cdma2000tunneling,
ENBDirectInformationTransfer,
ENBStatusTransfer,
ENBConfigurationUpdate,
ENBConfigurationUpdateAcknowledge,
ENBConfigurationUpdateFailure,
ErrorIndication,
HandoverCancel,
HandoverCancelAcknowledge,
HandoverCommand,
HandoverFailure,
HandoverNotify,
HandoverPreparationFailure,
HandoverRequest,
HandoverRequestAcknowledge,
HandoverRequired,
InitialContextSetupFailure,
InitialContextSetupRequest,
InitialContextSetupResponse,
InitialUEMessage,
KillRequest,
KillResponse,
LocationReportingControl,
LocationReportingFailureIndication,
LocationReport,
MMEConfigurationUpdate,
MMEConfigurationUpdateAcknowledge,
MMEConfigurationUpdateFailure,
MMEDirectInformationTransfer,
MMEStatusTransfer,
NASNonDeliveryIndication,
OverloadStart,
OverloadStop,
Paging,
PathSwitchRequest,
PathSwitchRequestAcknowledge,
PathSwitchRequestFailure,
PrivateMessage,
Reset,
ResetAcknowledge,
S1SetupFailure,
S1SetupRequest,
S1SetupResponse,
E-RABModifyRequest,
E-RABModifyResponse,
E-RABReleaseCommand,
E-RABReleaseResponse,
E-RABReleaseIndication,
E-RABSetupRequest,
E-RABSetupResponse,
TraceFailureIndication,
TraceStart,
UECapabilityInfoIndication,
UEContextModificationFailure,
UEContextModificationRequest,
UEContextModificationResponse,
UEContextReleaseCommand,
UEContextReleaseComplete,
UEContextReleaseRequest,
UplinkUEAssociatedLPPaTransport,
UplinkNASTransport,
UplinkNonUEAssociatedLPPaTransport,
UplinkS1cdma2000tunneling,
WriteReplaceWarningRequest,
WriteReplaceWarningResponse,
ENBConfigurationTransfer,
MMEConfigurationTransfer
S1ap-CellTrafficTrace,
S1ap-DeactivateTrace,
S1ap-DownlinkUEAssociatedLPPaTransport,
S1ap-DownlinkNASTransport,
S1ap-DownlinkNonUEAssociatedLPPaTransport,
S1ap-DownlinkS1cdma2000tunneling,
S1ap-ENBDirectInformationTransfer,
S1ap-ENBStatusTransfer,
S1ap-ENBConfigurationUpdate,
S1ap-ENBConfigurationUpdateAcknowledge,
S1ap-ENBConfigurationUpdateFailure,
S1ap-ErrorIndication,
S1ap-HandoverCancel,
S1ap-HandoverCancelAcknowledge,
S1ap-HandoverCommand,
S1ap-HandoverFailure,
S1ap-HandoverNotify,
S1ap-HandoverPreparationFailure,
S1ap-HandoverRequest,
S1ap-HandoverRequestAcknowledge,
S1ap-HandoverRequired,
S1ap-InitialContextSetupFailure,
S1ap-InitialContextSetupRequest,
S1ap-InitialContextSetupResponse,
S1ap-InitialUEMessage,
S1ap-KillRequest,
S1ap-KillResponse,
S1ap-LocationReportingControl,
S1ap-LocationReportingFailureIndication,
S1ap-LocationReport,
S1ap-MMEConfigurationUpdate,
S1ap-MMEConfigurationUpdateAcknowledge,
S1ap-MMEConfigurationUpdateFailure,
S1ap-MMEDirectInformationTransfer,
S1ap-MMEStatusTransfer,
S1ap-NASNonDeliveryIndication,
S1ap-OverloadStart,
S1ap-OverloadStop,
S1ap-Paging,
S1ap-PathSwitchRequest,
S1ap-PathSwitchRequestAcknowledge,
S1ap-PathSwitchRequestFailure,
S1ap-PrivateMessage,
S1ap-Reset,
S1ap-ResetAcknowledge,
S1ap-S1SetupFailure,
S1ap-S1SetupRequest,
S1ap-S1SetupResponse,
E-S1ap-RABModifyRequest,
E-S1ap-RABModifyResponse,
E-S1ap-RABReleaseCommand,
E-S1ap-RABReleaseResponse,
E-S1ap-RABReleaseIndication,
E-S1ap-RABSetupRequest,
E-S1ap-RABSetupResponse,
S1ap-TraceFailureIndication,
S1ap-TraceStart,
S1ap-UECapabilityInfoIndication,
S1ap-UEContextModificationFailure,
S1ap-UEContextModificationRequest,
S1ap-UEContextModificationResponse,
S1ap-UEContextReleaseCommand,
S1ap-UEContextReleaseComplete,
S1ap-UEContextReleaseRequest,
S1ap-UplinkUEAssociatedLPPaTransport,
S1ap-UplinkNASTransport,
S1ap-UplinkNonUEAssociatedLPPaTransport,
S1ap-UplinkS1cdma2000tunneling,
S1ap-WriteReplaceWarningRequest,
S1ap-WriteReplaceWarningResponse,
S1ap-ENBConfigurationTransfer,
S1ap-MMEConfigurationTransfer
FROM S1AP-PDU-Contents
......
......@@ -3,7 +3,7 @@ import datetime
import getopt
import getpass
version = "1.0.0"
version = "1.0.1"
lines = ""
iesDefs = {}
......@@ -19,6 +19,7 @@ WARN = '\033[93m'
ENDC = '\033[0m'
fileprefix = ""
fileprefix_first_upper = ""
def printFail(string):
sys.stderr.write(FAIL + string + ENDC + "\n")
......@@ -164,6 +165,8 @@ if len(iesDefs) == 0:
printFail("No Information Element parsed, exiting")
sys.exit(0)
fileprefix_first_upper = fileprefix[0].upper() + fileprefix[1:]
f = open(outdir + fileprefix + '_ies_defs.h', 'w')
outputHeaderToFile(f, filename)
f.write("#include \"%s_common.h\"\n\n" % (fileprefix))
......@@ -223,8 +226,8 @@ for key in iesDefs:
f.write("} %s_t;\n\n" % (re.sub('-', '_', key)))
f.write("typedef struct %s_message_s {\n" % (fileprefix))
f.write(" ProcedureCode_t procedureCode;\n")
f.write(" Criticality_t criticality;\n")
f.write(" %s_ProcedureCode_t procedureCode;\n" % (fileprefix_first_upper))
f.write(" %s_Criticality_t criticality;\n" % (fileprefix_first_upper))
f.write(" uint8_t direction;\n")
f.write(" union {\n")
......@@ -353,7 +356,7 @@ for key in iesDefs:
f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), re.sub('-', '_', keyName)))
f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower))
f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess))
f.write(" IE_t *ie_p;\n")
f.write(" %s_IE_t *ie_p;\n" % (fileprefix[0].upper() + fileprefix[1:]))
f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess))
f.write(" switch(ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
......@@ -368,7 +371,7 @@ for key in iesDefs:
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" case ProtocolIE_ID_%s:\n" % (re.sub('-', '_', ie[0])))
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
if ie[3] != "mandatory":
......@@ -416,12 +419,12 @@ for key in iesDefs:
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
f.write(" for (i = 0; i < %s->list.count; i++) {\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" IE_t *ie_p = %s->list.array[i];\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" %s_IE_t *ie_p = %s->list.array[i];\n" % (fileprefix[0].upper() + fileprefix[1:], lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" switch (ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
f.write(" case ProtocolIE_ID_%s:\n" % (re.sub('-', '_', ie[0])))
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
......@@ -478,7 +481,7 @@ for key in iesDefs:
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" IE_t *ie;\n\n")
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))));
......@@ -497,8 +500,8 @@ for key in iesDefs:
f.write(" /* Conditional field */\n")
f.write(" if (%s->presenceMask & %s_%s_PRESENT) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
#f.write(" == %s_%s_PRESENT) {\n" % (keyupperunderscore, ieupperunderscore))
f.write(" if ((ie = %s_new_ie(ProtocolIE_ID_%s,\n" % (fileprefix, re.sub('-', '_', ie[0])))
f.write(" Criticality_%s,\n" % (ie[1]))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" return -1;\n")
......@@ -511,8 +514,8 @@ for key in iesDefs:
f.write(" memset(&%s, 0, sizeof(%s_t));\n" % (ienamefirstwordlower, ietypeunderscore))
f.write("\n")
f.write(" if (%s_encode_%s(&%s, &%s->%s) < 0) return -1;\n" % (fileprefix, ietypeunderscore.lower(), ienamefirstwordlower, lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" if ((ie = %s_new_ie(ProtocolIE_ID_%s,\n" % (fileprefix, re.sub('-', '_', ie[0])))
f.write(" Criticality_%s,\n" % (ie[1]))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
if ie[2] in ieofielist.keys():
f.write(" &%s)) == NULL) {\n" % (ienamefirstwordlower))
......@@ -546,14 +549,14 @@ for (key, value) in iesDefs.items():
f.write(" %sIEs_t *%sIEs) {\n\n" % (re.sub('-', '_', i), lowerFirstCamelWord(re.sub('-', '_', i))))
f.write(" int i;\n")
f.write(" IE_t *ie;\n\n")
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', i))));
f.write(" for (i = 0; i < %sIEs->%s.count; i++) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" if ((ie = %s_new_ie(ProtocolIE_ID_%s,\n" % (fileprefix, re.sub('-', '_', ie[0])))
f.write(" Criticality_%s,\n" % (ie[1]))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" %sIEs->%s.array[i])) == NULL) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" return -1;\n")
......@@ -644,8 +647,8 @@ for (key, value) in iesDefs.items():
f.write(" }\n")
else:
f.write(" fprintf(file, \"<%s-PDU>\\n\");\n" % (fileprefix.upper()))
f.write(" xer_encode_local(&asn_DEF_Criticality, &message_p->criticality, cb, app_key, 1);\n")
f.write(" xer_encode_local(&asn_DEF_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n")
f.write(" xer_encode_local(&asn_DEF_%s_Criticality, &message_p->criticality, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" xer_encode_local(&asn_DEF_%s_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" fprintf(file, \" <%s>\\n\");\n" % (key))
for ie in iesDefs[key]["ies"]:
......
This diff is collapsed.
This diff is collapsed.
......@@ -73,6 +73,8 @@ $(S1AP_OBJDIR)/s1ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-CommonDataTyp
(cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER $^)
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)
@echo Creating S1AP archive
@$(AR) rcs $@ $(libs1ap_OBJECTS)
......
......@@ -62,8 +62,8 @@ inline void ASN_DEBUG(const char *fmt, ...)
ssize_t s1ap_generate_initiating_message(
uint8_t **buffer,
uint32_t *length,
e_ProcedureCode procedureCode,
Criticality_t criticality,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
......@@ -96,8 +96,8 @@ ssize_t s1ap_generate_initiating_message(
ssize_t s1ap_generate_successfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_ProcedureCode procedureCode,
Criticality_t criticality,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
......@@ -131,8 +131,8 @@ ssize_t s1ap_generate_successfull_outcome(
ssize_t s1ap_generate_unsuccessfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_ProcedureCode procedureCode,
Criticality_t criticality,
e_S1ap_ProcedureCode procedureCode,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr)
{
......@@ -163,19 +163,19 @@ ssize_t s1ap_generate_unsuccessfull_outcome(
return encoded;
}
IE_t *s1ap_new_ie(
ProtocolIE_ID_t id,
Criticality_t criticality,
S1ap_IE_t *s1ap_new_ie(
S1ap_ProtocolIE_ID_t id,
S1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *type,
void *sptr)
{
IE_t *buff;
S1ap_IE_t *buff;
if ((buff = malloc(sizeof(IE_t))) == NULL) {
if ((buff = malloc(sizeof(S1ap_IE_t))) == NULL) {
// Possible error on malloc
return NULL;
}
memset((void *)buff, 0, sizeof(IE_t));
memset((void *)buff, 0, sizeof(S1ap_IE_t));
buff->id = id;
buff->criticality = criticality;
......@@ -187,7 +187,7 @@ IE_t *s1ap_new_ie(
}
if (asn1_xer_print)
if (xer_fprint(stdout, &asn_DEF_IE, buff) < 0) {
if (xer_fprint(stdout, &asn_DEF_S1ap_IE, buff) < 0) {
free(buff);
return NULL;
}
......@@ -195,7 +195,7 @@ IE_t *s1ap_new_ie(
return buff;
}
void s1ap_handle_criticality(e_Criticality criticality)
void s1ap_handle_criticality(S1ap_Criticality_t criticality)
{
}
This diff is collapsed.
......@@ -260,9 +260,11 @@ static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p)
{
s1ap_message message;
S1SetupRequestIEs_t *s1SetupRequest_p;
PLMNidentity_t plmnIdentity;
SupportedTAs_Item_t ta;
S1ap_S1SetupRequestIEs_t *s1SetupRequest_p;
S1ap_PLMNidentity_t plmnIdentity;
S1ap_SupportedTAs_Item_t ta;
uint8_t *buffer;
uint32_t len;
int ret = 0;
......@@ -273,17 +275,17 @@ static int s1ap_eNB_generate_s1_setup_request(
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_initiatingMessage;
message.procedureCode = ProcedureCode_id_S1Setup;
message.criticality = Criticality_reject;
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
message.criticality = S1ap_Criticality_reject;
s1SetupRequest_p = &message.msg.s1SetupRequestIEs;
memset((void *)&plmnIdentity, 0, sizeof(PLMNidentity_t));
s1SetupRequest_p = &message.msg.s1ap_S1SetupRequestIEs;
memset((void *)&plmnIdentity, 0, sizeof(S1ap_PLMNidentity_t));
memset((void *)&ta, 0, sizeof(SupportedTAs_Item_t));
memset((void *)&ta, 0, sizeof(S1ap_SupportedTAs_Item_t));
s1ap_mme_data_p->state = S1AP_ENB_STATE_WAITING;
s1SetupRequest_p->global_ENB_ID.eNB_ID.present = ENB_ID_PR_macroENB_ID;
s1SetupRequest_p->global_ENB_ID.eNB_ID.present = S1ap_ENB_ID_PR_macroENB_ID;
MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id,
&s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID);
MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc,
......@@ -298,7 +300,7 @@ static int s1ap_eNB_generate_s1_setup_request(
s1SetupRequest_p->defaultPagingDRX = instance_p->default_drx;
if (instance_p->eNB_name != NULL) {
s1SetupRequest_p->presenceMask |= S1SETUPREQUESTIES_ENBNAME_PRESENT;
s1SetupRequest_p->presenceMask |= S1AP_S1SETUPREQUESTIES_ENBNAME_PRESENT;
OCTET_STRING_fromBuf(&s1SetupRequest_p->eNBname, instance_p->eNB_name,
strlen(instance_p->eNB_name));
}
......
......@@ -44,7 +44,7 @@
#include "s1ap_eNB_decoder.h"
static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
InitiatingMessage_t *initiating_p)
S1ap_InitiatingMessage_t *initiating_p)
{
DevAssert(initiating_p != NULL);
......@@ -52,12 +52,14 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
message->criticality = initiating_p->criticality;
switch(initiating_p->procedureCode) {
case ProcedureCode_id_downlinkNASTransport:
return s1ap_decode_downlinknastransporties(&message->msg.downlinkNASTransportIEs,
&initiating_p->value);
case ProcedureCode_id_InitialContextSetup:
return s1ap_decode_initialcontextsetuprequesties(
&message->msg.initialContextSetupRequestIEs, &initiating_p->value);
case S1ap_ProcedureCode_id_downlinkNASTransport:
return s1ap_decode_s1ap_downlinknastransporties(
&message->msg.s1ap_DownlinkNASTransportIEs, &initiating_p->value);
case S1ap_ProcedureCode_id_InitialContextSetup:
return s1ap_decode_s1ap_initialcontextsetuprequesties(
&message->msg.s1ap_InitialContextSetupRequestIEs, &initiating_p->value);
default:
S1AP_DEBUG("Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode);
......@@ -67,7 +69,7 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
}
static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
SuccessfulOutcome_t *successfullOutcome_p)
S1ap_SuccessfulOutcome_t *successfullOutcome_p)
{
DevAssert(successfullOutcome_p != NULL);
......@@ -75,9 +77,10 @@ static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
message->criticality = successfullOutcome_p->criticality;
switch(successfullOutcome_p->procedureCode) {
case ProcedureCode_id_S1Setup:
return s1ap_decode_s1setupresponseies(&message->msg.s1SetupResponseIEs,
&successfullOutcome_p->value);
case S1ap_ProcedureCode_id_S1Setup:
return s1ap_decode_s1ap_s1setupresponseies(
&message->msg.s1ap_S1SetupResponseIEs, &successfullOutcome_p->value);
default:
S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n",
(int)successfullOutcome_p->procedureCode);
......@@ -87,7 +90,7 @@ static int s1ap_eNB_decode_successful_outcome(s1ap_message *message,
}
static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message,
UnsuccessfulOutcome_t *unSuccessfullOutcome_p)
S1ap_UnsuccessfulOutcome_t *unSuccessfullOutcome_p)
{
DevAssert(unSuccessfullOutcome_p != NULL);
......@@ -95,9 +98,10 @@ static int s1ap_eNB_decode_unsuccessful_outcome(s1ap_message *message,
message->criticality = unSuccessfullOutcome_p->criticality;
switch(unSuccessfullOutcome_p->procedureCode) {
case ProcedureCode_id_S1Setup:
return s1ap_decode_s1setupfailureies(&message->msg.s1SetupFailureIEs,
&unSuccessfullOutcome_p->value);
case S1ap_ProcedureCode_id_S1Setup:
return s1ap_decode_s1ap_s1setupfailureies(
&message->msg.s1ap_S1SetupFailureIEs, &unSuccessfullOutcome_p->value);
default:
S1AP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)unSuccessfullOutcome_p->procedureCode);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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