GTPv2_Templates: Allow specifying APCO IE in CreateSessionReq/Resp
Change-Id: I860a9424d6109434a953b1aa39d1fa6035fc7e94
diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn
index 9f242ee..8df234a 100644
--- a/library/GTPv2_Templates.ttcn
+++ b/library/GTPv2_Templates.ttcn
@@ -762,6 +762,68 @@
pDN_CSID_List := {csid},
instance := instance);
+/* 8.94 Additional Protocol Configuration Options (APCO) */
+template (present) ProtocolID_or_ContainerID
+tr_GTP2C_PCO_P(template (present) OCT2 protocolID_or_ContainerID := ?,
+ template (present) octetstring protID_orContID_Contents := ?) := {
+ protocolID_or_ContainerID := protocolID_or_ContainerID,
+ lengthIndicator := ?,
+ protID_orContID_Contents := protID_orContID_Contents
+}
+template (value) ProtocolID_or_ContainerID
+ts_GTP2C_PCO_P(template (value) OCT2 protocolID_or_ContainerID,
+ template (value) octetstring protID_orContID_Contents := ''O) := {
+ protocolID_or_ContainerID := protocolID_or_ContainerID,
+ lengthIndicator := 0,
+ protID_orContID_Contents := protID_orContID_Contents
+}
+
+template (present) ProtocolID_or_ContainerID tr_GTP2C_PCO_P_DNS_IPv4(template (present) octetstring dns4 := ?) :=
+ tr_GTP2C_PCO_P('000d'O, dns4);
+template (value) ProtocolID_or_ContainerID ts_GTP2C_PCO_P_DNS_IPv4(template (value) octetstring dns4 := ''O) :=
+ ts_GTP2C_PCO_P('000d'O, dns4);
+
+template (present) ProtocolID_or_ContainerID tr_GTP2C_PCO_P_DNS_IPv6(template (present) octetstring dns6 := ?) :=
+ tr_GTP2C_PCO_P('0003'O, dns6);
+template (value) ProtocolID_or_ContainerID ts_GTP2C_PCO_P_DNS_IPv6(template (value) octetstring dns6 := ''O) :=
+ ts_GTP2C_PCO_P('0003'O, dns6);
+
+template (present) ProtocolID_or_ContainerID tr_GTP2C_PCO_P_PCSCF_IPv4(template (present) octetstring pcscf4 := ?) :=
+ tr_GTP2C_PCO_P('000C'O, pcscf4);
+template (value) ProtocolID_or_ContainerID ts_GTP2C_PCO_P_PCSCF_IPv4(template (value) octetstring pcscf4 := ''O) :=
+ ts_GTP2C_PCO_P('000C'O, pcscf4);
+
+template (present) ProtocolID_or_ContainerID tr_GTP2C_PCO_P_PCSCF_IPv6(template (present) octetstring pcscf6 := ?) :=
+ tr_GTP2C_PCO_P('0001'O, pcscf6);
+template (value) ProtocolID_or_ContainerID ts_GTP2C_PCO_P_PCSCF_IPv6(template (value) octetstring pcscf6 := ''O) :=
+ ts_GTP2C_PCO_P('0001'O, pcscf6);
+
+template (value) APCO
+ts_GTP2C_APCO(template (value) BIT4 instance := '0000'B,
+ template (value) ProtocolIDs_and_ContainerIDs protocolIDs_and_ContainerIDs := {}) := {
+ elementIdentifier := 'A3'O,
+ lengthIndicator := 0,
+ instance := instance,
+ spare := '0000'B,
+ configProtocol := '000'B,
+ spare2 := '0000'B,
+ extensionField := '1'B,
+ protocolIDs_and_ContainerIDs := protocolIDs_and_ContainerIDs,
+ additionalOctets := omit
+}
+template (present) APCO
+tr_GTP2C_APCO(template (present) BIT4 instance := ?,
+ template ProtocolIDs_and_ContainerIDs protocolIDs_and_ContainerIDs := *) := {
+ elementIdentifier := 'A3'O,
+ lengthIndicator := ?,
+ instance := instance,
+ spare := ?,
+ configProtocol := '000'B,
+ spare2 := '0000'B,
+ extensionField := '1'B,
+ protocolIDs_and_ContainerIDs := protocolIDs_and_ContainerIDs,
+ additionalOctets := *
+}
template (value) PDU_GTPCv2 ts_PDU_GTP2C(template (omit) OCT4 teid, template (value) OCT3 seq,
template (value) OCT1 msg_type,
@@ -890,7 +952,9 @@
template (present) PDU_GTPCv2
-tr_GTP2C_CreateSessionReq(template (present) hexstring imsi := ?, template (present) octetstring apn := ?) :=
+tr_GTP2C_CreateSessionReq(template (present) hexstring imsi := ?,
+ template (present) octetstring apn := ?,
+ template APCO apco := *) :=
tr_PDU_GTP2C('00000000'O, ?, {
createSessionRequest := {
iMSI := tr_GTP2C_Imsi(imsi),
@@ -921,7 +985,7 @@
signallingPriorityIndication := *,
iP_Addr := omit,
portNumber := omit,
- aPCO := *,
+ aPCO := apco,
trustedWLANAccessNetworkIdentifier := omit,
cNOperatorSelectionEntity := omit,
presenceReportingAreaInformation := omit,
@@ -943,7 +1007,8 @@
template (value) OCT3 seq,
template (value) FullyQualifiedTEID_List fteids,
template (value) PDN_AddressAllocation addr,
- template (omit) BearerContextGrouped_List bearerContextGrouped := omit) :=
+ template (omit) BearerContextGrouped_List bearerContextGrouped := omit,
+ template (omit) APCO apco := omit) :=
ts_PDU_GTP2C(d_teid, seq, '21'O, {
createSessionResponse := {
cause := ts_GTP2C_Cause(Request_accepted, '0'B),
@@ -963,7 +1028,7 @@
csid := omit,
lDN := omit,
pGW_Back_OffTime := omit,
- aPCO := omit,
+ aPCO := apco,
trustedWLANIPv4Parameters := omit,
indicationFlags := omit,
presenceReportingAreaAction := omit,