Exemplo n.º 1
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NAS.__init__(self, with_security)
     self.extend([
         Bit('spare', Pt=0, BitLen=4),
         Bit('Bearer', ReprName='Linked EPS Bearer ID', Pt=5, BitLen=4,
             Repr='hum'),
         Type4_LV('TFA', ReprName='Traffic Flow Aggregate', V='\0'),
         Type4_LV('EQoS', ReprName='Required Traffic Flow QoS', V='\0'),
         Type4_TLV('ProtConfig', ReprName='Protocol Config Options',
                   T=0x27, V='\x80'),
         Type1_TV('DevProp', ReprName='Device Properties', T=0xC, V=0)
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 2
0
class DOWNLINK_NAS_TRANSPORT(Layer3NASEMM):
    '''
    Net -> UE
    Dual
    '''
    constructorList = [ie for ie in EMMHeader(Type=98)] + [
        Type4_LV('NASContainer', V='\0\0')]
Exemplo n.º 3
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Bit('spare', Pt=0, BitLen=4),
         Bit('EPSAttRes', ReprName='EPS Attach Result', Pt=1, BitLen=4, 
             Dict=EPSAttRes_dict, Repr='hum'),
         Int('T3412', ReprName='GPRS Timer', Pt=0, Type='uint8'),
         Type4_LV('TAIList', ReprName='Tracking Area Identity List',
                  V=6*'\0'),
         Type6_LVE('ESMContainer', V=3*'\0'),
         Type4_TLV('GUTI', T=0x50, V=11*'\0'),
         Type3_TV('LAI', T=0x13, V=LAI(), Len=5),
         Type4_TLV('ID', T=0x23, V=ID()),
         Type3_TV('EMMCause', T=0x53, V='\0', Len=1),
         Type3_TV('T3402', T=0x17, V='\0', Len=1),
         Type3_TV('T3423', T=0x59, V='\0', Len=1),
         Type4_TLV('PLMNList', ReprName='Equivalent PLMNs', T=0x4A, 
                   V=PLMNList()),
         Type4_TLV('ECNList', ReprName='Emergency Number List', T=0x34,
                   V='\0\0\0'),
         Type4_TLV('EPSFeatSup', ReprName='EPS Network Feature Support',
                   T=0x64, V='\0'),
         Type1_TV('AddUpdRes', ReprName='Additional Update Result', T=0xF,
                  V=0),
         Type4_TLV('T3412ext', ReprName='GPRS Timer 3', T=0x5E, V='\0')
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 4
0
class ESM_NOTIFICATION(Layer3NAS):
    '''
    Net -> UE
    Local
    '''
    constructorList = [ie for ie in ESMHeader(Type=219)] + [ \
        Type4_LV('NotifInd', V='\0')]
Exemplo n.º 5
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Type4_LV('GUTI', V=11*'\0'),
         Type4_TLV('TAIList', ReprName='Tracking Area Identity List', 
                   T=0x54, V=6*'\0')
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 6
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NAS.__init__(self, with_security)
     self.extend([
         Bit('spare', Pt=0, BitLen=4),
         Bit('Bearer', ReprName='Linked EPS Bearer ID', Pt=5, BitLen=4,
             Repr='hum'),
         Type4_LV('EQoS', ReprName='EPS QoS', V='\0'),
         Type4_LV('TFT', ReprName='Traffic Flow Template', V='\0'),
         Type4_TLV('TI', ReprName='Transaction Identifier', T=0x5D, V='\0'),
         Type4_TLV('QoS', ReprName='Negotiated QoS', T=0x30, V=12*'\0'),
         Type3_TV('LLC_SAPI', ReprName='Negotiated LLC Service Access ' \
                   'Point ID', T=0x32, V='\0', Len=1),
         Type1_TV('RadioPrio', ReprName='Radio Priority', T=0x8, V=1),
         Type4_TLV('PFlowID', ReprName='Packet Flow ID', T=0x34, V='\0'),
         Type4_TLV('ProtConfig', ReprName='Protocol Config Options',
                   T=0x27, V='\x80')
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 7
0
class EPS_AUTHENTICATION_RESPONSE(Layer3NASEMM):
    '''
    UE -> Net
    Dual
    '''
    constructorList = [ie for ie in EMMHeader(Type=83)] + [
        Type4_LV('RES', V=4*'\0')
        ]
    def __init__(self, with_options=False, with_security=False, **kwargs):
        Layer3.__init__(self, **kwargs)
        self.RES.V.Repr = 'hex'
Exemplo n.º 8
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NAS.__init__(self, with_security)
     self.extend([
         Type4_LV('EQoS', ReprName='EPS QoS', V='\0'),
         Type4_LV('APN', ReprName='Access Point Name', V='\0'),
         Type4_LV('PDNAddr', ReprName='PDN Address', V=5*'\0'),
         Type4_TLV('LTI', ReprName='Linked Transaction Identifier', T=0x5D, V='\0'),
         Type4_TLV('QoS', ReprName='Negotiated QoS', T=0x30, V=12*'\0'),
         Type3_TV('LLC_SAPI', ReprName='Negotiated LLC Service Access ' \
                   'Point ID', T=0x32, V='\0', Len=1),
         Type1_TV('RadioPrio', ReprName='Radio Priority', T=0x8, V=1),
         Type4_TLV('PFlowID', ReprName='Packet Flow ID', T=0x34, V='\0'),
         Type4_TLV('APN_AMBR', ReprName='APN Aggregate Maximum Bitrate', 
                   T=0x5E, V='\0\0'),
         Type3_TV('ESMCause', T=0x58, V='\0', Len=1),
         Type4_TLV('ProtConfig', ReprName='Protocol Configuration options',
                   T=0x27, V='\x80'),
         Type1_TV('ConType', ReprName='Connectivity Type', T=0xB, V=0)
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 9
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Bit('NASKSI', ReprName='NAS Key Set Identifier', Pt=0, BitLen=4,
             Dict=NASKSI_dict, Repr='hum'),
         Bit('EPSAttType', ReprName='EPS Attach Type', Pt=1, BitLen=4, 
             Dict=EPSAttType_dict, Repr='hum'),
         Type4_LV('EPS_ID', ReprName='EPS Mobile Identity', V=4*'\0'),
         Type4_LV('UENetCap', ReprName='UE Network Capability', V='\0\0'),
         Type6_LVE('ESMContainer', V=3*'\0'),
         Type3_TV('PTMSISign', ReprName='Old P-TMSI Signature', T=0x19,
                  V=3*'\0', Len=3),
         Type4_TLV('GUTI', ReprName='Additional GUTI', T=0x50, V=11*'\0'),
         Type3_TV('TAI', ReprName='Last Visited TAI', T=0x52,
                  V=5*'\0', Len=5),
         Type3_TV('DRX', ReprName='DRX Parameter', T=0x5C, V=2*'\0', Len=2),
         Type4_TLV('MSNetCap', ReprName='MS Network Capability', T=0x31,
                   V='\0\0'),
         Type3_TV('LAI', ReprName='Old LAI', T=0x13, V=LAI(), Len=5),
         Type1_TV('TMSIStat', ReprName='TMSI Status', T=0x9, V=0,
                  Dict=TMSIStatus_dict),
         Type4_TLV('MSCm2', T=0x11, V=MSCm2()),
         Type4_TLV('MSCm3', T=0x20, V=MSCm3()),
         Type4_TLV('SuppCodecs', ReprName='Supported Codecs List',
                   T=0x40, V='\0\0\0'),
         Type1_TV('AddUpdType', ReprName='Additional Update Type', T=0xF,
                  V=0),
         Type4_TLV('VoicePref', ReprName='Voice Domain Preference', T=0x5D,
                   V='\0'),
         Type1_TV('DevProp', ReprName='Device Properties', T=0xD, V=0),
         Type1_TV('GUTIType', ReprName='Old GUTI Type', T=0xE, V=0,
                  Dict=GUTIType_dict),
         Type1_TV('MSFeatSup', ReprName='MS Net Feature Support', 
                  T=0xC, V=0),
         Type4_TLV('NRIContainer', ReprName='TMSI-based NRI Container',
                   T=0x10, V=2*'\0')
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 10
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Bit('NASKSI', ReprName='NAS Key Set Indentifier', Pt=0, BitLen=4,
             Dict=NASKSI_dict, Repr='hum'),
         Bit('ServType', ReprName='Service Type', Pt=0, BitLen=4,
             Dict=ServType_dict, Repr='hum'),
         Type4_LV('ID', ReprName='M-TMSI', V=ID()),
         Type1_TV('CSFBResp', T=0xB, V=0, Dict=CSFBResp_dict),
         Type4_TLV('EPSCtxStat', ReprName='EPS Bearer Context Status',
                   T=0x57, V=2*'\0'),
         Type1_TV('DevProp', ReprName='Device Properties', T=0xD, V=0)
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 11
0
class EPS_AUTHENTICATION_REQUEST(Layer3NASEMM):
    '''
    Net -> UE
    Dual
    '''
    constructorList = [ie for ie in EMMHeader(Type=82)] + [
        Bit('spare', Pt=0, BitLen=4),
        Bit('NASKSI', ReprName='NAS Key Set Indentifier', Pt=0, BitLen=4,
            Dict=NASKSI_dict, Repr='hum'),
        Str('RAND', Pt=16*'\0', Len=16, Repr='hex'),
        Type4_LV('AUTN', V=16*'\0') # the good old AUTN overflow capability...
        ]
    def __init__(self, with_options=False, with_security=False, **kwargs):
        Layer3.__init__(self, **kwargs)
        self.AUTN.V.Repr = 'hex'
Exemplo n.º 12
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Int('NASSecAlg', ReprName='Selected NAS Security Algorithms',
             Pt=0, Type='uint8', Repr='hex'),
         Bit('spare', Pt=0, BitLen=4),
         Bit('NASKSI', ReprName='NAS Key Set Indentifier', Pt=0, BitLen=4,
             Dict=NASKSI_dict, Repr='hum'),
         Type4_LV('UESecCap', ReprName='Replayed UE Security Capabilities',
                  V=2*'\0'),
         Type1_TV('IMEISVReq', T=0x0C, V=0),
         Type3_TV('NonceUE', ReprName='Replayed Nonce UE', T=0x55, V=4*'\0',
                  Len=4),
         Type3_TV('NonceMME', T=0x56, V=4*'\0', Len=4)
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 13
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     if self._initiator != 'Net':
         self.extend([
             Bit('NASKSI', ReprName='NAS Key Set Indentifier', Pt=0,
                 BitLen=4, Dict=NASKSI_dict, Repr='hum'),
             Bit('DetType', ReprName='Detach Type', Pt=0, BitLen=4,
                 Dict=MEDetType_dict, Repr='hum'),
             Type4_LV('EPS_ID', ReprName='EPS Mobile Identity', V=4*'\0')])
     else:
         self.extend([
             Bit('spare', Pt=0, BitLen=4),
             Bit('DetType', ReprName='Detach Type', Pt=0, BitLen=4,
                 Dict=NetDetType_dict, Repr='hum'),
             Type3_TV('EMMCause', T=0x53, V='\0', Len=1)])
     self._post_init(with_options, **kwargs)
Exemplo n.º 14
0
 def __init__(self, with_options=False, with_security=False, **kwargs):
     Layer3NASEMM.__init__(self, with_security)
     self.extend([
         Bit('NASKSI', ReprName='NAS Key Set Indentifier', Pt=0, BitLen=4,
             Dict=NASKSI_dict, Repr='hum'),
         Bit('EPSUpdType', ReprName='EPS Update Type', BitLen=4, 
             Dict=EPSUpdType_dict, Repr='hum'),
         Type4_LV('GUTI', ReprName='Old GUTI', V=11*'\0'),
         Type1_TV('NonCurNASKSI', ReprName='Non Current NAS KSI', T=0xB,
                  V=0, Dict=NASKSI_dict),
         Type1_TV('CKSN', ReprName='GPRS ciphering key sequence number',
                  T=0x8, V=0, Dict=CKSN_dict),
         Type3_TV('PTMSISign', ReprName='Old P-TMSI signature', T=0x19,
                  V=3*'\0', Len=3),
         Type4_TLV('GUTI_2', ReprName='Additional GUTI', T=0x50, V=11*'\0'),
         Type3_TV('NonceUE', T=0x55, V=4*'\0', Len=4),
         Type4_TLV('UENetCap', ReprName='UE network capability', T=0x58, 
                   V='\0\0'),
         Type3_TV('TAI', ReprName='Last Visited Registered TAI', T=0x52,
                  V=5*'\0', Len=5),
         Type3_TV('DRX', ReprName='DRX Parameter', T=0x5C, V=2*'\0', Len=2),
         Type1_TV('UERadCapUpd', ReprName='UE Radio Capability Info Update '\
                  'Needed', T=0xA, V=0),
         Type4_TLV('EPSCtxStat', ReprName='EPS Bearer Context Status',
                   T=0x57, V=2*'\0'),
         Type4_TLV('MSNetCap', ReprName='MS network capability', T=0x31,
                   V='\0\0'),
         Type3_TV('LAI', ReprName='Old LAI', T=0x13, V=LAI(), Len=5),
         Type1_TV('TMSIStat', ReprName='TMSI status', T=0x9, V=0,
                  Dict=TMSIStatus_dict),
         Type4_TLV('MSCm2', T=0x11, V=MSCm2()),
         Type4_TLV('MSCm3', T=0x20, V=MSCm3()),
         Type4_TLV('SuppCodecs', ReprName='Supported codecs list',
                   T=0x40, V='\0\0\0'),
         Type1_TV('AddUpdType', ReprName='Additional Update Type', T=0xF,
                  V=0),
         Type4_TLV('VoicePref', ReprName='Voice domain preference', T=0x5D,
                   V='\0'),
         Type1_TV('GUTIType', ReprName='Old GUTI Type', T=0xE, V=0, 
                  Dict=GUTIType_dict),
         Type1_TV('DevProp', ReprName='Device Properties', T=0xD, V=0),
         Type1_TV('MSFeatSup', ReprName='MS Net Feature Support', 
                  T=0xC, V=0),
         Type4_TLV('NRIContainer', ReprName='TMSI-based NRI Container',
                   T=0x10, V=2*'\0')
         ])
     self._post_init(with_options, **kwargs)
Exemplo n.º 15
0
class UPLINK_NAS_TRANSPORT(Layer3NASEMM):
    constructorList = [ie for ie in EMMHeader(Type=99)] + [
        Type4_LV('NASContainer', V='\0\0')]
Exemplo n.º 16
0
class EPS_IDENTITY_RESPONSE(Layer3NASEMM):
    constructorList = [ie for ie in EMMHeader(Type=86)] + [
        Type4_LV('ID', V=ID())]