P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
381 stars 132 forks source link

fix FGSIDTMSI class #129

Closed Yi-Hsueh-Tsai closed 3 years ago

Yi-Hsueh-Tsai commented 3 years ago

Please remove Uint8('AMFRegionID') from FGSIDTMSI class since it is not belong to 5G-S-TMSI.

class FGSIDTMSI(Envelope): _name = '5GSIDTMSI' _GEN = ( Uint('ind', val=0xf, bl=4, rep=REPR_HEX), Uint('spare', bl=1), Uint('Type', val=FGSIDTYPE_TMSI, bl=3, dic=FGSIDType_dict),

Uint8('AMFRegionID'),

    Uint('AMFSetID', bl=10),
    Uint('AMFPtr', bl=6),
    Uint32('5GTMSI', rep=REPR_HEX)
    )

image

p1-bmu commented 3 years ago

Thanks for reporting. Commit https://github.com/P1sec/pycrate/commit/7a551b8dbbcfbd5738d4885f19b17951391f210b fixed this, but also changed to a more appropriate naming (S-TMSI).