mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
sysmoISIM-SJA2: Add support for programming IPv4 address for PCSCF
This commit allows programming of IPv4 or FQDN in EF.PCSCF Example: ./pySim-prog.py -p 0 -x 001 -y 01 -s 8988211900000000004 -i 001011234567895 -k 8baf473f2f8fd09487cccbd7097c6862 --op 11111111111111111111111111111111 -o 8E27B6AF0E692E750F32667A3B14605D -a 85524953 -n isim.test --msisdn 0598765432100 --epdgid 172.24.15.20 --pcscf 99.100.80.102 --ims-hdomain testims.org Change-Id: I247a5413e9e5fef6b9d7b6cb8442313e72f9156a
This commit is contained in:
@@ -336,12 +336,16 @@ class IsimCard(Card):
|
||||
|
||||
def update_pcscf(self, pcscf):
|
||||
if len(pcscf) > 0:
|
||||
content = enc_addr_tlv(pcscf)
|
||||
addr_type = get_addr_type(pcscf)
|
||||
if addr_type == None:
|
||||
raise ValueError("Unknown PCSCF address type or invalid address provided")
|
||||
content = enc_addr_tlv(pcscf, ('%02x' % addr_type))
|
||||
else:
|
||||
# Just the tag value
|
||||
content = '80'
|
||||
rec_size_bytes = self._scc.record_size(EF_ISIM_ADF_map['PCSCF'])
|
||||
data, sw = self._scc.update_record(EF_ISIM_ADF_map['PCSCF'], 1, rpad(content, rec_size_bytes*2))
|
||||
pcscf_tlv = rpad(content, rec_size_bytes*2)
|
||||
data, sw = self._scc.update_record(EF_ISIM_ADF_map['PCSCF'], 1, pcscf_tlv)
|
||||
return sw
|
||||
|
||||
def read_domain(self):
|
||||
|
||||
Reference in New Issue
Block a user