library/GSM_RR_Types: do not duplicate Mobile Identity records
All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.
[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn
Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index d020d95..de7102e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1301,7 +1301,7 @@
template OCT4 tmsi := omit) runs on test_CT
{
var template BSSMAP_IE_ChannelNeeded bssmap_chneed;
- var MobileIdentity mi;
+ /* FIXME (unused): var MobileIdentity mi; */
var template octetstring id_enc; /* FIXME */
var RSL_Message rx_rsl;
var integer paging_group := hex2int(imsi[lengthof(imsi)-1]);
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 46c9647..3018bca 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2979,7 +2979,7 @@
var integer new_sent := f_min(pkt_total, float2int(T_total.read * pch_blocks_per_sec) + 1);
while (st.num_paging_sent < new_sent) {
/* build mobile Identity */
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
if (cfg.use_tmsi) {
mi := valueof(ts_MI_TMSI_LV(f_rnd_octstring(4)));
} else {
@@ -4570,7 +4570,7 @@
f_init_pcu_test();
for (var integer i := 0; i < 100; i := i+1) {
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
timer T := 3.0;
if (i < 50) {
mi := valueof(ts_MI_TMSI_LV(f_rnd_octstring(4)));
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 292205a..ebd8d0f 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -894,12 +894,14 @@
},
page_mode := PAGE_MODE_NORMAL,
mi1 := {
- len := 1,
- mi := {
- unused := {
- pad := '1111'B,
- odd := false,
- mi_type := MI_TYPE_NONE
+ lengthIndicator := 1,
+ mobileIdentityV := {
+ typeOfIdentity := '000'B,
+ oddEvenInd_identity := {
+ no_identity := {
+ oddevenIndicator := '0'B,
+ fillerDigits := 'F'H
+ }
}
}
},
diff --git a/library/BSSGP_Types.ttcn b/library/BSSGP_Types.ttcn
index d51bb6d..e9984d8 100644
--- a/library/BSSGP_Types.ttcn
+++ b/library/BSSGP_Types.ttcn
@@ -245,9 +245,9 @@
BssgpCause cause, /* 11.3.8 */
BssgpCellId cell_id, /* 11.3.9 */
DrxParameter drx_parameter, /* 10.3.11 */
- MobileIdentity imsi, /* 11.3.14 */
+ MobileIdentityV imsi, /* 11.3.14 */
LocationAreaIdentification lai, /* 11.3.17 */
- MobileIdentity mobile_id, /* 11.3.20 */
+ MobileIdentityV mobile_id, /* 11.3.20 */
BssgpPduLifetime pdu_lifetime, /* 11.3.25 */
BssgpPriority priority, /* 11.3.27 */
BssgpQosProfile qos_profile, /* 11.3.28 */
@@ -388,10 +388,14 @@
len := 4,
u := {
mobile_id := {
- imsi := {
- mi_type := MI_TYPE_IMSI,
- odd := true, /* IMSI has 15 digits */
- digits := imsi
+ typeOfIdentity := MI_TYPE_IMSI,
+ oddEvenInd_identity := {
+ imsi := {
+ /* TODO: introduce generic tr_IMSI_L3 */
+ oddevenIndicator := true, /* IMSI has 15 digits */
+ digits := imsi,
+ fillerDigit := '1111'B
+ }
}
}
}
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 9fd7733..878166b 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -16,6 +16,7 @@
import from Osmocom_Types all;
import from GSM_Types all;
import from RLCMAC_CSN1_Types all;
+ import from MobileL3_CommonIE_Types all;
/* Table 10.4.1 of Section 10.4 / 3GPP TS 44.018 */
type enumerated RrMessageType {
@@ -205,51 +206,6 @@
MI_TYPE_TMGI
} with { variant "FIELDLENGTH(3)" };
- type record MobileIdentityBCD {
- MobileIdentityType mi_type (MI_TYPE_IMSI, MI_TYPE_IMEI, MI_TYPE_IMEISV),
- boolean odd,
- hexstring digits
- } with { variant "FIELDORDER(lsb)" };
-
- type record MobileIdentityTMSI {
- BIT4 pad ('1111'B),
- boolean odd (false),
- MobileIdentityType mi_type (MI_TYPE_TMSI),
- GsmTmsi tmsi
- } with { variant "FIELDORDER(lsb)" };
-
- type record MobileIdentityNone {
- BIT4 pad ('1111'B),
- boolean odd (false),
- MobileIdentityType mi_type (MI_TYPE_NONE)
- } with { variant "FIELDORDER(lsb)" };
-
- type union MobileIdentity {
- MobileIdentityBCD imsi,
- MobileIdentityBCD imei,
- MobileIdentityBCD imeisv,
- MobileIdentityTMSI tmsi,
- MobileIdentityNone unused
- } with { variant "TAG(imsi, mi_type = MI_TYPE_IMSI;
- imei, mi_type = MI_TYPE_IMEI;
- imeisv, mi_type = MI_TYPE_IMEISV;
- tmsi, mi_type = MI_TYPE_TMSI;
- unused, mi_type = MI_TYPE_NONE)"
- variant "FIELDORDER(lsb)"
- };
-
- /* TS 24.008 10.5.1.4 "Mobile Identity" */
- type record MobileIdentityLV {
- uint8_t len,
- MobileIdentity mi
- } with { variant (len) "LENGTHTO(mi)" };
-
- type record MobileIdentityTLV {
- uint8_t tag,
- uint8_t len,
- MobileIdentity mi
- } with { variant (len) "LENGTHTO(mi)" };
-
/* TS 24.008 10.5.1.5 */
type record MsClassmark1 {
BIT1 spare,
@@ -762,7 +718,7 @@
MobileIdentityLV mi1,
MobileIdentityTLV mi2 optional,
RestOctets rest_octets
- } with { variant "TAG(mi2, tag = 23)" };
+ } with { variant "TAG(mi2, elementIdentifier = '0010111'B)" };
/* 9.1.23 */
type record PagingRequestType2 {
@@ -772,7 +728,7 @@
GsmTmsi mi2,
MobileIdentityTLV mi3 optional,
RestOctets rest_octets
- } with { variant "TAG(mi3, tag = 23)" };
+ } with { variant "TAG(mi3, elementIdentifier = '0010111'B)" };
/* 9.1.24 */
type record length(4) of GsmTmsi GsmTmsi4;
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index cf7b9d9..af4a573 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -315,7 +315,7 @@
}
/* Template for receiving a Paging Request Type1 message with a given TMSI in the first mobile identity. */
-template MobileL3_CommonIE_Types.MobileIdentityLV tr_PAGING_REQ1_MI1_TMSI(octetstring tmsi) := {
+template MobileIdentityLV tr_PAGING_REQ1_MI1_TMSI(octetstring tmsi) := {
lengthIndicator := 5,
mobileIdentityV := {
typeOfIdentity := '100'B,
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index c21bcd9..623dae9 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -442,7 +442,7 @@
{
var PDU_DTAP_MT dtap_mt;
var GSUP_PDU gsup_msg;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
if (not g_pars.net.expect_imei) {
return
@@ -480,7 +480,7 @@
{
var PDU_DTAP_MT dtap_mt;
var GSUP_PDU gsup_msg;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
if (not g_pars.net.expect_imei_early) {
return
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 62ebcd6..6e11889 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -1386,7 +1386,7 @@
var RlcmacDlBlock dl_block;
var boolean ok;
var OCT4 tlli := '00000001'O;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
var octetstring mi_enc_lv;
var hexstring imsi := f_gen_imsi(42);
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index eb1fff2..6c963fa 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -553,7 +553,7 @@
}
altstep as_mm_identity(integer ran_index := 0) runs on BSSGP_ConnHdlr {
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
[is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3(ts_GMM_ID_RESP(mi), ran_index);
@@ -740,7 +740,7 @@
}
/* return a MobileIdentityLV: P-TMSI if we have one, IMSI otherwise */
-private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileL3_CommonIE_Types.MobileIdentityLV {
+private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileIdentityLV {
if (ispresent(g_pars.p_tmsi)) {
return valueof(ts_MI_TMSI_LV(g_pars.p_tmsi));
} else {
@@ -2153,7 +2153,7 @@
/* Attempt an attach, but loose the Identification Request (IMEI) */
private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnHdlr {
var integer count_req := 0;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
@@ -2199,7 +2199,7 @@
/* Attempt an attach, but loose the Identification Request (IMSI) */
private function f_TC_attach_no_imsi_response(charstring id) runs on BSSGP_ConnHdlr {
var integer count_req := 0;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
/* set p_tmsi to use it in Attach Req via f_mi_get_lv() */
g_pars.p_tmsi := 'c0000035'O;
@@ -2479,7 +2479,7 @@
private function f_TC_attach_gmm_attach_req_while_gmm_attach(charstring id) runs on BSSGP_ConnHdlr {
var integer count_req := 0;
- var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var MobileIdentityLV mi;
var RoutingAreaIdentificationV rand_rai := f_random_RAI();
var PDU_L3_SGSN_MS l3_mt;