aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-02-13 11:53:08 +0100
committerHarald Welte <laforge@osmocom.org>2022-02-15 15:35:36 +0100
commit226b866f51b37a20fd8adc49ce7b49ea82492417 (patch)
tree20d38534caf24793dd833ef9cbc9b58394e14dd3
parent540adb0ee6ef4716e6453f942f9228a2c06e1b43 (diff)
ts_31_103: TLV definitions for IMS, XCAP and MudMid configuration
-rw-r--r--pySim/ts_31_103.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py
index 66124a8..fb164ef 100644
--- a/pySim/ts_31_103.py
+++ b/pySim/ts_31_103.py
@@ -176,13 +176,61 @@ class EF_UICCIARI(LinFixedEF):
# TS 31.103 Section 4.2.18
class EF_IMSConfigData(BerTlvEF):
+ class ImsConfigDataEncoding(BER_TLV_IE, tag=0x80):
+ _construct = HexAdapter(Bytes(1))
+ class ImsConfigData(BER_TLV_IE, tag=0x81):
+ _construct = GreedyString
+ # pylint: disable=undefined-variable
+ class ImsConfigDataCollection(TLV_IE_Collection, neted=[ImsConfigDataEncoding, ImsConfigData]):
+ pass
def __init__(self, fid='6ff8', sfid=None, name='EF.IMSConfigData', desc='IMS Configuration Data', **kwargs):
super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs)
+ self._tlv = EF_IMSConfigData.ImsConfigDataCollection
# TS 31.103 Section 4.2.19
class EF_XCAPConfigData(BerTlvEF):
+ class Access(BER_TLV_IE, tag=0x81):
+ pass
+ class ApplicationName(BER_TLV_IE, tag=0x82):
+ pass
+ class ProviderID(BER_TLV_IE, tag=0x83):
+ pass
+ class URI(BER_TLV_IE, tag=0x84):
+ pass
+ class XcapAuthenticationUserName(BER_TLV_IE, tag=0x85):
+ pass
+ class XcapAuthenticationPassword(BER_TLV_IE, tag=0x86):
+ pass
+ class XcapAuthenticationType(BER_TLV_IE, tag=0x87):
+ pass
+ class AddressType(BER_TLV_IE, tag=0x88):
+ pass
+ class Address(BER_TLV_IE, tag=0x89):
+ pass
+ class PDPAuthenticationType(BER_TLV_IE, tag=0x8a):
+ pass
+ class PDPAuthenticationName(BER_TLV_IE, tag=0x8b):
+ pass
+ class PDPAuthenticationSecret(BER_TLV_IE, tag=0x8c):
+ pass
+
+ class AccessForXCAP(BER_TLV_IE, tag=0x81):
+ pass
+ class NumberOfXcapConnParPolicy(BER_TLV_IE, tag=0x82):
+ _construct = Int8ub
+ # pylint: disable=undefined-variable
+ class XcapConnParamsPolicyPart(BER_TLV_IE, tag=0xa1, nested=[Access, ApplicationName, ProviderID, URI,
+ XcapAuthenticationUserName, XcapAuthenticationPassword,
+ XcapAuthenticationType, AddressType, Address, PDPAuthenticationType,
+ PDPAuthenticationName, PDPAuthenticationSecret]):
+ pass
+ class XcapConnParamsPolicy(BER_TLV_IE, tag=0xa0, nested=[AccessForXCAP, NumberOfXcapConnParPolicy, XcapConnParamsPolicyPart]):
+ pass
+ class XcapConnParamsPolicyDO(BER_TLV_IE, tag=0x80, nested=[XcapConnParamsPolicy]):
+ pass
def __init__(self, fid='6ffc', sfid=None, name='EF.XCAPConfigData', desc='XCAP Configuration Data', **kwargs):
super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs)
+ self._tlv = EF_XCAPConfigData.XcapConnParamsPolicy
# TS 31.103 Section 4.2.20
class EF_WebRTCURI(TransparentEF):
@@ -195,9 +243,17 @@ class EF_WebRTCURI(TransparentEF):
# TS 31.103 Section 4.2.21
class EF_MuDMiDConfigData(BerTlvEF):
+ class MudMidConfigDataEncoding(BER_TLV_IE, tag=0x80):
+ _construct = HexAdapter(Bytes(1))
+ class MudMidConfigData(BER_TLV_IE, tag=0x81):
+ _construct = GreedyString
+ # pylint: disable=undefined-variable
+ class MudMidConfigDataCollection(TLV_IE_Collection, neted=[MudMidConfigDataEncoding, MudMidConfigData]):
+ pass
def __init__(self, fid='6ffe', sfid=None, name='EF.MuDMiDConfigData',
desc='MuD and MiD Configuration Data', **kwargs):
super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs)
+ self._tlv = EF_MuDMiDConfigData.MudMidConfigDataCollection
class ADF_ISIM(CardADF):