From 07d99c8e7b46b9c490e0cb488d4e2703790fcd84 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 2 May 2019 18:33:16 +0200 Subject: move imsi_hex2oct to Osmocom_Types.ttcn This function is required not only for the MSC_Tests, but also for the upcoming Iu related SGSN tests Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e --- msc/BSC_ConnectionHandler.ttcn | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'msc') diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index b1a0491d..595f4024 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -86,25 +86,6 @@ type record BSC_ConnHdlrPars { boolean ran_is_geran }; -function imsi_hex2oct(hexstring imsi) return octetstring { - var hexstring tmp := ''H; - var octetstring ret; - var integer i; - - /* swap nibbles and pad with F if insufficient input nibbles */ - for (i := 0; i < lengthof(imsi); i := i+1) { - if (i+1 < lengthof(imsi)) { - tmp := tmp & imsi[i+1]; - } else { - tmp := tmp & 'F'H; - } - tmp := tmp & imsi[i]; - i := i+1; - } - ret := hex2oct(tmp); - return ret; -} - /* get a one-octet bitmaks of supported algorithms based on Classmark information */ function f_alg_mask_from_cm(BSSMAP_IE_ClassmarkInformationType2 cm2) return OCT1 { var BIT8 res := '00000001'B; /* A5/0 always supported */ -- cgit v1.2.3