From 71290077b99982cc327e083b946996b13596f15a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 21 Apr 2021 10:58:24 +0200 Subject: [PATCH] ts_31_102, ts_31_103: Add EF.FromPreferred Change-Id: I7dc989a4ab198f3eaa45ba7060c8087354a544bb --- pySim/ts_31_102.py | 10 +++++++++- pySim/ts_31_103.py | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 2de3948d..de729be9 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -278,7 +278,7 @@ EF_USIM_ADF_map = { from struct import unpack, pack from construct import * -from pySim.construct import LV, HexAdapter, BcdAdapter +from pySim.construct import LV, HexAdapter, BcdAdapter, BitsRFU from pySim.filesystem import * from pySim.ts_102_221 import EF_ARR from pySim.ts_51_011 import EF_IMSI, EF_xPLMNwAcT, EF_SPN, EF_CBMI, EF_ACC, EF_PLMNsel, EF_AD @@ -608,6 +608,13 @@ class EF_IPS(CyclicEF): self._construct = Struct('status'/PaddedString(2, 'ascii'), 'link_to_ef_ipd'/Int8ub, 'rfu'/Byte) +# TS 31.102 Section 4.2.106 +class EF_FromPreferred(TransparentEF): + def __init__(self, fid='6ff7', sfid=None, name='EF.FromPreferred', size={1,1}, + desc='From Preferred'): + super().__init__(fid, sfid=sfid, name=name, desc=desc, size=size) + self._construct = BitStruct('rfu'/BitsRFU(7), 'from_preferred'/Bit) + ###################################################################### # DF.5GS ###################################################################### @@ -814,6 +821,7 @@ class ADF_USIM(CardADF): LinFixedEF('6fef', None, 'EF.SDNURI', 'Service Dialling Numbers URI'), EF_IPS(), # FIXME: from EF_ePDGid onwards + EF_FromPreferred(), # FIXME: DF_SoLSA # FIXME: DF_PHONEBOOK # FIXME: DF_GSM_ACCESS diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py index d155fdc6..baa4d250 100644 --- a/pySim/ts_31_103.py +++ b/pySim/ts_31_103.py @@ -25,7 +25,7 @@ Various constants from 3GPP TS 31.103 V16.1.0 from pySim.filesystem import * from pySim.utils import * from pySim.ts_51_011 import EF_AD, EF_SMS, EF_SMSS, EF_SMSR, EF_SMSP -from pySim.ts_31_102 import ADF_USIM +from pySim.ts_31_102 import ADF_USIM, EF_FromPreferred import pySim.ts_102_221 # Mapping between ISIM Service Number and its description @@ -188,7 +188,7 @@ class ADF_ISIM(CardADF): EF_SMSR(), EF_SMSP(), EF_UICCIARI(), - # FromPreferred + EF_FromPreferred(), EF_IMSConfigData(), EF_XCAPConfigData(), EF_WebRTCURI(),