lib: L3_Templates: Fix DEACT PDP REQ msg type and make tearDownInd optional

Specs state in 3GPP TS 24.008 that TearDownInd IE is optional, so allow
possibility to omit it.

Also fix protocolConfigOpts being passed as parameter but not being used
in template tr_SM_DEACT_PDP_REQ_MT.

Change-Id: I006d64f51c17a22a42a225ddfa4119933e48a022
This commit is contained in:
Pau Espin 2018-07-13 15:07:43 +02:00
parent 8466722f3f
commit 67e47dd328
1 changed files with 33 additions and 34 deletions

View File

@ -2254,6 +2254,22 @@ function ts_PcoTLV(template (omit) ProtocolConfigOptionsV pco)
}
}
function ts_TearDownIndicatorTV(in template (omit) boolean ind)
return template (omit) TearDownIndicatorTV {
if (istemplatekind(ind, "omit")) {
return omit;
} else {
var template (omit) TearDownIndicatorTV ret := {
tearDownIndicatorV := {
tdi_flag := bool2bit(valueof(ind)),
spare := '000'B
},
elementIdentifier := '1001'B
}
return ret;
}
}
template (value) PDU_L3_MS_SGSN ts_SM_ACT_PDP_REQ(BIT3 tid, BIT4 nsapi, BIT4 sapi, QoSV qos,
PDPAddressV addr,
template (omit) octetstring apn := omit,
@ -2348,10 +2364,11 @@ template PDU_L3_SGSN_MS tr_SM_ACT_PDP_ACCEPT(template BIT3 tid := ?, template BI
}
}
template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_REQ_MO(BIT3 tid, OCT1 cause, boolean tdown := false,
template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_REQ_MO(BIT3 tid, OCT1 cause,
template (omit) boolean tdown := omit,
template (omit) ProtocolConfigOptionsV pco := omit
) := {
discriminator := '0000'B, /* overwritten */
discriminator := '1010'B,
tiOrSkip := {
transactionId := {
tio := tid,
@ -2362,15 +2379,9 @@ template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_REQ_MO(BIT3 tid, OCT1 cause, boo
msgs := {
gprs_sm := {
deactivatePDPContextRequest := {
messageType := '00000000'B, /* overwritten */
messageType := '01000110'B,
smCause := cause,
tearDownIndicator := {
tearDownIndicatorV := {
tdi_flag := bool2bit(tdown),
spare := '000'B
},
elementIdentifier := '1001'B
},
tearDownIndicator := ts_TearDownIndicatorTV(tdown),
protocolConfigOpts := ts_PcoTLV(pco),
mBMSprotocolConfigOptions := omit,
t3396 := omit,
@ -2381,10 +2392,11 @@ template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_REQ_MO(BIT3 tid, OCT1 cause, boo
}
}
template (value) PDU_L3_SGSN_MS ts_SM_DEACT_PDP_REQ_MT(BIT3 tid, OCT1 cause, boolean tdown := false,
template (value) PDU_L3_SGSN_MS ts_SM_DEACT_PDP_REQ_MT(BIT3 tid, OCT1 cause,
template (omit) boolean tdown := omit,
template (omit) ProtocolConfigOptionsV pco := omit
) := {
discriminator := '0000'B, /* overwritten */
discriminator := '1010'B,
tiOrSkip := {
transactionId := {
tio := tid,
@ -2395,15 +2407,9 @@ template (value) PDU_L3_SGSN_MS ts_SM_DEACT_PDP_REQ_MT(BIT3 tid, OCT1 cause, boo
msgs := {
gprs_sm := {
deactivatePDPContextRequest := {
messageType := '00000000'B, /* overwritten */
messageType := '01000110'B,
smCause := cause,
tearDownIndicator := {
tearDownIndicatorV := {
tdi_flag := bool2bit(tdown),
spare := '000'B
},
elementIdentifier := '1001'B
},
tearDownIndicator := ts_TearDownIndicatorTV(tdown),
protocolConfigOpts := ts_PcoTLV(pco),
mBMSprotocolConfigOptions := omit,
t3396 := omit,
@ -2415,10 +2421,10 @@ template (value) PDU_L3_SGSN_MS ts_SM_DEACT_PDP_REQ_MT(BIT3 tid, OCT1 cause, boo
}
template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_REQ_MT(template BIT3 tid, template OCT1 cause,
template boolean tdown := false,
template (omit) ProtocolConfigOptionsV pco := omit
) := {
discriminator := '0000'B, /* overwritten */
template (omit) boolean tdown := omit,
template (omit) ProtocolConfigOptionsV pco := omit
) := {
discriminator := '1010'B,
tiOrSkip := {
transactionId := {
tio := tid,
@ -2429,16 +2435,10 @@ template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_REQ_MT(template BIT3 tid, template OCT1
msgs := {
gprs_sm := {
deactivatePDPContextRequest := {
messageType := '00000000'B, /* overwritten */
messageType := '01000110'B,
smCause := cause,
tearDownIndicator := {
tearDownIndicatorV := {
tdi_flag := bool2bit_tmpl(tdown),
spare := '000'B
},
elementIdentifier := '1001'B
},
protocolConfigOpts := *,
tearDownIndicator := ts_TearDownIndicatorTV(tdown),
protocolConfigOpts := ts_PcoTLV(pco),
mBMSprotocolConfigOptions := *,
t3396 := *,
wLANOffloadIndication := *,
@ -2448,7 +2448,6 @@ template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_REQ_MT(template BIT3 tid, template OCT1
}
}
template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_ACCEPT_MT(template BIT3 tid := ?)
:= {
discriminator := '1010'B,