Пример #1
0
GMMCause_dict = IANA_dict({ \
    0:'Protocol error, unspecified',
    2:'IMSI unknown in HLR',
    3:'Illegal MS',
    4:'Protocol error, unspecified',
    5:'IMEI not accepted',
    6:'Illegal ME',
    7:'GPRS services not allowed',
    8:'GPRS services and non-GPRS services not allowed',
    9:'MS identity cannot be derived by the network',
    10:'implicitly detached',
    11:'PLMN not allowed',
    12:'Location Area not allowed',
    13:'Roaming not allowed in this location area',
    14:'GPRS services not allowed in this PLMN',
    15:'GPRS services not allowed in this PLMN',
    16:'MSC temporarily not reachable',
    17:'Network failure',
    18:'Protocol error, unspecified',
    20:'MAC failure',
    21:'Synch failure',
    22:'Congestion',
    23:'GSM authentication unacceptable',
    24:'Protocol error, unspecified',
    25:'Not authorized for this CSG',
    26:'Protocol error, unspecified',
    40:'No PDP context activated',
    41:'Protocol error, unspecified',
    48:'retry upon entry into a new cell',
    64:'Protocol error, unspecified',
    95:'Semantically incorrect message',
    96:'Invalid mandatory information',
    97:'Message type non-existent or not implemented',
    98:'Message type not compatible with the protocol state',
    99:'Information element non-existent or not implemented',
    100:'Conditional IE error',
    101:'Message not compatible with the protocol state',
    102:'Protocol error, unspecified',
    })
Пример #2
0
chunk_dict = IANA_dict({
    0: ('Payload Data', 'DATA'),
    1: ('Initiation', 'INIT'),
    2: ('Initiation Acknowledgement', 'INIT_ACK'),
    3: ('Selective Acknowledgement', 'SACK'),
    4: ('Heartbeat Request', 'HEARTBEAT'),
    5: ('Heartbeat Acknowledgement', 'HEARTBEAT_ACK'),
    6: ('Abort', 'ABORT'),
    7: ('Shutdown', 'SHUTDOWN'),
    8: ('Shutdown Acknowledgement', 'SHUTDOWN_ACK'),
    9: ('Operation Error', 'ERROR'),
    10: ('State Cookie', 'COOKIE_ECHO'),
    11: ('Cookie Acknowledgement', 'COOKIE_ACK'),
    12: ('Reserved for Explicit Congestion Notification Echo', 'ECNE'),
    13: ('Reserved for Congestion Window Reduced', 'CWR'),
    14: ('Shutdown Complete', 'SHUTDOWN_COMPLETE'),
    15: ('Authentication Chunk', 'AUTH'),
    16:
    'available',
    63:
    'reserved',
    64:
    'available',
    127:
    'reserved',
    128: ('Address Configuration Acknowledgment', 'ASCONF_ACK'),
    129:
    'available',
    132: ('Padding Chunk', 'PAD'),
    133:
    'available',
    191:
    'reserved',
    192: ('Forward TSN', 'FWD_TSN'),
    193: ('Address Configuration Change Chunk', 'ASCONF'),
    194:
    'available',
    255:
    'reserved'
})
Пример #3
0
Reject_dict = IANA_dict({ \
    0:'private',
    2:'IMSI unknown in HLR',
    3:'Illegal MS',
    4:'IMSI unknown in VLR',
    5:'IMEI not accepted',
    6:'Illegal ME',
    7:'private',
    11:'PLMN not allowed',
    12:'Location Area not allowed',
    13:'Roaming not allowed in this location area',
    14:'private',
    15:'No Suitable Cells In Location Area',
    16:'private',
    17:'Network failure',
    18:'private',
    20:'MAC failure',
    21:'Synch failure',
    22:'Congestion',
    23:'GSM authentication unacceptable',
    24:'private',
    25:'Not authorized for this CSG',
    26:'private',
    32:'Service option not supported',
    33:'Requested service option not subscribed',
    34:'Service option temporarily out of order',
    35:'private',
    38:'Call cannot be identified',
    39:'private',
    48:'retry upon entry into a new cell',
    95:'Semantically incorrect message',
    96:'Invalid mandatory information',
    97:'Message type non-existent or not implemented',
    98:'Message type not compatible with the protocol state',
    99:'Information element non-existent or not implemented',
    100:'Conditional IE error',
    101:'Message not compatible with the protocol state',
    102:'private',
    111:'Protocol error, unspecified',
    112:'private'})
Пример #4
0
#*/ 

#!/usr/bin/env python

# generic imports
from libmich.core.element import Str, Int, Layer, Block, show
from libmich.core.IANA_dict import IANA_dict

SIMAKASubtype = IANA_dict({
    0 : "Reserved",
    1 : "AKA-Challenge",
    2 : "AKA-Authentication-Reject",
    3 : "Unassigned",
    4 : "AKA-Synchronization-Failure",
    5 : "AKA-Identity",
    6 : "Unassigned",
    10 : "SIM-Start",
    11 : "SIM-Challenge",
    12 : "AKA-Notification and SIM-Notification",
    13 : "AKA-Reauthentication and SIM-Reauthentication",
    14 : "AKA-Client-Error and SIM-Client-Error",
    15 : "Unassigned",
    255 : "Unassigned",
    })
    
SIMAKAAttribute = IANA_dict({
    0 : "Reserved",
    1 : "AT_RAND",
    2 : "AT_AUTN",
    3 : "AT_RES",
    4 : "AT_AUTS",
    5 : "Unassigned",
Пример #5
0
Seg_dict = IANA_dict({

    # reserved markers
    0x01: ('Temporary private use in arithmetic coding', 'TEM'),
    0x02: ('reserved', 'RES'),
    0xBF: ('reserved', 'RES'),

    # non-differential Huffman coding
    0xC0: ('Start Of Frame (Baseline DCT)', 'SOF0'),
    0xC1: ('Start Of Frame (Extended Sequential DCT)', 'S0F1'),
    0xC2: ('Start Of Frame (Progressive DCT)', 'SOF2'),
    0xC3: ('Start Of Frame (Lossless Sequential)', 'S0F3'),

    # differential Huffman coding
    0xC5: ('Start Of Frame (Differential Sequential DCT)', 'SOF5'),
    0xC6: ('Start Of Frame (Differential Progressive DCT)', 'S0F6'),
    0xC7: ('Start Of Frame (Differential Lossless Sequential)', 'SOF7'),

    # non-differential arithmetic coding
    0xC8: ('Start Of Frame (Reserved for JPEG extensions)', 'JPG'),
    0xC9: ('Start Of Frame (Extended Sequential DCT)', 'S0F9'),
    0xCA: ('Start Of Frame (Progressive DCT)', 'SOF10'),
    0xCB: ('Start Of Frame (Lossless Sequential)', 'S0F11'),

    # differential arithmetic coding
    0xCD: ('Start Of Frame (Differential Sequential DCT)', 'SOF12'),
    0xCE: ('Start Of Frame (Differential Progressive DCT)', 'S0F13'),
    0xCF: ('Start Of Frame (Differential Lossless Sequential)', 'SOF14'),

    # huffman table spec
    0xC4: ('Define Huffman Table(s)', 'DHT'),
    # arithmetic coding conditioning spec
    0xCC: ('Define Arithmetic Coding Conditioning(s)', 'DAC'),

    # restart interval termination
    0xD0: ('RST0'),
    0xD1: ('RST1'),
    0xD2: ('RST2'),
    0xD3: ('RST3'),
    0xD4: ('RST4'),
    0xD5: ('RST5'),
    0xD6: ('RST6'),
    0xD7: ('RST7'),

    # other markers
    0xD8: ('Start Of Image', 'SOI'),
    0xD9: ('End Of Image', 'EOI'),
    0xDA: ('Start Of Scan', 'SOS'),
    0xDB: ('Define Quantization Table(s)', 'DQT'),
    0xDD: ('Define Restart Interval', 'DRI'),
    0xDE: ('Define Hierarchichal Progression', 'DHP'),
    0xDF: ('Expand Reference Component(s)', 'EXP'),

    # reserved for application segments
    0xE0: ('APP0'),
    0xE1: ('APP1'),
    0xE2: ('APP2'),
    0xE3: ('APP3'),
    0xE4: ('APP4'),
    0xE5: ('APP5'),
    0xE6: ('APP6'),
    0xE7: ('APP7'),
    0xE8: ('APP8'),
    0xE9: ('APP9'),
    0xEA: ('APPA'),
    0xEB: ('APPB'),
    0xEC: ('APPC'),
    0xED: ('APPD'),
    0xEE: ('APPE'),
    0xEF: ('APPF'),

    # reserved for JPEG extensions
    0xF0: ('JPG0'),
    0xF1: ('JPG1'),
    0xF2: ('JPG2'),
    0xF3: ('JPG3'),
    0xF4: ('JPG4'),
    0xF5: ('JPG5'),
    0xF6: ('JPG6'),
    0xF7: ('JPG7'),
    0xF8: ('JPG8'),
    0xF9: ('JPG9'),
    0xFA: ('JPGA'),
    0xFB: ('JPGB'),
    0xFC: ('JPGC'),
    0xFD: ('JPGD'),

    # comment
    0xFE: ('Comment', 'COM'),
})
Пример #6
0
    print '[WNG] pycrypto not found:'\
          '.protect() / .unprotect() will fail'
# TODO: some data lengths still hardcoded in protect() / unprotect() methods

PayloadType = IANA_dict({
    0: "None",
    1: "Reserved",
    33: ("Security Association", "SA"),
    34: ("Key Exchange", "KE"),
    35: ("Identification - Initiator", "IDi"),
    36: ("Identification - Responder", "IDr"),
    37: ("Certificate", "CERT"),
    38: ("Certificate Request", "CERTREQ"),
    39: ("Authentication", "Auth"),
    40: ("Nonce", "N"),
    41: ("Notify", "Not"),
    42: ("Delete", "Del"),
    43: ("Vendor ID", "V"),
    44: ("Traffic Selector - Initiator", "TSi"),
    45: ("Traffic Selector - Responder", "TSr"),
    46: ("Encrypted", "Enc"),
    47: ("Configuration", "CP"),
    48: ("Extensible Authentication", "EAP"),
    49: "Unassigned",
    128: "Private",
    255: "Private",
})

ExchangeType = IANA_dict({
    0: "Reserved",
    34: "IKE_SA_INIT",
Пример #7
0
###
# This is a naive and quick implementation of the S1AP protocol:
# This is firstly developped to interoperate with the lteenb application
# from Amarisoft (F. Bellard SDR LTE implementation)
#
# message formatting is taken from TS 36.413, section 11
###

Type_dict = {
    0x00: 'InitiatingMessage',
    0x20: 'SuccessfulOutcome',
    0x40: 'UnsuccessfulOutcome',
}

Critic_dict = IANA_dict({
    0x00: 'reject',
    0x40: 'ignore',
})

ProcedureCode_dict = IANA_dict({
    0: "id-HandoverPreparation",
    1: "id-HandoverResourceAllocation",
    2: "id-HandoverNotification",
    3: "id-PathSwitchRequest",
    4: "id-HandoverCancel",
    5: "id-E-RABSetup",
    6: "id-E-RABModify",
    7: "id-E-RABRelease",
    8: "id-E-RABReleaseIndication",
    9: "id-InitialContextSetup",
    10: "id-Paging",
    11: "id-downlinkNASTransport",
Пример #8
0
# * Created : 2011-08-28
# * Authors : Benoit Michau
# *--------------------------------------------------------
#*/

#!/usr/bin/env python

# generic imports
from libmich.core.element import Str, Int, Layer, Block
from libmich.core.IANA_dict import IANA_dict

code_dict = IANA_dict({
    1: "Request",
    2: "Response",
    3: "Success",
    4: "Failure",
    5: "Initiate",
    6: "Finish",
    7: "Unassigned",
    255: "Unassigned",
})

method_dict = IANA_dict({
    0: "Reserved",
    1: "Identity",
    2: "Notification",
    3: "Legacy Nak",
    4: ("MD5-Challenge", "md5"),
    5: ("One-Time Password", "otp"),
    6: ("Generic Token Card", "gtc"),
    7: "Allocated",
    8: "Allocated",
Пример #9
0
###
# GA-RC is the basis UMA signaling layer:
# 1) GA-RC discovery request -> accept / reject <-
# 2) GA-RC register request -> accept / reject / redirect <-
# 3) GA-RC deregister <->
# 4) GA-RC keep alive ->
# 5) GA-RC synch info ->
# 6) GA-RC cell broadcast info <-
###
'''
### Implements TS 44.318 v920, section 11 ###
'''

ProtocolDiscriminator = IANA_dict({
    0: "GA-RC",
    1: "GA-CSR",
    2: "GA-PSR",
    3: "GA-RRC",
})

RCMsgType = IANA_dict({
    1: 'GA-RC DISCOVERY REQUEST',
    2: 'GA-RC DISCOVERY ACCEPT',
    3: 'GA-RC DISCOVERY REJECT',
    4: 'unassigned',
    16: 'GA-RC REGISTER REQUEST',
    17: 'GA-RC REGISTER ACCEPT',
    18: 'GA-RC REGISTER REDIRECT',
    19: 'GA-RC REGISTER REJECT',
    20: 'GA-RC DEREGISTER',
    21: 'GA-RC REGISTER UPDATE UPLINK',
    22: 'GA-RC REGISTER UPDATE DOWNLINK',
Пример #10
0
            kid.map(self.KID())
            self.replace(self.KID, kid)


#
RespStatus_dict = IANA_dict({
    0x00 : 'PoR OK',
    0x01 : 'RC/CC/DS failed',
    0x02 : 'CNTR low',
    0x03 : 'CNTR high',
    0x04 : 'CNTR Blocked',
    0x05 : 'Ciphering error',
    0x06 : 'Unidentified security error. This code is for the case where the Receiving Entity cannot correctly ' \
           'interpret the Command Header and the Response Packet is sent unciphered with no RC/CC/DS ',
    0x07 : 'Insufficient memory to process incoming message',
    0x08 : 'This status code "more time" should be used if the Receiving Entity/Application needs more time ' \
           'to process the Command Packet due to timing constraints. In this case a later Response Packet ' \
           'should be returned to the Sending Entity once processing has been completed',
    0x09 : 'TAR Unknown',
    0x0A : 'Insufficient security level',
    0x0B : 'Reserved for 3GPP (see TS 131 115 [5])',
    0x0C : 'Reserved for 3GPP (see TS 131 115 [5])',
    0x0D : 'to 0xBF Reserved for future use',
    0xC0 : 'to 0xFE Reserved for proprietary use',
    0xFF : 'Reserved for future use',
    })


class RespPacket(Layer):
    constructorList = [
        Int('RPI', ReprName='Response Packet Identifier', Pt=0, Type='uint8'),
Пример #11
0
__all__ = ['LCP', 'LCPopt', 'NCP', 'IPCP']
###
# this is from RFC 1331 and 1332 on PPP
###

###
# RFC 1331

LCPCode_dict = IANA_dict({
    1: 'Configure-Request',
    2: 'Configure-Ack',
    3: 'Configure-Nak',
    4: 'Configure-Reject',
    5: 'Terminate-Request',
    6: 'Terminate-Ack',
    7: 'Code-Reject',
    8: 'Protocol-Reject',
    9: 'Echo-Request',
    10: 'Echo-Reply',
    11: 'Discard-Request',
    12: 'RESERVED',
})


class LCP(Layer):
    constructorList = [
        Int('Code', Pt=0, Type='uint8', Dict=LCPCode_dict),
        Int('Identifier', Pt=0, Type='uint8'),
        Int('Length', Type='uint16'),
        Str('Data', Pt='', Repr='hex'),
    ]
Пример #12
0
# SUA: http://wiki.tools.ietf.org/html/rfc3868

# http://www.iana.org/assignments/sigtran-adapt
# (almost) automatic parsing and generation
# -> see michau.benoit.free.fr for the script
# Registry Name: Message Classes
Classes = IANA_dict({
    0 : ('Management Message', 'MGMT'), # [RFC4233] [RFC3331] [RFC4666] [RFC3868] [RFC4129] [RFC3057]
    1 : 'Transfer Messages', # [RFC4666]
    2 : ('SS7 Signalling Network Management Messages', 'SSNM'), # [RFC4666] [RFC3868]
    3 : ('ASP State Maintenance Messages', 'ASPSM'), # [RFC4233] [RFC3331] [RFC4666] [RFC3868] [RFC4129] [RFC3057]
    4 : ('ASP Traffic Maintenance Messages', 'ASPTM'), # [RFC4233] [RFC3331] [RFC4666] [RFC3868] [RFC4129] [RFC3057]
    5 : ('Q.921/Q.931 Boundary Primitives Transport Messages', 'QPTM'), # [RFC4233]
    6 : ('MTP2 User Adaptation Messages', 'MAUP'), # [RFC3331]
    7 : 'Connectionless Messages', # [RFC3868]
    8 : 'Connection-Oriented Messages', # [RFC3868]
    9 : ('Routing Key Management Messages', 'RKM'), # [RFC4666]
    10 : ('Interface Identifier Management Messages', 'IIM'), # [RFC3331]
    11 : 'M2PA Messages', # [RFC4165]
    12 : 'Security Messages', # [RFC3788]
    13 : 'DPNSS/DASS2 Boundary Primitives Transport Messages', # [RFC4129]
    14 : 'V5 Boundary Primitives Transport Messages', # [RFC3807]
    15 : 'Unassigned',
    128 : 'Reserved for IETF-Defined Message Class extensions',
})

# Registry Name: Message Types - Management (MGMT) Message (Value 0)
MGMT = IANA_dict({
    0 : ('Error', 'ERR'), # [RFC4233] [RFC3331] [RFC4666] [RFC3868] [RFC4129] [RFC3057]
    1 : ('Notify', 'NTFY'), # [RFC4233] [RFC3331] [RFC4666] [RFC3868] [RFC4129] [RFC3057]
    2 : 'TEI Status Request', # [RFC4233] [RFC3057]
Пример #13
0
from libmich.formats.L3GSM_IE import *
from libmich.formats.L3GSM_rest import *
#
#
######
# TS 24.007, section 11.2.3.1.1
# Protocol Discriminator dict
PD_dict = IANA_dict({
    0: ("group call control", "GCC"),
    1: ("broadcast call control", "BC"),
    2: ("EPS session management messages", "ESM"),
    3: ("call control; call related SS messages", "CC"),
    4: ("GPRS Transparent Transport Protocol", "GTTP"),
    5: ("mobility management messages", "MM"),
    6: ("radio resources management messages", "RR"),
    7: ("EPS mobility management messages", "EMM"),
    8: ("GPRS mobility management messages", "GMM"),
    9: ("short messages service", "SMS"),
    10: ("GPRS session management messages", "SM"),
    11: ("non call related SS messages", "SS"),
    12: ("Location services", "LCS"),  # specified in 3GPP TS 44.071 [8a]
    13: "reserved for extension of the PD to one octet length",
    14: "testing",
})

#
# the following list is used when parsing L3 messages
# if a field has 1 of the following name (possibly with an _[0-9]{1,} suffix)
# its content will be mapped onto the corresponding Information Element
IE_lookup = {
    # L3Mobile_IE.py: 2G / 3G IE
Пример #14
0
# * Created : 2011-08-28 
# * Authors : Benoit Michau 
# *--------------------------------------------------------
#*/ 

#!/usr/bin/env python

from libmich.core.element import Str, Int, Bit, \
     Layer, Block, RawLayer
from libmich.core.IANA_dict import IANA_dict


# GTP version 1 is defined in TS 29.060 for CP
# and TS 29.281 for UP
ProtType = IANA_dict({
    0 : 'GTP prime',
    1 : 'GTP',
    })

MsgTypeV1 = IANA_dict({
    0 : "undefined",
    1 : "Echo Request",
    2 : "Echo Response",
    3 : "Version Not Supported",
    4 : "Node Alive Request",
    5 : "Node Alive Response",
    6 : "Redirection Request",
    7 : "Redirection Response",
    8 : "undefined",
    16 : "Create PDP Context Request",
    17 : "Create PDP Context Response",
    18 : "Update PDP Context Request",
Пример #15
0
# and how the content of the message itself is encoded
# SM-TL : Short Message Transport Protocol
# SM-AL : Short Message Application Layer


# 24007, section 11.2.3.1.2
TI_dict = {
    0:'allocated by sender',
    1:'allocated by receiver',
    }

# 24011, section 8.1: SM-CP
# CS Mobility Management procedures dict
SMSCP_dict = IANA_dict({
    1:("SMS CP-DATA", "DATA"),
    4:("SMS CP-ACK", "ACK"),
    16:("SMS CP-ERROR", "ERR"),
    })

# section 8.1.4.2
CPCause_dict = {
    17 : 'Network failure',
    22 : 'Congestion',
    81 : 'Invalid Transaction Identifier value',
    95 : 'Semantically incorrect message',
    96 : 'Invalid mandatory information',
    97 : 'Message type non existent or not implemented',
    98 : 'Message not compatible with the short message protocol state',
    99 : 'Information element non existent or not implemented',
    111 : 'Protocol error, unspecified',
    }
Пример #16
0
IP_prot = IANA_dict({
    0 : "HOPOPT",
    1 : "ICMP",
    2 : "IGMP",
    3 : "GGP",
    4 : "IP",
    5 : "ST",
    6 : "TCP",
    7 : "CBT",
    8 : "EGP",
    9 : "IGP",
    10 : "BBN-RCC-MON",
    11 : "NVP-II",
    12 : "PUP",
    13 : "ARGUS",
    14 : "EMCON",
    15 : "XNET",
    16 : "CHAOS",
    17 : "UDP",
    18 : "MUX",
    19 : "DCN-MEAS",
    20 : "HMP",
    21 : "PRM",
    22 : "XNS-IDP",
    23 : "TRUNK-1",
    24 : "TRUNK-2",
    25 : "LEAF-1",
    26 : "LEAF-2",
    27 : "RDP",
    28 : "IRTP",
    29 : "ISO-TP4",
    30 : "NETBLT",
    31 : "MFE-NSP",
    32 : "MERIT-INP",
    33 : "DCCP",
    34 : "3PC",
    35 : "IDPR",
    36 : "XTP",
    37 : "DDP",
    38 : "IDPR-CMTP",
    39 : "TP++",
    40 : "IL",
    41 : "IPv6",
    42 : "SDRP",
    43 : "IPv6-Route",
    44 : "IPv6-Frag",
    45 : "IDRP",
    46 : "RSVP",
    47 : "GRE",
    48 : "DSR",
    49 : "BNA",
    50 : "ESP",
    51 : "AH",
    52 : "I-NLSP",
    53 : "SWIPE",
    54 : "NARP",
    55 : "MOBILE",
    56 : "TLSP",
    57 : "SKIP",
    58 : "IPv6-ICMP",
    59 : "IPv6-NoNxt",
    60 : "IPv6-Opts",
    61 : "any",
    62 : "CFTP",
    63 : "any",
    64 : "SAT-EXPAK",
    65 : "KRYPTOLAN",
    66 : "RVD",
    67 : "IPPC",
    68 : "any",
    69 : "SAT-MON",
    70 : "VISA",
    71 : "IPCV",
    72 : "CPNX",
    73 : "CPHB",
    74 : "WSN",
    75 : "PVP",
    76 : "BR-SAT-MON",
    77 : "SUN-ND",
    78 : "WB-MON",
    79 : "WB-EXPAK",
    80 : "ISO-IP",
    81 : "VMTP",
    82 : "SECURE-VMTP",
    83 : "VINES",
    84 : "TTP",
    85 : "NSFNET-IGP",
    86 : "DGP",
    87 : "TCF",
    88 : "EIGRP",
    89 : "OSPFIGP",
    90 : "Sprite-RPC",
    91 : "LARP",
    92 : "MTP",
    93 : "AX.25",
    94 : "IPIP",
    95 : "MICP",
    96 : "SCC-SP",
    97 : "ETHERIP",
    98 : "ENCAP",
    99 : "any",
    100 : "GMTP",
    101 : "IFMP",
    102 : "PNNI",
    103 : "PIM",
    104 : "ARIS",
    105 : "SCPS",
    106 : "QNX",
    107 : "A/N",
    108 : "IPComp",
    109 : "SNP",
    110 : "Compaq-Peer",
    111 : "IPX-in-IP",
    112 : "VRRP",
    113 : "PGM",
    114 : "any",
    115 : "L2TP",
    116 : "DDX",
    117 : "IATP",
    118 : "STP",
    119 : "SRP",
    120 : "UTI",
    121 : "SMP",
    122 : "SM",
    123 : "PTP",
    124 : "ISIS",
    125 : "FIRE",
    126 : "CRTP",
    127 : "CRUDP",
    128 : "SSCOPMCE",
    129 : "IPLT",
    130 : "SPS",
    131 : "PIPE",
    132 : "SCTP",
    133 : "FC",
    134 : "RSVP-E2E-IGNORE",
    135 : "Mobility",
    136 : "UDPLite",
    137 : "MPLS-in-IP",
    138 : "manet",
    139 : "HIP",
    140 : "Shim6",
    141 : "Unassigned",
    252 : "Unassigned",
    253 : "Experimentation",
    254 : "Experimentation",
    255 : "Reserved"
    })
Пример #17
0
#*/

#!/usr/bin/env python
from libmich.core.element import Bit, Int, Str, Layer, RawLayer, Block, show, debug
from libmich.core.IANA_dict import IANA_dict

# endianness to use when mapping an ELF file onto our Elf Layers
Int._endian = 'little'

# global header info
e_type_dict = IANA_dict({
    0: 'ET_NONE: No file type',
    1: 'ET_REL: Relocatable file',
    2: 'ET_EXEC: Executable file',
    3: 'ET_DYN: Shared object file',
    4: 'ET_CORE: Core file',
    0xfe00: 'ET_LOOS: OS specific',
    0xfeff: 'ET_HIOS: OS specific',
    0xff00: 'ET_LOPROC: Processor specific',
    0xffff: 'ET_HIPROC: Processor specific',
})
e_machine_dict = {
    0: 'No machine',
    1: 'AT&T WE 32100',
    2: 'SPARC',
    3: 'Intel 80386',
    4: 'Motorola 68000',
    5: 'Motorola 88000',
    7: 'Intel 80860',
    8: 'MIPS I Architecture',
    10: 'MIPS RS3000 little-endian',
Пример #18
0
ElementProc_dict = IANA_dict({
    0 : 'id-RAB-Assignment',
    1 : 'id-Iu-Release',
    2 : 'id-RelocationPreparation',
    3 : 'id-RelocationResourceAllocation',
    4 : 'id-RelocationCancel',
    5 : 'id-SRNS-ContextTransfer',
    6 : 'id-SecurityModeControl',
    7 : 'id-DataVolumeReport',
    9 : 'id-Reset',
    10 : 'id-RAB-ReleaseRequest',
    11 : 'id-Iu-ReleaseRequest',
    12 : 'id-RelocationDetect',
    13 : 'id-RelocationComplete',
    14 : 'id-Paging',
    15 : 'id-CommonID',
    16 : 'id-CN-InvokeTrace',
    17 : 'id-LocationReportingControl',
    18 : 'id-LocationReport',
    19 : 'id-InitialUE-Message',
    20 : 'id-DirectTransfer',
    21 : 'id-OverloadControl',
    22 : 'id-ErrorIndication',
    23 : 'id-SRNS-DataForward',
    24 : 'id-ForwardSRNS-Context',
    25 : 'id-privateMessage',
    26 : 'id-CN-DeactivateTrace',
    27 : 'id-ResetResource',
    28 : 'id-RANAP-Relocation',
    29 : 'id-RAB-ModifyRequest',
    30 : 'id-LocationRelatedData',
    31 : 'id-InformationTransfer',
    32 : 'id-UESpecificInformation',
    33 : 'id-UplinkInformationExchange',
    34 : 'id-DirectInformationTransfer',
    35 : 'id-MBMSSessionStart',
    36 : 'id-MBMSSessionUpdate',
    37 : 'id-MBMSSessionStop',
    38 : 'id-MBMSUELinking',
    39 : 'id-MBMSRegistration',
    40 : 'id-MBMSCNDe-Registration-Procedure',
    41 : 'id-MBMSRABEstablishmentIndication',
    42 : 'id-MBMSRABRelease',
    43 : 'id-enhancedRelocationComplete',
    44 : 'id-enhancedRelocationCompleteConfirm',
    45 : 'id-RANAPenhancedRelocation',
    46 : 'id-SRVCCPreparation',
    })