diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index d020d9538..de7102ef9 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1301,7 +1301,7 @@ private function f_pageing_helper(hexstring imsi, 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 46c9647b1..3018bcad7 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2979,7 +2979,7 @@ private function f_TC_paging(PagingTestCfg cfg) runs on test_CT return PagingTes 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 @@ testcase TC_pcu_paging_from_rsl() runs on test_CT { 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 292205a7f..ebd8d0f4f 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -894,12 +894,14 @@ private template GsmRrMessage tr_PagingType1_empty := { }, 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 d51bb6dd0..e9984d8f6 100644 --- a/library/BSSGP_Types.ttcn +++ b/library/BSSGP_Types.ttcn @@ -245,9 +245,9 @@ module BSSGP_Types { 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 @@ module BSSGP_Types { 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 9fd7733cf..878166bf8 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -16,6 +16,7 @@ module GSM_RR_Types { 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 @@ module GSM_RR_Types { 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 @@ module GSM_RR_Types { 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 @@ module GSM_RR_Types { 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 cf7b9d9dd..af4a573b1 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -315,7 +315,7 @@ template PDU_ML3_NW_MS tr_PAGING_REQ1(template MobileIdentityLV mi1 := ?, } /* 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 c21bcd990..623dae9bb 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -442,7 +442,7 @@ function f_mm_imei() runs on BSC_ConnHdlr { 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 @@ function f_mm_imei_early() runs on BSC_ConnHdlr { 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 62ebcd6d1..6e1188968 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -1386,7 +1386,7 @@ testcase TC_paging_cs_from_bts() runs on RAW_PCU_Test_CT { 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 eb1fff2cc..6c963faa9 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -553,7 +553,7 @@ function f_send_l3(template (value) PDU_L3_MS_SGSN l3_mo, integer ran_index := 0 } 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 @@ function f_random_RAI(HEX0_3n mcc := '262'H, HEX0_3n mnc := '42'H) return Routin } /* 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 @@ testcase TC_attach_detach_check_subscriber_list() runs on test_CT { /* 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 @@ testcase TC_attach_no_imei_response() runs on test_CT { /* 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 @@ testcase TC_attach_rau_a_b() runs on test_CT { 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;