From 3385855ce25a3d7c30a75ee0c20906d5247ef5e1 Mon Sep 17 00:00:00 2001 From: Santeri Moberg Date: Tue, 7 Feb 2017 09:11:27 +0200 Subject: [PATCH] Used autopep8 on gsm_um.py file modified: scapy-2.3.3/scapy/contrib/gsm_um.py --- scapy-2.3.3/scapy/contrib/gsm_um.py | 14639 +++++++++++++------------- 1 file changed, 7320 insertions(+), 7319 deletions(-) diff --git a/scapy-2.3.3/scapy/contrib/gsm_um.py b/scapy-2.3.3/scapy/contrib/gsm_um.py index 36b6a41..0b54156 100644 --- a/scapy-2.3.3/scapy/contrib/gsm_um.py +++ b/scapy-2.3.3/scapy/contrib/gsm_um.py @@ -18,15 +18,15 @@ along with this program. If not, see . """ - #################################################################### - # This file holds the GSM UM interface implementation for Scapy # - # author: Laurent Weber # - # # - # Some examples on how to use this script: # - # http://0xbadcab1e.lu/scapy_gsm_um-howto.txt # - # # - # tested on: scapy-version: 2.2.0 (dev) # - #################################################################### +#################################################################### +# This file holds the GSM UM interface implementation for Scapy # +# author: Laurent Weber # +# # +# Some examples on how to use this script: # +# http://0xbadcab1e.lu/scapy_gsm_um-howto.txt # +# # +# tested on: scapy-version: 2.2.0 (dev) # +#################################################################### import logging from types import IntType @@ -81,6 +81,7 @@ def sendum(x, typeSock=0): class ErrorLength(Exception): + def __str__(self): error = "ERROR: Please make sure you build entire, 8 bit fields." return repr(error) @@ -161,17 +162,17 @@ class TpPd(Packet): name = "Skip Indicator And Transaction Identifier and Protocol \ Discriminator" fields_desc = [ - BitField("ti", 0x0, 4), - BitField("pd", 0x3, 4) - ] + BitField("ti", 0x0, 4), + BitField("pd", 0x3, 4) + ] class MessageType(Packet): """Message Type Section 10.4""" name = "Message Type" fields_desc = [ - XByteField("mesType", 0x3C) - ] + XByteField("mesType", 0x3C) + ] ## @@ -373,8 +374,8 @@ class ChannelRequest(Packet): """Channel request Section 9.1.8""" name = "Channel Request" fields_desc = [ - ByteField("estCause", 0x0) - ] + ByteField("estCause", 0x0) + ] def channelRequest(): @@ -387,8 +388,8 @@ def cipheringModeCommand(): a = TpPd(pd=0x6) b = MessageType(mesType=0x35) # 00110101 c = RrCause() - #d=cipherModeSetting() - #e=cipherResponse() + # d=cipherModeSetting() + # e=cipherResponse() # FIX d = CipherModeSettingAndcipherResponse() packet = a / b / c / d @@ -565,8 +566,8 @@ def gprsSuspensionRequest(): class HandoverAccess(Packet): name = "Handover Access" # Section 9.1.14" fields_desc = [ - ByteField("handover", None), - ] + ByteField("handover", None), + ] # Network to MS @@ -713,9 +714,9 @@ def handoverFailure(): return packet -#The L2 pseudo length of this message is the sum of lengths of all -#information elements present in the message except -#the IA Rest Octets and L2 Pseudo Length information elements. +# The L2 pseudo length of this message is the sum of lengths of all +# information elements present in the message except +# the IA Rest Octets and L2 Pseudo Length information elements. # Network to MS def immediateAssignment(ChannelDescription_presence=0, PacketChannelDescription_presence=0, @@ -744,9 +745,9 @@ def immediateAssignment(ChannelDescription_presence=0, return packet -#The L2 pseudo length of this message is the sum of lengths of all -#information elements present in the message except -#the IAX Rest Octets and L2 Pseudo Length information elements. +# The L2 pseudo length of this message is the sum of lengths of all +# information elements present in the message except +# the IAX Rest Octets and L2 Pseudo Length information elements. # Network to MS def immediateAssignmentExtended(StartingTime_presence=0): @@ -803,11 +804,11 @@ class NotificationFacch(): """NOTIFICATION/FACCH Section 9.1.21a""" name = "Notification/facch" fields_desc = [ - BitField("rr", 0x0, 1), - BitField("msgTyoe", 0x0, 5), - BitField("layer2Header", 0x0, 2), - BitField("frChanDes", 0x0, 24) - ] + BitField("rr", 0x0, 1), + BitField("msgTyoe", 0x0, 5), + BitField("layer2Header", 0x0, 2), + BitField("frChanDes", 0x0, 24) + ] # The L2 pseudo length of this message has a value one @@ -847,9 +848,9 @@ def rrCellChangeOrder(): # Network to MS def pagingRequestType1(MobileId_presence=0): """PAGING REQUEST TYPE 1 Section 9.1.22""" - #The L2 pseudo length of this message is the sum of lengths of all - #information elements present in the message except - #the P1 Rest Octets and L2 Pseudo Length information elements. + # The L2 pseudo length of this message is the sum of lengths of all + # information elements present in the message except + # the P1 Rest Octets and L2 Pseudo Length information elements. a = L2PseudoLength() b = TpPd(pd=0x6) c = MessageType(mesType=0x21) # 00100001 @@ -970,14 +971,14 @@ class SynchronizationChannelInformation(): """SYNCHRONIZATION CHANNEL INFORMATION Section 9.1.30""" name = "Synchronization Channel Information" fields_desc = [ - BitField("bsic", 0x0, 5), - BitField("t1Hi", 0x0, 3), - ByteField("t1Mi", 0x0), - BitField("t1Lo", 0x0, 1), - BitField("t2", 0x0, 5), - BitField("t3Hi", 0x0, 2), - BitField("t3Lo", 0x0, 1) - ] + BitField("bsic", 0x0, 5), + BitField("t1Hi", 0x0, 3), + ByteField("t1Mi", 0x0), + BitField("t1Lo", 0x0, 1), + BitField("t2", 0x0, 5), + BitField("t3Hi", 0x0, 2), + BitField("t3Lo", 0x0, 1) + ] # This message has a L2 Pseudo Length of 21. @@ -1053,9 +1054,9 @@ def systemInformationType3(): return packet -#The L2 pseudo length of this message is the -#sum of lengths of all information elements present in the message except -#the SI 4 Rest Octets and L2 Pseudo Length +# The L2 pseudo length of this message is the +# sum of lengths of all information elements present in the message except +# the SI 4 Rest Octets and L2 Pseudo Length # Network to MS def systemInformationType4(ChannelDescription_presence=0, MobileAllocation_presence=0): @@ -1078,7 +1079,7 @@ def systemInformationType4(ChannelDescription_presence=0, return packet -#This message has a L2 Pseudo Length of 18 +# This message has a L2 Pseudo Length of 18 # Network to MS def systemInformationType5(): """SYSTEM INFORMATION TYPE 5 Section 9.1.37""" @@ -1090,7 +1091,7 @@ def systemInformationType5(): return packet -#This message has a L2 Pseudo Length of 18 +# This message has a L2 Pseudo Length of 18 # Network to MS def systemInformationType5bis(): """SYSTEM INFORMATION TYPE 5bis Section 9.1.38""" @@ -1114,7 +1115,7 @@ def systemInformationType5ter(): return packet -#This message has a L2 Pseudo Length of 11 +# This message has a L2 Pseudo Length of 11 # Network to MS def systemInformationType6(): """SYSTEM INFORMATION TYPE 6 Section 9.1.40""" @@ -1219,8 +1220,8 @@ class UplinkAccess(): """UPLINK ACCESS Section 9.1.45""" name = "Uplink Access" fields_desc = [ - ByteField("establishment", 0x0) - ] + ByteField("establishment", 0x0) + ] # Network to MS @@ -1238,13 +1239,13 @@ class UplinkFree(): """UPLINK FREE Section 9.1.47""" name = "Uplink Free" fields_desc = [ - BitField("pd", 0x0, 1), - BitField("msgType", 0x0, 5), - BitField("layer2Header", 0x0, 2), - BitField("uplinkAccess", 0x0, 1), - BitField("lOrH", 0x0, 1), # 0 for L, 1 for H - BitField("upIdCode", 0x0, 6), - ] + BitField("pd", 0x0, 1), + BitField("msgType", 0x0, 5), + BitField("layer2Header", 0x0, 2), + BitField("uplinkAccess", 0x0, 1), + BitField("lOrH", 0x0, 1), # 0 for L, 1 for H + BitField("upIdCode", 0x0, 6), + ] def uplinkRelease(): @@ -1273,11 +1274,11 @@ def systemInformationType10(): """SYSTEM INFORMATION TYPE 10 Section 9.1.50""" name = "SyStem Information Type 10" fields_desc = [ - BitField("pd", 0x0, 1), - BitField("msgType", 0x0, 5), - BitField("layer2Header", 0x0, 2), - BitField("si10", 0x0, 160) - ] + BitField("pd", 0x0, 1), + BitField("msgType", 0x0, 5), + BitField("layer2Header", 0x0, 2), + BitField("si10", 0x0, 160) + ] # Network to MS @@ -2057,7 +2058,7 @@ def setupMobileTerminated(RepeatIndicator_presence=0, CallingPartySubaddress_presence=0, CalledPartyBcdNumber_presence=0, CalledPartySubaddress_presence=0, -# RecallType_presence=0, + # RecallType_presence=0, RedirectingPartyBcdNumber_presence=0, RedirectingPartySubaddress_presence=0, RepeatIndicator_presence1=0, @@ -2450,8 +2451,8 @@ def ptmsiReallocationComplete(): def authenticationAndCipheringRequest( - AuthenticationParameterRAND_presence=0, - CiphKeySeqNr_presence=0): + AuthenticationParameterRAND_presence=0, + CiphKeySeqNr_presence=0): """AUTHENTICATION AND CIPHERING REQUEST Section 9.4.9""" a = TpPd(pd=0x3) b = MessageType(mesType=0x12) # 00010010 @@ -2468,8 +2469,8 @@ def authenticationAndCipheringRequest( def authenticationAndCipheringResponse( - AuthenticationParameterSRES_presence=0, - MobileId_presence=0): + AuthenticationParameterSRES_presence=0, + MobileId_presence=0): """AUTHENTICATION AND CIPHERING RESPONSE Section 9.4.10""" a = TpPd(pd=0x3) b = MessageType(mesType=0x13) # 00010011 @@ -2829,59 +2830,59 @@ class CellIdentityHdr(Packet): """ Cell identity Section 10.5.1.1 """ name = "Cell Identity" fields_desc = [ - BitField("eightBitCI", None, 1), - XBitField("ieiCI", None, 7), - ByteField("ciValue1", 0x0), - ByteField("ciValue2", 0x0) - ] + BitField("eightBitCI", None, 1), + XBitField("ieiCI", None, 7), + ByteField("ciValue1", 0x0), + ByteField("ciValue2", 0x0) + ] class CiphKeySeqNrHdr(Packet): """ Ciphering Key Sequence Number Section 10.5.1.2 """ name = "Cipher Key Sequence Number" fields_desc = [ - XBitField("ieiCKSN", None, 4), - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3) - ] + XBitField("ieiCKSN", None, 4), + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3) + ] # Fix 1/2 len problem class CiphKeySeqNrAndSpareHalfOctets(Packet): name = "Cipher Key Sequence Number and Spare Half Octets" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3), + BitField("spareHalfOctets", 0x0, 4) + ] # Fix 1/2 len problem class CiphKeySeqNrAndMacModeAndChannelCodingRequest(Packet): name = "Cipher Key Sequence Number and Mac Mode And Channel Coding Request" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3), - BitField("macMode", 0x0, 2), - BitField("cs", 0x0, 2) - ] + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3), + BitField("macMode", 0x0, 2), + BitField("cs", 0x0, 2) + ] class LocalAreaIdHdr(Packet): """ Local Area Identification Section 10.5.1.3 """ name = "Location Area Identification" fields_desc = [ - BitField("eightBitLAI", None, 1), - XBitField("ieiLAI", None, 7), - BitField("mccDigit2", 0x0, 4), - BitField("mccDigit1", 0x0, 4), - BitField("mncDigit3", 0x0, 4), - BitField("mccDigit3", 0x0, 4), - BitField("mncDigit2", 0x0, 4), - BitField("mncDigit1", 0x0, 4), - ByteField("lac1", 0x0), - ByteField("lac2", 0x0) - ] + BitField("eightBitLAI", None, 1), + XBitField("ieiLAI", None, 7), + BitField("mccDigit2", 0x0, 4), + BitField("mccDigit1", 0x0, 4), + BitField("mncDigit3", 0x0, 4), + BitField("mccDigit3", 0x0, 4), + BitField("mncDigit2", 0x0, 4), + BitField("mncDigit1", 0x0, 4), + ByteField("lac1", 0x0), + ByteField("lac2", 0x0) + ] # # The Mobile Identity is a type 4 information element with a minimum # length of 3 octet and 11 octets length maximal. @@ -2893,36 +2894,36 @@ class MobileIdHdr(Packet): """ Mobile Identity Section 10.5.1.4 """ name = "Mobile Identity" fields_desc = [ - BitField("eightBitMI", 0x0, 1), - XBitField("ieiMI", 0x0, 7), + BitField("eightBitMI", 0x0, 1), + XBitField("ieiMI", 0x0, 7), - XByteField("lengthMI", None), + XByteField("lengthMI", None), - BitField("idDigit1", 0x0, 4), - BitField("oddEven", 0x0, 1), - BitField("typeOfId", 0x0, 3), + BitField("idDigit1", 0x0, 4), + BitField("oddEven", 0x0, 1), + BitField("typeOfId", 0x0, 3), - BitField("idDigit2_1", None, 4), # optional - BitField("idDigit2", None, 4), + BitField("idDigit2_1", None, 4), # optional + BitField("idDigit2", None, 4), - BitField("idDigit3_1", None, 4), - BitField("idDigit3", None, 4), + BitField("idDigit3_1", None, 4), + BitField("idDigit3", None, 4), - BitField("idDigit4_1", None, 4), - BitField("idDigit4", None, 4), + BitField("idDigit4_1", None, 4), + BitField("idDigit4", None, 4), - BitField("idDigit5_1", None, 4), - BitField("idDigit5", None, 4), + BitField("idDigit5_1", None, 4), + BitField("idDigit5", None, 4), - BitField("idDigit6_1", None, 4), - BitField("idDigit6", None, 4), - BitField("idDigit7_1", None, 4), - BitField("idDigit7", None, 4), - BitField("idDigit8_1", None, 4), - BitField("idDigit8", None, 4), - BitField("idDigit9_1", None, 4), - BitField("idDigit9", None, 4), - ] + BitField("idDigit6_1", None, 4), + BitField("idDigit6", None, 4), + BitField("idDigit7_1", None, 4), + BitField("idDigit7", None, 4), + BitField("idDigit8_1", None, 4), + BitField("idDigit8", None, 4), + BitField("idDigit9_1", None, 4), + BitField("idDigit9", None, 4), + ] def post_build(self, p, pay): # this list holds the values of the variables, the @@ -2941,44 +2942,44 @@ class MobileStationClassmark1Hdr(Packet): """ Mobile Station Classmark 1 Section 10.5.1.5 """ name = "Mobile Station Classmark 1" fields_desc = [ - BitField("eightBitiMSC1", None, 1), - XBitField("ieiMSC1", None, 7), - BitField("spare", 0x0, 1), - BitField("revisionLvl", 0x0, 2), - BitField("esInd", 0x0, 1), - BitField("a51", 0x0, 1), - BitField("rfPowerCap", 0x0, 3) - ] + BitField("eightBitiMSC1", None, 1), + XBitField("ieiMSC1", None, 7), + BitField("spare", 0x0, 1), + BitField("revisionLvl", 0x0, 2), + BitField("esInd", 0x0, 1), + BitField("a51", 0x0, 1), + BitField("rfPowerCap", 0x0, 3) + ] class MobileStationClassmark2Hdr(Packet): """ Mobile Station Classmark 2 Section 10.5.1.6 """ name = "Mobile Station Classmark 2" fields_desc = [ - BitField("eightBitMSC2", None, 1), - XBitField("ieiMSC2", None, 7), - XByteField("lengthMSC2", 0x3), - BitField("spare", 0x0, 1), - BitField("revisionLvl", 0x0, 2), - BitField("esInd", 0x0, 1), - BitField("a51", 0x0, 1), - BitField("rfPowerCap", 0x0, 3), - BitField("spare1", 0x0, 1), - BitField("psCap", 0x0, 1), - BitField("ssScreenInd", 0x0, 2), - BitField("smCaPabi", 0x0, 1), - BitField("vbs", 0x0, 1), - BitField("vgcs", 0x0, 1), - BitField("fc", 0x0, 1), - BitField("cm3", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("lcsvaCap", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("soLsa", 0x0, 1), - BitField("cmsp", 0x0, 1), - BitField("a53", 0x0, 1), - BitField("a52", 0x0, 1) - ] + BitField("eightBitMSC2", None, 1), + XBitField("ieiMSC2", None, 7), + XByteField("lengthMSC2", 0x3), + BitField("spare", 0x0, 1), + BitField("revisionLvl", 0x0, 2), + BitField("esInd", 0x0, 1), + BitField("a51", 0x0, 1), + BitField("rfPowerCap", 0x0, 3), + BitField("spare1", 0x0, 1), + BitField("psCap", 0x0, 1), + BitField("ssScreenInd", 0x0, 2), + BitField("smCaPabi", 0x0, 1), + BitField("vbs", 0x0, 1), + BitField("vgcs", 0x0, 1), + BitField("fc", 0x0, 1), + BitField("cm3", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("lcsvaCap", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("soLsa", 0x0, 1), + BitField("cmsp", 0x0, 1), + BitField("a53", 0x0, 1), + BitField("a52", 0x0, 1) + ] # len max 14 @@ -2986,81 +2987,81 @@ class MobileStationClassmark3(Packet): """ Mobile Station Classmark 3 Section 10.5.1.7 """ name = "Mobile Station Classmark 3" fields_desc = [ - # FIXME - ByteField("ieiMSC3", 0x0), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0) - ] + # FIXME + ByteField("ieiMSC3", 0x0), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0) + ] class SpareHalfOctets(Packet): """ Spare Half Octet Section 10.5.1.8 """ name = "Spare Half Octet" fields_desc = [ - BitField("filler", None, 4), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("filler", None, 4), + BitField("spareHalfOctets", 0x0, 4) + ] class DescriptiveGroupOrBroadcastCallReferenceHdr(Packet): """ Descriptive group or broadcast call reference Section 10.5.1.9 """ name = "Descriptive Group or Broadcast Call Reference" fields_desc = [ - BitField("eightBitDGOBCR", None, 1), - XBitField("ieiDGOBCR", None, 7), - BitField("binCallRef", 0x0, 27), - BitField("sf", 0x0, 1), - BitField("fa", 0x0, 1), - BitField("callPrio", 0x0, 3), - BitField("cipherInfo", 0x0, 4), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("spare4", 0x0, 1) - ] + BitField("eightBitDGOBCR", None, 1), + XBitField("ieiDGOBCR", None, 7), + BitField("binCallRef", 0x0, 27), + BitField("sf", 0x0, 1), + BitField("fa", 0x0, 1), + BitField("callPrio", 0x0, 3), + BitField("cipherInfo", 0x0, 4), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("spare4", 0x0, 1) + ] class GroupCipherKeyNumber(Packet): """ Group Cipher Key Number reference Section 10.5.1.10 """ name = "Group Cipher Key Number" fields_desc = [ - XBitField("ieiGCKN", None, 4), - BitField("groupCipher", 0x0, 4) - ] + XBitField("ieiGCKN", None, 4), + BitField("groupCipher", 0x0, 4) + ] class PdAndSapiHdr(Packet): """ PD and SAPI $(CCBS)$ Section 10.5.1.10a """ name = "PD and SAPI $(CCBS)$" fields_desc = [ - BitField("eightBitPAS", None, 1), - XBitField("ieiPAS", None, 7), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("sapi", 0x0, 2), - BitField("pd", 0x0, 4) - ] + BitField("eightBitPAS", None, 1), + XBitField("ieiPAS", None, 7), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("sapi", 0x0, 2), + BitField("pd", 0x0, 4) + ] class PriorityLevelHdr(Packet): """ Priority Level Section 10.5.1.11 """ name = "Priority Level" fields_desc = [ - XBitField("ieiPL", None, 4), - BitField("spare", 0x0, 1), - BitField("callPrio", 0x0, 3) - ] + XBitField("ieiPL", None, 4), + BitField("spare", 0x0, 1), + BitField("callPrio", 0x0, 3) + ] # # Radio Resource management information elements @@ -3072,439 +3073,439 @@ class BaRangeHdr(Packet): """ BA Range Section 10.5.2.1a """ name = "BA Range" fields_desc = [ - BitField("eightBitBR", None, 1), - XBitField("ieiBR", None, 7), - - XByteField("lengthBR", None), -#error: byte format requires -128 <= number <= 127 - ByteField("nrOfRanges", 0x0), -# # rX = range X -# # L o = Lower H i = higher -# # H p = high Part Lp = low Part - ByteField("r1LoHp", 0x0), - - BitField("r1LoLp", 0x0, 3), - BitField("r1HiHp", 0x0, 5), - - BitField("r1HiLp", 0x0, 4), - BitField("r2LoHp", 0x0, 4), - # optional - BitField("r2LoLp", None, 5), - BitField("r2HiHp", None, 3), - - ByteField("r2HiLp", None), - ByteField("r3LoHp", None), - - BitField("r3LoLp", None, 5), - BitField("r3HiHp", None, 3), - - ByteField("r3HiLp", None), - ByteField("r4LoHp", None), - - BitField("r4LoLp", None, 5), - BitField("r4HiHp", None, 3), - ByteField("r4HiLp", None), - ByteField("r5LoHp", None), - - BitField("r5LoLp", None, 5), - BitField("r5HiHp", None, 3), - ByteField("r5HiLp", None), - ByteField("r6LoHp", None), - - BitField("r6LoLp", None, 5), - BitField("r6HiHp", None, 3), - ByteField("r6HiLp", None), - ByteField("r7LoHp", None), - - BitField("r7LoLp", None, 5), - BitField("r7HiHp", None, 3), - ByteField("r7HiLp", None), - ByteField("r8LoHp", None), - - BitField("r8LoLp", None, 5), - BitField("r8HiHp", None, 3), - ByteField("r8HiLp", None), - ByteField("r9LoHp", None), - - BitField("r9LoLp", None, 5), - BitField("r9HiHp", None, 3), - ByteField("r9HiLp", None), - ByteField("r10LoHp", None), - - BitField("r10LoLp", None, 5), - BitField("r10HiHp", None, 3), - ByteField("r10HiLp", None), - ByteField("r11LoHp", None), - - BitField("r11LoLp", None, 5), - BitField("r11HiHp", None, 3), - ByteField("r11HiLp", None), - ByteField("r12LoHp", None), - - BitField("r12LoLp", None, 5), - BitField("r12HiHp", None, 3), - ByteField("r12HiLp", None), - ByteField("r13LoHp", None), - - BitField("r13LoLp", None, 5), - BitField("r13HiHp", None, 3), - ByteField("r13HiLp", None), - ByteField("r14LoHp", None), - - BitField("r14LoLp", None, 5), - BitField("r14HiHp", None, 3), - ByteField("r14HiLp", None), - ByteField("r15LoHp", None), - - BitField("r15LoLp", None, 5), - BitField("r15HiHp", None, 3), - ByteField("r15HiLp", None), - ByteField("r16LoHp", None), - - BitField("r16LoLp", None, 5), - BitField("r16HiHp", None, 3), - ByteField("r16HiLp", None), - ByteField("r17LoHp", None), - - BitField("r17LoLp", None, 5), - BitField("r17HiHp", None, 3), - ByteField("r17HiLp", None), - ByteField("r18LoHp", None), - - BitField("r18LoLp", None, 5), - BitField("r18HiHp", None, 3), - ByteField("r18HiLp", None), - ByteField("r19LoHp", None), - - BitField("r19LoLp", None, 5), - BitField("r19HiHp", None, 3), - ByteField("r19HiLp", None), - ByteField("r20LoHp", None), - - BitField("r20LoLp", None, 5), - BitField("r20HiHp", None, 3), - ByteField("r20HiLp", None), - ByteField("r21LoHp", None), - - BitField("r21LoLp", None, 5), - BitField("r21HiHp", None, 3), - ByteField("r21HiLp", None), - ByteField("r22LoHp", None), - - BitField("r22LoLp", None, 5), - BitField("r22HiHp", None, 3), - ByteField("r22HiLp", None), - ByteField("r23LoHp", None), - - BitField("r23LoLp", None, 5), - BitField("r23HiHp", None, 3), - ByteField("r23HiLp", None), - ByteField("r24LoHp", None), - - BitField("r24LoLp", None, 5), - BitField("r24HiHp", None, 3), - ByteField("r24HiLp", None), - ByteField("r25LoHp", None), - - BitField("r25LoLp", None, 5), - BitField("r25HiHp", None, 3), - ByteField("r25HiLp", None), - ByteField("r26LoHp", None), - - BitField("r26LoLp", None, 5), - BitField("r26HiHp", None, 3), - ByteField("r26HiLp", None), - ByteField("r27LoHp", None), - - BitField("r27LoLp", None, 5), - BitField("r27HiHp", None, 3), - ByteField("r27HiLp", None), - ByteField("r28LoHp", None), - - BitField("r28LoLp", None, 5), - BitField("r28HiHp", None, 3), - ByteField("r28HiLp", None), - ByteField("r29LoHp", None), - - BitField("r29LoLp", None, 5), - BitField("r29HiHp", None, 3), - ByteField("r29HiLp", None), - ByteField("r30LoHp", None), - - BitField("r30LoLp", None, 5), - BitField("r30HiHp", None, 3), - ByteField("r30HiLp", None), - ByteField("r31LoHp", None), - - BitField("r31LoLp", None, 5), - BitField("r31HiHp", None, 3), - ByteField("r31HiLp", None), - ByteField("r32LoHp", None), - - BitField("r32LoLp", None, 5), - BitField("r32HiHp", None, 3), - ByteField("r32HiLp", None), - ByteField("r33LoHp", None), - - BitField("r33LoLp", None, 5), - BitField("r33HiHp", None, 3), - ByteField("r33HiLp", None), - ByteField("r34LoHp", None), - - BitField("r34LoLp", None, 5), - BitField("r34HiHp", None, 3), - ByteField("r34HiLp", None), - ByteField("r35LoHp", None), - - BitField("r35LoLp", None, 5), - BitField("r35HiHp", None, 3), - ByteField("r35HiLp", None), - ByteField("r36LoHp", None), - - BitField("r36LoLp", None, 5), - BitField("r36HiHp", None, 3), - ByteField("r36HiLp", None), - ByteField("r37LoHp", None), - - BitField("r37LoLp", None, 5), - BitField("r37HiHp", None, 3), - ByteField("r37HiLp", None), - ByteField("r38LoHp", None), - - BitField("r38LoLp", None, 5), - BitField("r38HiHp", None, 3), - ByteField("r38HiLp", None), - ByteField("r39LoHp", None), - - BitField("r39LoLp", None, 5), - BitField("r39HiHp", None, 3), - ByteField("r39HiLp", None), - ByteField("r40LoHp", None), - - BitField("r40LoLp", None, 5), - BitField("r40HiHp", None, 3), - ByteField("r40HiLp", None), - ByteField("r41LoHp", None), - - BitField("r41LoLp", None, 5), - BitField("r41HiHp", None, 3), - ByteField("r41HiLp", None), - ByteField("r42LoHp", None), - - BitField("r42LoLp", None, 5), - BitField("r42HiHp", None, 3), - ByteField("r42HiLp", None), - ByteField("r43LoHp", None), - - BitField("r43LoLp", None, 5), - BitField("r43HiHp", None, 3), - ByteField("r43HiLp", None), - ByteField("r44LoHp", None), - - BitField("r44LoLp", None, 5), - BitField("r44HiHp", None, 3), - ByteField("r44HiLp", None), - ByteField("r45LoHp", None), - - BitField("r45LoLp", None, 5), - BitField("r45HiHp", None, 3), - ByteField("r45HiLp", None), - ByteField("r46LoHp", None), - - BitField("r46LoLp", None, 5), - BitField("r46HiHp", None, 3), - ByteField("r46HiLp", None), - ByteField("r47LoHp", None), - - BitField("r47LoLp", None, 5), - BitField("r47HiHp", None, 3), - ByteField("r47HiLp", None), - ByteField("r48LoHp", None), - - BitField("r48LoLp", None, 5), - BitField("r48HiHp", None, 3), - ByteField("r48HiLp", None), - ByteField("r49LoHp", None), - - BitField("r49LoLp", None, 5), - BitField("r49HiHp", None, 3), - ByteField("r49HiLp", None), - ByteField("r50LoHp", None), - - BitField("r50LoLp", None, 5), - BitField("r50HiHp", None, 3), - ByteField("r50HiLp", None), - ByteField("r51LoHp", None), - - BitField("r51LoLp", None, 5), - BitField("r51HiHp", None, 3), - ByteField("r51HiLp", None), - ByteField("r52LoHp", None), - - BitField("r52LoLp", None, 5), - BitField("r52HiHp", None, 3), - ByteField("r52HiLp", None), - ByteField("r53LoHp", None), - - BitField("r53LoLp", None, 5), - BitField("r53HiHp", None, 3), - ByteField("r53HiLp", None), - ByteField("r54LoHp", None), - - BitField("r54LoLp", None, 5), - BitField("r54HiHp", None, 3), - ByteField("r54HiLp", None), - ByteField("r55LoHp", None), - - BitField("r55LoLp", None, 5), - BitField("r55HiHp", None, 3), - ByteField("r55HiLp", None), - ByteField("r56LoHp", None), - - BitField("r56LoLp", None, 5), - BitField("r56HiHp", None, 3), - ByteField("r56HiLp", None), - ByteField("r57LoHp", None), - - BitField("r57LoLp", None, 5), - BitField("r57HiHp", None, 3), - ByteField("r57HiLp", None), - ByteField("r58LoHp", None), - - BitField("r58LoLp", None, 5), - BitField("r58HiHp", None, 3), - ByteField("r58HiLp", None), - ByteField("r59LoHp", None), - - BitField("r59LoLp", None, 5), - BitField("r59HiHp", None, 3), - ByteField("r59HiLp", None), - ByteField("r60LoHp", None), - - BitField("r60LoLp", None, 5), - BitField("r60HiHp", None, 3), - ByteField("r60HiLp", None), - ByteField("r61LoHp", None), - - BitField("r61LoLp", None, 5), - BitField("r61HiHp", None, 3), - ByteField("r61HiLp", None), - ByteField("r62LoHp", None), - - BitField("r62LoLp", None, 5), - BitField("r62HiHp", None, 3), - ByteField("r62HiLp", None), - ByteField("r63LoHp", None), - - BitField("r63LoLp", None, 5), - BitField("r63HiHp", None, 3), - ByteField("r63HiLp", None), - ByteField("r64LoHp", None), - - BitField("r64LoLp", None, 5), - BitField("r64HiHp", None, 3), - ByteField("r64HiLp", None), - ByteField("r65LoHp", None), - - BitField("r65LoLp", None, 5), - BitField("r65HiHp", None, 3), - ByteField("r65HiLp", None), - ByteField("r66LoHp", None), - - BitField("r66LoLp", None, 5), - BitField("r66HiHp", None, 3), - ByteField("r66HiLp", None), - ByteField("r67LoHp", None), - - BitField("r67LoLp", None, 5), - BitField("r67HiHp", None, 3), - ByteField("r67HiLp", None), - ByteField("r68LoHp", None), - - BitField("r68LoLp", None, 5), - BitField("r68HiHp", None, 3), - ByteField("r68HiLp", None), - ByteField("r69LoHp", None), - - BitField("r69LoLp", None, 5), - BitField("r69HiHp", None, 3), - ByteField("r69HiLp", None), - ByteField("r70LoHp", None), - - BitField("r70LoLp", None, 5), - BitField("r70HiHp", None, 3), - ByteField("r70HiLp", None), - ByteField("r71LoHp", None), - - BitField("r71LoLp", None, 5), - BitField("r71HiHp", None, 3), - ByteField("r71HiLp", None), - ByteField("r72LoHp", None), - - BitField("r72LoLp", None, 5), - BitField("r72HiHp", None, 3), - ByteField("r72HiLp", None), - ByteField("r73LoHp", None), - - BitField("r73LoLp", None, 5), - BitField("r73HiHp", None, 3), - ByteField("r73HiLp", None), - ByteField("r74LoHp", None), - - BitField("r74LoLp", None, 5), - BitField("r74HiHp", None, 3), - ByteField("r74HiLp", None), - ByteField("r75LoHp", None), - - BitField("r75LoLp", None, 5), - BitField("r75HiHp", None, 3), - ByteField("r75HiLp", None), - ByteField("r76LoHp", None), - - BitField("r76LoLp", None, 5), - BitField("r76HiHp", None, 3), - ByteField("r76HiLp", None), - ByteField("r77LoHp", None), - - BitField("r77LoLp", None, 5), - BitField("r77HiHp", None, 3), - ByteField("r77HiLp", None), - ByteField("r78LoHp", None), - - BitField("r78LoLp", None, 5), - BitField("r78HiHp", None, 3), - ByteField("r78HiLp", None), - ByteField("r79LoHp", None), - - BitField("r79LoLp", None, 5), - BitField("r79HiHp", None, 3), - ByteField("r79HiLp", None), - ByteField("r80LoHp", None), - - BitField("r80LoLp", None, 5), - BitField("r80HiHp", None, 3), - ByteField("r80HiLp", None), - ByteField("r81LoHp", None), - - BitField("r81LoLp", None, 5), - BitField("r81HiHp", None, 3), - ByteField("r81HiLp", None), - ByteField("r82LoHp", None), - - BitField("r82LoLp", None, 5), - BitField("r82HiHp", None, 3), - ByteField("r82HiLp", None), - ByteField("r83LoHp", None), - - BitField("r83LoLp", None, 5), - BitField("r83HiHp", None, 3), - ByteField("r83HiLp", None), - ByteField("r84LoHp", None), - - BitField("r84LoLp", None, 5), - BitField("r84HiHp", None, 3), - ByteField("r84HiLp", None) - ] + BitField("eightBitBR", None, 1), + XBitField("ieiBR", None, 7), + + XByteField("lengthBR", None), + # error: byte format requires -128 <= number <= 127 + ByteField("nrOfRanges", 0x0), + # # rX = range X + # # L o = Lower H i = higher + # # H p = high Part Lp = low Part + ByteField("r1LoHp", 0x0), + + BitField("r1LoLp", 0x0, 3), + BitField("r1HiHp", 0x0, 5), + + BitField("r1HiLp", 0x0, 4), + BitField("r2LoHp", 0x0, 4), + # optional + BitField("r2LoLp", None, 5), + BitField("r2HiHp", None, 3), + + ByteField("r2HiLp", None), + ByteField("r3LoHp", None), + + BitField("r3LoLp", None, 5), + BitField("r3HiHp", None, 3), + + ByteField("r3HiLp", None), + ByteField("r4LoHp", None), + + BitField("r4LoLp", None, 5), + BitField("r4HiHp", None, 3), + ByteField("r4HiLp", None), + ByteField("r5LoHp", None), + + BitField("r5LoLp", None, 5), + BitField("r5HiHp", None, 3), + ByteField("r5HiLp", None), + ByteField("r6LoHp", None), + + BitField("r6LoLp", None, 5), + BitField("r6HiHp", None, 3), + ByteField("r6HiLp", None), + ByteField("r7LoHp", None), + + BitField("r7LoLp", None, 5), + BitField("r7HiHp", None, 3), + ByteField("r7HiLp", None), + ByteField("r8LoHp", None), + + BitField("r8LoLp", None, 5), + BitField("r8HiHp", None, 3), + ByteField("r8HiLp", None), + ByteField("r9LoHp", None), + + BitField("r9LoLp", None, 5), + BitField("r9HiHp", None, 3), + ByteField("r9HiLp", None), + ByteField("r10LoHp", None), + + BitField("r10LoLp", None, 5), + BitField("r10HiHp", None, 3), + ByteField("r10HiLp", None), + ByteField("r11LoHp", None), + + BitField("r11LoLp", None, 5), + BitField("r11HiHp", None, 3), + ByteField("r11HiLp", None), + ByteField("r12LoHp", None), + + BitField("r12LoLp", None, 5), + BitField("r12HiHp", None, 3), + ByteField("r12HiLp", None), + ByteField("r13LoHp", None), + + BitField("r13LoLp", None, 5), + BitField("r13HiHp", None, 3), + ByteField("r13HiLp", None), + ByteField("r14LoHp", None), + + BitField("r14LoLp", None, 5), + BitField("r14HiHp", None, 3), + ByteField("r14HiLp", None), + ByteField("r15LoHp", None), + + BitField("r15LoLp", None, 5), + BitField("r15HiHp", None, 3), + ByteField("r15HiLp", None), + ByteField("r16LoHp", None), + + BitField("r16LoLp", None, 5), + BitField("r16HiHp", None, 3), + ByteField("r16HiLp", None), + ByteField("r17LoHp", None), + + BitField("r17LoLp", None, 5), + BitField("r17HiHp", None, 3), + ByteField("r17HiLp", None), + ByteField("r18LoHp", None), + + BitField("r18LoLp", None, 5), + BitField("r18HiHp", None, 3), + ByteField("r18HiLp", None), + ByteField("r19LoHp", None), + + BitField("r19LoLp", None, 5), + BitField("r19HiHp", None, 3), + ByteField("r19HiLp", None), + ByteField("r20LoHp", None), + + BitField("r20LoLp", None, 5), + BitField("r20HiHp", None, 3), + ByteField("r20HiLp", None), + ByteField("r21LoHp", None), + + BitField("r21LoLp", None, 5), + BitField("r21HiHp", None, 3), + ByteField("r21HiLp", None), + ByteField("r22LoHp", None), + + BitField("r22LoLp", None, 5), + BitField("r22HiHp", None, 3), + ByteField("r22HiLp", None), + ByteField("r23LoHp", None), + + BitField("r23LoLp", None, 5), + BitField("r23HiHp", None, 3), + ByteField("r23HiLp", None), + ByteField("r24LoHp", None), + + BitField("r24LoLp", None, 5), + BitField("r24HiHp", None, 3), + ByteField("r24HiLp", None), + ByteField("r25LoHp", None), + + BitField("r25LoLp", None, 5), + BitField("r25HiHp", None, 3), + ByteField("r25HiLp", None), + ByteField("r26LoHp", None), + + BitField("r26LoLp", None, 5), + BitField("r26HiHp", None, 3), + ByteField("r26HiLp", None), + ByteField("r27LoHp", None), + + BitField("r27LoLp", None, 5), + BitField("r27HiHp", None, 3), + ByteField("r27HiLp", None), + ByteField("r28LoHp", None), + + BitField("r28LoLp", None, 5), + BitField("r28HiHp", None, 3), + ByteField("r28HiLp", None), + ByteField("r29LoHp", None), + + BitField("r29LoLp", None, 5), + BitField("r29HiHp", None, 3), + ByteField("r29HiLp", None), + ByteField("r30LoHp", None), + + BitField("r30LoLp", None, 5), + BitField("r30HiHp", None, 3), + ByteField("r30HiLp", None), + ByteField("r31LoHp", None), + + BitField("r31LoLp", None, 5), + BitField("r31HiHp", None, 3), + ByteField("r31HiLp", None), + ByteField("r32LoHp", None), + + BitField("r32LoLp", None, 5), + BitField("r32HiHp", None, 3), + ByteField("r32HiLp", None), + ByteField("r33LoHp", None), + + BitField("r33LoLp", None, 5), + BitField("r33HiHp", None, 3), + ByteField("r33HiLp", None), + ByteField("r34LoHp", None), + + BitField("r34LoLp", None, 5), + BitField("r34HiHp", None, 3), + ByteField("r34HiLp", None), + ByteField("r35LoHp", None), + + BitField("r35LoLp", None, 5), + BitField("r35HiHp", None, 3), + ByteField("r35HiLp", None), + ByteField("r36LoHp", None), + + BitField("r36LoLp", None, 5), + BitField("r36HiHp", None, 3), + ByteField("r36HiLp", None), + ByteField("r37LoHp", None), + + BitField("r37LoLp", None, 5), + BitField("r37HiHp", None, 3), + ByteField("r37HiLp", None), + ByteField("r38LoHp", None), + + BitField("r38LoLp", None, 5), + BitField("r38HiHp", None, 3), + ByteField("r38HiLp", None), + ByteField("r39LoHp", None), + + BitField("r39LoLp", None, 5), + BitField("r39HiHp", None, 3), + ByteField("r39HiLp", None), + ByteField("r40LoHp", None), + + BitField("r40LoLp", None, 5), + BitField("r40HiHp", None, 3), + ByteField("r40HiLp", None), + ByteField("r41LoHp", None), + + BitField("r41LoLp", None, 5), + BitField("r41HiHp", None, 3), + ByteField("r41HiLp", None), + ByteField("r42LoHp", None), + + BitField("r42LoLp", None, 5), + BitField("r42HiHp", None, 3), + ByteField("r42HiLp", None), + ByteField("r43LoHp", None), + + BitField("r43LoLp", None, 5), + BitField("r43HiHp", None, 3), + ByteField("r43HiLp", None), + ByteField("r44LoHp", None), + + BitField("r44LoLp", None, 5), + BitField("r44HiHp", None, 3), + ByteField("r44HiLp", None), + ByteField("r45LoHp", None), + + BitField("r45LoLp", None, 5), + BitField("r45HiHp", None, 3), + ByteField("r45HiLp", None), + ByteField("r46LoHp", None), + + BitField("r46LoLp", None, 5), + BitField("r46HiHp", None, 3), + ByteField("r46HiLp", None), + ByteField("r47LoHp", None), + + BitField("r47LoLp", None, 5), + BitField("r47HiHp", None, 3), + ByteField("r47HiLp", None), + ByteField("r48LoHp", None), + + BitField("r48LoLp", None, 5), + BitField("r48HiHp", None, 3), + ByteField("r48HiLp", None), + ByteField("r49LoHp", None), + + BitField("r49LoLp", None, 5), + BitField("r49HiHp", None, 3), + ByteField("r49HiLp", None), + ByteField("r50LoHp", None), + + BitField("r50LoLp", None, 5), + BitField("r50HiHp", None, 3), + ByteField("r50HiLp", None), + ByteField("r51LoHp", None), + + BitField("r51LoLp", None, 5), + BitField("r51HiHp", None, 3), + ByteField("r51HiLp", None), + ByteField("r52LoHp", None), + + BitField("r52LoLp", None, 5), + BitField("r52HiHp", None, 3), + ByteField("r52HiLp", None), + ByteField("r53LoHp", None), + + BitField("r53LoLp", None, 5), + BitField("r53HiHp", None, 3), + ByteField("r53HiLp", None), + ByteField("r54LoHp", None), + + BitField("r54LoLp", None, 5), + BitField("r54HiHp", None, 3), + ByteField("r54HiLp", None), + ByteField("r55LoHp", None), + + BitField("r55LoLp", None, 5), + BitField("r55HiHp", None, 3), + ByteField("r55HiLp", None), + ByteField("r56LoHp", None), + + BitField("r56LoLp", None, 5), + BitField("r56HiHp", None, 3), + ByteField("r56HiLp", None), + ByteField("r57LoHp", None), + + BitField("r57LoLp", None, 5), + BitField("r57HiHp", None, 3), + ByteField("r57HiLp", None), + ByteField("r58LoHp", None), + + BitField("r58LoLp", None, 5), + BitField("r58HiHp", None, 3), + ByteField("r58HiLp", None), + ByteField("r59LoHp", None), + + BitField("r59LoLp", None, 5), + BitField("r59HiHp", None, 3), + ByteField("r59HiLp", None), + ByteField("r60LoHp", None), + + BitField("r60LoLp", None, 5), + BitField("r60HiHp", None, 3), + ByteField("r60HiLp", None), + ByteField("r61LoHp", None), + + BitField("r61LoLp", None, 5), + BitField("r61HiHp", None, 3), + ByteField("r61HiLp", None), + ByteField("r62LoHp", None), + + BitField("r62LoLp", None, 5), + BitField("r62HiHp", None, 3), + ByteField("r62HiLp", None), + ByteField("r63LoHp", None), + + BitField("r63LoLp", None, 5), + BitField("r63HiHp", None, 3), + ByteField("r63HiLp", None), + ByteField("r64LoHp", None), + + BitField("r64LoLp", None, 5), + BitField("r64HiHp", None, 3), + ByteField("r64HiLp", None), + ByteField("r65LoHp", None), + + BitField("r65LoLp", None, 5), + BitField("r65HiHp", None, 3), + ByteField("r65HiLp", None), + ByteField("r66LoHp", None), + + BitField("r66LoLp", None, 5), + BitField("r66HiHp", None, 3), + ByteField("r66HiLp", None), + ByteField("r67LoHp", None), + + BitField("r67LoLp", None, 5), + BitField("r67HiHp", None, 3), + ByteField("r67HiLp", None), + ByteField("r68LoHp", None), + + BitField("r68LoLp", None, 5), + BitField("r68HiHp", None, 3), + ByteField("r68HiLp", None), + ByteField("r69LoHp", None), + + BitField("r69LoLp", None, 5), + BitField("r69HiHp", None, 3), + ByteField("r69HiLp", None), + ByteField("r70LoHp", None), + + BitField("r70LoLp", None, 5), + BitField("r70HiHp", None, 3), + ByteField("r70HiLp", None), + ByteField("r71LoHp", None), + + BitField("r71LoLp", None, 5), + BitField("r71HiHp", None, 3), + ByteField("r71HiLp", None), + ByteField("r72LoHp", None), + + BitField("r72LoLp", None, 5), + BitField("r72HiHp", None, 3), + ByteField("r72HiLp", None), + ByteField("r73LoHp", None), + + BitField("r73LoLp", None, 5), + BitField("r73HiHp", None, 3), + ByteField("r73HiLp", None), + ByteField("r74LoHp", None), + + BitField("r74LoLp", None, 5), + BitField("r74HiHp", None, 3), + ByteField("r74HiLp", None), + ByteField("r75LoHp", None), + + BitField("r75LoLp", None, 5), + BitField("r75HiHp", None, 3), + ByteField("r75HiLp", None), + ByteField("r76LoHp", None), + + BitField("r76LoLp", None, 5), + BitField("r76HiHp", None, 3), + ByteField("r76HiLp", None), + ByteField("r77LoHp", None), + + BitField("r77LoLp", None, 5), + BitField("r77HiHp", None, 3), + ByteField("r77HiLp", None), + ByteField("r78LoHp", None), + + BitField("r78LoLp", None, 5), + BitField("r78HiHp", None, 3), + ByteField("r78HiLp", None), + ByteField("r79LoHp", None), + + BitField("r79LoLp", None, 5), + BitField("r79HiHp", None, 3), + ByteField("r79HiLp", None), + ByteField("r80LoHp", None), + + BitField("r80LoLp", None, 5), + BitField("r80HiHp", None, 3), + ByteField("r80HiLp", None), + ByteField("r81LoHp", None), + + BitField("r81LoLp", None, 5), + BitField("r81HiHp", None, 3), + ByteField("r81HiLp", None), + ByteField("r82LoHp", None), + + BitField("r82LoLp", None, 5), + BitField("r82HiHp", None, 3), + ByteField("r82HiLp", None), + ByteField("r83LoHp", None), + + BitField("r83LoLp", None, 5), + BitField("r83HiHp", None, 3), + ByteField("r83HiLp", None), + ByteField("r84LoHp", None), + + BitField("r84LoLp", None, 5), + BitField("r84HiHp", None, 3), + ByteField("r84HiLp", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -3521,19 +3522,19 @@ class BaListPrefHdr(Packet): """ BA List Pref Section 10.5.2.1c """ name = "BA List Pref" fields_desc = [ - # FIXME dynamic - BitField("eightBitBLP", None, 1), - XBitField("ieiBLP", None, 7), + # FIXME dynamic + BitField("eightBitBLP", None, 1), + XBitField("ieiBLP", None, 7), - XByteField("lengthBLP", None), + XByteField("lengthBLP", None), - BitField("fixBit", 0x0, 1), - BitField("rangeLower", 0x0, 10), - BitField("fixBit2", 0x0, 1), - BitField("rangeUpper", 0x0, 10), - BitField("baFreq", 0x0, 10), - BitField("sparePad", 0x0, 8) - ] + BitField("fixBit", 0x0, 1), + BitField("rangeLower", 0x0, 10), + BitField("fixBit2", 0x0, 1), + BitField("rangeUpper", 0x0, 10), + BitField("baFreq", 0x0, 10), + BitField("sparePad", 0x0, 8) + ] # len 17 || Have a look at the specs for the field format @@ -3547,216 +3548,216 @@ class CellChannelDescriptionHdr(Packet): """ Cell Channel Description Section 10.5.2.1b """ name = "Cell Channel Description " fields_desc = [ - BitField("eightBitCCD", None, 1), - XBitField("ieiCCD", None, 7), - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - ByteField("bit120", 0x0), - ByteField("bit112", 0x0), - ByteField("bit104", 0x0), - ByteField("bit96", 0x0), - ByteField("bit88", 0x0), - ByteField("bit80", 0x0), - ByteField("bit72", 0x0), - ByteField("bit64", 0x0), - ByteField("bit56", 0x0), - ByteField("bit48", 0x0), - ByteField("bit40", 0x0), - ByteField("bit32", 0x0), - ByteField("bit24", 0x0), - ByteField("bit16", 0x0), - ByteField("bit8", 0x0) - ] + BitField("eightBitCCD", None, 1), + XBitField("ieiCCD", None, 7), + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + ByteField("bit120", 0x0), + ByteField("bit112", 0x0), + ByteField("bit104", 0x0), + ByteField("bit96", 0x0), + ByteField("bit88", 0x0), + ByteField("bit80", 0x0), + ByteField("bit72", 0x0), + ByteField("bit64", 0x0), + ByteField("bit56", 0x0), + ByteField("bit48", 0x0), + ByteField("bit40", 0x0), + ByteField("bit32", 0x0), + ByteField("bit24", 0x0), + ByteField("bit16", 0x0), + ByteField("bit8", 0x0) + ] class CellDescriptionHdr(Packet): """ Cell Description Section 10.5.2.2 """ name = "Cell Description" fields_desc = [ - BitField("eightBitCD", None, 1), - XBitField("ieiCD", None, 7), - BitField("bcchHigh", 0x0, 2), - BitField("ncc", 0x0, 3), - BitField("bcc", 0x0, 3), - ByteField("bcchLow", 0x0) - ] + BitField("eightBitCD", None, 1), + XBitField("ieiCD", None, 7), + BitField("bcchHigh", 0x0, 2), + BitField("ncc", 0x0, 3), + BitField("bcc", 0x0, 3), + ByteField("bcchLow", 0x0) + ] class CellOptionsBCCHHdr(Packet): """ Cell Options (BCCH) Section 10.5.2.3 """ name = "Cell Options (BCCH)" fields_desc = [ - BitField("eightBitCOB", None, 1), - XBitField("ieiCOB", None, 7), - BitField("spare", 0x0, 1), - BitField("pwrc", 0x0, 1), - BitField("dtx", 0x0, 2), - BitField("rLinkTout", 0x0, 4) - ] + BitField("eightBitCOB", None, 1), + XBitField("ieiCOB", None, 7), + BitField("spare", 0x0, 1), + BitField("pwrc", 0x0, 1), + BitField("dtx", 0x0, 2), + BitField("rLinkTout", 0x0, 4) + ] class CellOptionsSACCHHdr(Packet): """ Cell Options (SACCH) Section 10.5.2.3a """ name = "Cell Options (SACCH)" fields_desc = [ - BitField("eightBitCOS", None, 1), - XBitField("ieiCOS", None, 7), - BitField("dtx", 0x0, 1), - BitField("pwrc", 0x0, 1), - BitField("dtx", 0x0, 1), - BitField("rLinkTout", 0x0, 4) - ] + BitField("eightBitCOS", None, 1), + XBitField("ieiCOS", None, 7), + BitField("dtx", 0x0, 1), + BitField("pwrc", 0x0, 1), + BitField("dtx", 0x0, 1), + BitField("rLinkTout", 0x0, 4) + ] class CellSelectionParametersHdr(Packet): """ Cell Selection Parameters Section 10.5.2.4 """ name = "Cell Selection Parameters" fields_desc = [ - BitField("eightBitCSP", None, 1), - XBitField("ieiCSP", None, 7), - BitField("cellReselect", 0x0, 3), - BitField("msTxPwrMax", 0x0, 5), - BitField("acs", None, 1), - BitField("neci", None, 1), - BitField("rxlenAccMin", None, 6) - ] + BitField("eightBitCSP", None, 1), + XBitField("ieiCSP", None, 7), + BitField("cellReselect", 0x0, 3), + BitField("msTxPwrMax", 0x0, 5), + BitField("acs", None, 1), + BitField("neci", None, 1), + BitField("rxlenAccMin", None, 6) + ] class MacModeAndChannelCodingRequestHdr(Packet): """ MAC Mode and Channel Coding Requested Section 10.5.2.4a """ name = "MAC Mode and Channel Coding Requested" fields_desc = [ - XBitField("ieiMMACCR", None, 4), - BitField("macMode", 0x0, 2), - BitField("cs", 0x0, 2) - ] + XBitField("ieiMMACCR", None, 4), + BitField("macMode", 0x0, 2), + BitField("cs", 0x0, 2) + ] class ChannelDescriptionHdr(Packet): """ Channel Description Section 10.5.2.5 """ name = "Channel Description" fields_desc = [ - BitField("eightBitCD", None, 1), - XBitField("ieiCD", None, 7), + BitField("eightBitCD", None, 1), + XBitField("ieiCD", None, 7), - BitField("channelTyp", 0x0, 5), - BitField("tn", 0x0, 3), + BitField("channelTyp", 0x0, 5), + BitField("tn", 0x0, 3), - BitField("tsc", 0x0, 3), - BitField("h", 0x1, 1), - # if h=1 maybe we find a better solution here... - BitField("maioHi", 0x0, 4), + BitField("tsc", 0x0, 3), + BitField("h", 0x1, 1), + # if h=1 maybe we find a better solution here... + BitField("maioHi", 0x0, 4), - BitField("maioLo", 0x0, 2), - BitField("hsn", 0x0, 6) - #BitField("spare", 0x0, 2), - #BitField("arfcnHigh", 0x0, 2), - #ByteField("arfcnLow", 0x0) - ] + BitField("maioLo", 0x0, 2), + BitField("hsn", 0x0, 6) + #BitField("spare", 0x0, 2), + #BitField("arfcnHigh", 0x0, 2), + #ByteField("arfcnLow", 0x0) + ] class ChannelDescription2Hdr(Packet): """ Channel Description 2 Section 10.5.2.5a """ name = "Channel Description 2" fields_desc = [ - BitField("eightBitCD2", None, 1), - XBitField("ieiCD2", None, 7), - BitField("channelTyp", 0x0, 5), - BitField("tn", 0x0, 3), - BitField("tsc", 0x0, 3), - BitField("h", 0x0, 1), - # if h=1 - # BitField("maioHi", 0x0, 4), - # BitField("maioLo", 0x0, 2), - # BitField("hsn", 0x0, 6) - BitField("spare", 0x0, 2), - BitField("arfcnHigh", 0x0, 2), - ByteField("arfcnLow", 0x0) - ] + BitField("eightBitCD2", None, 1), + XBitField("ieiCD2", None, 7), + BitField("channelTyp", 0x0, 5), + BitField("tn", 0x0, 3), + BitField("tsc", 0x0, 3), + BitField("h", 0x0, 1), + # if h=1 + # BitField("maioHi", 0x0, 4), + # BitField("maioLo", 0x0, 2), + # BitField("hsn", 0x0, 6) + BitField("spare", 0x0, 2), + BitField("arfcnHigh", 0x0, 2), + ByteField("arfcnLow", 0x0) + ] class ChannelModeHdr(Packet): """ Channel Mode Section 10.5.2.6 """ name = "Channel Mode" fields_desc = [ - BitField("eightBitCM", None, 1), - XBitField("ieiCM", None, 7), - ByteField("mode", 0x0) - ] + BitField("eightBitCM", None, 1), + XBitField("ieiCM", None, 7), + ByteField("mode", 0x0) + ] class ChannelMode2Hdr(Packet): """ Channel Mode 2 Section 10.5.2.7 """ name = "Channel Mode 2" fields_desc = [ - BitField("eightBitCM2", None, 1), - XBitField("ieiCM2", None, 7), - ByteField("mode", 0x0) - ] + BitField("eightBitCM2", None, 1), + XBitField("ieiCM2", None, 7), + ByteField("mode", 0x0) + ] class ChannelNeededHdr(Packet): """ Channel Needed Section 10.5.2.8 """ name = "Channel Needed" fields_desc = [ - XBitField("ieiCN", None, 4), - BitField("channel2", 0x0, 2), - BitField("channel1", 0x0, 2), - ] + XBitField("ieiCN", None, 4), + BitField("channel2", 0x0, 2), + BitField("channel1", 0x0, 2), + ] class ChannelRequestDescriptionHdr(Packet): """Channel Request Description Section 10.5.2.8a """ name = "Channel Request Description" fields_desc = [ - BitField("eightBitCRD", None, 1), - XBitField("ieiCRD", None, 7), - BitField("mt", 0x0, 1), - ConditionalField(BitField("spare", 0x0, 39), - lambda pkt: pkt.mt == 0), - ConditionalField(BitField("spare", 0x0, 3), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("priority", 0x0, 2), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("rlcMode", 0x0, 1), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("llcFrame", 0x1, 1), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("reqBandMsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("reqBandLsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("rlcMsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("rlcLsb", 0x0), - lambda pkt: pkt.mt == 1) - ] + BitField("eightBitCRD", None, 1), + XBitField("ieiCRD", None, 7), + BitField("mt", 0x0, 1), + ConditionalField(BitField("spare", 0x0, 39), + lambda pkt: pkt.mt == 0), + ConditionalField(BitField("spare", 0x0, 3), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("priority", 0x0, 2), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("rlcMode", 0x0, 1), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("llcFrame", 0x1, 1), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("reqBandMsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("reqBandLsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("rlcMsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("rlcLsb", 0x0), + lambda pkt: pkt.mt == 1) + ] class CipherModeSettingHdr(Packet): """Cipher Mode Setting Section 10.5.2.9 """ name = "Cipher Mode Setting" fields_desc = [ - XBitField("ieiCMS", None, 4), - BitField("algoId", 0x0, 3), - BitField("sc", 0x0, 1), - ] + XBitField("ieiCMS", None, 4), + BitField("algoId", 0x0, 3), + BitField("sc", 0x0, 1), + ] class CipherResponseHdr(Packet): """Cipher Response Section 10.5.2.10 """ name = "Cipher Response" fields_desc = [ - XBitField("ieiCR", None, 4), - BitField("spare", 0x0, 3), - BitField("cr", 0x0, 1), - ] + XBitField("ieiCR", None, 4), + BitField("spare", 0x0, 3), + BitField("cr", 0x0, 1), + ] # This packet fixes the problem with the 1/2 Byte length. Concatenation @@ -3764,61 +3765,61 @@ class CipherResponseHdr(Packet): class CipherModeSettingAndcipherResponse(Packet): name = "Cipher Mode Setting And Cipher Response" fields_desc = [ - BitField("algoId", 0x0, 3), - BitField("sc", 0x0, 1), - BitField("spare", 0x0, 3), - BitField("cr", 0x0, 1) - ] + BitField("algoId", 0x0, 3), + BitField("sc", 0x0, 1), + BitField("spare", 0x0, 3), + BitField("cr", 0x0, 1) + ] class ControlChannelDescriptionHdr(Packet): """Control Channel Description Section 10.5.2.11 """ name = "Control Channel Description" fields_desc = [ - BitField("eightBitCCD", None, 1), - XBitField("ieiCCD", None, 7), + BitField("eightBitCCD", None, 1), + XBitField("ieiCCD", None, 7), - BitField("spare", 0x0, 1), - BitField("att", 0x0, 1), - BitField("bsAgBlksRes", 0x0, 3), - BitField("ccchConf", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("att", 0x0, 1), + BitField("bsAgBlksRes", 0x0, 3), + BitField("ccchConf", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("spare4", 0x0, 1), - BitField("bsPaMfrms", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("spare4", 0x0, 1), + BitField("bsPaMfrms", 0x0, 3), - ByteField("t3212", 0x0) - ] + ByteField("t3212", 0x0) + ] class FrequencyChannelSequenceHdr(Packet): """Frequency Channel Sequence Section 10.5.2.12""" name = "Frequency Channel Sequence" fields_desc = [ - BitField("eightBitFCS", None, 1), - XBitField("ieiFCS", None, 7), - BitField("spare", 0x0, 1), - BitField("lowestArfcn", 0x0, 7), - BitField("skipArfcn01", 0x0, 4), - BitField("skipArfcn02", 0x0, 4), - BitField("skipArfcn03", 0x0, 4), - BitField("skipArfcn04", 0x0, 4), - BitField("skipArfcn05", 0x0, 4), - BitField("skipArfcn06", 0x0, 4), - BitField("skipArfcn07", 0x0, 4), - BitField("skipArfcn08", 0x0, 4), - BitField("skipArfcn09", 0x0, 4), - BitField("skipArfcn10", 0x0, 4), - BitField("skipArfcn11", 0x0, 4), - BitField("skipArfcn12", 0x0, 4), - BitField("skipArfcn13", 0x0, 4), - BitField("skipArfcn14", 0x0, 4), - BitField("skipArfcn15", 0x0, 4), - BitField("skipArfcn16", 0x0, 4) - ] + BitField("eightBitFCS", None, 1), + XBitField("ieiFCS", None, 7), + BitField("spare", 0x0, 1), + BitField("lowestArfcn", 0x0, 7), + BitField("skipArfcn01", 0x0, 4), + BitField("skipArfcn02", 0x0, 4), + BitField("skipArfcn03", 0x0, 4), + BitField("skipArfcn04", 0x0, 4), + BitField("skipArfcn05", 0x0, 4), + BitField("skipArfcn06", 0x0, 4), + BitField("skipArfcn07", 0x0, 4), + BitField("skipArfcn08", 0x0, 4), + BitField("skipArfcn09", 0x0, 4), + BitField("skipArfcn10", 0x0, 4), + BitField("skipArfcn11", 0x0, 4), + BitField("skipArfcn12", 0x0, 4), + BitField("skipArfcn13", 0x0, 4), + BitField("skipArfcn14", 0x0, 4), + BitField("skipArfcn15", 0x0, 4), + BitField("skipArfcn16", 0x0, 4) + ] class FrequencyListHdr(Packet): @@ -3830,70 +3831,70 @@ class FrequencyListHdr(Packet): # Some formats are frequency bit maps, the others use a special encoding # scheme. fields_desc = [ - BitField("eightBitFL", None, 1), - XBitField("ieiFL", None, 7), - XByteField("lengthFL", None), - - BitField("formatID", 0x0, 2), - BitField("spare", 0x0, 2), - BitField("arfcn124", 0x0, 1), - BitField("arfcn123", 0x0, 1), - BitField("arfcn122", 0x0, 1), - BitField("arfcn121", 0x0, 1), - - ByteField("arfcn120", 0x0), - ByteField("arfcn112", 0x0), - ByteField("arfcn104", 0x0), - ByteField("arfcn96", 0x0), - ByteField("arfcn88", 0x0), - ByteField("arfcn80", 0x0), - ByteField("arfcn72", 0x0), - ByteField("arfcn64", 0x0), - ByteField("arfcn56", 0x0), - ByteField("arfcn48", 0x0), - ByteField("arfcn40", 0x0), - ByteField("arfcn32", 0x0), - ByteField("arfcn24", 0x0), - ByteField("arfcn16", 0x0), - ByteField("arfcn8", 0x0) - ] + BitField("eightBitFL", None, 1), + XBitField("ieiFL", None, 7), + XByteField("lengthFL", None), + + BitField("formatID", 0x0, 2), + BitField("spare", 0x0, 2), + BitField("arfcn124", 0x0, 1), + BitField("arfcn123", 0x0, 1), + BitField("arfcn122", 0x0, 1), + BitField("arfcn121", 0x0, 1), + + ByteField("arfcn120", 0x0), + ByteField("arfcn112", 0x0), + ByteField("arfcn104", 0x0), + ByteField("arfcn96", 0x0), + ByteField("arfcn88", 0x0), + ByteField("arfcn80", 0x0), + ByteField("arfcn72", 0x0), + ByteField("arfcn64", 0x0), + ByteField("arfcn56", 0x0), + ByteField("arfcn48", 0x0), + ByteField("arfcn40", 0x0), + ByteField("arfcn32", 0x0), + ByteField("arfcn24", 0x0), + ByteField("arfcn16", 0x0), + ByteField("arfcn8", 0x0) + ] class FrequencyShortListHdr(Packet): """Frequency Short List Section 10.5.2.14""" name = "Frequency Short List" # len is 10 -#This element is encoded exactly as the Frequency List information element, -#except that it has a fixed length instead of a -#variable length and does not contain a length indicator and that it -#shall not be encoded in bitmap 0 format. - fields_desc = [ - ByteField("ieiFSL", 0x0), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0) - ] +# This element is encoded exactly as the Frequency List information element, +# except that it has a fixed length instead of a +# variable length and does not contain a length indicator and that it +# shall not be encoded in bitmap 0 format. + fields_desc = [ + ByteField("ieiFSL", 0x0), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0) + ] class FrequencyShortListHdr2(Packet): """Frequency Short List2 Section 10.5.2.14a""" name = "Frequency Short List 2" fields_desc = [ - ByteField("byte1", 0x0), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0) - ] + ByteField("byte1", 0x0), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0) + ] # len 4 to 13 @@ -3901,41 +3902,41 @@ class GroupChannelDescriptionHdr(Packet): """Group Channel Description Section 10.5.2.14b""" name = "Group Channel Description" fields_desc = [ - BitField("eightBitGCD", None, 1), - XBitField("ieiGCD", None, 7), - - XByteField("lengthGCD", None), - - BitField("channelType", 0x0, 5), - BitField("tn", 0x0, 3), - - BitField("tsc", 0x0, 3), - BitField("h", 0x0, 1), - # if h == 0 the packet looks the following way: - ConditionalField(BitField("spare", 0x0, 2), - lambda pkt: pkt. h == 0x0), - ConditionalField(BitField("arfcnHi", 0x0, 2), - lambda pkt: pkt. h == 0x0), - ConditionalField(ByteField("arfcnLo", None), - lambda pkt: pkt. h == 0x0), - # if h == 1 the packet looks the following way: - ConditionalField(BitField("maioHi", 0x0, 4), - lambda pkt: pkt. h == 0x1), - ConditionalField(BitField("maioLo", None, 2), - lambda pkt: pkt. h == 0x1), - ConditionalField(BitField("hsn", None, 6), - lambda pkt: pkt. h == 0x1), - # finished with conditional fields - ByteField("maC6", None), - ByteField("maC7", None), - ByteField("maC8", None), - ByteField("maC9", None), - ByteField("maC10", None), - ByteField("maC11", None), - ByteField("maC12", None), - ByteField("maC13", None), - ByteField("maC14", None) - ] + BitField("eightBitGCD", None, 1), + XBitField("ieiGCD", None, 7), + + XByteField("lengthGCD", None), + + BitField("channelType", 0x0, 5), + BitField("tn", 0x0, 3), + + BitField("tsc", 0x0, 3), + BitField("h", 0x0, 1), + # if h == 0 the packet looks the following way: + ConditionalField(BitField("spare", 0x0, 2), + lambda pkt: pkt. h == 0x0), + ConditionalField(BitField("arfcnHi", 0x0, 2), + lambda pkt: pkt. h == 0x0), + ConditionalField(ByteField("arfcnLo", None), + lambda pkt: pkt. h == 0x0), + # if h == 1 the packet looks the following way: + ConditionalField(BitField("maioHi", 0x0, 4), + lambda pkt: pkt. h == 0x1), + ConditionalField(BitField("maioLo", None, 2), + lambda pkt: pkt. h == 0x1), + ConditionalField(BitField("hsn", None, 6), + lambda pkt: pkt. h == 0x1), + # finished with conditional fields + ByteField("maC6", None), + ByteField("maC7", None), + ByteField("maC8", None), + ByteField("maC9", None), + ByteField("maC10", None), + ByteField("maC11", None), + ByteField("maC12", None), + ByteField("maC13", None), + ByteField("maC14", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -3951,20 +3952,20 @@ class GprsResumptionHdr(Packet): """GPRS Resumption Section 10.5.2.14c""" name = "GPRS Resumption" fields_desc = [ - XBitField("ieiGR", None, 4), - BitField("spare", 0x0, 3), - BitField("ack", 0x0, 1) - ] + XBitField("ieiGR", None, 4), + BitField("spare", 0x0, 3), + BitField("ack", 0x0, 1) + ] class HandoverReferenceHdr(Packet): """Handover Reference Section 10.5.2.15""" name = "Handover Reference" fields_desc = [ - BitField("eightBitHR", None, 1), - XBitField("ieiHR", None, 7), - ByteField("handoverRef", 0x0) - ] + BitField("eightBitHR", None, 1), + XBitField("ieiHR", None, 7), + ByteField("handoverRef", 0x0) + ] # len 1-12 @@ -3972,26 +3973,26 @@ class IaRestOctets(Packet): """IA Rest Octets Section 10.5.2.16""" name = "IA Rest Octets" fields_desc = [ - ByteField("ieiIRO", 0x0), - # FIXME brainfuck packet - XByteField("lengthIRO", None), - ByteField("byte2", None), - ByteField("byte3", None), - ByteField("byte4", None), - ByteField("byte5", None), - ByteField("byte6", None), - ByteField("byte7", None), - ByteField("byte8", None), - ByteField("byte9", None), - ByteField("byte10", None), - ByteField("byte11", None) - ] + ByteField("ieiIRO", 0x0), + # FIXME brainfuck packet + XByteField("lengthIRO", None), + ByteField("byte2", None), + ByteField("byte3", None), + ByteField("byte4", None), + ByteField("byte5", None), + ByteField("byte6", None), + ByteField("byte7", None), + ByteField("byte8", None), + ByteField("byte9", None), + ByteField("byte10", None), + ByteField("byte11", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] res = adapt(1, 12, a, self.fields_desc) if self.lengthIRO is None: - if res[1] < 0: # FIXME better fix + if res[1] < 0: # FIXME better fix res[1] = 0 p = p[:1] + struct.pack(">B", res[1]) + p[2:] if res[0] != 0: @@ -4003,33 +4004,33 @@ class IraRestOctetsHdr(Packet): """IAR Rest Octets Section 10.5.2.17""" name = "IAR Rest Octets" fields_desc = [ - BitField("eightBitIRO", None, 1), - XBitField("ieiIRO", None, 7), - BitField("spare01", 0x0, 1), - BitField("spare02", 0x0, 1), - BitField("spare03", 0x1, 1), - BitField("spare04", 0x0, 1), - BitField("spare05", 0x1, 1), - BitField("spare06", 0x0, 1), - BitField("spare07", 0x1, 1), - BitField("spare08", 0x1, 1), - BitField("spare09", 0x0, 1), - BitField("spare10", 0x0, 1), - BitField("spare11", 0x1, 1), - BitField("spare12", 0x0, 1), - BitField("spare13", 0x1, 1), - BitField("spare14", 0x0, 1), - BitField("spare15", 0x1, 1), - BitField("spare16", 0x1, 1), - BitField("spare17", 0x0, 1), - BitField("spare18", 0x0, 1), - BitField("spare19", 0x1, 1), - BitField("spare20", 0x0, 1), - BitField("spare21", 0x1, 1), - BitField("spare22", 0x0, 1), - BitField("spare23", 0x1, 1), - BitField("spare24", 0x1, 1) - ] + BitField("eightBitIRO", None, 1), + XBitField("ieiIRO", None, 7), + BitField("spare01", 0x0, 1), + BitField("spare02", 0x0, 1), + BitField("spare03", 0x1, 1), + BitField("spare04", 0x0, 1), + BitField("spare05", 0x1, 1), + BitField("spare06", 0x0, 1), + BitField("spare07", 0x1, 1), + BitField("spare08", 0x1, 1), + BitField("spare09", 0x0, 1), + BitField("spare10", 0x0, 1), + BitField("spare11", 0x1, 1), + BitField("spare12", 0x0, 1), + BitField("spare13", 0x1, 1), + BitField("spare14", 0x0, 1), + BitField("spare15", 0x1, 1), + BitField("spare16", 0x1, 1), + BitField("spare17", 0x0, 1), + BitField("spare18", 0x0, 1), + BitField("spare19", 0x1, 1), + BitField("spare20", 0x0, 1), + BitField("spare21", 0x1, 1), + BitField("spare22", 0x0, 1), + BitField("spare23", 0x1, 1), + BitField("spare24", 0x1, 1) + ] # len is 1 to 5 what do we do with the variable size? no lenght @@ -4038,102 +4039,102 @@ class IaxRestOctetsHdr(Packet): """IAX Rest Octets Section 10.5.2.18""" name = "IAX Rest Octets" fields_desc = [ - BitField("eightBitIRO", None, 1), - XBitField("ieiIRO", None, 7), - BitField("spare01", 0x0, 1), - BitField("spare02", 0x0, 1), - BitField("spare03", 0x1, 1), - BitField("spare04", 0x0, 1), - BitField("spare05", 0x1, 1), - BitField("spare06", 0x0, 1), - BitField("spare07", 0x1, 1), - BitField("spare08", 0x1, 1), - ByteField("spareB1", None), - ByteField("spareB2", None), - ByteField("spareB3", None) - ] + BitField("eightBitIRO", None, 1), + XBitField("ieiIRO", None, 7), + BitField("spare01", 0x0, 1), + BitField("spare02", 0x0, 1), + BitField("spare03", 0x1, 1), + BitField("spare04", 0x0, 1), + BitField("spare05", 0x1, 1), + BitField("spare06", 0x0, 1), + BitField("spare07", 0x1, 1), + BitField("spare08", 0x1, 1), + ByteField("spareB1", None), + ByteField("spareB2", None), + ByteField("spareB3", None) + ] class L2PseudoLengthHdr(Packet): """L2 Pseudo Length Section 10.5.2.19""" name = "L2 Pseudo Length" fields_desc = [ - BitField("eightBitPL", None, 1), - XBitField("ieiPL", None, 7), - BitField("l2pLength", None, 6), - BitField("bit2", 0x0, 1), - BitField("bit1", 0x1, 1) - ] + BitField("eightBitPL", None, 1), + XBitField("ieiPL", None, 7), + BitField("l2pLength", None, 6), + BitField("bit2", 0x0, 1), + BitField("bit1", 0x1, 1) + ] class MeasurementResultsHdr(Packet): """Measurement Results Section 10.5.2.20""" name = "Measurement Results" fields_desc = [ - BitField("eightBitMR", None, 1), - XBitField("ieiMR", None, 7), - BitField("baUsed", 0x0, 1), - BitField("dtxUsed", 0x0, 1), - BitField("rxLevFull", 0x0, 6), - BitField("spare", 0x0, 1), - BitField("measValid", 0x0, 1), - BitField("rxLevSub", 0x0, 6), - BitField("spare0", 0x0, 1), - BitField("rxqualFull", 0x0, 3), - BitField("rxqualSub", 0x0, 3), - BitField("noNcellHi", 0x0, 1), - BitField("noNcellLo", 0x0, 2), - BitField("rxlevC1", 0x0, 6), - BitField("bcchC1", 0x0, 5), - BitField("bsicC1Hi", 0x0, 3), - BitField("bsicC1Lo", 0x0, 3), - BitField("rxlevC2", 0x0, 5), - BitField("rxlevC2Lo", 0x0, 1), - BitField("bcchC2", 0x0, 5), - BitField("bsicC1Hi", 0x0, 2), - BitField("bscicC2Lo", 0x0, 4), - BitField("bscicC2Hi", 0x0, 4), - - BitField("rxlevC3Lo", 0x0, 2), - BitField("bcchC3", 0x0, 5), - BitField("rxlevC3Hi", 0x0, 1), - - BitField("bsicC3Lo", 0x0, 5), - BitField("bsicC3Hi", 0x0, 3), - - BitField("rxlevC4Lo", 0x0, 3), - BitField("bcchC4", 0x0, 5), - - BitField("bsicC4", 0x0, 6), - BitField("rxlevC5Hi", 0x0, 2), - - BitField("rxlevC5Lo", 0x0, 4), - BitField("bcchC5Hi", 0x0, 4), - - BitField("bcchC5Lo", 0x0, 1), - BitField("bsicC5", 0x0, 6), - BitField("rxlevC6", 0x0, 1), - - BitField("rxlevC6Lo", 0x0, 5), - BitField("bcchC6Hi", 0x0, 3), - - BitField("bcchC6Lo", 0x0, 3), - BitField("bsicC6", 0x0, 5) - ] + BitField("eightBitMR", None, 1), + XBitField("ieiMR", None, 7), + BitField("baUsed", 0x0, 1), + BitField("dtxUsed", 0x0, 1), + BitField("rxLevFull", 0x0, 6), + BitField("spare", 0x0, 1), + BitField("measValid", 0x0, 1), + BitField("rxLevSub", 0x0, 6), + BitField("spare0", 0x0, 1), + BitField("rxqualFull", 0x0, 3), + BitField("rxqualSub", 0x0, 3), + BitField("noNcellHi", 0x0, 1), + BitField("noNcellLo", 0x0, 2), + BitField("rxlevC1", 0x0, 6), + BitField("bcchC1", 0x0, 5), + BitField("bsicC1Hi", 0x0, 3), + BitField("bsicC1Lo", 0x0, 3), + BitField("rxlevC2", 0x0, 5), + BitField("rxlevC2Lo", 0x0, 1), + BitField("bcchC2", 0x0, 5), + BitField("bsicC1Hi", 0x0, 2), + BitField("bscicC2Lo", 0x0, 4), + BitField("bscicC2Hi", 0x0, 4), + + BitField("rxlevC3Lo", 0x0, 2), + BitField("bcchC3", 0x0, 5), + BitField("rxlevC3Hi", 0x0, 1), + + BitField("bsicC3Lo", 0x0, 5), + BitField("bsicC3Hi", 0x0, 3), + + BitField("rxlevC4Lo", 0x0, 3), + BitField("bcchC4", 0x0, 5), + + BitField("bsicC4", 0x0, 6), + BitField("rxlevC5Hi", 0x0, 2), + + BitField("rxlevC5Lo", 0x0, 4), + BitField("bcchC5Hi", 0x0, 4), + + BitField("bcchC5Lo", 0x0, 1), + BitField("bsicC5", 0x0, 6), + BitField("rxlevC6", 0x0, 1), + + BitField("rxlevC6Lo", 0x0, 5), + BitField("bcchC6Hi", 0x0, 3), + + BitField("bcchC6Lo", 0x0, 3), + BitField("bsicC6", 0x0, 5) + ] class GprsMeasurementResultsHdr(Packet): """GPRS Measurement Results Section 10.5.2.20a""" name = "GPRS Measurement Results" fields_desc = [ - BitField("eightBitGMR", None, 1), - XBitField("ieiGMR", None, 7), - BitField("cValue", 0x0, 6), - BitField("rxqualHi", 0x0, 2), - BitField("rxqL", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("signVar", 0x0, 6) - ] + BitField("eightBitGMR", None, 1), + XBitField("ieiGMR", None, 7), + BitField("cValue", 0x0, 6), + BitField("rxqualHi", 0x0, 2), + BitField("rxqL", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("signVar", 0x0, 6) + ] # len 3 to 10 @@ -4141,18 +4142,18 @@ class MobileAllocationHdr(Packet): """Mobile Allocation Section 10.5.2.21""" name = "Mobile Allocation" fields_desc = [ - BitField("eightBitMA", None, 1), - XBitField("ieiMA", None, 7), - XByteField("lengthMA", None), - ByteField("maC64", 0x12), - ByteField("maC56", None), # optional fields start here - ByteField("maC48", None), - ByteField("maC40", None), - ByteField("maC32", None), - ByteField("maC24", None), - ByteField("maC16", None), - ByteField("maC8", None) - ] + BitField("eightBitMA", None, 1), + XBitField("ieiMA", None, 7), + XByteField("lengthMA", None), + ByteField("maC64", 0x12), + ByteField("maC56", None), # optional fields start here + ByteField("maC48", None), + ByteField("maC40", None), + ByteField("maC32", None), + ByteField("maC24", None), + ByteField("maC16", None), + ByteField("maC8", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -4168,16 +4169,16 @@ class MobileTimeDifferenceHdr(Packet): """Mobile Time Difference Section 10.5.2.21a""" name = "Mobile Time Difference" fields_desc = [ - BitField("eightBitMTD", None, 1), - XBitField("ieiMTD", None, 7), - XByteField("lengthMTD", 0x5), - ByteField("valueHi", 0x0), - ByteField("valueCnt", 0x0), - BitField("valueLow", 0x0, 5), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1) - ] + BitField("eightBitMTD", None, 1), + XBitField("ieiMTD", None, 7), + XByteField("lengthMTD", 0x5), + ByteField("valueHi", 0x0), + ByteField("valueCnt", 0x0), + BitField("valueLow", 0x0, 5), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1) + ] # min 4 octets max 8 @@ -4185,32 +4186,32 @@ class MultiRateConfigurationHdr(Packet): """ MultiRate configuration Section 10.5.2.21aa""" name = "MultiRate Configuration" fields_desc = [ - BitField("eightBitMRC", None, 1), - XBitField("ieiMRC", None, 7), + BitField("eightBitMRC", None, 1), + XBitField("ieiMRC", None, 7), - XByteField("lengthMRC", None), + XByteField("lengthMRC", None), - BitField("mrVersion", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("icmi", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("startMode", 0x0, 2), + BitField("mrVersion", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("icmi", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("startMode", 0x0, 2), - ByteField("amrCodec", 0x0), + ByteField("amrCodec", 0x0), - BitField("spare", None, 2), - BitField("threshold1", None, 6), + BitField("spare", None, 2), + BitField("threshold1", None, 6), - BitField("hysteresis1", None, 4), - BitField("threshold2", None, 4), + BitField("hysteresis1", None, 4), + BitField("threshold2", None, 4), - BitField("threshold2cnt", None, 2), - BitField("hysteresis2", None, 4), - BitField("threshold3", None, 2), + BitField("threshold2cnt", None, 2), + BitField("hysteresis2", None, 4), + BitField("threshold3", None, 2), - BitField("threshold3cnt", None, 4), - BitField("hysteresis3", None, 4) - ] + BitField("threshold3cnt", None, 4), + BitField("hysteresis3", None, 4) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -4227,24 +4228,24 @@ class MultislotAllocationHdr(Packet): """Multislot Allocation Section 10.5.2.21b""" name = "Multislot Allocation" fields_desc = [ - BitField("eightBitMSA", None, 1), - XBitField("ieiMSA", None, 7), - XByteField("lengthMSA", None), - BitField("ext0", 0x1, 1), - BitField("da", 0x0, 7), - ConditionalField(BitField("ext1", 0x1, 1), # optional - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("ua", 0x0, 7), - lambda pkt: pkt.ext0 == 0), - ByteField("chan1", None), - ByteField("chan2", None), - ByteField("chan3", None), - ByteField("chan4", None), - ByteField("chan5", None), - ByteField("chan6", None), - ByteField("chan7", None), - ByteField("chan8", None) - ] + BitField("eightBitMSA", None, 1), + XBitField("ieiMSA", None, 7), + XByteField("lengthMSA", None), + BitField("ext0", 0x1, 1), + BitField("da", 0x0, 7), + ConditionalField(BitField("ext1", 0x1, 1), # optional + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("ua", 0x0, 7), + lambda pkt: pkt.ext0 == 0), + ByteField("chan1", None), + ByteField("chan2", None), + ByteField("chan3", None), + ByteField("chan4", None), + ByteField("chan5", None), + ByteField("chan6", None), + ByteField("chan7", None), + ByteField("chan8", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -4252,7 +4253,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthMSA is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay @@ -4260,10 +4261,10 @@ class NcModeHdr(Packet): """NC mode Section 10.5.2.21c""" name = "NC Mode" fields_desc = [ - XBitField("ieiNM", None, 4), - BitField("spare", 0x0, 2), - BitField("ncMode", 0x0, 2) - ] + XBitField("ieiNM", None, 4), + BitField("spare", 0x0, 2), + BitField("ncMode", 0x0, 2) + ] # Fix for len problem @@ -4271,55 +4272,55 @@ class NcModeHdr(Packet): class NcModeAndSpareHalfOctets(Packet): name = "NC Mode And Spare Half Octets" fields_desc = [ - BitField("spare", 0x0, 2), - BitField("ncMode", 0x0, 2), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 2), + BitField("ncMode", 0x0, 2), + BitField("spareHalfOctets", 0x0, 4) + ] class NeighbourCellsDescriptionHdr(Packet): """Neighbour Cells Description Section 10.5.2.22""" name = "Neighbour Cells Description" fields_desc = [ - BitField("eightBitNCD", None, 1), - XBitField("ieiNCD", None, 7), - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("extInd", 0x0, 1), - BitField("baInd", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - BitField("120bits", 0x0, 120) - ] + BitField("eightBitNCD", None, 1), + XBitField("ieiNCD", None, 7), + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("extInd", 0x0, 1), + BitField("baInd", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + BitField("120bits", 0x0, 120) + ] class NeighbourCellsDescription2Hdr(Packet): """Neighbour Cells Description 2 Section 10.5.2.22a""" name = "Neighbour Cells Description 2" fields_desc = [ - BitField("eightBitNCD2", None, 1), - XBitField("ieiNCD2", None, 7), - BitField("bit128", 0x0, 1), - BitField("multiband", 0x0, 2), - BitField("baInd", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - BitField("120bits", 0x0, 120) - ] + BitField("eightBitNCD2", None, 1), + XBitField("ieiNCD2", None, 7), + BitField("bit128", 0x0, 1), + BitField("multiband", 0x0, 2), + BitField("baInd", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + BitField("120bits", 0x0, 120) + ] class NtNRestOctets(Packet): """NT/N Rest Octets Section 10.5.2.22c""" name = "NT/N Rest Octets" fields_desc = [ - BitField("nln", 0x0, 2), - BitField("ncnInfo", 0x0, 4), - BitField("spare", 0x0, 2) - ] + BitField("nln", 0x0, 2), + BitField("ncnInfo", 0x0, 4), + BitField("spare", 0x0, 2) + ] # @@ -4330,31 +4331,31 @@ class P1RestOctets(Packet): """P1 Rest Octets Section 10.5.2.23""" name = "P1 Rest Octets" fields_desc = [ - BitField("nln", 0x0, 2), - BitField("nlnStatus", 0x0, 1), - BitField("prio1", 0x0, 3), - BitField("prio2", 0x0, 3), - # optional - BitField("pageIndication1", 0x0, 1), - BitField("pageIndication2", 0x0, 1), - BitField("spare", 0x0, 5), - ByteField("spareB1", None), - ByteField("spareB2", None), - ByteField("spareB3", None), - ByteField("spareB4", None), - ByteField("spareB5", None), - ByteField("spareB6", None), - ByteField("spareB7", None), - ByteField("spareB8", None), - ByteField("spareB9", None), - ByteField("spareB10", None), - ByteField("spareB11", None), - ByteField("spareB12", None), - ByteField("spareB13", None), - ByteField("spareB14", None), - ByteField("spareB15", None), - ByteField("spareB16", None), - ] + BitField("nln", 0x0, 2), + BitField("nlnStatus", 0x0, 1), + BitField("prio1", 0x0, 3), + BitField("prio2", 0x0, 3), + # optional + BitField("pageIndication1", 0x0, 1), + BitField("pageIndication2", 0x0, 1), + BitField("spare", 0x0, 5), + ByteField("spareB1", None), + ByteField("spareB2", None), + ByteField("spareB3", None), + ByteField("spareB4", None), + ByteField("spareB5", None), + ByteField("spareB6", None), + ByteField("spareB7", None), + ByteField("spareB8", None), + ByteField("spareB9", None), + ByteField("spareB10", None), + ByteField("spareB11", None), + ByteField("spareB12", None), + ByteField("spareB13", None), + ByteField("spareB14", None), + ByteField("spareB15", None), + ByteField("spareB16", None), + ] # len 2-12 @@ -4362,30 +4363,30 @@ class P2RestOctets(Packet): """P2 Rest Octets Section 10.5.2.24""" name = "P2 Rest Octets" fields_desc = [ - BitField("cn3", 0x0, 2), - BitField("nln", 0x0, 2), - BitField("nlnStatus", 0x0, 1), - BitField("prio1", 0x0, 3), + BitField("cn3", 0x0, 2), + BitField("nln", 0x0, 2), + BitField("nlnStatus", 0x0, 1), + BitField("prio1", 0x0, 3), - BitField("prio2", 0x0, 3), - BitField("prio3", 0x0, 3), - BitField("pageIndication3", 0x0, 1), - BitField("spare", 0x0, 1), + BitField("prio2", 0x0, 3), + BitField("prio3", 0x0, 3), + BitField("pageIndication3", 0x0, 1), + BitField("spare", 0x0, 1), - # optinal (No length field!) - ByteField("spareB1", None), - ByteField("spareB2", None), - ByteField("spareB3", None), - ByteField("spareB4", None), + # optinal (No length field!) + ByteField("spareB1", None), + ByteField("spareB2", None), + ByteField("spareB3", None), + ByteField("spareB4", None), - ByteField("spareB5", None), - ByteField("spareB6", None), - ByteField("spareB7", None), - ByteField("spareB8", None), + ByteField("spareB5", None), + ByteField("spareB6", None), + ByteField("spareB7", None), + ByteField("spareB8", None), - ByteField("spareB9", None), - ByteField("spareB10", None) - ] + ByteField("spareB9", None), + ByteField("spareB10", None) + ] # len 4 @@ -4393,16 +4394,16 @@ class P3RestOctets(Packet): """P3 Rest Octets Section 10.5.2.25""" name = "P3 Rest Octets" fields_desc = [ - BitField("cn3", 0x0, 2), - BitField("cn4", 0x0, 2), - BitField("nln", 0x0, 2), - BitField("nlnStatus", 0x0, 1), - BitField("prio1", 0x0, 3), - BitField("prio2", 0x0, 3), - BitField("prio3", 0x0, 3), - BitField("prio4", 0x0, 3), - BitField("spare", 0x0, 5) - ] + BitField("cn3", 0x0, 2), + BitField("cn4", 0x0, 2), + BitField("nln", 0x0, 2), + BitField("nlnStatus", 0x0, 1), + BitField("prio1", 0x0, 3), + BitField("prio2", 0x0, 3), + BitField("prio3", 0x0, 3), + BitField("prio4", 0x0, 3), + BitField("spare", 0x0, 5) + ] # len 4 @@ -4420,31 +4421,31 @@ class PacketChannelDescription(Packet): """Packet Channel Description Section 10.5.2.25a""" name = "Packet Channel Description" fields_desc = [ - ByteField("ieiPCD", None), - BitField("chanType", 0x0, 5), # This packet has multiple - # possible layouts. I moddeled the first one - BitField("tn", 0x0, 3), # maybe build an - #"interactive" builder. Like - # a Q/A then propose a - # packet? - BitField("tsc", 0x0, 3), - BitField("chooser1", 0x0, 1), - BitField("chooser2", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("arfcn", 0x0, 10), - ] + ByteField("ieiPCD", None), + BitField("chanType", 0x0, 5), # This packet has multiple + # possible layouts. I moddeled the first one + BitField("tn", 0x0, 3), # maybe build an + #"interactive" builder. Like + # a Q/A then propose a + # packet? + BitField("tsc", 0x0, 3), + BitField("chooser1", 0x0, 1), + BitField("chooser2", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("arfcn", 0x0, 10), + ] class DedicatedModeOrTBFHdr(Packet): """Dedicated mode or TBF Section 10.5.2.25b""" name = "Dedicated Mode or TBF" fields_desc = [ - XBitField("ieiDMOT", None, 4), - BitField("spare", 0x0, 1), - BitField("tma", 0x0, 1), - BitField("downlink", 0x0, 1), - BitField("td", 0x0, 1) - ] + XBitField("ieiDMOT", None, 4), + BitField("spare", 0x0, 1), + BitField("tma", 0x0, 1), + BitField("downlink", 0x0, 1), + BitField("td", 0x0, 1) + ] # FIXME add implementation @@ -4452,19 +4453,19 @@ class RrPacketUplinkAssignment(Packet): """RR Packet Uplink Assignment Section 10.5.2.25c""" name = "RR Packet Uplink Assignment" fields_desc = [ - # Fill me - ] + # Fill me + ] class PageModeHdr(Packet): """Page Mode Section 10.5.2.26""" name = "Page Mode" fields_desc = [ - XBitField("ieiPM", None, 4), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("pm", 0x0, 2) - ] + XBitField("ieiPM", None, 4), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("pm", 0x0, 2) + ] # Fix for 1/2 len problem @@ -4472,14 +4473,14 @@ class PageModeHdr(Packet): class PageModeAndDedicatedModeOrTBF(Packet): name = "Page Mode and Dedicated Mode Or TBF" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("pm", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("tma", 0x0, 1), - BitField("downlink", 0x0, 1), - BitField("td", 0x0, 1) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("pm", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("tma", 0x0, 1), + BitField("downlink", 0x0, 1), + BitField("td", 0x0, 1) + ] # Fix for 1/2 len problem @@ -4487,11 +4488,11 @@ class PageModeAndDedicatedModeOrTBF(Packet): class PageModeAndSpareHalfOctets(Packet): name = "Page Mode and Spare Half Octets" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("pm", 0x0, 2), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("pm", 0x0, 2), + BitField("spareHalfOctets", 0x0, 4) + ] # Fix for 1/2 len problem @@ -4499,128 +4500,128 @@ class PageModeAndSpareHalfOctets(Packet): class PageModeAndChannelNeeded(Packet): name = "Page Mode and Channel Needed" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("pm", 0x0, 2), - BitField("channel2", 0x0, 2), - BitField("channel1", 0x0, 2) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("pm", 0x0, 2), + BitField("channel2", 0x0, 2), + BitField("channel1", 0x0, 2) + ] class NccPermittedHdr(Packet): """NCC Permitted Section 10.5.2.27""" name = "NCC Permited" fields_desc = [ - BitField("eightBitNP", None, 1), - XBitField("ieiNP", None, 7), - ByteField("nccPerm", 0x0) - ] + BitField("eightBitNP", None, 1), + XBitField("ieiNP", None, 7), + ByteField("nccPerm", 0x0) + ] class PowerCommandHdr(Packet): """Power Command Section 10.5.2.28""" name = "Power Command" fields_desc = [ - BitField("eightBitPC", None, 1), - XBitField("ieiPC", None, 7), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("powerLvl", 0x0, 5) - ] + BitField("eightBitPC", None, 1), + XBitField("ieiPC", None, 7), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("powerLvl", 0x0, 5) + ] class PowerCommandAndAccessTypeHdr(Packet): """Power Command and access type Section 10.5.2.28a""" name = "Power Command and Access Type" fields_desc = [ - BitField("eightBitPCAAT", None, 1), - XBitField("ieiPCAAT", None, 7), - BitField("atc", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("powerLvl", 0x0, 5) - ] + BitField("eightBitPCAAT", None, 1), + XBitField("ieiPCAAT", None, 7), + BitField("atc", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("powerLvl", 0x0, 5) + ] class RachControlParametersHdr(Packet): """RACH Control Parameters Section 10.5.2.29""" name = "RACH Control Parameters" fields_desc = [ - BitField("eightBitRCP", None, 1), - XBitField("ieiRCP", None, 7), - BitField("maxRetrans", 0x0, 2), - BitField("txInteger", 0x0, 4), - BitField("cellBarrAccess", 0x0, 1), - BitField("re", 0x0, 1), - BitField("ACC15", 0x0, 1), - BitField("ACC14", 0x0, 1), - BitField("ACC13", 0x0, 1), - BitField("ACC12", 0x0, 1), - BitField("ACC11", 0x0, 1), - BitField("ACC10", 0x0, 1), - BitField("ACC09", 0x0, 1), - BitField("ACC08", 0x0, 1), - BitField("ACC07", 0x0, 1), - BitField("ACC06", 0x0, 1), - BitField("ACC05", 0x0, 1), - BitField("ACC04", 0x0, 1), - BitField("ACC03", 0x0, 1), - BitField("ACC02", 0x0, 1), - BitField("ACC01", 0x0, 1), - BitField("ACC00", 0x0, 1), - ] + BitField("eightBitRCP", None, 1), + XBitField("ieiRCP", None, 7), + BitField("maxRetrans", 0x0, 2), + BitField("txInteger", 0x0, 4), + BitField("cellBarrAccess", 0x0, 1), + BitField("re", 0x0, 1), + BitField("ACC15", 0x0, 1), + BitField("ACC14", 0x0, 1), + BitField("ACC13", 0x0, 1), + BitField("ACC12", 0x0, 1), + BitField("ACC11", 0x0, 1), + BitField("ACC10", 0x0, 1), + BitField("ACC09", 0x0, 1), + BitField("ACC08", 0x0, 1), + BitField("ACC07", 0x0, 1), + BitField("ACC06", 0x0, 1), + BitField("ACC05", 0x0, 1), + BitField("ACC04", 0x0, 1), + BitField("ACC03", 0x0, 1), + BitField("ACC02", 0x0, 1), + BitField("ACC01", 0x0, 1), + BitField("ACC00", 0x0, 1), + ] class RequestReferenceHdr(Packet): """Request Reference Section 10.5.2.30""" name = "Request Reference" fields_desc = [ - BitField("eightBitRR", None, 1), - XBitField("ieiRR", None, 7), - ByteField("ra", 0x0), - BitField("t1", 0x0, 5), - BitField("t3Hi", 0x0, 3), - BitField("t3Lo", 0x0, 3), - BitField("t2", 0x0, 5) - ] + BitField("eightBitRR", None, 1), + XBitField("ieiRR", None, 7), + ByteField("ra", 0x0), + BitField("t1", 0x0, 5), + BitField("t3Hi", 0x0, 3), + BitField("t3Lo", 0x0, 3), + BitField("t2", 0x0, 5) + ] class RrCauseHdr(Packet): """RR Cause Section 10.5.2.31""" name = "RR Cause" fields_desc = [ - BitField("eightBitRC", None, 1), - XBitField("ieiRC", None, 7), - ByteField("rrCause", 0x0) - ] + BitField("eightBitRC", None, 1), + XBitField("ieiRC", None, 7), + ByteField("rrCause", 0x0) + ] class Si1RestOctets(Packet): """SI 1 Rest Octets Section 10.5.2.32""" name = "SI 1 Rest Octets" fields_desc = [ - ByteField("nchPos", 0x0) - ] + ByteField("nchPos", 0x0) + ] class Si2bisRestOctets(Packet): """SI 2bis Rest Octets Section 10.5.2.33""" name = "SI 2bis Rest Octets" fields_desc = [ - ByteField("spare", 0x0) - ] + ByteField("spare", 0x0) + ] class Si2terRestOctets(Packet): """SI 2ter Rest Octets Section 10.5.2.33a""" name = "SI 2ter Rest Octets" fields_desc = [ - ByteField("spare1", 0x0), - ByteField("spare2", 0x0), - ByteField("spare3", 0x0), - ByteField("spare4", 0x0) - ] + ByteField("spare1", 0x0), + ByteField("spare2", 0x0), + ByteField("spare3", 0x0), + ByteField("spare4", 0x0) + ] # len 5 @@ -4628,12 +4629,12 @@ class Si3RestOctets(Packet): """SI 3 Rest Octets Section 10.5.2.34""" name = "SI 3 Rest Octets" fields_desc = [ - ByteField("byte1", 0x0), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0) - ] + ByteField("byte1", 0x0), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0) + ] # len 1 to 11 @@ -4641,18 +4642,18 @@ class Si4RestOctets(Packet): """SI 4 Rest Octets Section 10.5.2.35""" name = "SI 4 Rest Octets" fields_desc = [ - XByteField("lengthSI4", None), - ByteField("byte2", None), - ByteField("byte3", None), - ByteField("byte4", None), - ByteField("byte5", None), - ByteField("byte6", None), - ByteField("byte7", None), - ByteField("byte8", None), - ByteField("byte9", None), - ByteField("byte10", None), - ByteField("byte11", None) - ] + XByteField("lengthSI4", None), + ByteField("byte2", None), + ByteField("byte3", None), + ByteField("byte4", None), + ByteField("byte5", None), + ByteField("byte6", None), + ByteField("byte7", None), + ByteField("byte8", None), + ByteField("byte9", None), + ByteField("byte10", None), + ByteField("byte11", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -4670,8 +4671,8 @@ class Si6RestOctets(Packet): """SI 6 Rest Octets Section 10.5.2.35a""" name = "SI 4 Rest Octets" fields_desc = [ - # FIXME - ] + # FIXME + ] # len 21 @@ -4679,29 +4680,29 @@ class Si7RestOctets(Packet): """SI 7 Rest Octets Section 10.5.2.36""" name = "SI 7 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI7", 0x15), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0), - ByteField("byte18", 0x0), - ByteField("byte19", 0x0), - ByteField("byte20", 0x0), - ByteField("byte21", 0x0) - ] + # FIXME + XByteField("lengthSI7", 0x15), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0), + ByteField("byte18", 0x0), + ByteField("byte19", 0x0), + ByteField("byte20", 0x0), + ByteField("byte21", 0x0) + ] # len 21 @@ -4709,55 +4710,55 @@ class Si8RestOctets(Packet): """SI 8 Rest Octets Section 10.5.2.37""" name = "SI 8 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI8", 0x15), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0), - ByteField("byte18", 0x0), - ByteField("byte19", 0x0), - ByteField("byte20", 0x0), - ByteField("byte21", 0x0) - ] - - -#len 17 + # FIXME + XByteField("lengthSI8", 0x15), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0), + ByteField("byte18", 0x0), + ByteField("byte19", 0x0), + ByteField("byte20", 0x0), + ByteField("byte21", 0x0) + ] + + +# len 17 class Si9RestOctets(Packet): """SI 9 Rest Octets Section 10.5.2.37a""" name = "SI 9 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI9", 0x11), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0) - ] + # FIXME + XByteField("lengthSI9", 0x11), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0) + ] # len 21 @@ -4765,29 +4766,29 @@ class Si13RestOctets(Packet): """SI 13 Rest Octets Section 10.5.2.37b""" name = "SI 13 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI3", 0x15), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0), - ByteField("byte18", 0x0), - ByteField("byte19", 0x0), - ByteField("byte20", 0x0), - ByteField("byte21", 0x0) - ] + # FIXME + XByteField("lengthSI3", 0x15), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0), + ByteField("byte18", 0x0), + ByteField("byte19", 0x0), + ByteField("byte20", 0x0), + ByteField("byte21", 0x0) + ] # 10.5.2.37c [spare] @@ -4799,29 +4800,29 @@ class Si16RestOctets(Packet): """SI 16 Rest Octets Section 10.5.2.37e""" name = "SI 16 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI16", 0x15), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0), - ByteField("byte18", 0x0), - ByteField("byte19", 0x0), - ByteField("byte20", 0x0), - ByteField("byte21", 0x0) - ] + # FIXME + XByteField("lengthSI16", 0x15), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0), + ByteField("byte18", 0x0), + ByteField("byte19", 0x0), + ByteField("byte20", 0x0), + ByteField("byte21", 0x0) + ] # len 21 @@ -4829,127 +4830,127 @@ class Si17RestOctets(Packet): """SI 17 Rest Octets Section 10.5.2.37f""" name = "SI 17 Rest Octets" fields_desc = [ - # FIXME - XByteField("lengthSI17", 0x15), - ByteField("byte2", 0x0), - ByteField("byte3", 0x0), - ByteField("byte4", 0x0), - ByteField("byte5", 0x0), - ByteField("byte6", 0x0), - ByteField("byte7", 0x0), - ByteField("byte8", 0x0), - ByteField("byte9", 0x0), - ByteField("byte10", 0x0), - ByteField("byte11", 0x0), - ByteField("byte12", 0x0), - ByteField("byte13", 0x0), - ByteField("byte14", 0x0), - ByteField("byte15", 0x0), - ByteField("byte16", 0x0), - ByteField("byte17", 0x0), - ByteField("byte18", 0x0), - ByteField("byte19", 0x0), - ByteField("byte20", 0x0), - ByteField("byte21", 0x0) - ] + # FIXME + XByteField("lengthSI17", 0x15), + ByteField("byte2", 0x0), + ByteField("byte3", 0x0), + ByteField("byte4", 0x0), + ByteField("byte5", 0x0), + ByteField("byte6", 0x0), + ByteField("byte7", 0x0), + ByteField("byte8", 0x0), + ByteField("byte9", 0x0), + ByteField("byte10", 0x0), + ByteField("byte11", 0x0), + ByteField("byte12", 0x0), + ByteField("byte13", 0x0), + ByteField("byte14", 0x0), + ByteField("byte15", 0x0), + ByteField("byte16", 0x0), + ByteField("byte17", 0x0), + ByteField("byte18", 0x0), + ByteField("byte19", 0x0), + ByteField("byte20", 0x0), + ByteField("byte21", 0x0) + ] class StartingTimeHdr(Packet): """Starting Time Section 10.5.2.38""" name = "Starting Time" fields_desc = [ - BitField("eightBitST", None, 1), - XBitField("ieiST", None, 7), - ByteField("ra", 0x0), - BitField("t1", 0x0, 5), - BitField("t3Hi", 0x0, 3), - BitField("t3Lo", 0x0, 3), - BitField("t2", 0x0, 5) - ] + BitField("eightBitST", None, 1), + XBitField("ieiST", None, 7), + ByteField("ra", 0x0), + BitField("t1", 0x0, 5), + BitField("t3Hi", 0x0, 3), + BitField("t3Lo", 0x0, 3), + BitField("t2", 0x0, 5) + ] class SynchronizationIndicationHdr(Packet): """Synchronization Indication Section 10.5.2.39""" name = "Synchronization Indication" fields_desc = [ - XBitField("ieiSI", None, 4), - BitField("nci", 0x0, 1), - BitField("rot", 0x0, 1), - BitField("si", 0x0, 2) - ] + XBitField("ieiSI", None, 4), + BitField("nci", 0x0, 1), + BitField("rot", 0x0, 1), + BitField("si", 0x0, 2) + ] class TimingAdvanceHdr(Packet): """Timing Advance Section 10.5.2.40""" name = "Timing Advance" fields_desc = [ - BitField("eightBitTA", None, 1), - XBitField("ieiTA", None, 7), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("timingVal", 0x0, 6) - ] + BitField("eightBitTA", None, 1), + XBitField("ieiTA", None, 7), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("timingVal", 0x0, 6) + ] class TimeDifferenceHdr(Packet): """ Time Difference Section 10.5.2.41""" name = "Time Difference" fields_desc = [ - BitField("eightBitTD", None, 1), - XBitField("ieiTD", None, 7), - XByteField("lengthTD", 0x3), - ByteField("timeValue", 0x0) - ] + BitField("eightBitTD", None, 1), + XBitField("ieiTD", None, 7), + XByteField("lengthTD", 0x3), + ByteField("timeValue", 0x0) + ] class TlliHdr(Packet): """ TLLI Section Section 10.5.2.41a""" name = "TLLI" fields_desc = [ - BitField("eightBitT", None, 1), - XBitField("ieiT", None, 7), - ByteField("value", 0x0), - ByteField("value1", 0x0), - ByteField("value2", 0x0), - ByteField("value3", 0x0) - ] + BitField("eightBitT", None, 1), + XBitField("ieiT", None, 7), + ByteField("value", 0x0), + ByteField("value1", 0x0), + ByteField("value2", 0x0), + ByteField("value3", 0x0) + ] class TmsiPTmsiHdr(Packet): """ TMSI/P-TMSI Section 10.5.2.42""" name = "TMSI/P-TMSI" fields_desc = [ - BitField("eightBitTPT", None, 1), - XBitField("ieiTPT", None, 7), - ByteField("value", 0x0), - ByteField("value1", 0x0), - ByteField("value2", 0x0), - ByteField("value3", 0x0) - ] + BitField("eightBitTPT", None, 1), + XBitField("ieiTPT", None, 7), + ByteField("value", 0x0), + ByteField("value1", 0x0), + ByteField("value2", 0x0), + ByteField("value3", 0x0) + ] class VgcsTargetModeIdenticationHdr(Packet): """ VGCS target Mode Indication 10.5.2.42a""" name = "VGCS Target Mode Indication" fields_desc = [ - BitField("eightBitVTMI", None, 1), - XBitField("ieiVTMI", None, 7), - XByteField("lengthVTMI", 0x2), - BitField("targerMode", 0x0, 2), - BitField("cipherKeyNb", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1) - ] + BitField("eightBitVTMI", None, 1), + XBitField("ieiVTMI", None, 7), + XByteField("lengthVTMI", 0x2), + BitField("targerMode", 0x0, 2), + BitField("cipherKeyNb", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1) + ] class WaitIndicationHdr(Packet): """ Wait Indication Section 10.5.2.43""" name = "Wait Indication" fields_desc = [ # asciiart of specs strange - BitField("eightBitWI", None, 1), - XBitField("ieiWI", None, 7), - ByteField("timeoutVal", 0x0) - ] + BitField("eightBitWI", None, 1), + XBitField("ieiWI", None, 7), + ByteField("timeoutVal", 0x0) + ] # len 17 @@ -4957,59 +4958,59 @@ class ExtendedMeasurementResultsHdr(Packet): """EXTENDED MEASUREMENT RESULTS Section 10.5.2.45""" name = "Extended Measurement Results" fields_desc = [ - BitField("eightBitEMR", None, 1), - XBitField("ieiEMR", None, 7), + BitField("eightBitEMR", None, 1), + XBitField("ieiEMR", None, 7), - BitField("scUsed", None, 1), - BitField("dtxUsed", None, 1), - BitField("rxLevC0", None, 6), + BitField("scUsed", None, 1), + BitField("dtxUsed", None, 1), + BitField("rxLevC0", None, 6), - BitField("rxLevC1", None, 6), - BitField("rxLevC2Hi", None, 2), + BitField("rxLevC1", None, 6), + BitField("rxLevC2Hi", None, 2), - BitField("rxLevC2Lo", None, 4), - BitField("rxLevC3Hi", None, 4), + BitField("rxLevC2Lo", None, 4), + BitField("rxLevC3Hi", None, 4), - BitField("rxLevC3Lo", None, 3), - BitField("rxLevC4", None, 5), + BitField("rxLevC3Lo", None, 3), + BitField("rxLevC4", None, 5), - BitField("rxLevC5", None, 6), - BitField("rxLevC6Hi", None, 2), + BitField("rxLevC5", None, 6), + BitField("rxLevC6Hi", None, 2), - BitField("rxLevC6Lo", None, 4), - BitField("rxLevC7Hi", None, 4), + BitField("rxLevC6Lo", None, 4), + BitField("rxLevC7Hi", None, 4), - BitField("rxLevC7Lo", None, 2), - BitField("rxLevC8", None, 6), + BitField("rxLevC7Lo", None, 2), + BitField("rxLevC8", None, 6), - BitField("rxLevC9", None, 6), - BitField("rxLevC10Hi", None, 2), + BitField("rxLevC9", None, 6), + BitField("rxLevC10Hi", None, 2), - BitField("rxLevC10Lo", None, 4), - BitField("rxLevC11Hi", None, 4), + BitField("rxLevC10Lo", None, 4), + BitField("rxLevC11Hi", None, 4), - BitField("rxLevC13Lo", None, 2), - BitField("rxLevC12", None, 6), + BitField("rxLevC13Lo", None, 2), + BitField("rxLevC12", None, 6), - BitField("rxLevC13", None, 6), - BitField("rxLevC14Hi", None, 2), + BitField("rxLevC13", None, 6), + BitField("rxLevC14Hi", None, 2), - BitField("rxLevC14Lo", None, 4), - BitField("rxLevC15Hi", None, 4), + BitField("rxLevC14Lo", None, 4), + BitField("rxLevC15Hi", None, 4), - BitField("rxLevC15Lo", None, 2), - BitField("rxLevC16", None, 6), + BitField("rxLevC15Lo", None, 2), + BitField("rxLevC16", None, 6), - BitField("rxLevC17", None, 6), - BitField("rxLevC18Hi", None, 2), + BitField("rxLevC17", None, 6), + BitField("rxLevC18Hi", None, 2), - BitField("rxLevC18Lo", None, 4), - BitField("rxLevC19Hi", None, 4), + BitField("rxLevC18Lo", None, 4), + BitField("rxLevC19Hi", None, 4), - BitField("rxLevC19Lo", None, 2), - BitField("rxLevC20", None, 6) - ] + BitField("rxLevC19Lo", None, 2), + BitField("rxLevC20", None, 6) + ] # len 17 @@ -5017,63 +5018,63 @@ class ExtendedMeasurementFrequencyListHdr(Packet): """Extended Measurement Frequency List Section 10.5.2.46""" name = "Extended Measurement Frequency List" fields_desc = [ - BitField("eightBitEMFL", None, 1), - XBitField("ieiEMFL", None, 7), + BitField("eightBitEMFL", None, 1), + XBitField("ieiEMFL", None, 7), - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("seqCode", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("seqCode", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), - BitField("bitsRest", 0x0, 128) - ] + BitField("bitsRest", 0x0, 128) + ] class SuspensionCauseHdr(Packet): """Suspension Cause Section 10.5.2.47""" name = "Suspension Cause" fields_desc = [ - BitField("eightBitSC", None, 1), - XBitField("ieiSC", None, 7), - ByteField("suspVal", 0x0) - ] + BitField("eightBitSC", None, 1), + XBitField("ieiSC", None, 7), + ByteField("suspVal", 0x0) + ] class ApduIDHdr(Packet): """APDU Flags Section 10.5.2.48""" name = "Apdu Id" fields_desc = [ - XBitField("ieiAI", None, 4), - BitField("id", None, 4) - ] + XBitField("ieiAI", None, 4), + BitField("id", None, 4) + ] class ApduFlagsHdr(Packet): """APDU Flags Section 10.5.2.49""" name = "Apdu Flags" fields_desc = [ - XBitField("iei", None, 4), - BitField("spare", 0x0, 1), - BitField("cr", 0x0, 1), - BitField("firstSeg", 0x0, 1), - BitField("lastSeg", 0x0, 1) - ] + XBitField("iei", None, 4), + BitField("spare", 0x0, 1), + BitField("cr", 0x0, 1), + BitField("firstSeg", 0x0, 1), + BitField("lastSeg", 0x0, 1) + ] # Fix 1/2 len problem class ApduIDAndApduFlags(Packet): name = "Apu Id and Apdu Flags" fields_desc = [ - BitField("id", None, 4), - BitField("spare", 0x0, 1), - BitField("cr", 0x0, 1), - BitField("firstSeg", 0x0, 1), - BitField("lastSeg", 0x0, 1) - ] + BitField("id", None, 4), + BitField("spare", 0x0, 1), + BitField("cr", 0x0, 1), + BitField("firstSeg", 0x0, 1), + BitField("lastSeg", 0x0, 1) + ] # len 2 to max L3 (251) (done) @@ -5081,260 +5082,260 @@ class ApduDataHdr(Packet): """APDU Data Section 10.5.2.50""" name = "Apdu Data" fields_desc = [ - BitField("eightBitAD", None, 1), - XBitField("ieiAD", None, 7), - XByteField("lengthAD", None), - #optional - ByteField("apuInfo1", None), - ByteField("apuInfo2", None), - ByteField("apuInfo3", None), - ByteField("apuInfo4", None), - ByteField("apuInfo5", None), - ByteField("apuInfo6", None), - ByteField("apuInfo7", None), - ByteField("apuInfo8", None), - ByteField("apuInfo9", None), - ByteField("apuInfo10", None), - ByteField("apuInfo11", None), - ByteField("apuInfo12", None), - ByteField("apuInfo13", None), - ByteField("apuInfo14", None), - ByteField("apuInfo15", None), - ByteField("apuInfo16", None), - ByteField("apuInfo17", None), - ByteField("apuInfo18", None), - ByteField("apuInfo19", None), - ByteField("apuInfo20", None), - ByteField("apuInfo21", None), - ByteField("apuInfo22", None), - ByteField("apuInfo23", None), - ByteField("apuInfo24", None), - ByteField("apuInfo25", None), - ByteField("apuInfo26", None), - ByteField("apuInfo27", None), - ByteField("apuInfo28", None), - ByteField("apuInfo29", None), - ByteField("apuInfo30", None), - ByteField("apuInfo31", None), - ByteField("apuInfo32", None), - ByteField("apuInfo33", None), - ByteField("apuInfo34", None), - ByteField("apuInfo35", None), - ByteField("apuInfo36", None), - ByteField("apuInfo37", None), - ByteField("apuInfo38", None), - ByteField("apuInfo39", None), - ByteField("apuInfo40", None), - ByteField("apuInfo41", None), - ByteField("apuInfo42", None), - ByteField("apuInfo43", None), - ByteField("apuInfo44", None), - ByteField("apuInfo45", None), - ByteField("apuInfo46", None), - ByteField("apuInfo47", None), - ByteField("apuInfo48", None), - ByteField("apuInfo49", None), - ByteField("apuInfo50", None), - ByteField("apuInfo51", None), - ByteField("apuInfo52", None), - ByteField("apuInfo53", None), - ByteField("apuInfo54", None), - ByteField("apuInfo55", None), - ByteField("apuInfo56", None), - ByteField("apuInfo57", None), - ByteField("apuInfo58", None), - ByteField("apuInfo59", None), - ByteField("apuInfo60", None), - ByteField("apuInfo61", None), - ByteField("apuInfo62", None), - ByteField("apuInfo63", None), - ByteField("apuInfo64", None), - ByteField("apuInfo65", None), - ByteField("apuInfo66", None), - ByteField("apuInfo67", None), - ByteField("apuInfo68", None), - ByteField("apuInfo69", None), - ByteField("apuInfo70", None), - ByteField("apuInfo71", None), - ByteField("apuInfo72", None), - ByteField("apuInfo73", None), - ByteField("apuInfo74", None), - ByteField("apuInfo75", None), - ByteField("apuInfo76", None), - ByteField("apuInfo77", None), - ByteField("apuInfo78", None), - ByteField("apuInfo79", None), - ByteField("apuInfo80", None), - ByteField("apuInfo81", None), - ByteField("apuInfo82", None), - ByteField("apuInfo83", None), - ByteField("apuInfo84", None), - ByteField("apuInfo85", None), - ByteField("apuInfo86", None), - ByteField("apuInfo87", None), - ByteField("apuInfo88", None), - ByteField("apuInfo89", None), - ByteField("apuInfo90", None), - ByteField("apuInfo91", None), - ByteField("apuInfo92", None), - ByteField("apuInfo93", None), - ByteField("apuInfo94", None), - ByteField("apuInfo95", None), - ByteField("apuInfo96", None), - ByteField("apuInfo97", None), - ByteField("apuInfo98", None), - ByteField("apuInfo99", None), - ByteField("apuInfo100", None), - ByteField("apuInfo101", None), - ByteField("apuInfo102", None), - ByteField("apuInfo103", None), - ByteField("apuInfo104", None), - ByteField("apuInfo105", None), - ByteField("apuInfo106", None), - ByteField("apuInfo107", None), - ByteField("apuInfo108", None), - ByteField("apuInfo109", None), - ByteField("apuInfo110", None), - ByteField("apuInfo111", None), - ByteField("apuInfo112", None), - ByteField("apuInfo113", None), - ByteField("apuInfo114", None), - ByteField("apuInfo115", None), - ByteField("apuInfo116", None), - ByteField("apuInfo117", None), - ByteField("apuInfo118", None), - ByteField("apuInfo119", None), - ByteField("apuInfo120", None), - ByteField("apuInfo121", None), - ByteField("apuInfo122", None), - ByteField("apuInfo123", None), - ByteField("apuInfo124", None), - ByteField("apuInfo125", None), - ByteField("apuInfo126", None), - ByteField("apuInfo127", None), - ByteField("apuInfo128", None), - ByteField("apuInfo129", None), - ByteField("apuInfo130", None), - ByteField("apuInfo131", None), - ByteField("apuInfo132", None), - ByteField("apuInfo133", None), - ByteField("apuInfo134", None), - ByteField("apuInfo135", None), - ByteField("apuInfo136", None), - ByteField("apuInfo137", None), - ByteField("apuInfo138", None), - ByteField("apuInfo139", None), - ByteField("apuInfo140", None), - ByteField("apuInfo141", None), - ByteField("apuInfo142", None), - ByteField("apuInfo143", None), - ByteField("apuInfo144", None), - ByteField("apuInfo145", None), - ByteField("apuInfo146", None), - ByteField("apuInfo147", None), - ByteField("apuInfo148", None), - ByteField("apuInfo149", None), - ByteField("apuInfo150", None), - ByteField("apuInfo151", None), - ByteField("apuInfo152", None), - ByteField("apuInfo153", None), - ByteField("apuInfo154", None), - ByteField("apuInfo155", None), - ByteField("apuInfo156", None), - ByteField("apuInfo157", None), - ByteField("apuInfo158", None), - ByteField("apuInfo159", None), - ByteField("apuInfo160", None), - ByteField("apuInfo161", None), - ByteField("apuInfo162", None), - ByteField("apuInfo163", None), - ByteField("apuInfo164", None), - ByteField("apuInfo165", None), - ByteField("apuInfo166", None), - ByteField("apuInfo167", None), - ByteField("apuInfo168", None), - ByteField("apuInfo169", None), - ByteField("apuInfo170", None), - ByteField("apuInfo171", None), - ByteField("apuInfo172", None), - ByteField("apuInfo173", None), - ByteField("apuInfo174", None), - ByteField("apuInfo175", None), - ByteField("apuInfo176", None), - ByteField("apuInfo177", None), - ByteField("apuInfo178", None), - ByteField("apuInfo179", None), - ByteField("apuInfo180", None), - ByteField("apuInfo181", None), - ByteField("apuInfo182", None), - ByteField("apuInfo183", None), - ByteField("apuInfo184", None), - ByteField("apuInfo185", None), - ByteField("apuInfo186", None), - ByteField("apuInfo187", None), - ByteField("apuInfo188", None), - ByteField("apuInfo189", None), - ByteField("apuInfo190", None), - ByteField("apuInfo191", None), - ByteField("apuInfo192", None), - ByteField("apuInfo193", None), - ByteField("apuInfo194", None), - ByteField("apuInfo195", None), - ByteField("apuInfo196", None), - ByteField("apuInfo197", None), - ByteField("apuInfo198", None), - ByteField("apuInfo199", None), - ByteField("apuInfo200", None), - ByteField("apuInfo201", None), - ByteField("apuInfo202", None), - ByteField("apuInfo203", None), - ByteField("apuInfo204", None), - ByteField("apuInfo205", None), - ByteField("apuInfo206", None), - ByteField("apuInfo207", None), - ByteField("apuInfo208", None), - ByteField("apuInfo209", None), - ByteField("apuInfo210", None), - ByteField("apuInfo211", None), - ByteField("apuInfo212", None), - ByteField("apuInfo213", None), - ByteField("apuInfo214", None), - ByteField("apuInfo215", None), - ByteField("apuInfo216", None), - ByteField("apuInfo217", None), - ByteField("apuInfo218", None), - ByteField("apuInfo219", None), - ByteField("apuInfo220", None), - ByteField("apuInfo221", None), - ByteField("apuInfo222", None), - ByteField("apuInfo223", None), - ByteField("apuInfo224", None), - ByteField("apuInfo225", None), - ByteField("apuInfo226", None), - ByteField("apuInfo227", None), - ByteField("apuInfo228", None), - ByteField("apuInfo229", None), - ByteField("apuInfo230", None), - ByteField("apuInfo231", None), - ByteField("apuInfo232", None), - ByteField("apuInfo233", None), - ByteField("apuInfo234", None), - ByteField("apuInfo235", None), - ByteField("apuInfo236", None), - ByteField("apuInfo237", None), - ByteField("apuInfo238", None), - ByteField("apuInfo239", None), - ByteField("apuInfo240", None), - ByteField("apuInfo241", None), - ByteField("apuInfo242", None), - ByteField("apuInfo243", None), - ByteField("apuInfo244", None), - ByteField("apuInfo245", None), - ByteField("apuInfo246", None), - ByteField("apuInfo247", None), - ByteField("apuInfo248", None), - ByteField("apuInfo249", None) - ] + BitField("eightBitAD", None, 1), + XBitField("ieiAD", None, 7), + XByteField("lengthAD", None), + # optional + ByteField("apuInfo1", None), + ByteField("apuInfo2", None), + ByteField("apuInfo3", None), + ByteField("apuInfo4", None), + ByteField("apuInfo5", None), + ByteField("apuInfo6", None), + ByteField("apuInfo7", None), + ByteField("apuInfo8", None), + ByteField("apuInfo9", None), + ByteField("apuInfo10", None), + ByteField("apuInfo11", None), + ByteField("apuInfo12", None), + ByteField("apuInfo13", None), + ByteField("apuInfo14", None), + ByteField("apuInfo15", None), + ByteField("apuInfo16", None), + ByteField("apuInfo17", None), + ByteField("apuInfo18", None), + ByteField("apuInfo19", None), + ByteField("apuInfo20", None), + ByteField("apuInfo21", None), + ByteField("apuInfo22", None), + ByteField("apuInfo23", None), + ByteField("apuInfo24", None), + ByteField("apuInfo25", None), + ByteField("apuInfo26", None), + ByteField("apuInfo27", None), + ByteField("apuInfo28", None), + ByteField("apuInfo29", None), + ByteField("apuInfo30", None), + ByteField("apuInfo31", None), + ByteField("apuInfo32", None), + ByteField("apuInfo33", None), + ByteField("apuInfo34", None), + ByteField("apuInfo35", None), + ByteField("apuInfo36", None), + ByteField("apuInfo37", None), + ByteField("apuInfo38", None), + ByteField("apuInfo39", None), + ByteField("apuInfo40", None), + ByteField("apuInfo41", None), + ByteField("apuInfo42", None), + ByteField("apuInfo43", None), + ByteField("apuInfo44", None), + ByteField("apuInfo45", None), + ByteField("apuInfo46", None), + ByteField("apuInfo47", None), + ByteField("apuInfo48", None), + ByteField("apuInfo49", None), + ByteField("apuInfo50", None), + ByteField("apuInfo51", None), + ByteField("apuInfo52", None), + ByteField("apuInfo53", None), + ByteField("apuInfo54", None), + ByteField("apuInfo55", None), + ByteField("apuInfo56", None), + ByteField("apuInfo57", None), + ByteField("apuInfo58", None), + ByteField("apuInfo59", None), + ByteField("apuInfo60", None), + ByteField("apuInfo61", None), + ByteField("apuInfo62", None), + ByteField("apuInfo63", None), + ByteField("apuInfo64", None), + ByteField("apuInfo65", None), + ByteField("apuInfo66", None), + ByteField("apuInfo67", None), + ByteField("apuInfo68", None), + ByteField("apuInfo69", None), + ByteField("apuInfo70", None), + ByteField("apuInfo71", None), + ByteField("apuInfo72", None), + ByteField("apuInfo73", None), + ByteField("apuInfo74", None), + ByteField("apuInfo75", None), + ByteField("apuInfo76", None), + ByteField("apuInfo77", None), + ByteField("apuInfo78", None), + ByteField("apuInfo79", None), + ByteField("apuInfo80", None), + ByteField("apuInfo81", None), + ByteField("apuInfo82", None), + ByteField("apuInfo83", None), + ByteField("apuInfo84", None), + ByteField("apuInfo85", None), + ByteField("apuInfo86", None), + ByteField("apuInfo87", None), + ByteField("apuInfo88", None), + ByteField("apuInfo89", None), + ByteField("apuInfo90", None), + ByteField("apuInfo91", None), + ByteField("apuInfo92", None), + ByteField("apuInfo93", None), + ByteField("apuInfo94", None), + ByteField("apuInfo95", None), + ByteField("apuInfo96", None), + ByteField("apuInfo97", None), + ByteField("apuInfo98", None), + ByteField("apuInfo99", None), + ByteField("apuInfo100", None), + ByteField("apuInfo101", None), + ByteField("apuInfo102", None), + ByteField("apuInfo103", None), + ByteField("apuInfo104", None), + ByteField("apuInfo105", None), + ByteField("apuInfo106", None), + ByteField("apuInfo107", None), + ByteField("apuInfo108", None), + ByteField("apuInfo109", None), + ByteField("apuInfo110", None), + ByteField("apuInfo111", None), + ByteField("apuInfo112", None), + ByteField("apuInfo113", None), + ByteField("apuInfo114", None), + ByteField("apuInfo115", None), + ByteField("apuInfo116", None), + ByteField("apuInfo117", None), + ByteField("apuInfo118", None), + ByteField("apuInfo119", None), + ByteField("apuInfo120", None), + ByteField("apuInfo121", None), + ByteField("apuInfo122", None), + ByteField("apuInfo123", None), + ByteField("apuInfo124", None), + ByteField("apuInfo125", None), + ByteField("apuInfo126", None), + ByteField("apuInfo127", None), + ByteField("apuInfo128", None), + ByteField("apuInfo129", None), + ByteField("apuInfo130", None), + ByteField("apuInfo131", None), + ByteField("apuInfo132", None), + ByteField("apuInfo133", None), + ByteField("apuInfo134", None), + ByteField("apuInfo135", None), + ByteField("apuInfo136", None), + ByteField("apuInfo137", None), + ByteField("apuInfo138", None), + ByteField("apuInfo139", None), + ByteField("apuInfo140", None), + ByteField("apuInfo141", None), + ByteField("apuInfo142", None), + ByteField("apuInfo143", None), + ByteField("apuInfo144", None), + ByteField("apuInfo145", None), + ByteField("apuInfo146", None), + ByteField("apuInfo147", None), + ByteField("apuInfo148", None), + ByteField("apuInfo149", None), + ByteField("apuInfo150", None), + ByteField("apuInfo151", None), + ByteField("apuInfo152", None), + ByteField("apuInfo153", None), + ByteField("apuInfo154", None), + ByteField("apuInfo155", None), + ByteField("apuInfo156", None), + ByteField("apuInfo157", None), + ByteField("apuInfo158", None), + ByteField("apuInfo159", None), + ByteField("apuInfo160", None), + ByteField("apuInfo161", None), + ByteField("apuInfo162", None), + ByteField("apuInfo163", None), + ByteField("apuInfo164", None), + ByteField("apuInfo165", None), + ByteField("apuInfo166", None), + ByteField("apuInfo167", None), + ByteField("apuInfo168", None), + ByteField("apuInfo169", None), + ByteField("apuInfo170", None), + ByteField("apuInfo171", None), + ByteField("apuInfo172", None), + ByteField("apuInfo173", None), + ByteField("apuInfo174", None), + ByteField("apuInfo175", None), + ByteField("apuInfo176", None), + ByteField("apuInfo177", None), + ByteField("apuInfo178", None), + ByteField("apuInfo179", None), + ByteField("apuInfo180", None), + ByteField("apuInfo181", None), + ByteField("apuInfo182", None), + ByteField("apuInfo183", None), + ByteField("apuInfo184", None), + ByteField("apuInfo185", None), + ByteField("apuInfo186", None), + ByteField("apuInfo187", None), + ByteField("apuInfo188", None), + ByteField("apuInfo189", None), + ByteField("apuInfo190", None), + ByteField("apuInfo191", None), + ByteField("apuInfo192", None), + ByteField("apuInfo193", None), + ByteField("apuInfo194", None), + ByteField("apuInfo195", None), + ByteField("apuInfo196", None), + ByteField("apuInfo197", None), + ByteField("apuInfo198", None), + ByteField("apuInfo199", None), + ByteField("apuInfo200", None), + ByteField("apuInfo201", None), + ByteField("apuInfo202", None), + ByteField("apuInfo203", None), + ByteField("apuInfo204", None), + ByteField("apuInfo205", None), + ByteField("apuInfo206", None), + ByteField("apuInfo207", None), + ByteField("apuInfo208", None), + ByteField("apuInfo209", None), + ByteField("apuInfo210", None), + ByteField("apuInfo211", None), + ByteField("apuInfo212", None), + ByteField("apuInfo213", None), + ByteField("apuInfo214", None), + ByteField("apuInfo215", None), + ByteField("apuInfo216", None), + ByteField("apuInfo217", None), + ByteField("apuInfo218", None), + ByteField("apuInfo219", None), + ByteField("apuInfo220", None), + ByteField("apuInfo221", None), + ByteField("apuInfo222", None), + ByteField("apuInfo223", None), + ByteField("apuInfo224", None), + ByteField("apuInfo225", None), + ByteField("apuInfo226", None), + ByteField("apuInfo227", None), + ByteField("apuInfo228", None), + ByteField("apuInfo229", None), + ByteField("apuInfo230", None), + ByteField("apuInfo231", None), + ByteField("apuInfo232", None), + ByteField("apuInfo233", None), + ByteField("apuInfo234", None), + ByteField("apuInfo235", None), + ByteField("apuInfo236", None), + ByteField("apuInfo237", None), + ByteField("apuInfo238", None), + ByteField("apuInfo239", None), + ByteField("apuInfo240", None), + ByteField("apuInfo241", None), + ByteField("apuInfo242", None), + ByteField("apuInfo243", None), + ByteField("apuInfo244", None), + ByteField("apuInfo245", None), + ByteField("apuInfo246", None), + ByteField("apuInfo247", None), + ByteField("apuInfo248", None), + ByteField("apuInfo249", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -5354,78 +5355,78 @@ class AuthenticationParameterRAND(Packet): """Authentication parameter RAND Section 10.5.3.1""" name = "Authentication Parameter Rand" fields_desc = [ - ByteField("ieiAPR", None), - BitField("randValue", 0x0, 128) - ] + ByteField("ieiAPR", None), + BitField("randValue", 0x0, 128) + ] class AuthenticationParameterSRES(Packet): """Authentication parameter SRES Section 10.5.3.2""" name = "Authentication Parameter Sres" fields_desc = [ - ByteField("ieiAPS", None), - BitField("sresValue", 0x0, 40) - ] + ByteField("ieiAPS", None), + BitField("sresValue", 0x0, 40) + ] class CmServiceType(Packet): """CM service type Section 10.5.3.3""" name = "CM Service Type" fields_desc = [ - XBitField("ieiCST", 0x0, 4), - BitField("serviceType", 0x0, 4) - ] + XBitField("ieiCST", 0x0, 4), + BitField("serviceType", 0x0, 4) + ] class CmServiceTypeAndCiphKeySeqNr(Packet): name = "CM Service Type and Cipher Key Sequence Number" fields_desc = [ - BitField("keySeq", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("serviceType", 0x0, 4) - ] + BitField("keySeq", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("serviceType", 0x0, 4) + ] class IdentityType(Packet): """Identity type Section 10.5.3.4""" name = "Identity Type" fields_desc = [ - XBitField("ieiIT", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("idType", 0x1, 3) - ] + XBitField("ieiIT", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("idType", 0x1, 3) + ] # Fix 1/2 len problem class IdentityTypeAndSpareHalfOctet(Packet): name = "Identity Type and Spare Half Octet" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("idType", 0x1, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("idType", 0x1, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class LocationUpdatingType(Packet): """Location updating type Section 10.5.3.5""" name = "Location Updating Type" fields_desc = [ - XBitField("ieiLUT", 0x0, 4), - BitField("for", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("lut", 0x0, 2) - ] + XBitField("ieiLUT", 0x0, 4), + BitField("for", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("lut", 0x0, 2) + ] class LocationUpdatingTypeAndCiphKeySeqNr(Packet): name = "Location Updating Type and Cipher Key Sequence Number" fields_desc = [ - BitField("for", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("lut", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3) - ] + BitField("for", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("lut", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3) + ] # len 3 to L3 max (251) (done) @@ -5433,265 +5434,265 @@ class NetworkNameHdr(Packet): """Network Name Section 10.5.3.5a""" name = "Network Name" fields_desc = [ - BitField("eightBitNN", None, 1), - XBitField("ieiNN", None, 7), - - XByteField("lengthNN", None), - - BitField("ext1", 0x1, 1), - BitField("codingScheme", 0x0, 3), - BitField("addCi", 0x0, 1), - BitField("nbSpare", 0x0, 3), - # optional - ByteField("txtString1", None), - ByteField("txtString2", None), - ByteField("txtString3", None), - ByteField("txtString4", None), - ByteField("txtString5", None), - ByteField("txtString6", None), - ByteField("txtString7", None), - ByteField("txtString8", None), - ByteField("txtString9", None), - ByteField("txtString10", None), - ByteField("txtString11", None), - ByteField("txtString12", None), - ByteField("txtString13", None), - ByteField("txtString14", None), - ByteField("txtString15", None), - ByteField("txtString16", None), - ByteField("txtString17", None), - ByteField("txtString18", None), - ByteField("txtString19", None), - ByteField("txtString20", None), - ByteField("txtString21", None), - ByteField("txtString22", None), - ByteField("txtString23", None), - ByteField("txtString24", None), - ByteField("txtString25", None), - ByteField("txtString26", None), - ByteField("txtString27", None), - ByteField("txtString28", None), - ByteField("txtString29", None), - ByteField("txtString30", None), - ByteField("txtString31", None), - ByteField("txtString32", None), - ByteField("txtString33", None), - ByteField("txtString34", None), - ByteField("txtString35", None), - ByteField("txtString36", None), - ByteField("txtString37", None), - ByteField("txtString38", None), - ByteField("txtString39", None), - ByteField("txtString40", None), - ByteField("txtString41", None), - ByteField("txtString42", None), - ByteField("txtString43", None), - ByteField("txtString44", None), - ByteField("txtString45", None), - ByteField("txtString46", None), - ByteField("txtString47", None), - ByteField("txtString48", None), - ByteField("txtString49", None), - ByteField("txtString50", None), - ByteField("txtString51", None), - ByteField("txtString52", None), - ByteField("txtString53", None), - ByteField("txtString54", None), - ByteField("txtString55", None), - ByteField("txtString56", None), - ByteField("txtString57", None), - ByteField("txtString58", None), - ByteField("txtString59", None), - ByteField("txtString60", None), - ByteField("txtString61", None), - ByteField("txtString62", None), - ByteField("txtString63", None), - ByteField("txtString64", None), - ByteField("txtString65", None), - ByteField("txtString66", None), - ByteField("txtString67", None), - ByteField("txtString68", None), - ByteField("txtString69", None), - ByteField("txtString70", None), - ByteField("txtString71", None), - ByteField("txtString72", None), - ByteField("txtString73", None), - ByteField("txtString74", None), - ByteField("txtString75", None), - ByteField("txtString76", None), - ByteField("txtString77", None), - ByteField("txtString78", None), - ByteField("txtString79", None), - ByteField("txtString80", None), - ByteField("txtString81", None), - ByteField("txtString82", None), - ByteField("txtString83", None), - ByteField("txtString84", None), - ByteField("txtString85", None), - ByteField("txtString86", None), - ByteField("txtString87", None), - ByteField("txtString88", None), - ByteField("txtString89", None), - ByteField("txtString90", None), - ByteField("txtString91", None), - ByteField("txtString92", None), - ByteField("txtString93", None), - ByteField("txtString94", None), - ByteField("txtString95", None), - ByteField("txtString96", None), - ByteField("txtString97", None), - ByteField("txtString98", None), - ByteField("txtString99", None), - ByteField("txtString100", None), - ByteField("txtString101", None), - ByteField("txtString102", None), - ByteField("txtString103", None), - ByteField("txtString104", None), - ByteField("txtString105", None), - ByteField("txtString106", None), - ByteField("txtString107", None), - ByteField("txtString108", None), - ByteField("txtString109", None), - ByteField("txtString110", None), - ByteField("txtString111", None), - ByteField("txtString112", None), - ByteField("txtString113", None), - ByteField("txtString114", None), - ByteField("txtString115", None), - ByteField("txtString116", None), - ByteField("txtString117", None), - ByteField("txtString118", None), - ByteField("txtString119", None), - ByteField("txtString120", None), - ByteField("txtString121", None), - ByteField("txtString122", None), - ByteField("txtString123", None), - ByteField("txtString124", None), - ByteField("txtString125", None), - ByteField("txtString126", None), - ByteField("txtString127", None), - ByteField("txtString128", None), - ByteField("txtString129", None), - ByteField("txtString130", None), - ByteField("txtString131", None), - ByteField("txtString132", None), - ByteField("txtString133", None), - ByteField("txtString134", None), - ByteField("txtString135", None), - ByteField("txtString136", None), - ByteField("txtString137", None), - ByteField("txtString138", None), - ByteField("txtString139", None), - ByteField("txtString140", None), - ByteField("txtString141", None), - ByteField("txtString142", None), - ByteField("txtString143", None), - ByteField("txtString144", None), - ByteField("txtString145", None), - ByteField("txtString146", None), - ByteField("txtString147", None), - ByteField("txtString148", None), - ByteField("txtString149", None), - ByteField("txtString150", None), - ByteField("txtString151", None), - ByteField("txtString152", None), - ByteField("txtString153", None), - ByteField("txtString154", None), - ByteField("txtString155", None), - ByteField("txtString156", None), - ByteField("txtString157", None), - ByteField("txtString158", None), - ByteField("txtString159", None), - ByteField("txtString160", None), - ByteField("txtString161", None), - ByteField("txtString162", None), - ByteField("txtString163", None), - ByteField("txtString164", None), - ByteField("txtString165", None), - ByteField("txtString166", None), - ByteField("txtString167", None), - ByteField("txtString168", None), - ByteField("txtString169", None), - ByteField("txtString170", None), - ByteField("txtString171", None), - ByteField("txtString172", None), - ByteField("txtString173", None), - ByteField("txtString174", None), - ByteField("txtString175", None), - ByteField("txtString176", None), - ByteField("txtString177", None), - ByteField("txtString178", None), - ByteField("txtString179", None), - ByteField("txtString180", None), - ByteField("txtString181", None), - ByteField("txtString182", None), - ByteField("txtString183", None), - ByteField("txtString184", None), - ByteField("txtString185", None), - ByteField("txtString186", None), - ByteField("txtString187", None), - ByteField("txtString188", None), - ByteField("txtString189", None), - ByteField("txtString190", None), - ByteField("txtString191", None), - ByteField("txtString192", None), - ByteField("txtString193", None), - ByteField("txtString194", None), - ByteField("txtString195", None), - ByteField("txtString196", None), - ByteField("txtString197", None), - ByteField("txtString198", None), - ByteField("txtString199", None), - ByteField("txtString200", None), - ByteField("txtString201", None), - ByteField("txtString202", None), - ByteField("txtString203", None), - ByteField("txtString204", None), - ByteField("txtString205", None), - ByteField("txtString206", None), - ByteField("txtString207", None), - ByteField("txtString208", None), - ByteField("txtString209", None), - ByteField("txtString210", None), - ByteField("txtString211", None), - ByteField("txtString212", None), - ByteField("txtString213", None), - ByteField("txtString214", None), - ByteField("txtString215", None), - ByteField("txtString216", None), - ByteField("txtString217", None), - ByteField("txtString218", None), - ByteField("txtString219", None), - ByteField("txtString220", None), - ByteField("txtString221", None), - ByteField("txtString222", None), - ByteField("txtString223", None), - ByteField("txtString224", None), - ByteField("txtString225", None), - ByteField("txtString226", None), - ByteField("txtString227", None), - ByteField("txtString228", None), - ByteField("txtString229", None), - ByteField("txtString230", None), - ByteField("txtString231", None), - ByteField("txtString232", None), - ByteField("txtString233", None), - ByteField("txtString234", None), - ByteField("txtString235", None), - ByteField("txtString236", None), - ByteField("txtString237", None), - ByteField("txtString238", None), - ByteField("txtString239", None), - ByteField("txtString240", None), - ByteField("txtString241", None), - ByteField("txtString242", None), - ByteField("txtString243", None), - ByteField("txtString244", None), - ByteField("txtString245", None), - ByteField("txtString246", None), - ByteField("txtString247", None), - ByteField("txtString248", None) - ] + BitField("eightBitNN", None, 1), + XBitField("ieiNN", None, 7), + + XByteField("lengthNN", None), + + BitField("ext1", 0x1, 1), + BitField("codingScheme", 0x0, 3), + BitField("addCi", 0x0, 1), + BitField("nbSpare", 0x0, 3), + # optional + ByteField("txtString1", None), + ByteField("txtString2", None), + ByteField("txtString3", None), + ByteField("txtString4", None), + ByteField("txtString5", None), + ByteField("txtString6", None), + ByteField("txtString7", None), + ByteField("txtString8", None), + ByteField("txtString9", None), + ByteField("txtString10", None), + ByteField("txtString11", None), + ByteField("txtString12", None), + ByteField("txtString13", None), + ByteField("txtString14", None), + ByteField("txtString15", None), + ByteField("txtString16", None), + ByteField("txtString17", None), + ByteField("txtString18", None), + ByteField("txtString19", None), + ByteField("txtString20", None), + ByteField("txtString21", None), + ByteField("txtString22", None), + ByteField("txtString23", None), + ByteField("txtString24", None), + ByteField("txtString25", None), + ByteField("txtString26", None), + ByteField("txtString27", None), + ByteField("txtString28", None), + ByteField("txtString29", None), + ByteField("txtString30", None), + ByteField("txtString31", None), + ByteField("txtString32", None), + ByteField("txtString33", None), + ByteField("txtString34", None), + ByteField("txtString35", None), + ByteField("txtString36", None), + ByteField("txtString37", None), + ByteField("txtString38", None), + ByteField("txtString39", None), + ByteField("txtString40", None), + ByteField("txtString41", None), + ByteField("txtString42", None), + ByteField("txtString43", None), + ByteField("txtString44", None), + ByteField("txtString45", None), + ByteField("txtString46", None), + ByteField("txtString47", None), + ByteField("txtString48", None), + ByteField("txtString49", None), + ByteField("txtString50", None), + ByteField("txtString51", None), + ByteField("txtString52", None), + ByteField("txtString53", None), + ByteField("txtString54", None), + ByteField("txtString55", None), + ByteField("txtString56", None), + ByteField("txtString57", None), + ByteField("txtString58", None), + ByteField("txtString59", None), + ByteField("txtString60", None), + ByteField("txtString61", None), + ByteField("txtString62", None), + ByteField("txtString63", None), + ByteField("txtString64", None), + ByteField("txtString65", None), + ByteField("txtString66", None), + ByteField("txtString67", None), + ByteField("txtString68", None), + ByteField("txtString69", None), + ByteField("txtString70", None), + ByteField("txtString71", None), + ByteField("txtString72", None), + ByteField("txtString73", None), + ByteField("txtString74", None), + ByteField("txtString75", None), + ByteField("txtString76", None), + ByteField("txtString77", None), + ByteField("txtString78", None), + ByteField("txtString79", None), + ByteField("txtString80", None), + ByteField("txtString81", None), + ByteField("txtString82", None), + ByteField("txtString83", None), + ByteField("txtString84", None), + ByteField("txtString85", None), + ByteField("txtString86", None), + ByteField("txtString87", None), + ByteField("txtString88", None), + ByteField("txtString89", None), + ByteField("txtString90", None), + ByteField("txtString91", None), + ByteField("txtString92", None), + ByteField("txtString93", None), + ByteField("txtString94", None), + ByteField("txtString95", None), + ByteField("txtString96", None), + ByteField("txtString97", None), + ByteField("txtString98", None), + ByteField("txtString99", None), + ByteField("txtString100", None), + ByteField("txtString101", None), + ByteField("txtString102", None), + ByteField("txtString103", None), + ByteField("txtString104", None), + ByteField("txtString105", None), + ByteField("txtString106", None), + ByteField("txtString107", None), + ByteField("txtString108", None), + ByteField("txtString109", None), + ByteField("txtString110", None), + ByteField("txtString111", None), + ByteField("txtString112", None), + ByteField("txtString113", None), + ByteField("txtString114", None), + ByteField("txtString115", None), + ByteField("txtString116", None), + ByteField("txtString117", None), + ByteField("txtString118", None), + ByteField("txtString119", None), + ByteField("txtString120", None), + ByteField("txtString121", None), + ByteField("txtString122", None), + ByteField("txtString123", None), + ByteField("txtString124", None), + ByteField("txtString125", None), + ByteField("txtString126", None), + ByteField("txtString127", None), + ByteField("txtString128", None), + ByteField("txtString129", None), + ByteField("txtString130", None), + ByteField("txtString131", None), + ByteField("txtString132", None), + ByteField("txtString133", None), + ByteField("txtString134", None), + ByteField("txtString135", None), + ByteField("txtString136", None), + ByteField("txtString137", None), + ByteField("txtString138", None), + ByteField("txtString139", None), + ByteField("txtString140", None), + ByteField("txtString141", None), + ByteField("txtString142", None), + ByteField("txtString143", None), + ByteField("txtString144", None), + ByteField("txtString145", None), + ByteField("txtString146", None), + ByteField("txtString147", None), + ByteField("txtString148", None), + ByteField("txtString149", None), + ByteField("txtString150", None), + ByteField("txtString151", None), + ByteField("txtString152", None), + ByteField("txtString153", None), + ByteField("txtString154", None), + ByteField("txtString155", None), + ByteField("txtString156", None), + ByteField("txtString157", None), + ByteField("txtString158", None), + ByteField("txtString159", None), + ByteField("txtString160", None), + ByteField("txtString161", None), + ByteField("txtString162", None), + ByteField("txtString163", None), + ByteField("txtString164", None), + ByteField("txtString165", None), + ByteField("txtString166", None), + ByteField("txtString167", None), + ByteField("txtString168", None), + ByteField("txtString169", None), + ByteField("txtString170", None), + ByteField("txtString171", None), + ByteField("txtString172", None), + ByteField("txtString173", None), + ByteField("txtString174", None), + ByteField("txtString175", None), + ByteField("txtString176", None), + ByteField("txtString177", None), + ByteField("txtString178", None), + ByteField("txtString179", None), + ByteField("txtString180", None), + ByteField("txtString181", None), + ByteField("txtString182", None), + ByteField("txtString183", None), + ByteField("txtString184", None), + ByteField("txtString185", None), + ByteField("txtString186", None), + ByteField("txtString187", None), + ByteField("txtString188", None), + ByteField("txtString189", None), + ByteField("txtString190", None), + ByteField("txtString191", None), + ByteField("txtString192", None), + ByteField("txtString193", None), + ByteField("txtString194", None), + ByteField("txtString195", None), + ByteField("txtString196", None), + ByteField("txtString197", None), + ByteField("txtString198", None), + ByteField("txtString199", None), + ByteField("txtString200", None), + ByteField("txtString201", None), + ByteField("txtString202", None), + ByteField("txtString203", None), + ByteField("txtString204", None), + ByteField("txtString205", None), + ByteField("txtString206", None), + ByteField("txtString207", None), + ByteField("txtString208", None), + ByteField("txtString209", None), + ByteField("txtString210", None), + ByteField("txtString211", None), + ByteField("txtString212", None), + ByteField("txtString213", None), + ByteField("txtString214", None), + ByteField("txtString215", None), + ByteField("txtString216", None), + ByteField("txtString217", None), + ByteField("txtString218", None), + ByteField("txtString219", None), + ByteField("txtString220", None), + ByteField("txtString221", None), + ByteField("txtString222", None), + ByteField("txtString223", None), + ByteField("txtString224", None), + ByteField("txtString225", None), + ByteField("txtString226", None), + ByteField("txtString227", None), + ByteField("txtString228", None), + ByteField("txtString229", None), + ByteField("txtString230", None), + ByteField("txtString231", None), + ByteField("txtString232", None), + ByteField("txtString233", None), + ByteField("txtString234", None), + ByteField("txtString235", None), + ByteField("txtString236", None), + ByteField("txtString237", None), + ByteField("txtString238", None), + ByteField("txtString239", None), + ByteField("txtString240", None), + ByteField("txtString241", None), + ByteField("txtString242", None), + ByteField("txtString243", None), + ByteField("txtString244", None), + ByteField("txtString245", None), + ByteField("txtString246", None), + ByteField("txtString247", None), + ByteField("txtString248", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -5707,105 +5708,105 @@ class RejectCause(Packet): """Reject cause Section 10.5.3.6""" name = "Reject Cause" fields_desc = [ - ByteField("ieiRC", 0x0), - ByteField("rejCause", 0x0) - ] + ByteField("ieiRC", 0x0), + ByteField("rejCause", 0x0) + ] class FollowOnProceed(Packet): """Follow-on Proceed Section 10.5.3.7""" name = "Follow-on Proceed" fields_desc = [ - ByteField("ieiFOP", 0x0), - ] + ByteField("ieiFOP", 0x0), + ] class TimeZoneHdr(Packet): """Time Zone Section 10.5.3.8""" name = "Time Zone" fields_desc = [ - BitField("eightBitTZ", None, 1), - XBitField("ieiTZ", None, 7), - ByteField("timeZone", 0x0), - ] + BitField("eightBitTZ", None, 1), + XBitField("ieiTZ", None, 7), + ByteField("timeZone", 0x0), + ] class TimeZoneAndTimeHdr(Packet): """Time Zone and Time Section 10.5.3.9""" name = "Time Zone and Time" fields_desc = [ - BitField("eightBitTZAT", None, 1), - XBitField("ieiTZAT", None, 7), - ByteField("year", 0x0), - ByteField("month", 0x0), - ByteField("day", 0x0), - ByteField("hour", 0x0), - ByteField("minute", 0x0), - ByteField("second", 0x0), - ByteField("timeZone", 0x0) - ] + BitField("eightBitTZAT", None, 1), + XBitField("ieiTZAT", None, 7), + ByteField("year", 0x0), + ByteField("month", 0x0), + ByteField("day", 0x0), + ByteField("hour", 0x0), + ByteField("minute", 0x0), + ByteField("second", 0x0), + ByteField("timeZone", 0x0) + ] class CtsPermissionHdr(Packet): """CTS permission Section 10.5.3.10""" name = "Cts Permission" fields_desc = [ - BitField("eightBitCP", None, 1), - XBitField("ieiCP", None, 7), - ] + BitField("eightBitCP", None, 1), + XBitField("ieiCP", None, 7), + ] class LsaIdentifierHdr(Packet): """LSA Identifier Section 10.5.3.11""" name = "Lsa Identifier" fields_desc = [ - BitField("eightBitLI", None, 1), - XBitField("ieiLI", None, 7), - ByteField("lsaID", 0x0), - ByteField("lsaID1", 0x0), - ByteField("lsaID2", 0x0) - ] + BitField("eightBitLI", None, 1), + XBitField("ieiLI", None, 7), + ByteField("lsaID", 0x0), + ByteField("lsaID1", 0x0), + ByteField("lsaID2", 0x0) + ] # # 10.5.4 Call control information elements # -#10.5.4.1 Extensions of codesets +# 10.5.4.1 Extensions of codesets # This is only text and no packet class LockingShiftProcedureHdr(Packet): """Locking shift procedure Section 10.5.4.2""" name = "Locking Shift Procedure" fields_desc = [ - XBitField("ieiLSP", None, 4), - BitField("lockShift", 0x0, 1), - BitField("codesetId", 0x0, 3) - ] + XBitField("ieiLSP", None, 4), + BitField("lockShift", 0x0, 1), + BitField("codesetId", 0x0, 3) + ] class NonLockingShiftProcedureHdr(Packet): """Non-locking shift procedure Section 10.5.4.3""" name = "Non-locking Shift Procedure" fields_desc = [ - XBitField("ieiNLSP", None, 4), - BitField("nonLockShift", 0x1, 1), - BitField("codesetId", 0x0, 3) - ] + XBitField("ieiNLSP", None, 4), + BitField("nonLockShift", 0x1, 1), + BitField("codesetId", 0x0, 3) + ] class AuxiliaryStatesHdr(Packet): """Auxiliary states Section 10.5.4.4""" name = "Auxiliary States" fields_desc = [ - BitField("eightBitAS", None, 1), - XBitField("ieiAS", None, 7), - XByteField("lengthAS", 0x3), - BitField("ext", 0x1, 1), - BitField("spare", 0x0, 3), - BitField("holdState", 0x0, 2), - BitField("mptyState", 0x0, 2) - ] + BitField("eightBitAS", None, 1), + XBitField("ieiAS", None, 7), + XByteField("lengthAS", 0x3), + BitField("ext", 0x1, 1), + BitField("spare", 0x0, 3), + BitField("holdState", 0x0, 2), + BitField("mptyState", 0x0, 2) + ] # len 3 to 15 @@ -5813,134 +5814,134 @@ class BearerCapabilityHdr(Packet): """Bearer capability Section 10.5.4.5""" name = "Bearer Capability" fields_desc = [ - BitField("eightBitBC", None, 1), - XBitField("ieiBC", None, 7), - - XByteField("lengthBC", None), - - BitField("ext0", 0x1, 1), - BitField("radioChReq", 0x1, 2), - BitField("codingStd", 0x0, 1), - BitField("transMode", 0x0, 1), - BitField("infoTransCa", 0x0, 3), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("coding", None, 1), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("spare", None, 2), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("speechVers", 0x0, 4), - lambda pkt: pkt.ext0 == 0), - - ConditionalField(BitField("ext2", 0x1, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("compress", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("structure", None, 2), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("dupMode", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("config", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("nirr", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("establi", 0x0, 1), - lambda pkt: pkt.ext1 == 0), - - BitField("ext3", None, 1), - BitField("accessId", None, 2), - BitField("rateAda", None, 2), - BitField("signaling", None, 3), - - ConditionalField(BitField("ext4", None, 1), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("otherITC", None, 2), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("otherRate", None, 2), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("spare1", 0x0, 3), - lambda pkt: pkt.ext3 == 0), - - ConditionalField(BitField("ext5", 0x1, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("hdr", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("multiFr", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("mode", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("lli", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("assig", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("inbNeg", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("spare2", 0x0, 1), - lambda pkt: pkt.ext4 == 0), - - BitField("ext6", None, 1), - BitField("layer1Id", None, 2), - BitField("userInf", None, 4), - BitField("sync", None, 1), - - ConditionalField(BitField("ext7", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("stopBit", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("negoc", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("nbDataBit", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("userRate", None, 4), - lambda pkt: pkt.ext6 == 0), - - ConditionalField(BitField("ext8", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("interRate", None, 2), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("nicTX", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("nicRX", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("parity", None, 3), - lambda pkt: pkt.ext7 == 0), - - ConditionalField(BitField("ext9", None, 1), - lambda pkt: pkt.ext8 == 0), - ConditionalField(BitField("connEle", None, 2), - lambda pkt: pkt.ext8 == 0), - ConditionalField(BitField("modemType", None, 5), - lambda pkt: pkt.ext8 == 0), - - ConditionalField(BitField("ext10", None, 1), - lambda pkt: pkt.ext9 == 0), - ConditionalField(BitField("otherModemType", None, 2), - lambda pkt: pkt.ext9 == 0), - ConditionalField(BitField("netUserRate", None, 5), - lambda pkt: pkt.ext9 == 0), - - ConditionalField(BitField("ext11", None, 1), - lambda pkt: pkt.ext10 == 0), - ConditionalField(BitField("chanCoding", None, 4), - lambda pkt: pkt.ext10 == 0), - ConditionalField(BitField("maxTrafficChan", None, 3), - lambda pkt: pkt.ext10 == 0), - - ConditionalField(BitField("ext12", None, 1), - lambda pkt: pkt.ext11 == 0), - ConditionalField(BitField("uimi", None, 3), - lambda pkt: pkt.ext11 == 0), - ConditionalField(BitField("airInterfaceUserRate", None, 4), - lambda pkt: pkt.ext11 == 0), - - ConditionalField(BitField("ext13", 0x1, 1), - lambda pkt: pkt.ext12 == 0), - ConditionalField(BitField("layer2Ch", None, 2), - lambda pkt: pkt.ext12 == 0), - ConditionalField(BitField("userInfoL2", 0x0, 5), - lambda pkt: pkt.ext12 == 0) - ] + BitField("eightBitBC", None, 1), + XBitField("ieiBC", None, 7), + + XByteField("lengthBC", None), + + BitField("ext0", 0x1, 1), + BitField("radioChReq", 0x1, 2), + BitField("codingStd", 0x0, 1), + BitField("transMode", 0x0, 1), + BitField("infoTransCa", 0x0, 3), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("coding", None, 1), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("spare", None, 2), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("speechVers", 0x0, 4), + lambda pkt: pkt.ext0 == 0), + + ConditionalField(BitField("ext2", 0x1, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("compress", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("structure", None, 2), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("dupMode", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("config", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("nirr", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("establi", 0x0, 1), + lambda pkt: pkt.ext1 == 0), + + BitField("ext3", None, 1), + BitField("accessId", None, 2), + BitField("rateAda", None, 2), + BitField("signaling", None, 3), + + ConditionalField(BitField("ext4", None, 1), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("otherITC", None, 2), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("otherRate", None, 2), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("spare1", 0x0, 3), + lambda pkt: pkt.ext3 == 0), + + ConditionalField(BitField("ext5", 0x1, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("hdr", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("multiFr", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("mode", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("lli", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("assig", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("inbNeg", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("spare2", 0x0, 1), + lambda pkt: pkt.ext4 == 0), + + BitField("ext6", None, 1), + BitField("layer1Id", None, 2), + BitField("userInf", None, 4), + BitField("sync", None, 1), + + ConditionalField(BitField("ext7", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("stopBit", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("negoc", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("nbDataBit", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("userRate", None, 4), + lambda pkt: pkt.ext6 == 0), + + ConditionalField(BitField("ext8", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("interRate", None, 2), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("nicTX", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("nicRX", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("parity", None, 3), + lambda pkt: pkt.ext7 == 0), + + ConditionalField(BitField("ext9", None, 1), + lambda pkt: pkt.ext8 == 0), + ConditionalField(BitField("connEle", None, 2), + lambda pkt: pkt.ext8 == 0), + ConditionalField(BitField("modemType", None, 5), + lambda pkt: pkt.ext8 == 0), + + ConditionalField(BitField("ext10", None, 1), + lambda pkt: pkt.ext9 == 0), + ConditionalField(BitField("otherModemType", None, 2), + lambda pkt: pkt.ext9 == 0), + ConditionalField(BitField("netUserRate", None, 5), + lambda pkt: pkt.ext9 == 0), + + ConditionalField(BitField("ext11", None, 1), + lambda pkt: pkt.ext10 == 0), + ConditionalField(BitField("chanCoding", None, 4), + lambda pkt: pkt.ext10 == 0), + ConditionalField(BitField("maxTrafficChan", None, 3), + lambda pkt: pkt.ext10 == 0), + + ConditionalField(BitField("ext12", None, 1), + lambda pkt: pkt.ext11 == 0), + ConditionalField(BitField("uimi", None, 3), + lambda pkt: pkt.ext11 == 0), + ConditionalField(BitField("airInterfaceUserRate", None, 4), + lambda pkt: pkt.ext11 == 0), + + ConditionalField(BitField("ext13", 0x1, 1), + lambda pkt: pkt.ext12 == 0), + ConditionalField(BitField("layer2Ch", None, 2), + lambda pkt: pkt.ext12 == 0), + ConditionalField(BitField("userInfoL2", 0x0, 5), + lambda pkt: pkt.ext12 == 0) + ] # We have a bug here. packet is not working if used in message def post_build(self, p, pay): @@ -5953,7 +5954,7 @@ def post_build(self, p, pay): p = p[:-2] if self.lengthBC is None: print "len von a %s" % (len(p),) - p = p[:1] + struct.pack(">B", len(p)-3) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 3) + p[2:] return p + pay @@ -5961,24 +5962,24 @@ class CallControlCapabilitiesHdr(Packet): """Call Control Capabilities Section 10.5.4.5a""" name = "Call Control Capabilities" fields_desc = [ - BitField("eightBitCCC", None, 1), - XBitField("ieiCCC", None, 7), - XByteField("lengthCCC", 0x3), - BitField("spare", 0x0, 6), - BitField("pcp", 0x0, 1), - BitField("dtmf", 0x0, 1) - ] + BitField("eightBitCCC", None, 1), + XBitField("ieiCCC", None, 7), + XByteField("lengthCCC", 0x3), + BitField("spare", 0x0, 6), + BitField("pcp", 0x0, 1), + BitField("dtmf", 0x0, 1) + ] class CallStateHdr(Packet): """Call State Section 10.5.4.6""" name = "Call State" fields_desc = [ - BitField("eightBitCS", None, 1), - XBitField("ieiCS", None, 7), - BitField("codingStd", 0x0, 2), - BitField("stateValue", 0x0, 6) - ] + BitField("eightBitCS", None, 1), + XBitField("ieiCS", None, 7), + BitField("codingStd", 0x0, 2), + BitField("stateValue", 0x0, 6) + ] # len 3 to 43 @@ -5986,113 +5987,113 @@ class CalledPartyBcdNumberHdr(Packet): """Called party BCD number Section 10.5.4.7""" name = "Called Party BCD Number" fields_desc = [ - BitField("eightBitCPBN", None, 1), - XBitField("ieiCPBN", None, 7), - XByteField("lengthCPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("nbPlanId", 0x0, 4), - # optional - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), - - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), - - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), - - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), - - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), - - BitField("nbDigit22", None, 4), - BitField("nbDigit21", None, 4), - BitField("nbDigit24", None, 4), - BitField("nbDigit23", None, 4), - - BitField("nbDigit26", None, 4), - BitField("nbDigit25", None, 4), - BitField("nbDigit28", None, 4), - BitField("nbDigit27", None, 4), - - BitField("nbDigit30", None, 4), - BitField("nbDigit29", None, 4), - BitField("nbDigit32", None, 4), - BitField("nbDigit31", None, 4), - - BitField("nbDigit34", None, 4), - BitField("nbDigit33", None, 4), - BitField("nbDigit36", None, 4), - BitField("nbDigit35", None, 4), - - BitField("nbDigit38", None, 4), - BitField("nbDigit37", None, 4), - BitField("nbDigit40", None, 4), - BitField("nbDigit39", None, 4), -# ^^^^^^ 20 first optional bytes ^^^^^^^^^^^^^^^ - BitField("nbDigit42", None, 4), - BitField("nbDigit41", None, 4), - BitField("nbDigit44", None, 4), - BitField("nbDigit43", None, 4), - - BitField("nbDigit46", None, 4), - BitField("nbDigit45", None, 4), - BitField("nbDigit48", None, 4), - BitField("nbDigit47", None, 4), - - BitField("nbDigit50", None, 4), - BitField("nbDigit49", None, 4), - BitField("nbDigit52", None, 4), - BitField("nbDigit51", None, 4), - - BitField("nbDigit54", None, 4), - BitField("nbDigit53", None, 4), - BitField("nbDigit56", None, 4), - BitField("nbDigit55", None, 4), - - BitField("nbDigit58", None, 4), - BitField("nbDigit57", None, 4), - BitField("nbDigit60", None, 4), - BitField("nbDigit59", None, 4), - - BitField("nbDigit62", None, 4), - BitField("nbDigit61", None, 4), - BitField("nbDigit64", None, 4), - BitField("nbDigit63", None, 4), - - BitField("nbDigit66", None, 4), - BitField("nbDigit65", None, 4), - BitField("nbDigit68", None, 4), - BitField("nbDigit67", None, 4), - - BitField("nbDigit70", None, 4), - BitField("nbDigit69", None, 4), - BitField("nbDigit72", None, 4), - BitField("nbDigit71", None, 4), - - BitField("nbDigit74", None, 4), - BitField("nbDigit73", None, 4), - BitField("nbDigit76", None, 4), - BitField("nbDigit75", None, 4), - - BitField("nbDigit78", None, 4), - BitField("nbDigit77", None, 4), - BitField("nbDigit80", None, 4), - BitField("nbDigit79", None, 4), - ] + BitField("eightBitCPBN", None, 1), + XBitField("ieiCPBN", None, 7), + XByteField("lengthCPBN", None), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("nbPlanId", 0x0, 4), + # optional + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), + + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), + + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), + + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), + + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), + + BitField("nbDigit22", None, 4), + BitField("nbDigit21", None, 4), + BitField("nbDigit24", None, 4), + BitField("nbDigit23", None, 4), + + BitField("nbDigit26", None, 4), + BitField("nbDigit25", None, 4), + BitField("nbDigit28", None, 4), + BitField("nbDigit27", None, 4), + + BitField("nbDigit30", None, 4), + BitField("nbDigit29", None, 4), + BitField("nbDigit32", None, 4), + BitField("nbDigit31", None, 4), + + BitField("nbDigit34", None, 4), + BitField("nbDigit33", None, 4), + BitField("nbDigit36", None, 4), + BitField("nbDigit35", None, 4), + + BitField("nbDigit38", None, 4), + BitField("nbDigit37", None, 4), + BitField("nbDigit40", None, 4), + BitField("nbDigit39", None, 4), + # ^^^^^^ 20 first optional bytes ^^^^^^^^^^^^^^^ + BitField("nbDigit42", None, 4), + BitField("nbDigit41", None, 4), + BitField("nbDigit44", None, 4), + BitField("nbDigit43", None, 4), + + BitField("nbDigit46", None, 4), + BitField("nbDigit45", None, 4), + BitField("nbDigit48", None, 4), + BitField("nbDigit47", None, 4), + + BitField("nbDigit50", None, 4), + BitField("nbDigit49", None, 4), + BitField("nbDigit52", None, 4), + BitField("nbDigit51", None, 4), + + BitField("nbDigit54", None, 4), + BitField("nbDigit53", None, 4), + BitField("nbDigit56", None, 4), + BitField("nbDigit55", None, 4), + + BitField("nbDigit58", None, 4), + BitField("nbDigit57", None, 4), + BitField("nbDigit60", None, 4), + BitField("nbDigit59", None, 4), + + BitField("nbDigit62", None, 4), + BitField("nbDigit61", None, 4), + BitField("nbDigit64", None, 4), + BitField("nbDigit63", None, 4), + + BitField("nbDigit66", None, 4), + BitField("nbDigit65", None, 4), + BitField("nbDigit68", None, 4), + BitField("nbDigit67", None, 4), + + BitField("nbDigit70", None, 4), + BitField("nbDigit69", None, 4), + BitField("nbDigit72", None, 4), + BitField("nbDigit71", None, 4), + + BitField("nbDigit74", None, 4), + BitField("nbDigit73", None, 4), + BitField("nbDigit76", None, 4), + BitField("nbDigit75", None, 4), + + BitField("nbDigit78", None, 4), + BitField("nbDigit77", None, 4), + BitField("nbDigit80", None, 4), + BitField("nbDigit79", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6109,36 +6110,36 @@ class CalledPartySubaddressHdr(Packet): """Called party subaddress Section 10.5.4.8""" name = "Called Party Subaddress" fields_desc = [ - BitField("eightBitCPS", None, 1), - XBitField("ieiCPS", None, 7), - XByteField("lengthCPS", None), - # optional - BitField("ext", None, 1), - BitField("subAddr", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + BitField("eightBitCPS", None, 1), + XBitField("ieiCPS", None, 7), + XByteField("lengthCPS", None), + # optional + BitField("ext", None, 1), + BitField("subAddr", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6155,52 +6156,52 @@ class CallingPartyBcdNumberHdr(Packet): """Called party subaddress Section 10.5.4.9""" name = "Called Party Subaddress" fields_desc = [ - BitField("eightBitCPBN", None, 1), - XBitField("ieiCPBN", None, 7), - XByteField("lengthCPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("nbPlanId", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", None, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", None, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", 0x0, 2), - lambda pkt: pkt.ext == 0), + BitField("eightBitCPBN", None, 1), + XBitField("ieiCPBN", None, 7), + XByteField("lengthCPBN", None), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("nbPlanId", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", None, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", None, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", 0x0, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), - ] + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6208,7 +6209,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthCPBN is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay @@ -6217,36 +6218,36 @@ class CallingPartySubaddressHdr(Packet): """Calling party subaddress Section 10.5.4.10""" name = "Calling Party Subaddress" fields_desc = [ - BitField("eightBitCPS", None, 1), - XBitField("ieiCPS", None, 7), - XByteField("lengthCPS", None), - # optional - BitField("ext1", None, 1), - BitField("typeAddr", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + BitField("eightBitCPS", None, 1), + XBitField("ieiCPS", None, 7), + XByteField("lengthCPS", None), + # optional + BitField("ext1", None, 1), + BitField("typeAddr", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6263,52 +6264,52 @@ class CauseHdr(Packet): """Cause Section 10.5.4.11""" name = "Cause" fields_desc = [ - BitField("eightBitC", None, 1), - XBitField("ieiC", None, 7), - - XByteField("lengthC", None), - - BitField("ext", 0x1, 1), - BitField("codingStd", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("location", 0x0, 4), - - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("recommendation", 0x0, 7), - lambda pkt: pkt.ext == 0), - # optional - BitField("ext2", None, 1), - BitField("causeValue", None, 7), - - ByteField("diagnositc0", None), - ByteField("diagnositc1", None), - ByteField("diagnositc2", None), - ByteField("diagnositc3", None), - ByteField("diagnositc4", None), - ByteField("diagnositc5", None), - ByteField("diagnositc6", None), - ByteField("diagnositc7", None), - ByteField("diagnositc8", None), - ByteField("diagnositc9", None), - ByteField("diagnositc10", None), - ByteField("diagnositc11", None), - ByteField("diagnositc12", None), - ByteField("diagnositc13", None), - ByteField("diagnositc14", None), - ByteField("diagnositc15", None), - ByteField("diagnositc16", None), - ByteField("diagnositc17", None), - ByteField("diagnositc18", None), - ByteField("diagnositc19", None), - ByteField("diagnositc20", None), - ByteField("diagnositc21", None), - ByteField("diagnositc22", None), - ByteField("diagnositc23", None), - ByteField("diagnositc24", None), - ByteField("diagnositc25", None), - ByteField("diagnositc26", None), - ] + BitField("eightBitC", None, 1), + XBitField("ieiC", None, 7), + + XByteField("lengthC", None), + + BitField("ext", 0x1, 1), + BitField("codingStd", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("location", 0x0, 4), + + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("recommendation", 0x0, 7), + lambda pkt: pkt.ext == 0), + # optional + BitField("ext2", None, 1), + BitField("causeValue", None, 7), + + ByteField("diagnositc0", None), + ByteField("diagnositc1", None), + ByteField("diagnositc2", None), + ByteField("diagnositc3", None), + ByteField("diagnositc4", None), + ByteField("diagnositc5", None), + ByteField("diagnositc6", None), + ByteField("diagnositc7", None), + ByteField("diagnositc8", None), + ByteField("diagnositc9", None), + ByteField("diagnositc10", None), + ByteField("diagnositc11", None), + ByteField("diagnositc12", None), + ByteField("diagnositc13", None), + ByteField("diagnositc14", None), + ByteField("diagnositc15", None), + ByteField("diagnositc16", None), + ByteField("diagnositc17", None), + ByteField("diagnositc18", None), + ByteField("diagnositc19", None), + ByteField("diagnositc20", None), + ByteField("diagnositc21", None), + ByteField("diagnositc22", None), + ByteField("diagnositc23", None), + ByteField("diagnositc24", None), + ByteField("diagnositc25", None), + ByteField("diagnositc26", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6316,7 +6317,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthC is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay @@ -6324,36 +6325,36 @@ class ClirSuppressionHdr(Packet): """CLIR suppression Section 10.5.4.11a""" name = "Clir Suppression" fields_desc = [ - BitField("eightBitCS", None, 1), - XBitField("ieiCS", None, 7), - ] + BitField("eightBitCS", None, 1), + XBitField("ieiCS", None, 7), + ] class ClirInvocationHdr(Packet): """CLIR invocation Section 10.5.4.11b""" name = "Clir Invocation" fields_desc = [ - BitField("eightBitCI", None, 1), - XBitField("ieiCI", None, 7), - ] + BitField("eightBitCI", None, 1), + XBitField("ieiCI", None, 7), + ] class CongestionLevelHdr(Packet): """Congestion level Section 10.5.4.12""" name = "Congestion Level" fields_desc = [ - XBitField("ieiCL", None, 4), - BitField("notDef", 0x0, 4) - ] + XBitField("ieiCL", None, 4), + BitField("notDef", 0x0, 4) + ] # Fix 1/2 len problem class CongestionLevelAndSpareHalfOctets(Packet): name = "Congestion Level and Spare Half Octets" fields_desc = [ - BitField("ieiCL", 0x0, 4), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("ieiCL", 0x0, 4), + BitField("spareHalfOctets", 0x0, 4) + ] # len 3 to 14 @@ -6361,54 +6362,54 @@ class ConnectedNumberHdr(Packet): """Connected number Section 10.5.4.13""" name = "Connected Number" fields_desc = [ - BitField("eightBitCN", None, 1), - XBitField("ieiCN", None, 7), + BitField("eightBitCN", None, 1), + XBitField("ieiCN", None, 7), - XByteField("lengthCN", None), + XByteField("lengthCN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("typePlanId", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", None, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", None, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", None, 2), - lambda pkt: pkt.ext == 0), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("typePlanId", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", None, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", None, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", None, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4) - ] + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6416,7 +6417,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthCN is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay @@ -6425,37 +6426,37 @@ class ConnectedSubaddressHdr(Packet): """Connected subaddress Section 10.5.4.14""" name = "Connected Subaddress" fields_desc = [ - BitField("eightBitCS", None, 1), - XBitField("ieiCS", None, 7), - - XByteField("lengthCS", None), - # optional - BitField("ext", None, 1), - BitField("typeOfSub", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + BitField("eightBitCS", None, 1), + XBitField("ieiCS", None, 7), + + XByteField("lengthCS", None), + # optional + BitField("ext", None, 1), + BitField("typeOfSub", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6472,260 +6473,260 @@ class FacilityHdr(Packet): """Facility Section 10.5.4.15""" name = "Facility" fields_desc = [ - BitField("eightBitF", None, 1), - XBitField("ieiF", None, 7), - XByteField("lengthF", None), - # optional - ByteField("facilityInfo1", None), - ByteField("facilityInfo2", None), - ByteField("facilityInfo3", None), - ByteField("facilityInfo4", None), - ByteField("facilityInfo5", None), - ByteField("facilityInfo6", None), - ByteField("facilityInfo7", None), - ByteField("facilityInfo8", None), - ByteField("facilityInfo9", None), - ByteField("facilityInfo10", None), - ByteField("facilityInfo11", None), - ByteField("facilityInfo12", None), - ByteField("facilityInfo13", None), - ByteField("facilityInfo14", None), - ByteField("facilityInfo15", None), - ByteField("facilityInfo16", None), - ByteField("facilityInfo17", None), - ByteField("facilityInfo18", None), - ByteField("facilityInfo19", None), - ByteField("facilityInfo20", None), - ByteField("facilityInfo21", None), - ByteField("facilityInfo22", None), - ByteField("facilityInfo23", None), - ByteField("facilityInfo24", None), - ByteField("facilityInfo25", None), - ByteField("facilityInfo26", None), - ByteField("facilityInfo27", None), - ByteField("facilityInfo28", None), - ByteField("facilityInfo29", None), - ByteField("facilityInfo30", None), - ByteField("facilityInfo31", None), - ByteField("facilityInfo32", None), - ByteField("facilityInfo33", None), - ByteField("facilityInfo34", None), - ByteField("facilityInfo35", None), - ByteField("facilityInfo36", None), - ByteField("facilityInfo37", None), - ByteField("facilityInfo38", None), - ByteField("facilityInfo39", None), - ByteField("facilityInfo40", None), - ByteField("facilityInfo41", None), - ByteField("facilityInfo42", None), - ByteField("facilityInfo43", None), - ByteField("facilityInfo44", None), - ByteField("facilityInfo45", None), - ByteField("facilityInfo46", None), - ByteField("facilityInfo47", None), - ByteField("facilityInfo48", None), - ByteField("facilityInfo49", None), - ByteField("facilityInfo50", None), - ByteField("facilityInfo51", None), - ByteField("facilityInfo52", None), - ByteField("facilityInfo53", None), - ByteField("facilityInfo54", None), - ByteField("facilityInfo55", None), - ByteField("facilityInfo56", None), - ByteField("facilityInfo57", None), - ByteField("facilityInfo58", None), - ByteField("facilityInfo59", None), - ByteField("facilityInfo60", None), - ByteField("facilityInfo61", None), - ByteField("facilityInfo62", None), - ByteField("facilityInfo63", None), - ByteField("facilityInfo64", None), - ByteField("facilityInfo65", None), - ByteField("facilityInfo66", None), - ByteField("facilityInfo67", None), - ByteField("facilityInfo68", None), - ByteField("facilityInfo69", None), - ByteField("facilityInfo70", None), - ByteField("facilityInfo71", None), - ByteField("facilityInfo72", None), - ByteField("facilityInfo73", None), - ByteField("facilityInfo74", None), - ByteField("facilityInfo75", None), - ByteField("facilityInfo76", None), - ByteField("facilityInfo77", None), - ByteField("facilityInfo78", None), - ByteField("facilityInfo79", None), - ByteField("facilityInfo80", None), - ByteField("facilityInfo81", None), - ByteField("facilityInfo82", None), - ByteField("facilityInfo83", None), - ByteField("facilityInfo84", None), - ByteField("facilityInfo85", None), - ByteField("facilityInfo86", None), - ByteField("facilityInfo87", None), - ByteField("facilityInfo88", None), - ByteField("facilityInfo89", None), - ByteField("facilityInfo90", None), - ByteField("facilityInfo91", None), - ByteField("facilityInfo92", None), - ByteField("facilityInfo93", None), - ByteField("facilityInfo94", None), - ByteField("facilityInfo95", None), - ByteField("facilityInfo96", None), - ByteField("facilityInfo97", None), - ByteField("facilityInfo98", None), - ByteField("facilityInfo99", None), - ByteField("facilityInfo100", None), - ByteField("facilityInfo101", None), - ByteField("facilityInfo102", None), - ByteField("facilityInfo103", None), - ByteField("facilityInfo104", None), - ByteField("facilityInfo105", None), - ByteField("facilityInfo106", None), - ByteField("facilityInfo107", None), - ByteField("facilityInfo108", None), - ByteField("facilityInfo109", None), - ByteField("facilityInfo110", None), - ByteField("facilityInfo111", None), - ByteField("facilityInfo112", None), - ByteField("facilityInfo113", None), - ByteField("facilityInfo114", None), - ByteField("facilityInfo115", None), - ByteField("facilityInfo116", None), - ByteField("facilityInfo117", None), - ByteField("facilityInfo118", None), - ByteField("facilityInfo119", None), - ByteField("facilityInfo120", None), - ByteField("facilityInfo121", None), - ByteField("facilityInfo122", None), - ByteField("facilityInfo123", None), - ByteField("facilityInfo124", None), - ByteField("facilityInfo125", None), - ByteField("facilityInfo126", None), - ByteField("facilityInfo127", None), - ByteField("facilityInfo128", None), - ByteField("facilityInfo129", None), - ByteField("facilityInfo130", None), - ByteField("facilityInfo131", None), - ByteField("facilityInfo132", None), - ByteField("facilityInfo133", None), - ByteField("facilityInfo134", None), - ByteField("facilityInfo135", None), - ByteField("facilityInfo136", None), - ByteField("facilityInfo137", None), - ByteField("facilityInfo138", None), - ByteField("facilityInfo139", None), - ByteField("facilityInfo140", None), - ByteField("facilityInfo141", None), - ByteField("facilityInfo142", None), - ByteField("facilityInfo143", None), - ByteField("facilityInfo144", None), - ByteField("facilityInfo145", None), - ByteField("facilityInfo146", None), - ByteField("facilityInfo147", None), - ByteField("facilityInfo148", None), - ByteField("facilityInfo149", None), - ByteField("facilityInfo150", None), - ByteField("facilityInfo151", None), - ByteField("facilityInfo152", None), - ByteField("facilityInfo153", None), - ByteField("facilityInfo154", None), - ByteField("facilityInfo155", None), - ByteField("facilityInfo156", None), - ByteField("facilityInfo157", None), - ByteField("facilityInfo158", None), - ByteField("facilityInfo159", None), - ByteField("facilityInfo160", None), - ByteField("facilityInfo161", None), - ByteField("facilityInfo162", None), - ByteField("facilityInfo163", None), - ByteField("facilityInfo164", None), - ByteField("facilityInfo165", None), - ByteField("facilityInfo166", None), - ByteField("facilityInfo167", None), - ByteField("facilityInfo168", None), - ByteField("facilityInfo169", None), - ByteField("facilityInfo170", None), - ByteField("facilityInfo171", None), - ByteField("facilityInfo172", None), - ByteField("facilityInfo173", None), - ByteField("facilityInfo174", None), - ByteField("facilityInfo175", None), - ByteField("facilityInfo176", None), - ByteField("facilityInfo177", None), - ByteField("facilityInfo178", None), - ByteField("facilityInfo179", None), - ByteField("facilityInfo180", None), - ByteField("facilityInfo181", None), - ByteField("facilityInfo182", None), - ByteField("facilityInfo183", None), - ByteField("facilityInfo184", None), - ByteField("facilityInfo185", None), - ByteField("facilityInfo186", None), - ByteField("facilityInfo187", None), - ByteField("facilityInfo188", None), - ByteField("facilityInfo189", None), - ByteField("facilityInfo190", None), - ByteField("facilityInfo191", None), - ByteField("facilityInfo192", None), - ByteField("facilityInfo193", None), - ByteField("facilityInfo194", None), - ByteField("facilityInfo195", None), - ByteField("facilityInfo196", None), - ByteField("facilityInfo197", None), - ByteField("facilityInfo198", None), - ByteField("facilityInfo199", None), - ByteField("facilityInfo200", None), - ByteField("facilityInfo201", None), - ByteField("facilityInfo202", None), - ByteField("facilityInfo203", None), - ByteField("facilityInfo204", None), - ByteField("facilityInfo205", None), - ByteField("facilityInfo206", None), - ByteField("facilityInfo207", None), - ByteField("facilityInfo208", None), - ByteField("facilityInfo209", None), - ByteField("facilityInfo210", None), - ByteField("facilityInfo211", None), - ByteField("facilityInfo212", None), - ByteField("facilityInfo213", None), - ByteField("facilityInfo214", None), - ByteField("facilityInfo215", None), - ByteField("facilityInfo216", None), - ByteField("facilityInfo217", None), - ByteField("facilityInfo218", None), - ByteField("facilityInfo219", None), - ByteField("facilityInfo220", None), - ByteField("facilityInfo221", None), - ByteField("facilityInfo222", None), - ByteField("facilityInfo223", None), - ByteField("facilityInfo224", None), - ByteField("facilityInfo225", None), - ByteField("facilityInfo226", None), - ByteField("facilityInfo227", None), - ByteField("facilityInfo228", None), - ByteField("facilityInfo229", None), - ByteField("facilityInfo230", None), - ByteField("facilityInfo231", None), - ByteField("facilityInfo232", None), - ByteField("facilityInfo233", None), - ByteField("facilityInfo234", None), - ByteField("facilityInfo235", None), - ByteField("facilityInfo236", None), - ByteField("facilityInfo237", None), - ByteField("facilityInfo238", None), - ByteField("facilityInfo239", None), - ByteField("facilityInfo240", None), - ByteField("facilityInfo241", None), - ByteField("facilityInfo242", None), - ByteField("facilityInfo243", None), - ByteField("facilityInfo244", None), - ByteField("facilityInfo245", None), - ByteField("facilityInfo246", None), - ByteField("facilityInfo247", None), - ByteField("facilityInfo248", None), - ByteField("facilityInfo249", None) - ] + BitField("eightBitF", None, 1), + XBitField("ieiF", None, 7), + XByteField("lengthF", None), + # optional + ByteField("facilityInfo1", None), + ByteField("facilityInfo2", None), + ByteField("facilityInfo3", None), + ByteField("facilityInfo4", None), + ByteField("facilityInfo5", None), + ByteField("facilityInfo6", None), + ByteField("facilityInfo7", None), + ByteField("facilityInfo8", None), + ByteField("facilityInfo9", None), + ByteField("facilityInfo10", None), + ByteField("facilityInfo11", None), + ByteField("facilityInfo12", None), + ByteField("facilityInfo13", None), + ByteField("facilityInfo14", None), + ByteField("facilityInfo15", None), + ByteField("facilityInfo16", None), + ByteField("facilityInfo17", None), + ByteField("facilityInfo18", None), + ByteField("facilityInfo19", None), + ByteField("facilityInfo20", None), + ByteField("facilityInfo21", None), + ByteField("facilityInfo22", None), + ByteField("facilityInfo23", None), + ByteField("facilityInfo24", None), + ByteField("facilityInfo25", None), + ByteField("facilityInfo26", None), + ByteField("facilityInfo27", None), + ByteField("facilityInfo28", None), + ByteField("facilityInfo29", None), + ByteField("facilityInfo30", None), + ByteField("facilityInfo31", None), + ByteField("facilityInfo32", None), + ByteField("facilityInfo33", None), + ByteField("facilityInfo34", None), + ByteField("facilityInfo35", None), + ByteField("facilityInfo36", None), + ByteField("facilityInfo37", None), + ByteField("facilityInfo38", None), + ByteField("facilityInfo39", None), + ByteField("facilityInfo40", None), + ByteField("facilityInfo41", None), + ByteField("facilityInfo42", None), + ByteField("facilityInfo43", None), + ByteField("facilityInfo44", None), + ByteField("facilityInfo45", None), + ByteField("facilityInfo46", None), + ByteField("facilityInfo47", None), + ByteField("facilityInfo48", None), + ByteField("facilityInfo49", None), + ByteField("facilityInfo50", None), + ByteField("facilityInfo51", None), + ByteField("facilityInfo52", None), + ByteField("facilityInfo53", None), + ByteField("facilityInfo54", None), + ByteField("facilityInfo55", None), + ByteField("facilityInfo56", None), + ByteField("facilityInfo57", None), + ByteField("facilityInfo58", None), + ByteField("facilityInfo59", None), + ByteField("facilityInfo60", None), + ByteField("facilityInfo61", None), + ByteField("facilityInfo62", None), + ByteField("facilityInfo63", None), + ByteField("facilityInfo64", None), + ByteField("facilityInfo65", None), + ByteField("facilityInfo66", None), + ByteField("facilityInfo67", None), + ByteField("facilityInfo68", None), + ByteField("facilityInfo69", None), + ByteField("facilityInfo70", None), + ByteField("facilityInfo71", None), + ByteField("facilityInfo72", None), + ByteField("facilityInfo73", None), + ByteField("facilityInfo74", None), + ByteField("facilityInfo75", None), + ByteField("facilityInfo76", None), + ByteField("facilityInfo77", None), + ByteField("facilityInfo78", None), + ByteField("facilityInfo79", None), + ByteField("facilityInfo80", None), + ByteField("facilityInfo81", None), + ByteField("facilityInfo82", None), + ByteField("facilityInfo83", None), + ByteField("facilityInfo84", None), + ByteField("facilityInfo85", None), + ByteField("facilityInfo86", None), + ByteField("facilityInfo87", None), + ByteField("facilityInfo88", None), + ByteField("facilityInfo89", None), + ByteField("facilityInfo90", None), + ByteField("facilityInfo91", None), + ByteField("facilityInfo92", None), + ByteField("facilityInfo93", None), + ByteField("facilityInfo94", None), + ByteField("facilityInfo95", None), + ByteField("facilityInfo96", None), + ByteField("facilityInfo97", None), + ByteField("facilityInfo98", None), + ByteField("facilityInfo99", None), + ByteField("facilityInfo100", None), + ByteField("facilityInfo101", None), + ByteField("facilityInfo102", None), + ByteField("facilityInfo103", None), + ByteField("facilityInfo104", None), + ByteField("facilityInfo105", None), + ByteField("facilityInfo106", None), + ByteField("facilityInfo107", None), + ByteField("facilityInfo108", None), + ByteField("facilityInfo109", None), + ByteField("facilityInfo110", None), + ByteField("facilityInfo111", None), + ByteField("facilityInfo112", None), + ByteField("facilityInfo113", None), + ByteField("facilityInfo114", None), + ByteField("facilityInfo115", None), + ByteField("facilityInfo116", None), + ByteField("facilityInfo117", None), + ByteField("facilityInfo118", None), + ByteField("facilityInfo119", None), + ByteField("facilityInfo120", None), + ByteField("facilityInfo121", None), + ByteField("facilityInfo122", None), + ByteField("facilityInfo123", None), + ByteField("facilityInfo124", None), + ByteField("facilityInfo125", None), + ByteField("facilityInfo126", None), + ByteField("facilityInfo127", None), + ByteField("facilityInfo128", None), + ByteField("facilityInfo129", None), + ByteField("facilityInfo130", None), + ByteField("facilityInfo131", None), + ByteField("facilityInfo132", None), + ByteField("facilityInfo133", None), + ByteField("facilityInfo134", None), + ByteField("facilityInfo135", None), + ByteField("facilityInfo136", None), + ByteField("facilityInfo137", None), + ByteField("facilityInfo138", None), + ByteField("facilityInfo139", None), + ByteField("facilityInfo140", None), + ByteField("facilityInfo141", None), + ByteField("facilityInfo142", None), + ByteField("facilityInfo143", None), + ByteField("facilityInfo144", None), + ByteField("facilityInfo145", None), + ByteField("facilityInfo146", None), + ByteField("facilityInfo147", None), + ByteField("facilityInfo148", None), + ByteField("facilityInfo149", None), + ByteField("facilityInfo150", None), + ByteField("facilityInfo151", None), + ByteField("facilityInfo152", None), + ByteField("facilityInfo153", None), + ByteField("facilityInfo154", None), + ByteField("facilityInfo155", None), + ByteField("facilityInfo156", None), + ByteField("facilityInfo157", None), + ByteField("facilityInfo158", None), + ByteField("facilityInfo159", None), + ByteField("facilityInfo160", None), + ByteField("facilityInfo161", None), + ByteField("facilityInfo162", None), + ByteField("facilityInfo163", None), + ByteField("facilityInfo164", None), + ByteField("facilityInfo165", None), + ByteField("facilityInfo166", None), + ByteField("facilityInfo167", None), + ByteField("facilityInfo168", None), + ByteField("facilityInfo169", None), + ByteField("facilityInfo170", None), + ByteField("facilityInfo171", None), + ByteField("facilityInfo172", None), + ByteField("facilityInfo173", None), + ByteField("facilityInfo174", None), + ByteField("facilityInfo175", None), + ByteField("facilityInfo176", None), + ByteField("facilityInfo177", None), + ByteField("facilityInfo178", None), + ByteField("facilityInfo179", None), + ByteField("facilityInfo180", None), + ByteField("facilityInfo181", None), + ByteField("facilityInfo182", None), + ByteField("facilityInfo183", None), + ByteField("facilityInfo184", None), + ByteField("facilityInfo185", None), + ByteField("facilityInfo186", None), + ByteField("facilityInfo187", None), + ByteField("facilityInfo188", None), + ByteField("facilityInfo189", None), + ByteField("facilityInfo190", None), + ByteField("facilityInfo191", None), + ByteField("facilityInfo192", None), + ByteField("facilityInfo193", None), + ByteField("facilityInfo194", None), + ByteField("facilityInfo195", None), + ByteField("facilityInfo196", None), + ByteField("facilityInfo197", None), + ByteField("facilityInfo198", None), + ByteField("facilityInfo199", None), + ByteField("facilityInfo200", None), + ByteField("facilityInfo201", None), + ByteField("facilityInfo202", None), + ByteField("facilityInfo203", None), + ByteField("facilityInfo204", None), + ByteField("facilityInfo205", None), + ByteField("facilityInfo206", None), + ByteField("facilityInfo207", None), + ByteField("facilityInfo208", None), + ByteField("facilityInfo209", None), + ByteField("facilityInfo210", None), + ByteField("facilityInfo211", None), + ByteField("facilityInfo212", None), + ByteField("facilityInfo213", None), + ByteField("facilityInfo214", None), + ByteField("facilityInfo215", None), + ByteField("facilityInfo216", None), + ByteField("facilityInfo217", None), + ByteField("facilityInfo218", None), + ByteField("facilityInfo219", None), + ByteField("facilityInfo220", None), + ByteField("facilityInfo221", None), + ByteField("facilityInfo222", None), + ByteField("facilityInfo223", None), + ByteField("facilityInfo224", None), + ByteField("facilityInfo225", None), + ByteField("facilityInfo226", None), + ByteField("facilityInfo227", None), + ByteField("facilityInfo228", None), + ByteField("facilityInfo229", None), + ByteField("facilityInfo230", None), + ByteField("facilityInfo231", None), + ByteField("facilityInfo232", None), + ByteField("facilityInfo233", None), + ByteField("facilityInfo234", None), + ByteField("facilityInfo235", None), + ByteField("facilityInfo236", None), + ByteField("facilityInfo237", None), + ByteField("facilityInfo238", None), + ByteField("facilityInfo239", None), + ByteField("facilityInfo240", None), + ByteField("facilityInfo241", None), + ByteField("facilityInfo242", None), + ByteField("facilityInfo243", None), + ByteField("facilityInfo244", None), + ByteField("facilityInfo245", None), + ByteField("facilityInfo246", None), + ByteField("facilityInfo247", None), + ByteField("facilityInfo248", None), + ByteField("facilityInfo249", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6737,29 +6738,29 @@ def post_build(self, p, pay): return p + pay -#len 2 to 5 +# len 2 to 5 class HighLayerCompatibilityHdr(Packet): """High layer compatibility Section 10.5.4.16""" name = "High Layer Compatibility" fields_desc = [ - BitField("eightBitHLC", None, 1), - XBitField("ieiHLC", None, 7), + BitField("eightBitHLC", None, 1), + XBitField("ieiHLC", None, 7), - XByteField("lengthHLC", None), - # optional - BitField("ext", None, 1), - BitField("codingStd", None, 2), - BitField("interpret", None, 3), - BitField("presMeth", None, 2), + XByteField("lengthHLC", None), + # optional + BitField("ext", None, 1), + BitField("codingStd", None, 2), + BitField("interpret", None, 3), + BitField("presMeth", None, 2), - BitField("ext1", None, 1), - BitField("highLayerId", None, 7), + BitField("ext1", None, 1), + BitField("highLayerId", None, 7), - ConditionalField(BitField("ext2", 0x1, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("exHiLayerId", 0x0, 7), - lambda pkt: pkt.ext1 == 0) - ] + ConditionalField(BitField("ext2", 0x1, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("exHiLayerId", 0x0, 7), + lambda pkt: pkt.ext1 == 0) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6767,7 +6768,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthHLC is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay # # 10.5.4.16.1 Static conditions for the high layer @@ -6779,11 +6780,11 @@ class KeypadFacilityHdr(Packet): """Keypad facility Section 10.5.4.17""" name = "Keypad Facility" fields_desc = [ - BitField("eightBitKF", None, 1), - XBitField("ieiKF", None, 7), - BitField("spare", 0x0, 1), - BitField("keyPadInfo", 0x0, 7) - ] + BitField("eightBitKF", None, 1), + XBitField("ieiKF", None, 7), + BitField("spare", 0x0, 1), + BitField("keyPadInfo", 0x0, 7) + ] # len 2 to 15 @@ -6791,25 +6792,25 @@ class LowLayerCompatibilityHdr(Packet): """Low layer compatibility Section 10.5.4.18""" name = "Low Layer Compatibility" fields_desc = [ - BitField("eightBitLLC", None, 1), - XBitField("ieiLLC", None, 7), - - XByteField("lengthLLC", None), - # optional - ByteField("rest0", None), - ByteField("rest1", None), - ByteField("rest2", None), - ByteField("rest3", None), - ByteField("rest4", None), - ByteField("rest5", None), - ByteField("rest6", None), - ByteField("rest7", None), - ByteField("rest8", None), - ByteField("rest9", None), - ByteField("rest10", None), - ByteField("rest11", None), - ByteField("rest12", None) - ] + BitField("eightBitLLC", None, 1), + XBitField("ieiLLC", None, 7), + + XByteField("lengthLLC", None), + # optional + ByteField("rest0", None), + ByteField("rest1", None), + ByteField("rest2", None), + ByteField("rest3", None), + ByteField("rest4", None), + ByteField("rest5", None), + ByteField("rest6", None), + ByteField("rest7", None), + ByteField("rest8", None), + ByteField("rest9", None), + ByteField("rest10", None), + ByteField("rest11", None), + ByteField("rest12", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6825,47 +6826,47 @@ class MoreDataHdr(Packet): """More data Section 10.5.4.19""" name = "More Data" fields_desc = [ - BitField("eightBitMD", None, 1), - XBitField("ieiMD", None, 7), - ] + BitField("eightBitMD", None, 1), + XBitField("ieiMD", None, 7), + ] class NotificationIndicatorHdr(Packet): """Notification indicator Section 10.5.4.20""" name = "Notification Indicator" fields_desc = [ - BitField("eightBitNI", None, 1), - XBitField("ieiNI", None, 7), - BitField("ext", 0x1, 1), - BitField("notifDesc", 0x0, 7) - ] + BitField("eightBitNI", None, 1), + XBitField("ieiNI", None, 7), + BitField("ext", 0x1, 1), + BitField("notifDesc", 0x0, 7) + ] class ProgressIndicatorHdr(Packet): """Progress indicator Section 10.5.4.21""" name = "Progress Indicator" fields_desc = [ - BitField("eightBitPI", None, 1), - XBitField("ieiPI", None, 7), - XByteField("lengthPI", 0x2), - BitField("ext", 0x1, 1), - BitField("codingStd", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("location", 0x0, 4), - BitField("ext1", 0x1, 1), - BitField("progressDesc", 0x0, 7) - ] + BitField("eightBitPI", None, 1), + XBitField("ieiPI", None, 7), + XByteField("lengthPI", 0x2), + BitField("ext", 0x1, 1), + BitField("codingStd", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("location", 0x0, 4), + BitField("ext1", 0x1, 1), + BitField("progressDesc", 0x0, 7) + ] class RecallTypeHdr(Packet): """Recall type $(CCBS)$ Section 10.5.4.21a""" name = "Recall Type $(CCBS)$" fields_desc = [ - BitField("eightBitRT", None, 1), - XBitField("ieiRT", None, 7), - BitField("spare", 0x0, 5), - BitField("recallType", 0x0, 3) - ] + BitField("eightBitRT", None, 1), + XBitField("ieiRT", None, 7), + BitField("spare", 0x0, 5), + BitField("recallType", 0x0, 3) + ] # len 3 to 19 @@ -6873,69 +6874,69 @@ class RedirectingPartyBcdNumberHdr(Packet): """Redirecting party BCD number Section 10.5.4.21b""" name = "Redirecting Party BCD Number" fields_desc = [ - BitField("eightBitRPBN", None, 1), - XBitField("ieiRPBN", None, 7), + BitField("eightBitRPBN", None, 1), + XBitField("ieiRPBN", None, 7), - XByteField("lengthRPBN", None), + XByteField("lengthRPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("numberingPlan", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", None, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", None, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", None, 2), - lambda pkt: pkt.ext == 0), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("numberingPlan", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", None, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", None, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", None, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), - BitField("nbDigit22", None, 4), - BitField("nbDigit21", None, 4), + BitField("nbDigit22", None, 4), + BitField("nbDigit21", None, 4), - BitField("nbDigit24", None, 4), - BitField("nbDigit23", None, 4), + BitField("nbDigit24", None, 4), + BitField("nbDigit23", None, 4), - BitField("nbDigit26", None, 4), - BitField("nbDigit25", None, 4), + BitField("nbDigit26", None, 4), + BitField("nbDigit25", None, 4), - BitField("nbDigit28", None, 4), - BitField("nbDigit27", None, 4), + BitField("nbDigit28", None, 4), + BitField("nbDigit27", None, 4), - BitField("nbDigit30", None, 4), - BitField("nbDigit29", None, 4), - ] + BitField("nbDigit30", None, 4), + BitField("nbDigit29", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6943,7 +6944,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthRPBN is None: - p = p[:1] + struct.pack(">B", len(p)-2) + p[2:] + p = p[:1] + struct.pack(">B", len(p) - 2) + p[2:] return p + pay @@ -6952,37 +6953,37 @@ class RedirectingPartySubaddressHdr(Packet): """Redirecting party subaddress Section 10.5.4.21c""" name = "Redirecting Party BCD Number" fields_desc = [ - BitField("eightBitRPS", None, 1), - XBitField("ieiRPS", None, 7), - - XByteField("lengthRPS", None), - # optional - BitField("ext", None, 1), - BitField("typeSub", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + BitField("eightBitRPS", None, 1), + XBitField("ieiRPS", None, 7), + + XByteField("lengthRPS", None), + # optional + BitField("ext", None, 1), + BitField("typeSub", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -6998,17 +6999,17 @@ class RepeatIndicatorHdr(Packet): """Repeat indicator Section 10.5.4.22""" name = "Repeat Indicator" fields_desc = [ - XBitField("ieiRI", None, 4), - BitField("repeatIndic", 0x0, 4) - ] + XBitField("ieiRI", None, 4), + BitField("repeatIndic", 0x0, 4) + ] class ReverseCallSetupDirectionHdr(Packet): """Reverse call setup direction Section 10.5.4.22a""" name = "Reverse Call Setup Direction" fields_desc = [ - ByteField("ieiRCSD", 0x0) - ] + ByteField("ieiRCSD", 0x0) + ] # no upper length min 2(max for L3) (251) @@ -7016,260 +7017,260 @@ class SetupContainerHdr(Packet): """SETUP Container $(CCBS)$ Section 10.5.4.22b""" name = "Setup Container $(CCBS)$" fields_desc = [ - BitField("eightBitSC", None, 1), - XBitField("ieiSC", None, 7), - XByteField("lengthSC", None), - # optional - ByteField("mess1", None), - ByteField("mess2", None), - ByteField("mess3", None), - ByteField("mess4", None), - ByteField("mess5", None), - ByteField("mess6", None), - ByteField("mess7", None), - ByteField("mess8", None), - ByteField("mess9", None), - ByteField("mess10", None), - ByteField("mess11", None), - ByteField("mess12", None), - ByteField("mess13", None), - ByteField("mess14", None), - ByteField("mess15", None), - ByteField("mess16", None), - ByteField("mess17", None), - ByteField("mess18", None), - ByteField("mess19", None), - ByteField("mess20", None), - ByteField("mess21", None), - ByteField("mess22", None), - ByteField("mess23", None), - ByteField("mess24", None), - ByteField("mess25", None), - ByteField("mess26", None), - ByteField("mess27", None), - ByteField("mess28", None), - ByteField("mess29", None), - ByteField("mess30", None), - ByteField("mess31", None), - ByteField("mess32", None), - ByteField("mess33", None), - ByteField("mess34", None), - ByteField("mess35", None), - ByteField("mess36", None), - ByteField("mess37", None), - ByteField("mess38", None), - ByteField("mess39", None), - ByteField("mess40", None), - ByteField("mess41", None), - ByteField("mess42", None), - ByteField("mess43", None), - ByteField("mess44", None), - ByteField("mess45", None), - ByteField("mess46", None), - ByteField("mess47", None), - ByteField("mess48", None), - ByteField("mess49", None), - ByteField("mess50", None), - ByteField("mess51", None), - ByteField("mess52", None), - ByteField("mess53", None), - ByteField("mess54", None), - ByteField("mess55", None), - ByteField("mess56", None), - ByteField("mess57", None), - ByteField("mess58", None), - ByteField("mess59", None), - ByteField("mess60", None), - ByteField("mess61", None), - ByteField("mess62", None), - ByteField("mess63", None), - ByteField("mess64", None), - ByteField("mess65", None), - ByteField("mess66", None), - ByteField("mess67", None), - ByteField("mess68", None), - ByteField("mess69", None), - ByteField("mess70", None), - ByteField("mess71", None), - ByteField("mess72", None), - ByteField("mess73", None), - ByteField("mess74", None), - ByteField("mess75", None), - ByteField("mess76", None), - ByteField("mess77", None), - ByteField("mess78", None), - ByteField("mess79", None), - ByteField("mess80", None), - ByteField("mess81", None), - ByteField("mess82", None), - ByteField("mess83", None), - ByteField("mess84", None), - ByteField("mess85", None), - ByteField("mess86", None), - ByteField("mess87", None), - ByteField("mess88", None), - ByteField("mess89", None), - ByteField("mess90", None), - ByteField("mess91", None), - ByteField("mess92", None), - ByteField("mess93", None), - ByteField("mess94", None), - ByteField("mess95", None), - ByteField("mess96", None), - ByteField("mess97", None), - ByteField("mess98", None), - ByteField("mess99", None), - ByteField("mess100", None), - ByteField("mess101", None), - ByteField("mess102", None), - ByteField("mess103", None), - ByteField("mess104", None), - ByteField("mess105", None), - ByteField("mess106", None), - ByteField("mess107", None), - ByteField("mess108", None), - ByteField("mess109", None), - ByteField("mess110", None), - ByteField("mess111", None), - ByteField("mess112", None), - ByteField("mess113", None), - ByteField("mess114", None), - ByteField("mess115", None), - ByteField("mess116", None), - ByteField("mess117", None), - ByteField("mess118", None), - ByteField("mess119", None), - ByteField("mess120", None), - ByteField("mess121", None), - ByteField("mess122", None), - ByteField("mess123", None), - ByteField("mess124", None), - ByteField("mess125", None), - ByteField("mess126", None), - ByteField("mess127", None), - ByteField("mess128", None), - ByteField("mess129", None), - ByteField("mess130", None), - ByteField("mess131", None), - ByteField("mess132", None), - ByteField("mess133", None), - ByteField("mess134", None), - ByteField("mess135", None), - ByteField("mess136", None), - ByteField("mess137", None), - ByteField("mess138", None), - ByteField("mess139", None), - ByteField("mess140", None), - ByteField("mess141", None), - ByteField("mess142", None), - ByteField("mess143", None), - ByteField("mess144", None), - ByteField("mess145", None), - ByteField("mess146", None), - ByteField("mess147", None), - ByteField("mess148", None), - ByteField("mess149", None), - ByteField("mess150", None), - ByteField("mess151", None), - ByteField("mess152", None), - ByteField("mess153", None), - ByteField("mess154", None), - ByteField("mess155", None), - ByteField("mess156", None), - ByteField("mess157", None), - ByteField("mess158", None), - ByteField("mess159", None), - ByteField("mess160", None), - ByteField("mess161", None), - ByteField("mess162", None), - ByteField("mess163", None), - ByteField("mess164", None), - ByteField("mess165", None), - ByteField("mess166", None), - ByteField("mess167", None), - ByteField("mess168", None), - ByteField("mess169", None), - ByteField("mess170", None), - ByteField("mess171", None), - ByteField("mess172", None), - ByteField("mess173", None), - ByteField("mess174", None), - ByteField("mess175", None), - ByteField("mess176", None), - ByteField("mess177", None), - ByteField("mess178", None), - ByteField("mess179", None), - ByteField("mess180", None), - ByteField("mess181", None), - ByteField("mess182", None), - ByteField("mess183", None), - ByteField("mess184", None), - ByteField("mess185", None), - ByteField("mess186", None), - ByteField("mess187", None), - ByteField("mess188", None), - ByteField("mess189", None), - ByteField("mess190", None), - ByteField("mess191", None), - ByteField("mess192", None), - ByteField("mess193", None), - ByteField("mess194", None), - ByteField("mess195", None), - ByteField("mess196", None), - ByteField("mess197", None), - ByteField("mess198", None), - ByteField("mess199", None), - ByteField("mess200", None), - ByteField("mess201", None), - ByteField("mess202", None), - ByteField("mess203", None), - ByteField("mess204", None), - ByteField("mess205", None), - ByteField("mess206", None), - ByteField("mess207", None), - ByteField("mess208", None), - ByteField("mess209", None), - ByteField("mess210", None), - ByteField("mess211", None), - ByteField("mess212", None), - ByteField("mess213", None), - ByteField("mess214", None), - ByteField("mess215", None), - ByteField("mess216", None), - ByteField("mess217", None), - ByteField("mess218", None), - ByteField("mess219", None), - ByteField("mess220", None), - ByteField("mess221", None), - ByteField("mess222", None), - ByteField("mess223", None), - ByteField("mess224", None), - ByteField("mess225", None), - ByteField("mess226", None), - ByteField("mess227", None), - ByteField("mess228", None), - ByteField("mess229", None), - ByteField("mess230", None), - ByteField("mess231", None), - ByteField("mess232", None), - ByteField("mess233", None), - ByteField("mess234", None), - ByteField("mess235", None), - ByteField("mess236", None), - ByteField("mess237", None), - ByteField("mess238", None), - ByteField("mess239", None), - ByteField("mess240", None), - ByteField("mess241", None), - ByteField("mess242", None), - ByteField("mess243", None), - ByteField("mess244", None), - ByteField("mess245", None), - ByteField("mess246", None), - ByteField("mess247", None), - ByteField("mess248", None), - ByteField("mess249", None), - ] + BitField("eightBitSC", None, 1), + XBitField("ieiSC", None, 7), + XByteField("lengthSC", None), + # optional + ByteField("mess1", None), + ByteField("mess2", None), + ByteField("mess3", None), + ByteField("mess4", None), + ByteField("mess5", None), + ByteField("mess6", None), + ByteField("mess7", None), + ByteField("mess8", None), + ByteField("mess9", None), + ByteField("mess10", None), + ByteField("mess11", None), + ByteField("mess12", None), + ByteField("mess13", None), + ByteField("mess14", None), + ByteField("mess15", None), + ByteField("mess16", None), + ByteField("mess17", None), + ByteField("mess18", None), + ByteField("mess19", None), + ByteField("mess20", None), + ByteField("mess21", None), + ByteField("mess22", None), + ByteField("mess23", None), + ByteField("mess24", None), + ByteField("mess25", None), + ByteField("mess26", None), + ByteField("mess27", None), + ByteField("mess28", None), + ByteField("mess29", None), + ByteField("mess30", None), + ByteField("mess31", None), + ByteField("mess32", None), + ByteField("mess33", None), + ByteField("mess34", None), + ByteField("mess35", None), + ByteField("mess36", None), + ByteField("mess37", None), + ByteField("mess38", None), + ByteField("mess39", None), + ByteField("mess40", None), + ByteField("mess41", None), + ByteField("mess42", None), + ByteField("mess43", None), + ByteField("mess44", None), + ByteField("mess45", None), + ByteField("mess46", None), + ByteField("mess47", None), + ByteField("mess48", None), + ByteField("mess49", None), + ByteField("mess50", None), + ByteField("mess51", None), + ByteField("mess52", None), + ByteField("mess53", None), + ByteField("mess54", None), + ByteField("mess55", None), + ByteField("mess56", None), + ByteField("mess57", None), + ByteField("mess58", None), + ByteField("mess59", None), + ByteField("mess60", None), + ByteField("mess61", None), + ByteField("mess62", None), + ByteField("mess63", None), + ByteField("mess64", None), + ByteField("mess65", None), + ByteField("mess66", None), + ByteField("mess67", None), + ByteField("mess68", None), + ByteField("mess69", None), + ByteField("mess70", None), + ByteField("mess71", None), + ByteField("mess72", None), + ByteField("mess73", None), + ByteField("mess74", None), + ByteField("mess75", None), + ByteField("mess76", None), + ByteField("mess77", None), + ByteField("mess78", None), + ByteField("mess79", None), + ByteField("mess80", None), + ByteField("mess81", None), + ByteField("mess82", None), + ByteField("mess83", None), + ByteField("mess84", None), + ByteField("mess85", None), + ByteField("mess86", None), + ByteField("mess87", None), + ByteField("mess88", None), + ByteField("mess89", None), + ByteField("mess90", None), + ByteField("mess91", None), + ByteField("mess92", None), + ByteField("mess93", None), + ByteField("mess94", None), + ByteField("mess95", None), + ByteField("mess96", None), + ByteField("mess97", None), + ByteField("mess98", None), + ByteField("mess99", None), + ByteField("mess100", None), + ByteField("mess101", None), + ByteField("mess102", None), + ByteField("mess103", None), + ByteField("mess104", None), + ByteField("mess105", None), + ByteField("mess106", None), + ByteField("mess107", None), + ByteField("mess108", None), + ByteField("mess109", None), + ByteField("mess110", None), + ByteField("mess111", None), + ByteField("mess112", None), + ByteField("mess113", None), + ByteField("mess114", None), + ByteField("mess115", None), + ByteField("mess116", None), + ByteField("mess117", None), + ByteField("mess118", None), + ByteField("mess119", None), + ByteField("mess120", None), + ByteField("mess121", None), + ByteField("mess122", None), + ByteField("mess123", None), + ByteField("mess124", None), + ByteField("mess125", None), + ByteField("mess126", None), + ByteField("mess127", None), + ByteField("mess128", None), + ByteField("mess129", None), + ByteField("mess130", None), + ByteField("mess131", None), + ByteField("mess132", None), + ByteField("mess133", None), + ByteField("mess134", None), + ByteField("mess135", None), + ByteField("mess136", None), + ByteField("mess137", None), + ByteField("mess138", None), + ByteField("mess139", None), + ByteField("mess140", None), + ByteField("mess141", None), + ByteField("mess142", None), + ByteField("mess143", None), + ByteField("mess144", None), + ByteField("mess145", None), + ByteField("mess146", None), + ByteField("mess147", None), + ByteField("mess148", None), + ByteField("mess149", None), + ByteField("mess150", None), + ByteField("mess151", None), + ByteField("mess152", None), + ByteField("mess153", None), + ByteField("mess154", None), + ByteField("mess155", None), + ByteField("mess156", None), + ByteField("mess157", None), + ByteField("mess158", None), + ByteField("mess159", None), + ByteField("mess160", None), + ByteField("mess161", None), + ByteField("mess162", None), + ByteField("mess163", None), + ByteField("mess164", None), + ByteField("mess165", None), + ByteField("mess166", None), + ByteField("mess167", None), + ByteField("mess168", None), + ByteField("mess169", None), + ByteField("mess170", None), + ByteField("mess171", None), + ByteField("mess172", None), + ByteField("mess173", None), + ByteField("mess174", None), + ByteField("mess175", None), + ByteField("mess176", None), + ByteField("mess177", None), + ByteField("mess178", None), + ByteField("mess179", None), + ByteField("mess180", None), + ByteField("mess181", None), + ByteField("mess182", None), + ByteField("mess183", None), + ByteField("mess184", None), + ByteField("mess185", None), + ByteField("mess186", None), + ByteField("mess187", None), + ByteField("mess188", None), + ByteField("mess189", None), + ByteField("mess190", None), + ByteField("mess191", None), + ByteField("mess192", None), + ByteField("mess193", None), + ByteField("mess194", None), + ByteField("mess195", None), + ByteField("mess196", None), + ByteField("mess197", None), + ByteField("mess198", None), + ByteField("mess199", None), + ByteField("mess200", None), + ByteField("mess201", None), + ByteField("mess202", None), + ByteField("mess203", None), + ByteField("mess204", None), + ByteField("mess205", None), + ByteField("mess206", None), + ByteField("mess207", None), + ByteField("mess208", None), + ByteField("mess209", None), + ByteField("mess210", None), + ByteField("mess211", None), + ByteField("mess212", None), + ByteField("mess213", None), + ByteField("mess214", None), + ByteField("mess215", None), + ByteField("mess216", None), + ByteField("mess217", None), + ByteField("mess218", None), + ByteField("mess219", None), + ByteField("mess220", None), + ByteField("mess221", None), + ByteField("mess222", None), + ByteField("mess223", None), + ByteField("mess224", None), + ByteField("mess225", None), + ByteField("mess226", None), + ByteField("mess227", None), + ByteField("mess228", None), + ByteField("mess229", None), + ByteField("mess230", None), + ByteField("mess231", None), + ByteField("mess232", None), + ByteField("mess233", None), + ByteField("mess234", None), + ByteField("mess235", None), + ByteField("mess236", None), + ByteField("mess237", None), + ByteField("mess238", None), + ByteField("mess239", None), + ByteField("mess240", None), + ByteField("mess241", None), + ByteField("mess242", None), + ByteField("mess243", None), + ByteField("mess244", None), + ByteField("mess245", None), + ByteField("mess246", None), + ByteField("mess247", None), + ByteField("mess248", None), + ByteField("mess249", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -7285,10 +7286,10 @@ class SignalHdr(Packet): """Signal Section 10.5.4.23""" name = "Signal" fields_desc = [ - BitField("eightBitS", None, 1), - XBitField("ieiS", None, 7), - ByteField("sigValue", 0x0) - ] + BitField("eightBitS", None, 1), + XBitField("ieiS", None, 7), + ByteField("sigValue", 0x0) + ] # length 2 to max for L3 message (251) @@ -7296,260 +7297,260 @@ class SsVersionIndicatorHdr(Packet): """SS Version Indicator Section 10.5.4.24""" name = "SS Version Indicator" fields_desc = [ - BitField("eightBitSVI", None, 1), - XBitField("ieiSVI", None, 7), - XByteField("lengthSVI", None), - # optional - ByteField("info1", None), - ByteField("info2", None), - ByteField("info3", None), - ByteField("info4", None), - ByteField("info5", None), - ByteField("info6", None), - ByteField("info7", None), - ByteField("info8", None), - ByteField("info9", None), - ByteField("info10", None), - ByteField("info11", None), - ByteField("info12", None), - ByteField("info13", None), - ByteField("info14", None), - ByteField("info15", None), - ByteField("info16", None), - ByteField("info17", None), - ByteField("info18", None), - ByteField("info19", None), - ByteField("info20", None), - ByteField("info21", None), - ByteField("info22", None), - ByteField("info23", None), - ByteField("info24", None), - ByteField("info25", None), - ByteField("info26", None), - ByteField("info27", None), - ByteField("info28", None), - ByteField("info29", None), - ByteField("info30", None), - ByteField("info31", None), - ByteField("info32", None), - ByteField("info33", None), - ByteField("info34", None), - ByteField("info35", None), - ByteField("info36", None), - ByteField("info37", None), - ByteField("info38", None), - ByteField("info39", None), - ByteField("info40", None), - ByteField("info41", None), - ByteField("info42", None), - ByteField("info43", None), - ByteField("info44", None), - ByteField("info45", None), - ByteField("info46", None), - ByteField("info47", None), - ByteField("info48", None), - ByteField("info49", None), - ByteField("info50", None), - ByteField("info51", None), - ByteField("info52", None), - ByteField("info53", None), - ByteField("info54", None), - ByteField("info55", None), - ByteField("info56", None), - ByteField("info57", None), - ByteField("info58", None), - ByteField("info59", None), - ByteField("info60", None), - ByteField("info61", None), - ByteField("info62", None), - ByteField("info63", None), - ByteField("info64", None), - ByteField("info65", None), - ByteField("info66", None), - ByteField("info67", None), - ByteField("info68", None), - ByteField("info69", None), - ByteField("info70", None), - ByteField("info71", None), - ByteField("info72", None), - ByteField("info73", None), - ByteField("info74", None), - ByteField("info75", None), - ByteField("info76", None), - ByteField("info77", None), - ByteField("info78", None), - ByteField("info79", None), - ByteField("info80", None), - ByteField("info81", None), - ByteField("info82", None), - ByteField("info83", None), - ByteField("info84", None), - ByteField("info85", None), - ByteField("info86", None), - ByteField("info87", None), - ByteField("info88", None), - ByteField("info89", None), - ByteField("info90", None), - ByteField("info91", None), - ByteField("info92", None), - ByteField("info93", None), - ByteField("info94", None), - ByteField("info95", None), - ByteField("info96", None), - ByteField("info97", None), - ByteField("info98", None), - ByteField("info99", None), - ByteField("info100", None), - ByteField("info101", None), - ByteField("info102", None), - ByteField("info103", None), - ByteField("info104", None), - ByteField("info105", None), - ByteField("info106", None), - ByteField("info107", None), - ByteField("info108", None), - ByteField("info109", None), - ByteField("info110", None), - ByteField("info111", None), - ByteField("info112", None), - ByteField("info113", None), - ByteField("info114", None), - ByteField("info115", None), - ByteField("info116", None), - ByteField("info117", None), - ByteField("info118", None), - ByteField("info119", None), - ByteField("info120", None), - ByteField("info121", None), - ByteField("info122", None), - ByteField("info123", None), - ByteField("info124", None), - ByteField("info125", None), - ByteField("info126", None), - ByteField("info127", None), - ByteField("info128", None), - ByteField("info129", None), - ByteField("info130", None), - ByteField("info131", None), - ByteField("info132", None), - ByteField("info133", None), - ByteField("info134", None), - ByteField("info135", None), - ByteField("info136", None), - ByteField("info137", None), - ByteField("info138", None), - ByteField("info139", None), - ByteField("info140", None), - ByteField("info141", None), - ByteField("info142", None), - ByteField("info143", None), - ByteField("info144", None), - ByteField("info145", None), - ByteField("info146", None), - ByteField("info147", None), - ByteField("info148", None), - ByteField("info149", None), - ByteField("info150", None), - ByteField("info151", None), - ByteField("info152", None), - ByteField("info153", None), - ByteField("info154", None), - ByteField("info155", None), - ByteField("info156", None), - ByteField("info157", None), - ByteField("info158", None), - ByteField("info159", None), - ByteField("info160", None), - ByteField("info161", None), - ByteField("info162", None), - ByteField("info163", None), - ByteField("info164", None), - ByteField("info165", None), - ByteField("info166", None), - ByteField("info167", None), - ByteField("info168", None), - ByteField("info169", None), - ByteField("info170", None), - ByteField("info171", None), - ByteField("info172", None), - ByteField("info173", None), - ByteField("info174", None), - ByteField("info175", None), - ByteField("info176", None), - ByteField("info177", None), - ByteField("info178", None), - ByteField("info179", None), - ByteField("info180", None), - ByteField("info181", None), - ByteField("info182", None), - ByteField("info183", None), - ByteField("info184", None), - ByteField("info185", None), - ByteField("info186", None), - ByteField("info187", None), - ByteField("info188", None), - ByteField("info189", None), - ByteField("info190", None), - ByteField("info191", None), - ByteField("info192", None), - ByteField("info193", None), - ByteField("info194", None), - ByteField("info195", None), - ByteField("info196", None), - ByteField("info197", None), - ByteField("info198", None), - ByteField("info199", None), - ByteField("info200", None), - ByteField("info201", None), - ByteField("info202", None), - ByteField("info203", None), - ByteField("info204", None), - ByteField("info205", None), - ByteField("info206", None), - ByteField("info207", None), - ByteField("info208", None), - ByteField("info209", None), - ByteField("info210", None), - ByteField("info211", None), - ByteField("info212", None), - ByteField("info213", None), - ByteField("info214", None), - ByteField("info215", None), - ByteField("info216", None), - ByteField("info217", None), - ByteField("info218", None), - ByteField("info219", None), - ByteField("info220", None), - ByteField("info221", None), - ByteField("info222", None), - ByteField("info223", None), - ByteField("info224", None), - ByteField("info225", None), - ByteField("info226", None), - ByteField("info227", None), - ByteField("info228", None), - ByteField("info229", None), - ByteField("info230", None), - ByteField("info231", None), - ByteField("info232", None), - ByteField("info233", None), - ByteField("info234", None), - ByteField("info235", None), - ByteField("info236", None), - ByteField("info237", None), - ByteField("info238", None), - ByteField("info239", None), - ByteField("info240", None), - ByteField("info241", None), - ByteField("info242", None), - ByteField("info243", None), - ByteField("info244", None), - ByteField("info245", None), - ByteField("info246", None), - ByteField("info247", None), - ByteField("info248", None), - ByteField("info249", None), - ] + BitField("eightBitSVI", None, 1), + XBitField("ieiSVI", None, 7), + XByteField("lengthSVI", None), + # optional + ByteField("info1", None), + ByteField("info2", None), + ByteField("info3", None), + ByteField("info4", None), + ByteField("info5", None), + ByteField("info6", None), + ByteField("info7", None), + ByteField("info8", None), + ByteField("info9", None), + ByteField("info10", None), + ByteField("info11", None), + ByteField("info12", None), + ByteField("info13", None), + ByteField("info14", None), + ByteField("info15", None), + ByteField("info16", None), + ByteField("info17", None), + ByteField("info18", None), + ByteField("info19", None), + ByteField("info20", None), + ByteField("info21", None), + ByteField("info22", None), + ByteField("info23", None), + ByteField("info24", None), + ByteField("info25", None), + ByteField("info26", None), + ByteField("info27", None), + ByteField("info28", None), + ByteField("info29", None), + ByteField("info30", None), + ByteField("info31", None), + ByteField("info32", None), + ByteField("info33", None), + ByteField("info34", None), + ByteField("info35", None), + ByteField("info36", None), + ByteField("info37", None), + ByteField("info38", None), + ByteField("info39", None), + ByteField("info40", None), + ByteField("info41", None), + ByteField("info42", None), + ByteField("info43", None), + ByteField("info44", None), + ByteField("info45", None), + ByteField("info46", None), + ByteField("info47", None), + ByteField("info48", None), + ByteField("info49", None), + ByteField("info50", None), + ByteField("info51", None), + ByteField("info52", None), + ByteField("info53", None), + ByteField("info54", None), + ByteField("info55", None), + ByteField("info56", None), + ByteField("info57", None), + ByteField("info58", None), + ByteField("info59", None), + ByteField("info60", None), + ByteField("info61", None), + ByteField("info62", None), + ByteField("info63", None), + ByteField("info64", None), + ByteField("info65", None), + ByteField("info66", None), + ByteField("info67", None), + ByteField("info68", None), + ByteField("info69", None), + ByteField("info70", None), + ByteField("info71", None), + ByteField("info72", None), + ByteField("info73", None), + ByteField("info74", None), + ByteField("info75", None), + ByteField("info76", None), + ByteField("info77", None), + ByteField("info78", None), + ByteField("info79", None), + ByteField("info80", None), + ByteField("info81", None), + ByteField("info82", None), + ByteField("info83", None), + ByteField("info84", None), + ByteField("info85", None), + ByteField("info86", None), + ByteField("info87", None), + ByteField("info88", None), + ByteField("info89", None), + ByteField("info90", None), + ByteField("info91", None), + ByteField("info92", None), + ByteField("info93", None), + ByteField("info94", None), + ByteField("info95", None), + ByteField("info96", None), + ByteField("info97", None), + ByteField("info98", None), + ByteField("info99", None), + ByteField("info100", None), + ByteField("info101", None), + ByteField("info102", None), + ByteField("info103", None), + ByteField("info104", None), + ByteField("info105", None), + ByteField("info106", None), + ByteField("info107", None), + ByteField("info108", None), + ByteField("info109", None), + ByteField("info110", None), + ByteField("info111", None), + ByteField("info112", None), + ByteField("info113", None), + ByteField("info114", None), + ByteField("info115", None), + ByteField("info116", None), + ByteField("info117", None), + ByteField("info118", None), + ByteField("info119", None), + ByteField("info120", None), + ByteField("info121", None), + ByteField("info122", None), + ByteField("info123", None), + ByteField("info124", None), + ByteField("info125", None), + ByteField("info126", None), + ByteField("info127", None), + ByteField("info128", None), + ByteField("info129", None), + ByteField("info130", None), + ByteField("info131", None), + ByteField("info132", None), + ByteField("info133", None), + ByteField("info134", None), + ByteField("info135", None), + ByteField("info136", None), + ByteField("info137", None), + ByteField("info138", None), + ByteField("info139", None), + ByteField("info140", None), + ByteField("info141", None), + ByteField("info142", None), + ByteField("info143", None), + ByteField("info144", None), + ByteField("info145", None), + ByteField("info146", None), + ByteField("info147", None), + ByteField("info148", None), + ByteField("info149", None), + ByteField("info150", None), + ByteField("info151", None), + ByteField("info152", None), + ByteField("info153", None), + ByteField("info154", None), + ByteField("info155", None), + ByteField("info156", None), + ByteField("info157", None), + ByteField("info158", None), + ByteField("info159", None), + ByteField("info160", None), + ByteField("info161", None), + ByteField("info162", None), + ByteField("info163", None), + ByteField("info164", None), + ByteField("info165", None), + ByteField("info166", None), + ByteField("info167", None), + ByteField("info168", None), + ByteField("info169", None), + ByteField("info170", None), + ByteField("info171", None), + ByteField("info172", None), + ByteField("info173", None), + ByteField("info174", None), + ByteField("info175", None), + ByteField("info176", None), + ByteField("info177", None), + ByteField("info178", None), + ByteField("info179", None), + ByteField("info180", None), + ByteField("info181", None), + ByteField("info182", None), + ByteField("info183", None), + ByteField("info184", None), + ByteField("info185", None), + ByteField("info186", None), + ByteField("info187", None), + ByteField("info188", None), + ByteField("info189", None), + ByteField("info190", None), + ByteField("info191", None), + ByteField("info192", None), + ByteField("info193", None), + ByteField("info194", None), + ByteField("info195", None), + ByteField("info196", None), + ByteField("info197", None), + ByteField("info198", None), + ByteField("info199", None), + ByteField("info200", None), + ByteField("info201", None), + ByteField("info202", None), + ByteField("info203", None), + ByteField("info204", None), + ByteField("info205", None), + ByteField("info206", None), + ByteField("info207", None), + ByteField("info208", None), + ByteField("info209", None), + ByteField("info210", None), + ByteField("info211", None), + ByteField("info212", None), + ByteField("info213", None), + ByteField("info214", None), + ByteField("info215", None), + ByteField("info216", None), + ByteField("info217", None), + ByteField("info218", None), + ByteField("info219", None), + ByteField("info220", None), + ByteField("info221", None), + ByteField("info222", None), + ByteField("info223", None), + ByteField("info224", None), + ByteField("info225", None), + ByteField("info226", None), + ByteField("info227", None), + ByteField("info228", None), + ByteField("info229", None), + ByteField("info230", None), + ByteField("info231", None), + ByteField("info232", None), + ByteField("info233", None), + ByteField("info234", None), + ByteField("info235", None), + ByteField("info236", None), + ByteField("info237", None), + ByteField("info238", None), + ByteField("info239", None), + ByteField("info240", None), + ByteField("info241", None), + ByteField("info242", None), + ByteField("info243", None), + ByteField("info244", None), + ByteField("info245", None), + ByteField("info246", None), + ByteField("info247", None), + ByteField("info248", None), + ByteField("info249", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -7566,149 +7567,149 @@ class UserUserHdr(Packet): """User-user Section 10.5.4.25""" name = "User-User" fields_desc = [ - BitField("eightBitUU", None, 1), - XBitField("ieiUU", None, 7), - - XByteField("lengthUU", None), # dynamic length of field depending - # of the type of message - # let user decide which length he - # wants to take - # => more fuzzing options - ByteField("userUserPD", 0x0), - # optional - ByteField("userUserInfo1", None), - ByteField("userUserInfo2", None), - ByteField("userUserInfo3", None), - ByteField("userUserInfo4", None), - ByteField("userUserInfo5", None), - ByteField("userUserInfo6", None), - ByteField("userUserInfo7", None), - ByteField("userUserInfo8", None), - ByteField("userUserInfo9", None), - ByteField("userUserInfo10", None), - ByteField("userUserInfo11", None), - ByteField("userUserInfo12", None), - ByteField("userUserInfo13", None), - ByteField("userUserInfo14", None), - ByteField("userUserInfo15", None), - ByteField("userUserInfo16", None), - ByteField("userUserInfo17", None), - ByteField("userUserInfo18", None), - ByteField("userUserInfo19", None), - ByteField("userUserInfo20", None), - ByteField("userUserInfo21", None), - ByteField("userUserInfo22", None), - ByteField("userUserInfo23", None), - ByteField("userUserInfo24", None), - ByteField("userUserInfo25", None), - ByteField("userUserInfo26", None), - ByteField("userUserInfo27", None), - ByteField("userUserInfo28", None), - ByteField("userUserInfo29", None), - ByteField("userUserInfo30", None), - ByteField("userUserInfo31", None), - ByteField("userUserInfo32", None), - # long packet - ByteField("userUserInfo33", None), - ByteField("userUserInfo34", None), - ByteField("userUserInfo35", None), - ByteField("userUserInfo36", None), - ByteField("userUserInfo37", None), - ByteField("userUserInfo38", None), - ByteField("userUserInfo39", None), - ByteField("userUserInfo40", None), - ByteField("userUserInfo41", None), - ByteField("userUserInfo42", None), - ByteField("userUserInfo43", None), - ByteField("userUserInfo44", None), - ByteField("userUserInfo45", None), - ByteField("userUserInfo46", None), - ByteField("userUserInfo47", None), - ByteField("userUserInfo48", None), - ByteField("userUserInfo49", None), - ByteField("userUserInfo50", None), - ByteField("userUserInfo51", None), - ByteField("userUserInfo52", None), - ByteField("userUserInfo53", None), - ByteField("userUserInfo54", None), - ByteField("userUserInfo55", None), - ByteField("userUserInfo56", None), - ByteField("userUserInfo57", None), - ByteField("userUserInfo58", None), - ByteField("userUserInfo59", None), - ByteField("userUserInfo60", None), - ByteField("userUserInfo61", None), - ByteField("userUserInfo62", None), - ByteField("userUserInfo63", None), - ByteField("userUserInfo64", None), - ByteField("userUserInfo65", None), - ByteField("userUserInfo66", None), - ByteField("userUserInfo67", None), - ByteField("userUserInfo68", None), - ByteField("userUserInfo69", None), - ByteField("userUserInfo70", None), - ByteField("userUserInfo71", None), - ByteField("userUserInfo72", None), - ByteField("userUserInfo73", None), - ByteField("userUserInfo74", None), - ByteField("userUserInfo75", None), - ByteField("userUserInfo76", None), - ByteField("userUserInfo77", None), - ByteField("userUserInfo78", None), - ByteField("userUserInfo79", None), - ByteField("userUserInfo80", None), - ByteField("userUserInfo81", None), - ByteField("userUserInfo82", None), - ByteField("userUserInfo83", None), - ByteField("userUserInfo84", None), - ByteField("userUserInfo85", None), - ByteField("userUserInfo86", None), - ByteField("userUserInfo87", None), - ByteField("userUserInfo88", None), - ByteField("userUserInfo89", None), - ByteField("userUserInfo90", None), - ByteField("userUserInfo91", None), - ByteField("userUserInfo92", None), - ByteField("userUserInfo93", None), - ByteField("userUserInfo94", None), - ByteField("userUserInfo95", None), - ByteField("userUserInfo96", None), - ByteField("userUserInfo97", None), - ByteField("userUserInfo98", None), - ByteField("userUserInfo99", None), - ByteField("userUserInfo100", None), - ByteField("userUserInfo101", None), - ByteField("userUserInfo102", None), - ByteField("userUserInfo103", None), - ByteField("userUserInfo104", None), - ByteField("userUserInfo105", None), - ByteField("userUserInfo106", None), - ByteField("userUserInfo107", None), - ByteField("userUserInfo108", None), - ByteField("userUserInfo109", None), - ByteField("userUserInfo110", None), - ByteField("userUserInfo111", None), - ByteField("userUserInfo112", None), - ByteField("userUserInfo113", None), - ByteField("userUserInfo114", None), - ByteField("userUserInfo115", None), - ByteField("userUserInfo116", None), - ByteField("userUserInfo117", None), - ByteField("userUserInfo118", None), - ByteField("userUserInfo119", None), - ByteField("userUserInfo120", None), - ByteField("userUserInfo121", None), - ByteField("userUserInfo122", None), - ByteField("userUserInfo123", None), - ByteField("userUserInfo124", None), - ByteField("userUserInfo125", None), - ByteField("userUserInfo126", None), - ByteField("userUserInfo127", None), - ByteField("userUserInfo128", None), - ByteField("userUserInfo129", None), - ByteField("userUserInfo130", None), - ByteField("userUserInfo131", None) - ] + BitField("eightBitUU", None, 1), + XBitField("ieiUU", None, 7), + + XByteField("lengthUU", None), # dynamic length of field depending + # of the type of message + # let user decide which length he + # wants to take + # => more fuzzing options + ByteField("userUserPD", 0x0), + # optional + ByteField("userUserInfo1", None), + ByteField("userUserInfo2", None), + ByteField("userUserInfo3", None), + ByteField("userUserInfo4", None), + ByteField("userUserInfo5", None), + ByteField("userUserInfo6", None), + ByteField("userUserInfo7", None), + ByteField("userUserInfo8", None), + ByteField("userUserInfo9", None), + ByteField("userUserInfo10", None), + ByteField("userUserInfo11", None), + ByteField("userUserInfo12", None), + ByteField("userUserInfo13", None), + ByteField("userUserInfo14", None), + ByteField("userUserInfo15", None), + ByteField("userUserInfo16", None), + ByteField("userUserInfo17", None), + ByteField("userUserInfo18", None), + ByteField("userUserInfo19", None), + ByteField("userUserInfo20", None), + ByteField("userUserInfo21", None), + ByteField("userUserInfo22", None), + ByteField("userUserInfo23", None), + ByteField("userUserInfo24", None), + ByteField("userUserInfo25", None), + ByteField("userUserInfo26", None), + ByteField("userUserInfo27", None), + ByteField("userUserInfo28", None), + ByteField("userUserInfo29", None), + ByteField("userUserInfo30", None), + ByteField("userUserInfo31", None), + ByteField("userUserInfo32", None), + # long packet + ByteField("userUserInfo33", None), + ByteField("userUserInfo34", None), + ByteField("userUserInfo35", None), + ByteField("userUserInfo36", None), + ByteField("userUserInfo37", None), + ByteField("userUserInfo38", None), + ByteField("userUserInfo39", None), + ByteField("userUserInfo40", None), + ByteField("userUserInfo41", None), + ByteField("userUserInfo42", None), + ByteField("userUserInfo43", None), + ByteField("userUserInfo44", None), + ByteField("userUserInfo45", None), + ByteField("userUserInfo46", None), + ByteField("userUserInfo47", None), + ByteField("userUserInfo48", None), + ByteField("userUserInfo49", None), + ByteField("userUserInfo50", None), + ByteField("userUserInfo51", None), + ByteField("userUserInfo52", None), + ByteField("userUserInfo53", None), + ByteField("userUserInfo54", None), + ByteField("userUserInfo55", None), + ByteField("userUserInfo56", None), + ByteField("userUserInfo57", None), + ByteField("userUserInfo58", None), + ByteField("userUserInfo59", None), + ByteField("userUserInfo60", None), + ByteField("userUserInfo61", None), + ByteField("userUserInfo62", None), + ByteField("userUserInfo63", None), + ByteField("userUserInfo64", None), + ByteField("userUserInfo65", None), + ByteField("userUserInfo66", None), + ByteField("userUserInfo67", None), + ByteField("userUserInfo68", None), + ByteField("userUserInfo69", None), + ByteField("userUserInfo70", None), + ByteField("userUserInfo71", None), + ByteField("userUserInfo72", None), + ByteField("userUserInfo73", None), + ByteField("userUserInfo74", None), + ByteField("userUserInfo75", None), + ByteField("userUserInfo76", None), + ByteField("userUserInfo77", None), + ByteField("userUserInfo78", None), + ByteField("userUserInfo79", None), + ByteField("userUserInfo80", None), + ByteField("userUserInfo81", None), + ByteField("userUserInfo82", None), + ByteField("userUserInfo83", None), + ByteField("userUserInfo84", None), + ByteField("userUserInfo85", None), + ByteField("userUserInfo86", None), + ByteField("userUserInfo87", None), + ByteField("userUserInfo88", None), + ByteField("userUserInfo89", None), + ByteField("userUserInfo90", None), + ByteField("userUserInfo91", None), + ByteField("userUserInfo92", None), + ByteField("userUserInfo93", None), + ByteField("userUserInfo94", None), + ByteField("userUserInfo95", None), + ByteField("userUserInfo96", None), + ByteField("userUserInfo97", None), + ByteField("userUserInfo98", None), + ByteField("userUserInfo99", None), + ByteField("userUserInfo100", None), + ByteField("userUserInfo101", None), + ByteField("userUserInfo102", None), + ByteField("userUserInfo103", None), + ByteField("userUserInfo104", None), + ByteField("userUserInfo105", None), + ByteField("userUserInfo106", None), + ByteField("userUserInfo107", None), + ByteField("userUserInfo108", None), + ByteField("userUserInfo109", None), + ByteField("userUserInfo110", None), + ByteField("userUserInfo111", None), + ByteField("userUserInfo112", None), + ByteField("userUserInfo113", None), + ByteField("userUserInfo114", None), + ByteField("userUserInfo115", None), + ByteField("userUserInfo116", None), + ByteField("userUserInfo117", None), + ByteField("userUserInfo118", None), + ByteField("userUserInfo119", None), + ByteField("userUserInfo120", None), + ByteField("userUserInfo121", None), + ByteField("userUserInfo122", None), + ByteField("userUserInfo123", None), + ByteField("userUserInfo124", None), + ByteField("userUserInfo125", None), + ByteField("userUserInfo126", None), + ByteField("userUserInfo127", None), + ByteField("userUserInfo128", None), + ByteField("userUserInfo129", None), + ByteField("userUserInfo130", None), + ByteField("userUserInfo131", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -7724,24 +7725,24 @@ class AlertingPatternHdr(Packet): """Alerting Pattern 10.5.4.26""" name = "Alerting Pattern" fields_desc = [ - BitField("eightBitAP", None, 1), - XBitField("ieiAP", None, 7), - XByteField("lengthAP", 0x3), - BitField("spare", 0x0, 4), - BitField("alertingValue", 0x0, 4) - ] + BitField("eightBitAP", None, 1), + XBitField("ieiAP", None, 7), + XByteField("lengthAP", 0x3), + BitField("spare", 0x0, 4), + BitField("alertingValue", 0x0, 4) + ] class AllowedActionsHdr(Packet): """Allowed actions $(CCBS)$ Section 10.5.4.26""" name = "Allowed Actions $(CCBS)$" fields_desc = [ - BitField("eightBitAA", None, 1), - XBitField("ieiAA", None, 7), - XByteField("lengthAP", 0x3), - BitField("CCBS", 0x0, 1), - BitField("spare", 0x0, 7) - ] + BitField("eightBitAA", None, 1), + XBitField("ieiAA", None, 7), + XByteField("lengthAP", 0x3), + BitField("CCBS", 0x0, 1), + BitField("spare", 0x0, 7) + ] # @@ -7752,51 +7753,51 @@ class AttachResult(Packet): """Attach result Section 10.5.5.1""" name = "Attach Result" fields_desc = [ - XBitField("ieiAR", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("result", 0x1, 3) - ] + XBitField("ieiAR", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("result", 0x1, 3) + ] class AttachTypeHdr(Packet): """Attach type Section 10.5.5.2""" name = "Attach Type" fields_desc = [ - XBitField("ieiAT", None, 4), - BitField("spare", 0x0, 1), - BitField("type", 0x1, 3) - ] + XBitField("ieiAT", None, 4), + BitField("spare", 0x0, 1), + BitField("type", 0x1, 3) + ] # Fix 1/2 len problem class AttachTypeAndCiphKeySeqNr(Packet): name = "Attach Type and Cipher Key Sequence Number" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("type", 0x1, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("type", 0x1, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class CipheringAlgorithm(Packet): """Ciphering algorithm Section 10.5.5.3""" name = "Ciphering Algorithm" fields_desc = [ - XBitField("ieiCA", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("type", 0x1, 3) - ] + XBitField("ieiCA", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("type", 0x1, 3) + ] # Fix 1/2 len problem class CipheringAlgorithmAndImeisvRequest(Packet): name = "Ciphering Algorithm and Imeisv Request" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("type", 0x1, 3), - BitField("spare", 0x0, 1), - BitField("imeisvVal", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("type", 0x1, 3), + BitField("spare", 0x0, 1), + BitField("imeisvVal", 0x0, 3) + ] # [Spare] @@ -7804,144 +7805,144 @@ class TmsiStatus(Packet): """[Spare] TMSI status Section 10.5.5.4""" name = "[Spare] TMSI Status" fields_desc = [ - XBitField("ieiTS", None, 4), - BitField("spare", 0x0, 3), - BitField("flag", 0x1, 1) - ] + XBitField("ieiTS", None, 4), + BitField("spare", 0x0, 3), + BitField("flag", 0x1, 1) + ] class DetachType(Packet): """Detach type Section 10.5.5.5""" name = "Detach Type" fields_desc = [ - XBitField("ieiDT", 0x0, 4), - BitField("poweroff", 0x0, 1), - BitField("type", 0x1, 3) - ] + XBitField("ieiDT", 0x0, 4), + BitField("poweroff", 0x0, 1), + BitField("type", 0x1, 3) + ] # Fix 1/2 len problem class DetachTypeAndForceToStandby(Packet): name = "Detach Type and Force To Standby" fields_desc = [ - BitField("poweroff", 0x0, 1), - BitField("type", 0x1, 3), - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3) - ] + BitField("poweroff", 0x0, 1), + BitField("type", 0x1, 3), + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3) + ] # Fix 1/2 len problem class DetachTypeAndSpareHalfOctets(Packet): name = "Detach Type and Spare Half Octets" fields_desc = [ - BitField("poweroff", 0x0, 1), - BitField("type", 0x1, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("poweroff", 0x0, 1), + BitField("type", 0x1, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class DrxParameter(Packet): """DRX parameter Section 10.5.5.6""" name = "DRX Parameter" fields_desc = [ - ByteField("ieiDP", 0x0), - ByteField("splitPG", 0x0), - BitField("spare", 0x0, 4), - BitField("splitCCCH", 0x0, 1), - BitField("NonDrxTimer", 0x1, 3) - ] + ByteField("ieiDP", 0x0), + ByteField("splitPG", 0x0), + BitField("spare", 0x0, 4), + BitField("splitCCCH", 0x0, 1), + BitField("NonDrxTimer", 0x1, 3) + ] class ForceToStandby(Packet): """Force to standby Section 10.5.5.7""" name = "Force To Standby" fields_desc = [ - XBitField("ieiFTS", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3) - ] + XBitField("ieiFTS", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3) + ] # Fix 1/2 len problem class ForceToStandbyAndAcReferenceNumber(Packet): name = "Force To Standby And Ac Reference Number" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3), - BitField("acRefVal", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3), + BitField("acRefVal", 0x0, 4) + ] # Fix 1/2 len problem class ForceToStandbyAndUpdateResult(Packet): name = "Force To Standby And Update Result" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("updateResVal", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("updateResVal", 0x0, 3) + ] # Fix 1/2 len problem class ForceToStandbyAndSpareHalfOctets(Packet): name = "Force To Standby And Spare Half Octets" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class PTmsiSignature(Packet): """P-TMSI signature Section 10.5.5.8""" name = "P-TMSI Signature" fields_desc = [ - ByteField("ieiPTS", 0x0), - BitField("sgnature", 0x0, 24) - ] + ByteField("ieiPTS", 0x0), + BitField("sgnature", 0x0, 24) + ] class IdentityType2(Packet): """Identity type 2 Section 10.5.5.9""" name = "Identity Type 2" fields_desc = [ - XBitField("ieiIT2", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("typeOfIdentity", 0x0, 3) - ] + XBitField("ieiIT2", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("typeOfIdentity", 0x0, 3) + ] # Fix 1/2 len problem class IdentityType2AndforceToStandby(Packet): name = "Identity Type 2 and Force to Standby" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("typeOfIdentity", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("forceStandby", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("typeOfIdentity", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("forceStandby", 0x0, 3) + ] class ImeisvRequest(Packet): """IMEISV request Section 10.5.5.10""" name = "IMEISV Request" fields_desc = [ - XBitField("ieiIR", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("imeisvVal", 0x0, 3) - ] + XBitField("ieiIR", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("imeisvVal", 0x0, 3) + ] # Fix 1/2 len problem class ImeisvRequestAndForceToStandby(Packet): name = "IMEISV Request and Force To Standby" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("imeisvVal", 0x0, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("imeisvVal", 0x0, 3), + BitField("spareHalfOctets", 0x0, 4) + ] # length 4 to 19 @@ -7949,28 +7950,28 @@ class ReceiveNpduNumbersList(Packet): """Receive N-PDU Numbers list Section 10.5.5.11""" name = "Receive N-PDU Numbers list" fields_desc = [ - ByteField("ieiRNNL", 0x0), - - XByteField("lengthRNNL", None), - - BitField("nbList0", 0x0, 16), - # optional - ByteField("nbList1", None), - ByteField("nbList2", None), - ByteField("nbList3", None), - ByteField("nbList4", None), - ByteField("nbList5", None), - ByteField("nbList6", None), - ByteField("nbList7", None), - ByteField("nbList8", None), - ByteField("nbList9", None), - ByteField("nbList10", None), - ByteField("nbList11", None), - ByteField("nbList12", None), - ByteField("nbList13", None), - ByteField("nbList14", None), - ByteField("nbList15", None), - ] + ByteField("ieiRNNL", 0x0), + + XByteField("lengthRNNL", None), + + BitField("nbList0", 0x0, 16), + # optional + ByteField("nbList1", None), + ByteField("nbList2", None), + ByteField("nbList3", None), + ByteField("nbList4", None), + ByteField("nbList5", None), + ByteField("nbList6", None), + ByteField("nbList7", None), + ByteField("nbList8", None), + ByteField("nbList9", None), + ByteField("nbList10", None), + ByteField("nbList11", None), + ByteField("nbList12", None), + ByteField("nbList13", None), + ByteField("nbList14", None), + ByteField("nbList15", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -7986,10 +7987,10 @@ class MsNetworkCapability(Packet): """MS network capability Section 10.5.5.12""" name = "MS Network Capability" fields_desc = [ - ByteField("ieiMNC", 0x0), - XByteField("lengthMNC", 0x3), - ByteField("msNetValue", 0x0) - ] + ByteField("ieiMNC", 0x0), + XByteField("lengthMNC", 0x3), + ByteField("msNetValue", 0x0) + ] # length 6 to 14 @@ -7997,46 +7998,46 @@ class MsRadioAccessCapability(Packet): """MS Radio Access capability Section 10.5.5.12a""" name = "MS Radio Access Capability" fields_desc = [ - ByteField("ieiMRAC", 0x24), - - XByteField("lengthMRAC", None), - - BitField("spare1", 0x0, 1), # ... - - BitField("accessCap", 0x0, 4), - BitField("accessTechType", 0x0, 4), - # access capability - BitField("bool", 0x0, 1), - BitField("lengthContent", 0x0, 7), - BitField("spare1", 0x0, 1), # ... - # content - BitField("pwrCap", 0x0, 3), - BitField("bool1", 0x0, 1), - BitField("a51", 0x0, 1), - BitField("a52", 0x0, 1), - BitField("a53", 0x0, 1), - BitField("a54", 0x0, 1), - - BitField("a55", 0x0, 1), - BitField("a56", 0x0, 1), - BitField("a57", 0x0, 1), - BitField("esInd", 0x0, 1), - BitField("ps", 0x0, 1), - BitField("vgcs", 0x0, 1), - BitField("vbs", 0x0, 1), - BitField("bool2", 0x0, 1), - # multislot - BitField("bool3", 0x0, 1), - BitField("hscsd", 0x0, 5), - - BitField("bool4", 0x0, 1), - BitField("gprs", 0x0, 5), - BitField("gprsExt", 0x0, 1), - BitField("bool5", 0x0, 1), - - BitField("smsVal", 0x0, 4), - BitField("smVal", 0x0, 4) - ] + ByteField("ieiMRAC", 0x24), + + XByteField("lengthMRAC", None), + + BitField("spare1", 0x0, 1), # ... + + BitField("accessCap", 0x0, 4), + BitField("accessTechType", 0x0, 4), + # access capability + BitField("bool", 0x0, 1), + BitField("lengthContent", 0x0, 7), + BitField("spare1", 0x0, 1), # ... + # content + BitField("pwrCap", 0x0, 3), + BitField("bool1", 0x0, 1), + BitField("a51", 0x0, 1), + BitField("a52", 0x0, 1), + BitField("a53", 0x0, 1), + BitField("a54", 0x0, 1), + + BitField("a55", 0x0, 1), + BitField("a56", 0x0, 1), + BitField("a57", 0x0, 1), + BitField("esInd", 0x0, 1), + BitField("ps", 0x0, 1), + BitField("vgcs", 0x0, 1), + BitField("vbs", 0x0, 1), + BitField("bool2", 0x0, 1), + # multislot + BitField("bool3", 0x0, 1), + BitField("hscsd", 0x0, 5), + + BitField("bool4", 0x0, 1), + BitField("gprs", 0x0, 5), + BitField("gprsExt", 0x0, 1), + BitField("bool5", 0x0, 1), + + BitField("smsVal", 0x0, 4), + BitField("smVal", 0x0, 4) + ] # 10.5.5.13 Spare @@ -8046,26 +8047,26 @@ class GmmCause(Packet): """GMM cause Section 10.5.5.14""" name = "GMM Cause" fields_desc = [ - ByteField("ieiGC", 0x0), - ByteField("causeValue", 0x0) - ] + ByteField("ieiGC", 0x0), + ByteField("causeValue", 0x0) + ] class RoutingAreaIdentification(Packet): """Routing area identification Section 10.5.5.15""" name = "Routing Area Identification" fields_desc = [ - ByteField("ieiRAI", 0x0), - BitField("mccDigit2", 0x0, 4), - BitField("mccDigit1", 0x0, 4), - BitField("mncDigit3", 0x0, 4), - BitField("mccDigit3", 0x0, 4), - BitField("mccDigit2", 0x0, 4), - BitField("mccDigit1", 0x0, 4), - ByteField("LAC", 0x0), - ByteField("LAC1", 0x0), - ByteField("LAC", 0x0) - ] + ByteField("ieiRAI", 0x0), + BitField("mccDigit2", 0x0, 4), + BitField("mccDigit1", 0x0, 4), + BitField("mncDigit3", 0x0, 4), + BitField("mccDigit3", 0x0, 4), + BitField("mccDigit2", 0x0, 4), + BitField("mccDigit1", 0x0, 4), + ByteField("LAC", 0x0), + ByteField("LAC1", 0x0), + ByteField("LAC", 0x0) + ] # 10.5.5.16 Spare # This is intentionally left spare. @@ -8074,49 +8075,49 @@ class UpdateResult(Packet): """Update result Section 10.5.5.17""" name = "Update Result" fields_desc = [ - XBitField("ieiUR", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("updateResVal", 0x0, 3) - ] + XBitField("ieiUR", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("updateResVal", 0x0, 3) + ] class UpdateType(Packet): """Update type Section 10.5.5.18""" name = "Update Type" fields_desc = [ - XBitField("ieiUT", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("updateTypeVal", 0x0, 3) - ] + XBitField("ieiUT", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("updateTypeVal", 0x0, 3) + ] # Fix 1/2 len problem class UpdateTypeAndCiphKeySeqNr(Packet): name = "Update Type and Cipher Key Sequence Number" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("updateTypeVal", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("updateTypeVal", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3) + ] class AcReferenceNumber(Packet): """A&C reference number Section 10.5.5.19""" name = "A&C Reference Number" fields_desc = [ - XBitField("ieiARN", 0x0, 4), - BitField("acRefVal", 0x0, 4) - ] + XBitField("ieiARN", 0x0, 4), + BitField("acRefVal", 0x0, 4) + ] # Fix 1/2 len problem class AcReferenceNumberAndSpareHalfOctets(Packet): name = "A&C Reference Number and Spare Half Octets" fields_desc = [ - BitField("acRefVal", 0x0, 4), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("acRefVal", 0x0, 4), + BitField("spareHalfOctets", 0x0, 4) + ] # # 10.5.6 Session management information elements # @@ -8127,110 +8128,110 @@ class AccessPointName(Packet): """Access Point Name Section 10.5.6.1""" name = "Access Point Name" fields_desc = [ - ByteField("ieiAPN", 0x0), - XByteField("lengthAPN", None), - ByteField("apName", 0x0), - # optional - ByteField("apName1", None), - ByteField("apName2", None), - ByteField("apName3", None), - ByteField("apName4", None), - ByteField("apName5", None), - ByteField("apName6", None), - ByteField("apName7", None), - ByteField("apName8", None), - ByteField("apName9", None), - ByteField("apName10", None), - ByteField("apName11", None), - ByteField("apName12", None), - ByteField("apName13", None), - ByteField("apName14", None), - ByteField("apName15", None), - ByteField("apName16", None), - ByteField("apName17", None), - ByteField("apName18", None), - ByteField("apName19", None), - ByteField("apName20", None), - ByteField("apName21", None), - ByteField("apName22", None), - ByteField("apName23", None), - ByteField("apName24", None), - ByteField("apName25", None), - ByteField("apName26", None), - ByteField("apName27", None), - ByteField("apName28", None), - ByteField("apName29", None), - ByteField("apName30", None), - ByteField("apName31", None), - ByteField("apName32", None), - ByteField("apName33", None), - ByteField("apName34", None), - ByteField("apName35", None), - ByteField("apName36", None), - ByteField("apName37", None), - ByteField("apName38", None), - ByteField("apName39", None), - ByteField("apName40", None), - ByteField("apName41", None), - ByteField("apName42", None), - ByteField("apName43", None), - ByteField("apName44", None), - ByteField("apName45", None), - ByteField("apName46", None), - ByteField("apName47", None), - ByteField("apName48", None), - ByteField("apName49", None), - ByteField("apName50", None), - ByteField("apName51", None), - ByteField("apName52", None), - ByteField("apName53", None), - ByteField("apName54", None), - ByteField("apName55", None), - ByteField("apName56", None), - ByteField("apName57", None), - ByteField("apName58", None), - ByteField("apName59", None), - ByteField("apName60", None), - ByteField("apName61", None), - ByteField("apName62", None), - ByteField("apName63", None), - ByteField("apName64", None), - ByteField("apName65", None), - ByteField("apName66", None), - ByteField("apName67", None), - ByteField("apName68", None), - ByteField("apName69", None), - ByteField("apName70", None), - ByteField("apName71", None), - ByteField("apName72", None), - ByteField("apName73", None), - ByteField("apName74", None), - ByteField("apName75", None), - ByteField("apName76", None), - ByteField("apName77", None), - ByteField("apName78", None), - ByteField("apName79", None), - ByteField("apName80", None), - ByteField("apName81", None), - ByteField("apName82", None), - ByteField("apName83", None), - ByteField("apName84", None), - ByteField("apName85", None), - ByteField("apName86", None), - ByteField("apName87", None), - ByteField("apName88", None), - ByteField("apName89", None), - ByteField("apName90", None), - ByteField("apName91", None), - ByteField("apName92", None), - ByteField("apName93", None), - ByteField("apName94", None), - ByteField("apName95", None), - ByteField("apName96", None), - ByteField("apName97", None), - ByteField("apName98", None), - ByteField("apName99", None) - ] + ByteField("ieiAPN", 0x0), + XByteField("lengthAPN", None), + ByteField("apName", 0x0), + # optional + ByteField("apName1", None), + ByteField("apName2", None), + ByteField("apName3", None), + ByteField("apName4", None), + ByteField("apName5", None), + ByteField("apName6", None), + ByteField("apName7", None), + ByteField("apName8", None), + ByteField("apName9", None), + ByteField("apName10", None), + ByteField("apName11", None), + ByteField("apName12", None), + ByteField("apName13", None), + ByteField("apName14", None), + ByteField("apName15", None), + ByteField("apName16", None), + ByteField("apName17", None), + ByteField("apName18", None), + ByteField("apName19", None), + ByteField("apName20", None), + ByteField("apName21", None), + ByteField("apName22", None), + ByteField("apName23", None), + ByteField("apName24", None), + ByteField("apName25", None), + ByteField("apName26", None), + ByteField("apName27", None), + ByteField("apName28", None), + ByteField("apName29", None), + ByteField("apName30", None), + ByteField("apName31", None), + ByteField("apName32", None), + ByteField("apName33", None), + ByteField("apName34", None), + ByteField("apName35", None), + ByteField("apName36", None), + ByteField("apName37", None), + ByteField("apName38", None), + ByteField("apName39", None), + ByteField("apName40", None), + ByteField("apName41", None), + ByteField("apName42", None), + ByteField("apName43", None), + ByteField("apName44", None), + ByteField("apName45", None), + ByteField("apName46", None), + ByteField("apName47", None), + ByteField("apName48", None), + ByteField("apName49", None), + ByteField("apName50", None), + ByteField("apName51", None), + ByteField("apName52", None), + ByteField("apName53", None), + ByteField("apName54", None), + ByteField("apName55", None), + ByteField("apName56", None), + ByteField("apName57", None), + ByteField("apName58", None), + ByteField("apName59", None), + ByteField("apName60", None), + ByteField("apName61", None), + ByteField("apName62", None), + ByteField("apName63", None), + ByteField("apName64", None), + ByteField("apName65", None), + ByteField("apName66", None), + ByteField("apName67", None), + ByteField("apName68", None), + ByteField("apName69", None), + ByteField("apName70", None), + ByteField("apName71", None), + ByteField("apName72", None), + ByteField("apName73", None), + ByteField("apName74", None), + ByteField("apName75", None), + ByteField("apName76", None), + ByteField("apName77", None), + ByteField("apName78", None), + ByteField("apName79", None), + ByteField("apName80", None), + ByteField("apName81", None), + ByteField("apName82", None), + ByteField("apName83", None), + ByteField("apName84", None), + ByteField("apName85", None), + ByteField("apName86", None), + ByteField("apName87", None), + ByteField("apName88", None), + ByteField("apName89", None), + ByteField("apName90", None), + ByteField("apName91", None), + ByteField("apName92", None), + ByteField("apName93", None), + ByteField("apName94", None), + ByteField("apName95", None), + ByteField("apName96", None), + ByteField("apName97", None), + ByteField("apName98", None), + ByteField("apName99", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -8246,10 +8247,10 @@ class NetworkServiceAccessPointIdentifier(Packet): """Network service access point identifier Section 10.5.6.2""" name = "Network Service Access Point Identifier" fields_desc = [ - ByteField("ieiNSAPI", 0x0), - BitField("spare", 0x0, 4), - BitField("nsapiVal", 0x0, 4) - ] + ByteField("ieiNSAPI", 0x0), + BitField("spare", 0x0, 4), + BitField("nsapiVal", 0x0, 4) + ] # length 2 to 253 @@ -8257,347 +8258,347 @@ class ProtocolConfigurationOptions(Packet): """Protocol configuration options Section 10.5.6.3""" name = "Protocol Configuration Options" fields_desc = [ - ByteField("ieiPCO", 0x0), + ByteField("ieiPCO", 0x0), - XByteField("lengthPCO", None), - # optional - BitField("ext", None, 1), - BitField("spare", None, 4), - BitField("configProto", None, 3), + XByteField("lengthPCO", None), + # optional + BitField("ext", None, 1), + BitField("spare", None, 4), + BitField("configProto", None, 3), - ByteField("protoId1", None), - ByteField("lenProto1", None), - ByteField("proto1Content", None), + ByteField("protoId1", None), + ByteField("lenProto1", None), + ByteField("proto1Content", None), - ByteField("protoId2", None), - ByteField("lenProto2", None), - ByteField("proto2Content", None), + ByteField("protoId2", None), + ByteField("lenProto2", None), + ByteField("proto2Content", None), - ByteField("protoId3", None), - ByteField("lenProto3", None), - ByteField("proto3Content", None), + ByteField("protoId3", None), + ByteField("lenProto3", None), + ByteField("proto3Content", None), - ByteField("protoId4", None), - ByteField("lenProto4", None), - ByteField("proto4Content", None), + ByteField("protoId4", None), + ByteField("lenProto4", None), + ByteField("proto4Content", None), - ByteField("protoId5", None), - ByteField("lenProto5", None), - ByteField("proto5Content", None), + ByteField("protoId5", None), + ByteField("lenProto5", None), + ByteField("proto5Content", None), - ByteField("protoId6", None), - ByteField("lenProto6", None), - ByteField("proto6Content", None), + ByteField("protoId6", None), + ByteField("lenProto6", None), + ByteField("proto6Content", None), - ByteField("protoId7", None), - ByteField("lenProto7", None), - ByteField("proto7Content", None), + ByteField("protoId7", None), + ByteField("lenProto7", None), + ByteField("proto7Content", None), - ByteField("protoId8", None), - ByteField("lenProto8", None), - ByteField("proto8Content", None), + ByteField("protoId8", None), + ByteField("lenProto8", None), + ByteField("proto8Content", None), - ByteField("protoId9", None), - ByteField("lenProto9", None), - ByteField("proto9Content", None), + ByteField("protoId9", None), + ByteField("lenProto9", None), + ByteField("proto9Content", None), - ByteField("protoId10", None), - ByteField("lenProto10", None), - ByteField("proto10Content", None), + ByteField("protoId10", None), + ByteField("lenProto10", None), + ByteField("proto10Content", None), - ByteField("protoId11", None), - ByteField("lenProto11", None), - ByteField("proto11Content", None), + ByteField("protoId11", None), + ByteField("lenProto11", None), + ByteField("proto11Content", None), - ByteField("protoId12", None), - ByteField("lenProto12", None), - ByteField("proto12Content", None), + ByteField("protoId12", None), + ByteField("lenProto12", None), + ByteField("proto12Content", None), - ByteField("protoId13", None), - ByteField("lenProto13", None), - ByteField("proto13Content", None), + ByteField("protoId13", None), + ByteField("lenProto13", None), + ByteField("proto13Content", None), - ByteField("protoId14", None), - ByteField("lenProto14", None), - ByteField("proto14Content", None), + ByteField("protoId14", None), + ByteField("lenProto14", None), + ByteField("proto14Content", None), - ByteField("protoId15", None), - ByteField("lenProto15", None), - ByteField("proto15Content", None), + ByteField("protoId15", None), + ByteField("lenProto15", None), + ByteField("proto15Content", None), - ByteField("protoId16", None), - ByteField("lenProto16", None), - ByteField("proto16Content", None), + ByteField("protoId16", None), + ByteField("lenProto16", None), + ByteField("proto16Content", None), - ByteField("protoId17", None), - ByteField("lenProto17", None), - ByteField("proto17Content", None), + ByteField("protoId17", None), + ByteField("lenProto17", None), + ByteField("proto17Content", None), - ByteField("protoId18", None), - ByteField("lenProto18", None), - ByteField("proto18Content", None), + ByteField("protoId18", None), + ByteField("lenProto18", None), + ByteField("proto18Content", None), - ByteField("protoId19", None), - ByteField("lenProto19", None), - ByteField("proto19Content", None), + ByteField("protoId19", None), + ByteField("lenProto19", None), + ByteField("proto19Content", None), - ByteField("protoId20", None), - ByteField("lenProto20", None), - ByteField("proto20Content", None), + ByteField("protoId20", None), + ByteField("lenProto20", None), + ByteField("proto20Content", None), - ByteField("protoId21", None), - ByteField("lenProto21", None), - ByteField("proto21Content", None), + ByteField("protoId21", None), + ByteField("lenProto21", None), + ByteField("proto21Content", None), - ByteField("protoId22", None), - ByteField("lenProto22", None), - ByteField("proto22Content", None), + ByteField("protoId22", None), + ByteField("lenProto22", None), + ByteField("proto22Content", None), - ByteField("protoId23", None), - ByteField("lenProto23", None), - ByteField("proto23Content", None), + ByteField("protoId23", None), + ByteField("lenProto23", None), + ByteField("proto23Content", None), - ByteField("protoId24", None), - ByteField("lenProto24", None), - ByteField("proto24Content", None), + ByteField("protoId24", None), + ByteField("lenProto24", None), + ByteField("proto24Content", None), - ByteField("protoId25", None), - ByteField("lenProto25", None), - ByteField("proto25Content", None), + ByteField("protoId25", None), + ByteField("lenProto25", None), + ByteField("proto25Content", None), - ByteField("protoId26", None), - ByteField("lenProto26", None), - ByteField("proto26Content", None), + ByteField("protoId26", None), + ByteField("lenProto26", None), + ByteField("proto26Content", None), - ByteField("protoId27", None), - ByteField("lenProto27", None), - ByteField("proto27Content", None), + ByteField("protoId27", None), + ByteField("lenProto27", None), + ByteField("proto27Content", None), - ByteField("protoId28", None), - ByteField("lenProto28", None), - ByteField("proto28Content", None), + ByteField("protoId28", None), + ByteField("lenProto28", None), + ByteField("proto28Content", None), - ByteField("protoId29", None), - ByteField("lenProto29", None), - ByteField("proto29Content", None), + ByteField("protoId29", None), + ByteField("lenProto29", None), + ByteField("proto29Content", None), - ByteField("protoId30", None), - ByteField("lenProto30", None), - ByteField("proto30Content", None), + ByteField("protoId30", None), + ByteField("lenProto30", None), + ByteField("proto30Content", None), - ByteField("protoId31", None), - ByteField("lenProto31", None), - ByteField("proto31Content", None), + ByteField("protoId31", None), + ByteField("lenProto31", None), + ByteField("proto31Content", None), - ByteField("protoId32", None), - ByteField("lenProto32", None), - ByteField("proto32Content", None), + ByteField("protoId32", None), + ByteField("lenProto32", None), + ByteField("proto32Content", None), - ByteField("protoId33", None), - ByteField("lenProto33", None), - ByteField("proto33Content", None), + ByteField("protoId33", None), + ByteField("lenProto33", None), + ByteField("proto33Content", None), - ByteField("protoId34", None), - ByteField("lenProto34", None), - ByteField("proto34Content", None), + ByteField("protoId34", None), + ByteField("lenProto34", None), + ByteField("proto34Content", None), - ByteField("protoId35", None), - ByteField("lenProto35", None), - ByteField("proto35Content", None), + ByteField("protoId35", None), + ByteField("lenProto35", None), + ByteField("proto35Content", None), - ByteField("protoId36", None), - ByteField("lenProto36", None), - ByteField("proto36Content", None), + ByteField("protoId36", None), + ByteField("lenProto36", None), + ByteField("proto36Content", None), - ByteField("protoId37", None), - ByteField("lenProto37", None), - ByteField("proto37Content", None), + ByteField("protoId37", None), + ByteField("lenProto37", None), + ByteField("proto37Content", None), - ByteField("protoId38", None), - ByteField("lenProto38", None), - ByteField("proto38Content", None), + ByteField("protoId38", None), + ByteField("lenProto38", None), + ByteField("proto38Content", None), - ByteField("protoId39", None), - ByteField("lenProto39", None), - ByteField("proto39Content", None), + ByteField("protoId39", None), + ByteField("lenProto39", None), + ByteField("proto39Content", None), - ByteField("protoId40", None), - ByteField("lenProto40", None), - ByteField("proto40Content", None), + ByteField("protoId40", None), + ByteField("lenProto40", None), + ByteField("proto40Content", None), - ByteField("protoId41", None), - ByteField("lenProto41", None), - ByteField("proto41Content", None), + ByteField("protoId41", None), + ByteField("lenProto41", None), + ByteField("proto41Content", None), - ByteField("protoId42", None), - ByteField("lenProto42", None), - ByteField("proto42Content", None), + ByteField("protoId42", None), + ByteField("lenProto42", None), + ByteField("proto42Content", None), - ByteField("protoId43", None), - ByteField("lenProto43", None), - ByteField("proto43Content", None), + ByteField("protoId43", None), + ByteField("lenProto43", None), + ByteField("proto43Content", None), - ByteField("protoId44", None), - ByteField("lenProto44", None), - ByteField("proto44Content", None), + ByteField("protoId44", None), + ByteField("lenProto44", None), + ByteField("proto44Content", None), - ByteField("protoId45", None), - ByteField("lenProto45", None), - ByteField("proto45Content", None), + ByteField("protoId45", None), + ByteField("lenProto45", None), + ByteField("proto45Content", None), - ByteField("protoId46", None), - ByteField("lenProto46", None), - ByteField("proto46Content", None), + ByteField("protoId46", None), + ByteField("lenProto46", None), + ByteField("proto46Content", None), - ByteField("protoId47", None), - ByteField("lenProto47", None), - ByteField("proto47Content", None), + ByteField("protoId47", None), + ByteField("lenProto47", None), + ByteField("proto47Content", None), - ByteField("protoId48", None), - ByteField("lenProto48", None), - ByteField("proto48Content", None), + ByteField("protoId48", None), + ByteField("lenProto48", None), + ByteField("proto48Content", None), - ByteField("protoId49", None), - ByteField("lenProto49", None), - ByteField("proto49Content", None), + ByteField("protoId49", None), + ByteField("lenProto49", None), + ByteField("proto49Content", None), - ByteField("protoId50", None), - ByteField("lenProto50", None), - ByteField("proto50Content", None), + ByteField("protoId50", None), + ByteField("lenProto50", None), + ByteField("proto50Content", None), - ByteField("protoId51", None), - ByteField("lenProto51", None), - ByteField("proto51Content", None), + ByteField("protoId51", None), + ByteField("lenProto51", None), + ByteField("proto51Content", None), - ByteField("protoId52", None), - ByteField("lenProto52", None), - ByteField("proto52Content", None), + ByteField("protoId52", None), + ByteField("lenProto52", None), + ByteField("proto52Content", None), - ByteField("protoId53", None), - ByteField("lenProto53", None), - ByteField("proto53Content", None), + ByteField("protoId53", None), + ByteField("lenProto53", None), + ByteField("proto53Content", None), - ByteField("protoId54", None), - ByteField("lenProto54", None), - ByteField("proto54Content", None), + ByteField("protoId54", None), + ByteField("lenProto54", None), + ByteField("proto54Content", None), - ByteField("protoId55", None), - ByteField("lenProto55", None), - ByteField("proto55Content", None), + ByteField("protoId55", None), + ByteField("lenProto55", None), + ByteField("proto55Content", None), - ByteField("protoId56", None), - ByteField("lenProto56", None), - ByteField("proto56Content", None), + ByteField("protoId56", None), + ByteField("lenProto56", None), + ByteField("proto56Content", None), - ByteField("protoId57", None), - ByteField("lenProto57", None), - ByteField("proto57Content", None), + ByteField("protoId57", None), + ByteField("lenProto57", None), + ByteField("proto57Content", None), - ByteField("protoId58", None), - ByteField("lenProto58", None), - ByteField("proto58Content", None), + ByteField("protoId58", None), + ByteField("lenProto58", None), + ByteField("proto58Content", None), - ByteField("protoId59", None), - ByteField("lenProto59", None), - ByteField("proto59Content", None), + ByteField("protoId59", None), + ByteField("lenProto59", None), + ByteField("proto59Content", None), - ByteField("protoId60", None), - ByteField("lenProto60", None), - ByteField("proto60Content", None), + ByteField("protoId60", None), + ByteField("lenProto60", None), + ByteField("proto60Content", None), - ByteField("protoId61", None), - ByteField("lenProto61", None), - ByteField("proto61Content", None), + ByteField("protoId61", None), + ByteField("lenProto61", None), + ByteField("proto61Content", None), - ByteField("protoId62", None), - ByteField("lenProto62", None), - ByteField("proto62Content", None), + ByteField("protoId62", None), + ByteField("lenProto62", None), + ByteField("proto62Content", None), - ByteField("protoId63", None), - ByteField("lenProto63", None), - ByteField("proto63Content", None), + ByteField("protoId63", None), + ByteField("lenProto63", None), + ByteField("proto63Content", None), - ByteField("protoId64", None), - ByteField("lenProto64", None), - ByteField("proto64Content", None), + ByteField("protoId64", None), + ByteField("lenProto64", None), + ByteField("proto64Content", None), - ByteField("protoId65", None), - ByteField("lenProto65", None), - ByteField("proto65Content", None), + ByteField("protoId65", None), + ByteField("lenProto65", None), + ByteField("proto65Content", None), - ByteField("protoId66", None), - ByteField("lenProto66", None), - ByteField("proto66Content", None), + ByteField("protoId66", None), + ByteField("lenProto66", None), + ByteField("proto66Content", None), - ByteField("protoId67", None), - ByteField("lenProto67", None), - ByteField("proto67Content", None), + ByteField("protoId67", None), + ByteField("lenProto67", None), + ByteField("proto67Content", None), - ByteField("protoId68", None), - ByteField("lenProto68", None), - ByteField("proto68Content", None), + ByteField("protoId68", None), + ByteField("lenProto68", None), + ByteField("proto68Content", None), - ByteField("protoId69", None), - ByteField("lenProto69", None), - ByteField("proto69Content", None), + ByteField("protoId69", None), + ByteField("lenProto69", None), + ByteField("proto69Content", None), - ByteField("protoId70", None), - ByteField("lenProto70", None), - ByteField("proto70Content", None), + ByteField("protoId70", None), + ByteField("lenProto70", None), + ByteField("proto70Content", None), - ByteField("protoId71", None), - ByteField("lenProto71", None), - ByteField("proto71Content", None), + ByteField("protoId71", None), + ByteField("lenProto71", None), + ByteField("proto71Content", None), - ByteField("protoId72", None), - ByteField("lenProto72", None), - ByteField("proto72Content", None), + ByteField("protoId72", None), + ByteField("lenProto72", None), + ByteField("proto72Content", None), - ByteField("protoId73", None), - ByteField("lenProto73", None), - ByteField("proto73Content", None), + ByteField("protoId73", None), + ByteField("lenProto73", None), + ByteField("proto73Content", None), - ByteField("protoId74", None), - ByteField("lenProto74", None), - ByteField("proto74Content", None), + ByteField("protoId74", None), + ByteField("lenProto74", None), + ByteField("proto74Content", None), - ByteField("protoId75", None), - ByteField("lenProto75", None), - ByteField("proto75Content", None), + ByteField("protoId75", None), + ByteField("lenProto75", None), + ByteField("proto75Content", None), - ByteField("protoId76", None), - ByteField("lenProto76", None), - ByteField("proto76Content", None), + ByteField("protoId76", None), + ByteField("lenProto76", None), + ByteField("proto76Content", None), - ByteField("protoId77", None), - ByteField("lenProto77", None), - ByteField("proto77Content", None), + ByteField("protoId77", None), + ByteField("lenProto77", None), + ByteField("proto77Content", None), - ByteField("protoId78", None), - ByteField("lenProto78", None), - ByteField("proto78Content", None), + ByteField("protoId78", None), + ByteField("lenProto78", None), + ByteField("proto78Content", None), - ByteField("protoId79", None), - ByteField("lenProto79", None), - ByteField("proto79Content", None), + ByteField("protoId79", None), + ByteField("lenProto79", None), + ByteField("proto79Content", None), - ByteField("protoId80", None), - ByteField("lenProto80", None), - ByteField("proto80Content", None), + ByteField("protoId80", None), + ByteField("lenProto80", None), + ByteField("proto80Content", None), - ByteField("protoId81", None), - ByteField("lenProto81", None), - ByteField("proto81Content", None), + ByteField("protoId81", None), + ByteField("lenProto81", None), + ByteField("proto81Content", None), - ByteField("protoId82", None), - ByteField("lenProto82", None), - ByteField("proto82Content", None), + ByteField("protoId82", None), + ByteField("lenProto82", None), + ByteField("proto82Content", None), - ByteField("protoId83", None), - ByteField("lenProto83", None), - ByteField("proto83Content", None), - ] + ByteField("protoId83", None), + ByteField("lenProto83", None), + ByteField("proto83Content", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -8614,32 +8615,32 @@ class PacketDataProtocolAddress(Packet): """Packet data protocol address Section 10.5.6.4""" name = "Packet Data Protocol Address" fields_desc = [ - ByteField("ieiPDPA", 0x0), - - XByteField("lengthPDPA", None), - - BitField("spare", 0x0, 4), - BitField("pdpTypeOrga", 0x0, 4), - - ByteField("pdpTypeNb", 0x0), - # optional - ByteField("addressInfo1", None), - ByteField("addressInfo2", None), - ByteField("addressInfo3", None), - ByteField("addressInfo4", None), - ByteField("addressInfo5", None), - ByteField("addressInfo6", None), - ByteField("addressInfo7", None), - ByteField("addressInfo8", None), - ByteField("addressInfo9", None), - ByteField("addressInfo10", None), - ByteField("addressInfo11", None), - ByteField("addressInfo12", None), - ByteField("addressInfo13", None), - ByteField("addressInfo14", None), - ByteField("addressInfo15", None), - ByteField("addressInfo16", None) - ] + ByteField("ieiPDPA", 0x0), + + XByteField("lengthPDPA", None), + + BitField("spare", 0x0, 4), + BitField("pdpTypeOrga", 0x0, 4), + + ByteField("pdpTypeNb", 0x0), + # optional + ByteField("addressInfo1", None), + ByteField("addressInfo2", None), + ByteField("addressInfo3", None), + ByteField("addressInfo4", None), + ByteField("addressInfo5", None), + ByteField("addressInfo6", None), + ByteField("addressInfo7", None), + ByteField("addressInfo8", None), + ByteField("addressInfo9", None), + ByteField("addressInfo10", None), + ByteField("addressInfo11", None), + ByteField("addressInfo12", None), + ByteField("addressInfo13", None), + ByteField("addressInfo14", None), + ByteField("addressInfo15", None), + ByteField("addressInfo16", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -8655,29 +8656,29 @@ class QualityOfService(Packet): """Quality of service Section 10.5.6.5""" name = "Quality of Service" fields_desc = [ - ByteField("ieiQOS", 0x0), - XByteField("lengthQOS", 0x5), + ByteField("ieiQOS", 0x0), + XByteField("lengthQOS", 0x5), - BitField("spare", 0x0, 2), - BitField("delayClass", 0x0, 3), - BitField("reliaClass", 0x0, 3), + BitField("spare", 0x0, 2), + BitField("delayClass", 0x0, 3), + BitField("reliaClass", 0x0, 3), - BitField("peak", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("precedenceCl", 0x0, 3), + BitField("peak", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("precedenceCl", 0x0, 3), - BitField("spare", 0x0, 3), - BitField("mean", 0x0, 5) - ] + BitField("spare", 0x0, 3), + BitField("mean", 0x0, 5) + ] class SmCause(Packet): """SM cause Section 10.5.6.6""" name = "SM Cause" fields_desc = [ - ByteField("ieiSC", 0x0), - ByteField("causeVal", 0x0) - ] + ByteField("ieiSC", 0x0), + ByteField("causeVal", 0x0) + ] # 10.5.6.7 Spare # This is intentionally left spare. @@ -8687,30 +8688,30 @@ class AaDeactivationCause(Packet): """AA deactivation cause Section 10.5.6.8""" name = "AA Deactivation Cause" fields_desc = [ - XBitField("ieiADC", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("aaVal", 0x0, 3) - ] + XBitField("ieiADC", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("aaVal", 0x0, 3) + ] # Fix 1/2 len problem class AaDeactivationCauseAndSpareHalfOctets(Packet): name = "AA Deactivation Cause and Spare Half Octets" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("aaVal", 0x0, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("aaVal", 0x0, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class LlcServiceAccessPointIdentifier(Packet): """LLC service access point identifier Section 10.5.6.9""" name = "LLC Service Access Point Identifier" fields_desc = [ - ByteField("ieiLSAPI", None), - BitField("spare", 0x0, 4), - BitField("llcVal", 0x0, 4) - ] + ByteField("ieiLSAPI", None), + BitField("spare", 0x0, 4), + BitField("llcVal", 0x0, 4) + ] # @@ -8723,63 +8724,63 @@ class RadioPriority(Packet): """Radio priority Section 10.5.7.2""" name = "Radio Priority" fields_desc = [ - XBitField("ieiRP", 0x0, 4), - BitField("spare", 0x1, 1), - BitField("rplv", 0x0, 3) - ] + XBitField("ieiRP", 0x0, 4), + BitField("spare", 0x1, 1), + BitField("rplv", 0x0, 3) + ] # Fix 1/2 len problem class RadioPriorityAndSpareHalfOctets(Packet): name = "Radio Priority and Spare Half Octets" fields_desc = [ - BitField("spare", 0x1, 1), - BitField("rplv", 0x0, 3), - BitField("spareHalfOctets", 0x0, 4) - ] + BitField("spare", 0x1, 1), + BitField("rplv", 0x0, 3), + BitField("spareHalfOctets", 0x0, 4) + ] class GprsTimer(Packet): """GPRS Timer Section 10.5.7.3""" name = "GPRS Timer" fields_desc = [ - ByteField("ieiGT", 0x0), - BitField("unit", 0x0, 3), - BitField("timerVal", 0x0, 5) - ] + ByteField("ieiGT", 0x0), + BitField("unit", 0x0, 3), + BitField("timerVal", 0x0, 5) + ] class CellIdentity(Packet): """ Cell identity Section 10.5.1.1 """ name = "Cell Identity" fields_desc = [ - ByteField("ciValue1", 0x0), - ByteField("ciValue2", 0x0) - ] + ByteField("ciValue1", 0x0), + ByteField("ciValue2", 0x0) + ] class CiphKeySeqNr(Packet): """ Ciphering Key Sequence Number Section 10.5.1.2 """ name = "Cipher Key Sequence Number" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("keySeq", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("keySeq", 0x0, 3) + ] class LocalAreaId(Packet): """ Local Area Identification Section 10.5.1.3 """ name = "Location Area Identification" fields_desc = [ - BitField("mccDigit2", 0x0, 4), - BitField("mccDigit1", 0x0, 4), - BitField("mncDigit3", 0x0, 4), - BitField("mccDigit3", 0x0, 4), - BitField("mncDigit2", 0x0, 4), - BitField("mncDigit1", 0x0, 4), - ByteField("lac1", 0x0), - ByteField("lac2", 0x0) - ] + BitField("mccDigit2", 0x0, 4), + BitField("mccDigit1", 0x0, 4), + BitField("mncDigit3", 0x0, 4), + BitField("mccDigit3", 0x0, 4), + BitField("mncDigit2", 0x0, 4), + BitField("mncDigit1", 0x0, 4), + ByteField("lac1", 0x0), + ByteField("lac2", 0x0) + ] # # The Mobile Identity is a type 4 information element with a minimum # length of 3 octet and 11 octets length maximal. @@ -8791,28 +8792,28 @@ class MobileId(Packet): """ Mobile Identity Section 10.5.1.4 """ name = "Mobile Identity" fields_desc = [ - XByteField("lengthMI", None), - BitField("idDigit1", 0x0, 4), - BitField("oddEven", 0x0, 1), - BitField("typeOfId", 0x0, 3), - - BitField("idDigit2_1", None, 4), # optional - BitField("idDigit2", None, 4), - BitField("idDigit3_1", None, 4), - BitField("idDigit3", None, 4), - BitField("idDigit4_1", None, 4), - BitField("idDigit4", None, 4), - BitField("idDigit5_1", None, 4), - BitField("idDigit5", None, 4), - BitField("idDigit6_1", None, 4), - BitField("idDigit6", None, 4), - BitField("idDigit7_1", None, 4), - BitField("idDigit7", None, 4), - BitField("idDigit8_1", None, 4), - BitField("idDigit8", None, 4), - BitField("idDigit9_1", None, 4), - BitField("idDigit9", None, 4), - ] + XByteField("lengthMI", None), + BitField("idDigit1", 0x0, 4), + BitField("oddEven", 0x0, 1), + BitField("typeOfId", 0x0, 3), + + BitField("idDigit2_1", None, 4), # optional + BitField("idDigit2", None, 4), + BitField("idDigit3_1", None, 4), + BitField("idDigit3", None, 4), + BitField("idDigit4_1", None, 4), + BitField("idDigit4", None, 4), + BitField("idDigit5_1", None, 4), + BitField("idDigit5", None, 4), + BitField("idDigit6_1", None, 4), + BitField("idDigit6", None, 4), + BitField("idDigit7_1", None, 4), + BitField("idDigit7", None, 4), + BitField("idDigit8_1", None, 4), + BitField("idDigit8", None, 4), + BitField("idDigit9_1", None, 4), + BitField("idDigit9", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -8828,76 +8829,76 @@ class MobileStationClassmark1(Packet): """ Mobile Station Classmark 1 Section 10.5.1.5 """ name = "Mobile Station Classmark 1" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("revisionLvl", 0x0, 2), - BitField("esInd", 0x0, 1), - BitField("a51", 0x0, 1), - BitField("rfPowerCap", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("revisionLvl", 0x0, 2), + BitField("esInd", 0x0, 1), + BitField("a51", 0x0, 1), + BitField("rfPowerCap", 0x0, 3) + ] class MobileStationClassmark2(Packet): """ Mobile Station Classmark 2 Section 10.5.1.6 """ name = "Mobile Station Classmark 2" fields_desc = [ - XByteField("lengthMSC2", 0x3), - BitField("spare", 0x0, 1), - BitField("revisionLvl", 0x0, 2), - BitField("esInd", 0x0, 1), - BitField("a51", 0x0, 1), - BitField("rfPowerCap", 0x0, 3), - BitField("spare1", 0x0, 1), - BitField("psCap", 0x0, 1), - BitField("ssScreenInd", 0x0, 2), - BitField("smCaPabi", 0x0, 1), - BitField("vbs", 0x0, 1), - BitField("vgcs", 0x0, 1), - BitField("fc", 0x0, 1), - BitField("cm3", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("lcsvaCap", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("soLsa", 0x0, 1), - BitField("cmsp", 0x0, 1), - BitField("a53", 0x0, 1), - BitField("a52", 0x0, 1) - ] + XByteField("lengthMSC2", 0x3), + BitField("spare", 0x0, 1), + BitField("revisionLvl", 0x0, 2), + BitField("esInd", 0x0, 1), + BitField("a51", 0x0, 1), + BitField("rfPowerCap", 0x0, 3), + BitField("spare1", 0x0, 1), + BitField("psCap", 0x0, 1), + BitField("ssScreenInd", 0x0, 2), + BitField("smCaPabi", 0x0, 1), + BitField("vbs", 0x0, 1), + BitField("vgcs", 0x0, 1), + BitField("fc", 0x0, 1), + BitField("cm3", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("lcsvaCap", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("soLsa", 0x0, 1), + BitField("cmsp", 0x0, 1), + BitField("a53", 0x0, 1), + BitField("a52", 0x0, 1) + ] class DescriptiveGroupOrBroadcastCallReference(Packet): """ Descriptive group or broadcast call reference Section 10.5.1.9 """ name = "Descriptive Group or Broadcast Call Reference" fields_desc = [ - BitField("binCallRef", 0x0, 27), - BitField("sf", 0x0, 1), - BitField("fa", 0x0, 1), - BitField("callPrio", 0x0, 3), - BitField("cipherInfo", 0x0, 4), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("spare4", 0x0, 1) - ] + BitField("binCallRef", 0x0, 27), + BitField("sf", 0x0, 1), + BitField("fa", 0x0, 1), + BitField("callPrio", 0x0, 3), + BitField("cipherInfo", 0x0, 4), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("spare4", 0x0, 1) + ] class PdAndSapi(Packet): """ PD and SAPI $(CCBS)$ Section 10.5.1.10a """ name = "PD and SAPI $(CCBS)$" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("sapi", 0x0, 2), - BitField("pd", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("sapi", 0x0, 2), + BitField("pd", 0x0, 4) + ] class PriorityLevel(Packet): """ Priority Level Section 10.5.1.11 """ name = "Priority Level" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("callPrio", 0x0, 3) - ] + BitField("spare", 0x0, 1), + BitField("callPrio", 0x0, 3) + ] # # Radio Resource management information elements @@ -8910,436 +8911,436 @@ class BaRange(Packet): name = "BA Range" fields_desc = [ - XByteField("lengthBR", None), -#error: byte format requires -128 <= number <= 127 - ByteField("nrOfRanges", 0x0), -# # rX = range X -# # L o = Lower H i = higher -# # H p = high Part Lp = low Part - ByteField("r1LoHp", 0x0), - - BitField("r1LoLp", 0x0, 3), - BitField("r1HiHp", 0x0, 5), - - BitField("r1HiLp", 0x0, 4), - BitField("r2LoHp", 0x0, 4), - # optional - BitField("r2LoLp", None, 5), - BitField("r2HiHp", None, 3), - - ByteField("r2HiLp", None), - ByteField("r3LoHp", None), - - BitField("r3LoLp", None, 5), - BitField("r3HiHp", None, 3), - - ByteField("r3HiLp", None), - ByteField("r4LoHp", None), - - BitField("r4LoLp", None, 5), - BitField("r4HiHp", None, 3), - ByteField("r4HiLp", None), - ByteField("r5LoHp", None), - - BitField("r5LoLp", None, 5), - BitField("r5HiHp", None, 3), - ByteField("r5HiLp", None), - ByteField("r6LoHp", None), - - BitField("r6LoLp", None, 5), - BitField("r6HiHp", None, 3), - ByteField("r6HiLp", None), - ByteField("r7LoHp", None), - - BitField("r7LoLp", None, 5), - BitField("r7HiHp", None, 3), - ByteField("r7HiLp", None), - ByteField("r8LoHp", None), - - BitField("r8LoLp", None, 5), - BitField("r8HiHp", None, 3), - ByteField("r8HiLp", None), - ByteField("r9LoHp", None), - - BitField("r9LoLp", None, 5), - BitField("r9HiHp", None, 3), - ByteField("r9HiLp", None), - ByteField("r10LoHp", None), - - BitField("r10LoLp", None, 5), - BitField("r10HiHp", None, 3), - ByteField("r10HiLp", None), - ByteField("r11LoHp", None), - - BitField("r11LoLp", None, 5), - BitField("r11HiHp", None, 3), - ByteField("r11HiLp", None), - ByteField("r12LoHp", None), - - BitField("r12LoLp", None, 5), - BitField("r12HiHp", None, 3), - ByteField("r12HiLp", None), - ByteField("r13LoHp", None), - - BitField("r13LoLp", None, 5), - BitField("r13HiHp", None, 3), - ByteField("r13HiLp", None), - ByteField("r14LoHp", None), - - BitField("r14LoLp", None, 5), - BitField("r14HiHp", None, 3), - ByteField("r14HiLp", None), - ByteField("r15LoHp", None), - - BitField("r15LoLp", None, 5), - BitField("r15HiHp", None, 3), - ByteField("r15HiLp", None), - ByteField("r16LoHp", None), - - BitField("r16LoLp", None, 5), - BitField("r16HiHp", None, 3), - ByteField("r16HiLp", None), - ByteField("r17LoHp", None), - - BitField("r17LoLp", None, 5), - BitField("r17HiHp", None, 3), - ByteField("r17HiLp", None), - ByteField("r18LoHp", None), - - BitField("r18LoLp", None, 5), - BitField("r18HiHp", None, 3), - ByteField("r18HiLp", None), - ByteField("r19LoHp", None), - - BitField("r19LoLp", None, 5), - BitField("r19HiHp", None, 3), - ByteField("r19HiLp", None), - ByteField("r20LoHp", None), - - BitField("r20LoLp", None, 5), - BitField("r20HiHp", None, 3), - ByteField("r20HiLp", None), - ByteField("r21LoHp", None), - - BitField("r21LoLp", None, 5), - BitField("r21HiHp", None, 3), - ByteField("r21HiLp", None), - ByteField("r22LoHp", None), - - BitField("r22LoLp", None, 5), - BitField("r22HiHp", None, 3), - ByteField("r22HiLp", None), - ByteField("r23LoHp", None), - - BitField("r23LoLp", None, 5), - BitField("r23HiHp", None, 3), - ByteField("r23HiLp", None), - ByteField("r24LoHp", None), - - BitField("r24LoLp", None, 5), - BitField("r24HiHp", None, 3), - ByteField("r24HiLp", None), - ByteField("r25LoHp", None), - - BitField("r25LoLp", None, 5), - BitField("r25HiHp", None, 3), - ByteField("r25HiLp", None), - ByteField("r26LoHp", None), - - BitField("r26LoLp", None, 5), - BitField("r26HiHp", None, 3), - ByteField("r26HiLp", None), - ByteField("r27LoHp", None), - - BitField("r27LoLp", None, 5), - BitField("r27HiHp", None, 3), - ByteField("r27HiLp", None), - ByteField("r28LoHp", None), - - BitField("r28LoLp", None, 5), - BitField("r28HiHp", None, 3), - ByteField("r28HiLp", None), - ByteField("r29LoHp", None), - - BitField("r29LoLp", None, 5), - BitField("r29HiHp", None, 3), - ByteField("r29HiLp", None), - ByteField("r30LoHp", None), - - BitField("r30LoLp", None, 5), - BitField("r30HiHp", None, 3), - ByteField("r30HiLp", None), - ByteField("r31LoHp", None), - - BitField("r31LoLp", None, 5), - BitField("r31HiHp", None, 3), - ByteField("r31HiLp", None), - ByteField("r32LoHp", None), - - BitField("r32LoLp", None, 5), - BitField("r32HiHp", None, 3), - ByteField("r32HiLp", None), - ByteField("r33LoHp", None), - - BitField("r33LoLp", None, 5), - BitField("r33HiHp", None, 3), - ByteField("r33HiLp", None), - ByteField("r34LoHp", None), - - BitField("r34LoLp", None, 5), - BitField("r34HiHp", None, 3), - ByteField("r34HiLp", None), - ByteField("r35LoHp", None), - - BitField("r35LoLp", None, 5), - BitField("r35HiHp", None, 3), - ByteField("r35HiLp", None), - ByteField("r36LoHp", None), - - BitField("r36LoLp", None, 5), - BitField("r36HiHp", None, 3), - ByteField("r36HiLp", None), - ByteField("r37LoHp", None), - - BitField("r37LoLp", None, 5), - BitField("r37HiHp", None, 3), - ByteField("r37HiLp", None), - ByteField("r38LoHp", None), - - BitField("r38LoLp", None, 5), - BitField("r38HiHp", None, 3), - ByteField("r38HiLp", None), - ByteField("r39LoHp", None), - - BitField("r39LoLp", None, 5), - BitField("r39HiHp", None, 3), - ByteField("r39HiLp", None), - ByteField("r40LoHp", None), - - BitField("r40LoLp", None, 5), - BitField("r40HiHp", None, 3), - ByteField("r40HiLp", None), - ByteField("r41LoHp", None), - - BitField("r41LoLp", None, 5), - BitField("r41HiHp", None, 3), - ByteField("r41HiLp", None), - ByteField("r42LoHp", None), - - BitField("r42LoLp", None, 5), - BitField("r42HiHp", None, 3), - ByteField("r42HiLp", None), - ByteField("r43LoHp", None), - - BitField("r43LoLp", None, 5), - BitField("r43HiHp", None, 3), - ByteField("r43HiLp", None), - ByteField("r44LoHp", None), - - BitField("r44LoLp", None, 5), - BitField("r44HiHp", None, 3), - ByteField("r44HiLp", None), - ByteField("r45LoHp", None), - - BitField("r45LoLp", None, 5), - BitField("r45HiHp", None, 3), - ByteField("r45HiLp", None), - ByteField("r46LoHp", None), - - BitField("r46LoLp", None, 5), - BitField("r46HiHp", None, 3), - ByteField("r46HiLp", None), - ByteField("r47LoHp", None), - - BitField("r47LoLp", None, 5), - BitField("r47HiHp", None, 3), - ByteField("r47HiLp", None), - ByteField("r48LoHp", None), - - BitField("r48LoLp", None, 5), - BitField("r48HiHp", None, 3), - ByteField("r48HiLp", None), - ByteField("r49LoHp", None), - - BitField("r49LoLp", None, 5), - BitField("r49HiHp", None, 3), - ByteField("r49HiLp", None), - ByteField("r50LoHp", None), - - BitField("r50LoLp", None, 5), - BitField("r50HiHp", None, 3), - ByteField("r50HiLp", None), - ByteField("r51LoHp", None), - - BitField("r51LoLp", None, 5), - BitField("r51HiHp", None, 3), - ByteField("r51HiLp", None), - ByteField("r52LoHp", None), - - BitField("r52LoLp", None, 5), - BitField("r52HiHp", None, 3), - ByteField("r52HiLp", None), - ByteField("r53LoHp", None), - - BitField("r53LoLp", None, 5), - BitField("r53HiHp", None, 3), - ByteField("r53HiLp", None), - ByteField("r54LoHp", None), - - BitField("r54LoLp", None, 5), - BitField("r54HiHp", None, 3), - ByteField("r54HiLp", None), - ByteField("r55LoHp", None), - - BitField("r55LoLp", None, 5), - BitField("r55HiHp", None, 3), - ByteField("r55HiLp", None), - ByteField("r56LoHp", None), - - BitField("r56LoLp", None, 5), - BitField("r56HiHp", None, 3), - ByteField("r56HiLp", None), - ByteField("r57LoHp", None), - - BitField("r57LoLp", None, 5), - BitField("r57HiHp", None, 3), - ByteField("r57HiLp", None), - ByteField("r58LoHp", None), - - BitField("r58LoLp", None, 5), - BitField("r58HiHp", None, 3), - ByteField("r58HiLp", None), - ByteField("r59LoHp", None), - - BitField("r59LoLp", None, 5), - BitField("r59HiHp", None, 3), - ByteField("r59HiLp", None), - ByteField("r60LoHp", None), - - BitField("r60LoLp", None, 5), - BitField("r60HiHp", None, 3), - ByteField("r60HiLp", None), - ByteField("r61LoHp", None), - - BitField("r61LoLp", None, 5), - BitField("r61HiHp", None, 3), - ByteField("r61HiLp", None), - ByteField("r62LoHp", None), - - BitField("r62LoLp", None, 5), - BitField("r62HiHp", None, 3), - ByteField("r62HiLp", None), - ByteField("r63LoHp", None), - - BitField("r63LoLp", None, 5), - BitField("r63HiHp", None, 3), - ByteField("r63HiLp", None), - ByteField("r64LoHp", None), - - BitField("r64LoLp", None, 5), - BitField("r64HiHp", None, 3), - ByteField("r64HiLp", None), - ByteField("r65LoHp", None), - - BitField("r65LoLp", None, 5), - BitField("r65HiHp", None, 3), - ByteField("r65HiLp", None), - ByteField("r66LoHp", None), - - BitField("r66LoLp", None, 5), - BitField("r66HiHp", None, 3), - ByteField("r66HiLp", None), - ByteField("r67LoHp", None), - - BitField("r67LoLp", None, 5), - BitField("r67HiHp", None, 3), - ByteField("r67HiLp", None), - ByteField("r68LoHp", None), - - BitField("r68LoLp", None, 5), - BitField("r68HiHp", None, 3), - ByteField("r68HiLp", None), - ByteField("r69LoHp", None), - - BitField("r69LoLp", None, 5), - BitField("r69HiHp", None, 3), - ByteField("r69HiLp", None), - ByteField("r70LoHp", None), - - BitField("r70LoLp", None, 5), - BitField("r70HiHp", None, 3), - ByteField("r70HiLp", None), - ByteField("r71LoHp", None), - - BitField("r71LoLp", None, 5), - BitField("r71HiHp", None, 3), - ByteField("r71HiLp", None), - ByteField("r72LoHp", None), - - BitField("r72LoLp", None, 5), - BitField("r72HiHp", None, 3), - ByteField("r72HiLp", None), - ByteField("r73LoHp", None), - - BitField("r73LoLp", None, 5), - BitField("r73HiHp", None, 3), - ByteField("r73HiLp", None), - ByteField("r74LoHp", None), - - BitField("r74LoLp", None, 5), - BitField("r74HiHp", None, 3), - ByteField("r74HiLp", None), - ByteField("r75LoHp", None), - - BitField("r75LoLp", None, 5), - BitField("r75HiHp", None, 3), - ByteField("r75HiLp", None), - ByteField("r76LoHp", None), - - BitField("r76LoLp", None, 5), - BitField("r76HiHp", None, 3), - ByteField("r76HiLp", None), - ByteField("r77LoHp", None), - - BitField("r77LoLp", None, 5), - BitField("r77HiHp", None, 3), - ByteField("r77HiLp", None), - ByteField("r78LoHp", None), - - BitField("r78LoLp", None, 5), - BitField("r78HiHp", None, 3), - ByteField("r78HiLp", None), - ByteField("r79LoHp", None), - - BitField("r79LoLp", None, 5), - BitField("r79HiHp", None, 3), - ByteField("r79HiLp", None), - ByteField("r80LoHp", None), - - BitField("r80LoLp", None, 5), - BitField("r80HiHp", None, 3), - ByteField("r80HiLp", None), - ByteField("r81LoHp", None), - - BitField("r81LoLp", None, 5), - BitField("r81HiHp", None, 3), - ByteField("r81HiLp", None), - ByteField("r82LoHp", None), - - BitField("r82LoLp", None, 5), - BitField("r82HiHp", None, 3), - ByteField("r82HiLp", None), - ByteField("r83LoHp", None), - - BitField("r83LoLp", None, 5), - BitField("r83HiHp", None, 3), - ByteField("r83HiLp", None), - ByteField("r84LoHp", None), - - BitField("r84LoLp", None, 5), - BitField("r84HiHp", None, 3), - ByteField("r84HiLp", None) - ] + XByteField("lengthBR", None), + # error: byte format requires -128 <= number <= 127 + ByteField("nrOfRanges", 0x0), + # # rX = range X + # # L o = Lower H i = higher + # # H p = high Part Lp = low Part + ByteField("r1LoHp", 0x0), + + BitField("r1LoLp", 0x0, 3), + BitField("r1HiHp", 0x0, 5), + + BitField("r1HiLp", 0x0, 4), + BitField("r2LoHp", 0x0, 4), + # optional + BitField("r2LoLp", None, 5), + BitField("r2HiHp", None, 3), + + ByteField("r2HiLp", None), + ByteField("r3LoHp", None), + + BitField("r3LoLp", None, 5), + BitField("r3HiHp", None, 3), + + ByteField("r3HiLp", None), + ByteField("r4LoHp", None), + + BitField("r4LoLp", None, 5), + BitField("r4HiHp", None, 3), + ByteField("r4HiLp", None), + ByteField("r5LoHp", None), + + BitField("r5LoLp", None, 5), + BitField("r5HiHp", None, 3), + ByteField("r5HiLp", None), + ByteField("r6LoHp", None), + + BitField("r6LoLp", None, 5), + BitField("r6HiHp", None, 3), + ByteField("r6HiLp", None), + ByteField("r7LoHp", None), + + BitField("r7LoLp", None, 5), + BitField("r7HiHp", None, 3), + ByteField("r7HiLp", None), + ByteField("r8LoHp", None), + + BitField("r8LoLp", None, 5), + BitField("r8HiHp", None, 3), + ByteField("r8HiLp", None), + ByteField("r9LoHp", None), + + BitField("r9LoLp", None, 5), + BitField("r9HiHp", None, 3), + ByteField("r9HiLp", None), + ByteField("r10LoHp", None), + + BitField("r10LoLp", None, 5), + BitField("r10HiHp", None, 3), + ByteField("r10HiLp", None), + ByteField("r11LoHp", None), + + BitField("r11LoLp", None, 5), + BitField("r11HiHp", None, 3), + ByteField("r11HiLp", None), + ByteField("r12LoHp", None), + + BitField("r12LoLp", None, 5), + BitField("r12HiHp", None, 3), + ByteField("r12HiLp", None), + ByteField("r13LoHp", None), + + BitField("r13LoLp", None, 5), + BitField("r13HiHp", None, 3), + ByteField("r13HiLp", None), + ByteField("r14LoHp", None), + + BitField("r14LoLp", None, 5), + BitField("r14HiHp", None, 3), + ByteField("r14HiLp", None), + ByteField("r15LoHp", None), + + BitField("r15LoLp", None, 5), + BitField("r15HiHp", None, 3), + ByteField("r15HiLp", None), + ByteField("r16LoHp", None), + + BitField("r16LoLp", None, 5), + BitField("r16HiHp", None, 3), + ByteField("r16HiLp", None), + ByteField("r17LoHp", None), + + BitField("r17LoLp", None, 5), + BitField("r17HiHp", None, 3), + ByteField("r17HiLp", None), + ByteField("r18LoHp", None), + + BitField("r18LoLp", None, 5), + BitField("r18HiHp", None, 3), + ByteField("r18HiLp", None), + ByteField("r19LoHp", None), + + BitField("r19LoLp", None, 5), + BitField("r19HiHp", None, 3), + ByteField("r19HiLp", None), + ByteField("r20LoHp", None), + + BitField("r20LoLp", None, 5), + BitField("r20HiHp", None, 3), + ByteField("r20HiLp", None), + ByteField("r21LoHp", None), + + BitField("r21LoLp", None, 5), + BitField("r21HiHp", None, 3), + ByteField("r21HiLp", None), + ByteField("r22LoHp", None), + + BitField("r22LoLp", None, 5), + BitField("r22HiHp", None, 3), + ByteField("r22HiLp", None), + ByteField("r23LoHp", None), + + BitField("r23LoLp", None, 5), + BitField("r23HiHp", None, 3), + ByteField("r23HiLp", None), + ByteField("r24LoHp", None), + + BitField("r24LoLp", None, 5), + BitField("r24HiHp", None, 3), + ByteField("r24HiLp", None), + ByteField("r25LoHp", None), + + BitField("r25LoLp", None, 5), + BitField("r25HiHp", None, 3), + ByteField("r25HiLp", None), + ByteField("r26LoHp", None), + + BitField("r26LoLp", None, 5), + BitField("r26HiHp", None, 3), + ByteField("r26HiLp", None), + ByteField("r27LoHp", None), + + BitField("r27LoLp", None, 5), + BitField("r27HiHp", None, 3), + ByteField("r27HiLp", None), + ByteField("r28LoHp", None), + + BitField("r28LoLp", None, 5), + BitField("r28HiHp", None, 3), + ByteField("r28HiLp", None), + ByteField("r29LoHp", None), + + BitField("r29LoLp", None, 5), + BitField("r29HiHp", None, 3), + ByteField("r29HiLp", None), + ByteField("r30LoHp", None), + + BitField("r30LoLp", None, 5), + BitField("r30HiHp", None, 3), + ByteField("r30HiLp", None), + ByteField("r31LoHp", None), + + BitField("r31LoLp", None, 5), + BitField("r31HiHp", None, 3), + ByteField("r31HiLp", None), + ByteField("r32LoHp", None), + + BitField("r32LoLp", None, 5), + BitField("r32HiHp", None, 3), + ByteField("r32HiLp", None), + ByteField("r33LoHp", None), + + BitField("r33LoLp", None, 5), + BitField("r33HiHp", None, 3), + ByteField("r33HiLp", None), + ByteField("r34LoHp", None), + + BitField("r34LoLp", None, 5), + BitField("r34HiHp", None, 3), + ByteField("r34HiLp", None), + ByteField("r35LoHp", None), + + BitField("r35LoLp", None, 5), + BitField("r35HiHp", None, 3), + ByteField("r35HiLp", None), + ByteField("r36LoHp", None), + + BitField("r36LoLp", None, 5), + BitField("r36HiHp", None, 3), + ByteField("r36HiLp", None), + ByteField("r37LoHp", None), + + BitField("r37LoLp", None, 5), + BitField("r37HiHp", None, 3), + ByteField("r37HiLp", None), + ByteField("r38LoHp", None), + + BitField("r38LoLp", None, 5), + BitField("r38HiHp", None, 3), + ByteField("r38HiLp", None), + ByteField("r39LoHp", None), + + BitField("r39LoLp", None, 5), + BitField("r39HiHp", None, 3), + ByteField("r39HiLp", None), + ByteField("r40LoHp", None), + + BitField("r40LoLp", None, 5), + BitField("r40HiHp", None, 3), + ByteField("r40HiLp", None), + ByteField("r41LoHp", None), + + BitField("r41LoLp", None, 5), + BitField("r41HiHp", None, 3), + ByteField("r41HiLp", None), + ByteField("r42LoHp", None), + + BitField("r42LoLp", None, 5), + BitField("r42HiHp", None, 3), + ByteField("r42HiLp", None), + ByteField("r43LoHp", None), + + BitField("r43LoLp", None, 5), + BitField("r43HiHp", None, 3), + ByteField("r43HiLp", None), + ByteField("r44LoHp", None), + + BitField("r44LoLp", None, 5), + BitField("r44HiHp", None, 3), + ByteField("r44HiLp", None), + ByteField("r45LoHp", None), + + BitField("r45LoLp", None, 5), + BitField("r45HiHp", None, 3), + ByteField("r45HiLp", None), + ByteField("r46LoHp", None), + + BitField("r46LoLp", None, 5), + BitField("r46HiHp", None, 3), + ByteField("r46HiLp", None), + ByteField("r47LoHp", None), + + BitField("r47LoLp", None, 5), + BitField("r47HiHp", None, 3), + ByteField("r47HiLp", None), + ByteField("r48LoHp", None), + + BitField("r48LoLp", None, 5), + BitField("r48HiHp", None, 3), + ByteField("r48HiLp", None), + ByteField("r49LoHp", None), + + BitField("r49LoLp", None, 5), + BitField("r49HiHp", None, 3), + ByteField("r49HiLp", None), + ByteField("r50LoHp", None), + + BitField("r50LoLp", None, 5), + BitField("r50HiHp", None, 3), + ByteField("r50HiLp", None), + ByteField("r51LoHp", None), + + BitField("r51LoLp", None, 5), + BitField("r51HiHp", None, 3), + ByteField("r51HiLp", None), + ByteField("r52LoHp", None), + + BitField("r52LoLp", None, 5), + BitField("r52HiHp", None, 3), + ByteField("r52HiLp", None), + ByteField("r53LoHp", None), + + BitField("r53LoLp", None, 5), + BitField("r53HiHp", None, 3), + ByteField("r53HiLp", None), + ByteField("r54LoHp", None), + + BitField("r54LoLp", None, 5), + BitField("r54HiHp", None, 3), + ByteField("r54HiLp", None), + ByteField("r55LoHp", None), + + BitField("r55LoLp", None, 5), + BitField("r55HiHp", None, 3), + ByteField("r55HiLp", None), + ByteField("r56LoHp", None), + + BitField("r56LoLp", None, 5), + BitField("r56HiHp", None, 3), + ByteField("r56HiLp", None), + ByteField("r57LoHp", None), + + BitField("r57LoLp", None, 5), + BitField("r57HiHp", None, 3), + ByteField("r57HiLp", None), + ByteField("r58LoHp", None), + + BitField("r58LoLp", None, 5), + BitField("r58HiHp", None, 3), + ByteField("r58HiLp", None), + ByteField("r59LoHp", None), + + BitField("r59LoLp", None, 5), + BitField("r59HiHp", None, 3), + ByteField("r59HiLp", None), + ByteField("r60LoHp", None), + + BitField("r60LoLp", None, 5), + BitField("r60HiHp", None, 3), + ByteField("r60HiLp", None), + ByteField("r61LoHp", None), + + BitField("r61LoLp", None, 5), + BitField("r61HiHp", None, 3), + ByteField("r61HiLp", None), + ByteField("r62LoHp", None), + + BitField("r62LoLp", None, 5), + BitField("r62HiHp", None, 3), + ByteField("r62HiLp", None), + ByteField("r63LoHp", None), + + BitField("r63LoLp", None, 5), + BitField("r63HiHp", None, 3), + ByteField("r63HiLp", None), + ByteField("r64LoHp", None), + + BitField("r64LoLp", None, 5), + BitField("r64HiHp", None, 3), + ByteField("r64HiLp", None), + ByteField("r65LoHp", None), + + BitField("r65LoLp", None, 5), + BitField("r65HiHp", None, 3), + ByteField("r65HiLp", None), + ByteField("r66LoHp", None), + + BitField("r66LoLp", None, 5), + BitField("r66HiHp", None, 3), + ByteField("r66HiLp", None), + ByteField("r67LoHp", None), + + BitField("r67LoLp", None, 5), + BitField("r67HiHp", None, 3), + ByteField("r67HiLp", None), + ByteField("r68LoHp", None), + + BitField("r68LoLp", None, 5), + BitField("r68HiHp", None, 3), + ByteField("r68HiLp", None), + ByteField("r69LoHp", None), + + BitField("r69LoLp", None, 5), + BitField("r69HiHp", None, 3), + ByteField("r69HiLp", None), + ByteField("r70LoHp", None), + + BitField("r70LoLp", None, 5), + BitField("r70HiHp", None, 3), + ByteField("r70HiLp", None), + ByteField("r71LoHp", None), + + BitField("r71LoLp", None, 5), + BitField("r71HiHp", None, 3), + ByteField("r71HiLp", None), + ByteField("r72LoHp", None), + + BitField("r72LoLp", None, 5), + BitField("r72HiHp", None, 3), + ByteField("r72HiLp", None), + ByteField("r73LoHp", None), + + BitField("r73LoLp", None, 5), + BitField("r73HiHp", None, 3), + ByteField("r73HiLp", None), + ByteField("r74LoHp", None), + + BitField("r74LoLp", None, 5), + BitField("r74HiHp", None, 3), + ByteField("r74HiLp", None), + ByteField("r75LoHp", None), + + BitField("r75LoLp", None, 5), + BitField("r75HiHp", None, 3), + ByteField("r75HiLp", None), + ByteField("r76LoHp", None), + + BitField("r76LoLp", None, 5), + BitField("r76HiHp", None, 3), + ByteField("r76HiLp", None), + ByteField("r77LoHp", None), + + BitField("r77LoLp", None, 5), + BitField("r77HiHp", None, 3), + ByteField("r77HiLp", None), + ByteField("r78LoHp", None), + + BitField("r78LoLp", None, 5), + BitField("r78HiHp", None, 3), + ByteField("r78HiLp", None), + ByteField("r79LoHp", None), + + BitField("r79LoLp", None, 5), + BitField("r79HiHp", None, 3), + ByteField("r79HiLp", None), + ByteField("r80LoHp", None), + + BitField("r80LoLp", None, 5), + BitField("r80HiHp", None, 3), + ByteField("r80HiLp", None), + ByteField("r81LoHp", None), + + BitField("r81LoLp", None, 5), + BitField("r81HiHp", None, 3), + ByteField("r81HiLp", None), + ByteField("r82LoHp", None), + + BitField("r82LoLp", None, 5), + BitField("r82HiHp", None, 3), + ByteField("r82HiLp", None), + ByteField("r83LoHp", None), + + BitField("r83LoLp", None, 5), + BitField("r83HiHp", None, 3), + ByteField("r83HiLp", None), + ByteField("r84LoHp", None), + + BitField("r84LoLp", None, 5), + BitField("r84HiHp", None, 3), + ByteField("r84HiLp", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -9356,15 +9357,15 @@ class BaListPref(Packet): """ BA List Pref Section 10.5.2.1c """ name = "BA List Pref" fields_desc = [ - XByteField("lengthBLP", None), + XByteField("lengthBLP", None), - BitField("fixBit", 0x0, 1), - BitField("rangeLower", 0x0, 10), - BitField("fixBit2", 0x0, 1), - BitField("rangeUpper", 0x0, 10), - BitField("baFreq", 0x0, 10), - BitField("sparePad", 0x0, 8) - ] + BitField("fixBit", 0x0, 1), + BitField("rangeLower", 0x0, 10), + BitField("fixBit2", 0x0, 1), + BitField("rangeUpper", 0x0, 10), + BitField("baFreq", 0x0, 10), + BitField("sparePad", 0x0, 8) + ] # len 17 || Have a look at the specs for the field format @@ -9378,84 +9379,84 @@ class CellChannelDescription(Packet): """ Cell Channel Description Section 10.5.2.1b """ name = "Cell Channel Description " fields_desc = [ - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - ByteField("bit120", 0x0), - ByteField("bit112", 0x0), - ByteField("bit104", 0x0), - ByteField("bit96", 0x0), - ByteField("bit88", 0x0), - ByteField("bit80", 0x0), - ByteField("bit72", 0x0), - ByteField("bit64", 0x0), - ByteField("bit56", 0x0), - ByteField("bit48", 0x0), - ByteField("bit40", 0x0), - ByteField("bit32", 0x0), - ByteField("bit24", 0x0), - ByteField("bit16", 0x0), - ByteField("bit8", 0x0) - ] + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + ByteField("bit120", 0x0), + ByteField("bit112", 0x0), + ByteField("bit104", 0x0), + ByteField("bit96", 0x0), + ByteField("bit88", 0x0), + ByteField("bit80", 0x0), + ByteField("bit72", 0x0), + ByteField("bit64", 0x0), + ByteField("bit56", 0x0), + ByteField("bit48", 0x0), + ByteField("bit40", 0x0), + ByteField("bit32", 0x0), + ByteField("bit24", 0x0), + ByteField("bit16", 0x0), + ByteField("bit8", 0x0) + ] class CellDescription(Packet): """ Cell Description Section 10.5.2.2 """ name = "Cell Description" fields_desc = [ - BitField("bcchHigh", 0x0, 2), - BitField("ncc", 0x0, 3), - BitField("bcc", 0x0, 3), - ByteField("bcchLow", 0x0) - ] + BitField("bcchHigh", 0x0, 2), + BitField("ncc", 0x0, 3), + BitField("bcc", 0x0, 3), + ByteField("bcchLow", 0x0) + ] class CellOptionsBCCH(Packet): """ Cell Options (BCCH) Section 10.5.2.3 """ name = "Cell Options (BCCH)" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("pwrc", 0x0, 1), - BitField("dtx", 0x0, 2), - BitField("rLinkTout", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("pwrc", 0x0, 1), + BitField("dtx", 0x0, 2), + BitField("rLinkTout", 0x0, 4) + ] class CellOptionsSACCH(Packet): """ Cell Options (SACCH) Section 10.5.2.3a """ name = "Cell Options (SACCH)" fields_desc = [ - BitField("dtx", 0x0, 1), - BitField("pwrc", 0x0, 1), - BitField("dtx", 0x0, 1), - BitField("rLinkTout", 0x0, 4) - ] + BitField("dtx", 0x0, 1), + BitField("pwrc", 0x0, 1), + BitField("dtx", 0x0, 1), + BitField("rLinkTout", 0x0, 4) + ] class CellSelectionParameters(Packet): """ Cell Selection Parameters Section 10.5.2.4 """ name = "Cell Selection Parameters" fields_desc = [ - BitField("cellReselect", 0x0, 3), - BitField("msTxPwrMax", 0x0, 5), - BitField("acs", None, 1), - BitField("neci", None, 1), - BitField("rxlenAccMin", None, 6) - ] + BitField("cellReselect", 0x0, 3), + BitField("msTxPwrMax", 0x0, 5), + BitField("acs", None, 1), + BitField("neci", None, 1), + BitField("rxlenAccMin", None, 6) + ] class MacModeAndChannelCodingRequest(Packet): """ MAC Mode and Channel Coding Requested Section 10.5.2.4a """ name = "MAC Mode and Channel Coding Requested" fields_desc = [ - BitField("macMode", 0x0, 2), - BitField("cs", 0x0, 2) - ] + BitField("macMode", 0x0, 2), + BitField("cs", 0x0, 2) + ] class ChannelDescription(Packet): @@ -9463,103 +9464,103 @@ class ChannelDescription(Packet): name = "Channel Description" fields_desc = [ - BitField("channelTyp", 0x0, 5), - BitField("tn", 0x0, 3), + BitField("channelTyp", 0x0, 5), + BitField("tn", 0x0, 3), - BitField("tsc", 0x0, 3), - BitField("h", 0x1, 1), - BitField("maioHi", 0x0, 4), + BitField("tsc", 0x0, 3), + BitField("h", 0x1, 1), + BitField("maioHi", 0x0, 4), - BitField("maioLo", 0x0, 2), - BitField("hsn", 0x0, 6) - ] + BitField("maioLo", 0x0, 2), + BitField("hsn", 0x0, 6) + ] class ChannelDescription2(Packet): """ Channel Description 2 Section 10.5.2.5a """ name = "Channel Description 2" fields_desc = [ - BitField("channelTyp", 0x0, 5), - BitField("tn", 0x0, 3), - BitField("tsc", 0x0, 3), - BitField("h", 0x0, 1), - # if h=1 - # BitField("maioHi", 0x0, 4), - # BitField("maioLo", 0x0, 2), - # BitField("hsn", 0x0, 6) - BitField("spare", 0x0, 2), - BitField("arfcnHigh", 0x0, 2), - ByteField("arfcnLow", 0x0) - ] + BitField("channelTyp", 0x0, 5), + BitField("tn", 0x0, 3), + BitField("tsc", 0x0, 3), + BitField("h", 0x0, 1), + # if h=1 + # BitField("maioHi", 0x0, 4), + # BitField("maioLo", 0x0, 2), + # BitField("hsn", 0x0, 6) + BitField("spare", 0x0, 2), + BitField("arfcnHigh", 0x0, 2), + ByteField("arfcnLow", 0x0) + ] class ChannelMode(Packet): """ Channel Mode Section 10.5.2.6 """ name = "Channel Mode" fields_desc = [ - ByteField("mode", 0x0) - ] + ByteField("mode", 0x0) + ] class ChannelMode2(Packet): """ Channel Mode 2 Section 10.5.2.7 """ name = "Channel Mode 2" fields_desc = [ - ByteField("mode", 0x0) - ] + ByteField("mode", 0x0) + ] class ChannelNeeded(Packet): """ Channel Needed Section 10.5.2.8 """ name = "Channel Needed" fields_desc = [ - BitField("channel2", 0x0, 2), - BitField("channel1", 0x0, 2), - ] + BitField("channel2", 0x0, 2), + BitField("channel1", 0x0, 2), + ] class ChannelRequestDescription(Packet): """Channel Request Description Section 10.5.2.8a """ name = "Channel Request Description" fields_desc = [ - BitField("mt", 0x0, 1), - ConditionalField(BitField("spare", 0x0, 39), - lambda pkt: pkt.mt == 0), - ConditionalField(BitField("spare", 0x0, 3), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("priority", 0x0, 2), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("rlcMode", 0x0, 1), - lambda pkt: pkt.mt == 1), - ConditionalField(BitField("llcFrame", 0x1, 1), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("reqBandMsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("reqBandLsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("rlcMsb", 0x0), - lambda pkt: pkt.mt == 1), - ConditionalField(ByteField("rlcLsb", 0x0), - lambda pkt: pkt.mt == 1) - ] + BitField("mt", 0x0, 1), + ConditionalField(BitField("spare", 0x0, 39), + lambda pkt: pkt.mt == 0), + ConditionalField(BitField("spare", 0x0, 3), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("priority", 0x0, 2), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("rlcMode", 0x0, 1), + lambda pkt: pkt.mt == 1), + ConditionalField(BitField("llcFrame", 0x1, 1), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("reqBandMsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("reqBandLsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("rlcMsb", 0x0), + lambda pkt: pkt.mt == 1), + ConditionalField(ByteField("rlcLsb", 0x0), + lambda pkt: pkt.mt == 1) + ] class CipherModeSetting(Packet): """Cipher Mode Setting Section 10.5.2.9 """ name = "Cipher Mode Setting" fields_desc = [ - BitField("algoId", 0x0, 3), - BitField("sc", 0x0, 1), - ] + BitField("algoId", 0x0, 3), + BitField("sc", 0x0, 1), + ] class CipherResponse(Packet): """Cipher Response Section 10.5.2.10 """ name = "Cipher Response" fields_desc = [ - BitField("spare", 0x0, 3), - BitField("cr", 0x0, 1), - ] + BitField("spare", 0x0, 3), + BitField("cr", 0x0, 1), + ] class ControlChannelDescription(Packet): @@ -9567,45 +9568,45 @@ class ControlChannelDescription(Packet): name = "Control Channel Description" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("att", 0x0, 1), - BitField("bsAgBlksRes", 0x0, 3), - BitField("ccchConf", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("att", 0x0, 1), + BitField("bsAgBlksRes", 0x0, 3), + BitField("ccchConf", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("spare3", 0x0, 1), - BitField("spare4", 0x0, 1), - BitField("bsPaMfrms", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("spare3", 0x0, 1), + BitField("spare4", 0x0, 1), + BitField("bsPaMfrms", 0x0, 3), - ByteField("t3212", 0x0) - ] + ByteField("t3212", 0x0) + ] class FrequencyChannelSequence(Packet): """Frequency Channel Sequence Section 10.5.2.12""" name = "Frequency Channel Sequence" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("lowestArfcn", 0x0, 7), - BitField("skipArfcn01", 0x0, 4), - BitField("skipArfcn02", 0x0, 4), - BitField("skipArfcn03", 0x0, 4), - BitField("skipArfcn04", 0x0, 4), - BitField("skipArfcn05", 0x0, 4), - BitField("skipArfcn06", 0x0, 4), - BitField("skipArfcn07", 0x0, 4), - BitField("skipArfcn08", 0x0, 4), - BitField("skipArfcn09", 0x0, 4), - BitField("skipArfcn10", 0x0, 4), - BitField("skipArfcn11", 0x0, 4), - BitField("skipArfcn12", 0x0, 4), - BitField("skipArfcn13", 0x0, 4), - BitField("skipArfcn14", 0x0, 4), - BitField("skipArfcn15", 0x0, 4), - BitField("skipArfcn16", 0x0, 4) - ] + BitField("spare", 0x0, 1), + BitField("lowestArfcn", 0x0, 7), + BitField("skipArfcn01", 0x0, 4), + BitField("skipArfcn02", 0x0, 4), + BitField("skipArfcn03", 0x0, 4), + BitField("skipArfcn04", 0x0, 4), + BitField("skipArfcn05", 0x0, 4), + BitField("skipArfcn06", 0x0, 4), + BitField("skipArfcn07", 0x0, 4), + BitField("skipArfcn08", 0x0, 4), + BitField("skipArfcn09", 0x0, 4), + BitField("skipArfcn10", 0x0, 4), + BitField("skipArfcn11", 0x0, 4), + BitField("skipArfcn12", 0x0, 4), + BitField("skipArfcn13", 0x0, 4), + BitField("skipArfcn14", 0x0, 4), + BitField("skipArfcn15", 0x0, 4), + BitField("skipArfcn16", 0x0, 4) + ] class FrequencyList(Packet): @@ -9617,31 +9618,31 @@ class FrequencyList(Packet): # Some formats are frequency bit maps, the others use a special encoding # scheme. fields_desc = [ - XByteField("lengthFL", None), - - BitField("formatID", 0x0, 2), - BitField("spare", 0x0, 2), - BitField("arfcn124", 0x0, 1), - BitField("arfcn123", 0x0, 1), - BitField("arfcn122", 0x0, 1), - BitField("arfcn121", 0x0, 1), - - ByteField("arfcn120", 0x0), - ByteField("arfcn112", 0x0), - ByteField("arfcn104", 0x0), - ByteField("arfcn96", 0x0), - ByteField("arfcn88", 0x0), - ByteField("arfcn80", 0x0), - ByteField("arfcn72", 0x0), - ByteField("arfcn64", 0x0), - ByteField("arfcn56", 0x0), - ByteField("arfcn48", 0x0), - ByteField("arfcn40", 0x0), - ByteField("arfcn32", 0x0), - ByteField("arfcn24", 0x0), - ByteField("arfcn16", 0x0), - ByteField("arfcn8", 0x0) - ] + XByteField("lengthFL", None), + + BitField("formatID", 0x0, 2), + BitField("spare", 0x0, 2), + BitField("arfcn124", 0x0, 1), + BitField("arfcn123", 0x0, 1), + BitField("arfcn122", 0x0, 1), + BitField("arfcn121", 0x0, 1), + + ByteField("arfcn120", 0x0), + ByteField("arfcn112", 0x0), + ByteField("arfcn104", 0x0), + ByteField("arfcn96", 0x0), + ByteField("arfcn88", 0x0), + ByteField("arfcn80", 0x0), + ByteField("arfcn72", 0x0), + ByteField("arfcn64", 0x0), + ByteField("arfcn56", 0x0), + ByteField("arfcn48", 0x0), + ByteField("arfcn40", 0x0), + ByteField("arfcn32", 0x0), + ByteField("arfcn24", 0x0), + ByteField("arfcn16", 0x0), + ByteField("arfcn8", 0x0) + ] # len 4 to 13 @@ -9649,38 +9650,38 @@ class GroupChannelDescription(Packet): """Group Channel Description Section 10.5.2.14b""" name = "Group Channel Description" fields_desc = [ - XByteField("lengthGCD", None), - - BitField("channelType", 0x0, 5), - BitField("tn", 0x0, 3), - - BitField("tsc", 0x0, 3), - BitField("h", 0x0, 1), - # if h == 0 the packet looks the following way: - ConditionalField(BitField("spare", 0x0, 2), - lambda pkt: pkt. h == 0x0), - ConditionalField(BitField("arfcnHi", 0x0, 2), - lambda pkt: pkt. h == 0x0), - ConditionalField(ByteField("arfcnLo", None), - lambda pkt: pkt. h == 0x0), - # if h == 1 the packet looks the following way: - ConditionalField(BitField("maioHi", 0x0, 4), - lambda pkt: pkt. h == 0x1), - ConditionalField(BitField("maioLo", None, 2), - lambda pkt: pkt. h == 0x1), - ConditionalField(BitField("hsn", None, 6), - lambda pkt: pkt. h == 0x1), - # finished with conditional fields - ByteField("maC6", None), - ByteField("maC7", None), - ByteField("maC8", None), - ByteField("maC9", None), - ByteField("maC10", None), - ByteField("maC11", None), - ByteField("maC12", None), - ByteField("maC13", None), - ByteField("maC14", None) - ] + XByteField("lengthGCD", None), + + BitField("channelType", 0x0, 5), + BitField("tn", 0x0, 3), + + BitField("tsc", 0x0, 3), + BitField("h", 0x0, 1), + # if h == 0 the packet looks the following way: + ConditionalField(BitField("spare", 0x0, 2), + lambda pkt: pkt. h == 0x0), + ConditionalField(BitField("arfcnHi", 0x0, 2), + lambda pkt: pkt. h == 0x0), + ConditionalField(ByteField("arfcnLo", None), + lambda pkt: pkt. h == 0x0), + # if h == 1 the packet looks the following way: + ConditionalField(BitField("maioHi", 0x0, 4), + lambda pkt: pkt. h == 0x1), + ConditionalField(BitField("maioLo", None, 2), + lambda pkt: pkt. h == 0x1), + ConditionalField(BitField("hsn", None, 6), + lambda pkt: pkt. h == 0x1), + # finished with conditional fields + ByteField("maC6", None), + ByteField("maC7", None), + ByteField("maC8", None), + ByteField("maC9", None), + ByteField("maC10", None), + ByteField("maC11", None), + ByteField("maC12", None), + ByteField("maC13", None), + ByteField("maC14", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -9696,48 +9697,48 @@ class GprsResumption(Packet): """GPRS Resumption Section 10.5.2.14c""" name = "GPRS Resumption" fields_desc = [ - BitField("spare", 0x0, 3), - BitField("ack", 0x0, 1) - ] + BitField("spare", 0x0, 3), + BitField("ack", 0x0, 1) + ] class HandoverReference(Packet): """Handover Reference Section 10.5.2.15""" name = "Handover Reference" fields_desc = [ - ByteField("handoverRef", 0x0) - ] + ByteField("handoverRef", 0x0) + ] class IraRestOctets(Packet): """IAR Rest Octets Section 10.5.2.17""" name = "IAR Rest Octets" fields_desc = [ - BitField("spare01", 0x0, 1), - BitField("spare02", 0x0, 1), - BitField("spare03", 0x1, 1), - BitField("spare04", 0x0, 1), - BitField("spare05", 0x1, 1), - BitField("spare06", 0x0, 1), - BitField("spare07", 0x1, 1), - BitField("spare08", 0x1, 1), - BitField("spare09", 0x0, 1), - BitField("spare10", 0x0, 1), - BitField("spare11", 0x1, 1), - BitField("spare12", 0x0, 1), - BitField("spare13", 0x1, 1), - BitField("spare14", 0x0, 1), - BitField("spare15", 0x1, 1), - BitField("spare16", 0x1, 1), - BitField("spare17", 0x0, 1), - BitField("spare18", 0x0, 1), - BitField("spare19", 0x1, 1), - BitField("spare20", 0x0, 1), - BitField("spare21", 0x1, 1), - BitField("spare22", 0x0, 1), - BitField("spare23", 0x1, 1), - BitField("spare24", 0x1, 1) - ] + BitField("spare01", 0x0, 1), + BitField("spare02", 0x0, 1), + BitField("spare03", 0x1, 1), + BitField("spare04", 0x0, 1), + BitField("spare05", 0x1, 1), + BitField("spare06", 0x0, 1), + BitField("spare07", 0x1, 1), + BitField("spare08", 0x1, 1), + BitField("spare09", 0x0, 1), + BitField("spare10", 0x0, 1), + BitField("spare11", 0x1, 1), + BitField("spare12", 0x0, 1), + BitField("spare13", 0x1, 1), + BitField("spare14", 0x0, 1), + BitField("spare15", 0x1, 1), + BitField("spare16", 0x1, 1), + BitField("spare17", 0x0, 1), + BitField("spare18", 0x0, 1), + BitField("spare19", 0x1, 1), + BitField("spare20", 0x0, 1), + BitField("spare21", 0x1, 1), + BitField("spare22", 0x0, 1), + BitField("spare23", 0x1, 1), + BitField("spare24", 0x1, 1) + ] # len is 1 to 5 what do we do with the variable size? no lenght @@ -9746,101 +9747,101 @@ class IaxRestOctets(Packet): """IAX Rest Octets Section 10.5.2.18""" name = "IAX Rest Octets" fields_desc = [ - BitField("spare01", 0x0, 1), - BitField("spare02", 0x0, 1), - BitField("spare03", 0x1, 1), - BitField("spare04", 0x0, 1), - BitField("spare05", 0x1, 1), - BitField("spare06", 0x0, 1), - BitField("spare07", 0x1, 1), - BitField("spare08", 0x1, 1), - ByteField("spareB1", None), - ByteField("spareB2", None), - ByteField("spareB3", None) - ] + BitField("spare01", 0x0, 1), + BitField("spare02", 0x0, 1), + BitField("spare03", 0x1, 1), + BitField("spare04", 0x0, 1), + BitField("spare05", 0x1, 1), + BitField("spare06", 0x0, 1), + BitField("spare07", 0x1, 1), + BitField("spare08", 0x1, 1), + ByteField("spareB1", None), + ByteField("spareB2", None), + ByteField("spareB3", None) + ] class L2PseudoLength(Packet): """L2 Pseudo Length Section 10.5.2.19""" name = "L2 Pseudo Length" fields_desc = [ - BitField("l2pLength", None, 6), - BitField("bit2", 0x0, 1), - BitField("bit1", 0x1, 1) - ] + BitField("l2pLength", None, 6), + BitField("bit2", 0x0, 1), + BitField("bit1", 0x1, 1) + ] class MeasurementResults(Packet): """Measurement Results Section 10.5.2.20""" name = "Measurement Results" fields_desc = [ - BitField("baUsed", 0x0, 1), - BitField("dtxUsed", 0x0, 1), - BitField("rxLevFull", 0x0, 6), + BitField("baUsed", 0x0, 1), + BitField("dtxUsed", 0x0, 1), + BitField("rxLevFull", 0x0, 6), - BitField("spare", 0x0, 1), - BitField("measValid", 0x0, 1), - BitField("rxLevSub", 0x0, 6), + BitField("spare", 0x0, 1), + BitField("measValid", 0x0, 1), + BitField("rxLevSub", 0x0, 6), - BitField("spare0", 0x0, 1), - BitField("rxqualFull", 0x0, 3), - BitField("rxqualSub", 0x0, 3), - BitField("noNcellHi", 0x0, 1), + BitField("spare0", 0x0, 1), + BitField("rxqualFull", 0x0, 3), + BitField("rxqualSub", 0x0, 3), + BitField("noNcellHi", 0x0, 1), - BitField("noNcellLo", 0x0, 2), - BitField("rxlevC1", 0x0, 6), + BitField("noNcellLo", 0x0, 2), + BitField("rxlevC1", 0x0, 6), - BitField("bcchC1", 0x0, 5), - BitField("bsicC1Hi", 0x0, 3), + BitField("bcchC1", 0x0, 5), + BitField("bsicC1Hi", 0x0, 3), - BitField("bsicC1Lo", 0x0, 3), - BitField("rxlevC2", 0x0, 5), + BitField("bsicC1Lo", 0x0, 3), + BitField("rxlevC2", 0x0, 5), - BitField("rxlevC2Lo", 0x0, 1), - BitField("bcchC2", 0x0, 5), - BitField("bsicC2Hi", 0x0, 2), + BitField("rxlevC2Lo", 0x0, 1), + BitField("bcchC2", 0x0, 5), + BitField("bsicC2Hi", 0x0, 2), - BitField("bscicC2Lo", 0x0, 4), - BitField("bscicC2Hi", 0x0, 4), + BitField("bscicC2Lo", 0x0, 4), + BitField("bscicC2Hi", 0x0, 4), - BitField("rxlevC3Lo", 0x0, 2), - BitField("bcchC3", 0x0, 5), - BitField("rxlevC3Hi", 0x0, 1), + BitField("rxlevC3Lo", 0x0, 2), + BitField("bcchC3", 0x0, 5), + BitField("rxlevC3Hi", 0x0, 1), - BitField("bsicC3Lo", 0x0, 5), - BitField("bsicC3Hi", 0x0, 3), + BitField("bsicC3Lo", 0x0, 5), + BitField("bsicC3Hi", 0x0, 3), - BitField("rxlevC4Lo", 0x0, 3), - BitField("bcchC4", 0x0, 5), + BitField("rxlevC4Lo", 0x0, 3), + BitField("bcchC4", 0x0, 5), - BitField("bsicC4", 0x0, 6), - BitField("rxlevC5Hi", 0x0, 2), + BitField("bsicC4", 0x0, 6), + BitField("rxlevC5Hi", 0x0, 2), - BitField("rxlevC5Lo", 0x0, 4), - BitField("bcchC5Hi", 0x0, 4), + BitField("rxlevC5Lo", 0x0, 4), + BitField("bcchC5Hi", 0x0, 4), - BitField("bcchC5Lo", 0x0, 1), - BitField("bsicC5", 0x0, 6), - BitField("rxlevC6", 0x0, 1), + BitField("bcchC5Lo", 0x0, 1), + BitField("bsicC5", 0x0, 6), + BitField("rxlevC6", 0x0, 1), - BitField("rxlevC6Lo", 0x0, 5), - BitField("bcchC6Hi", 0x0, 3), + BitField("rxlevC6Lo", 0x0, 5), + BitField("bcchC6Hi", 0x0, 3), - BitField("bcchC6Lo", 0x0, 3), - BitField("bsicC6", 0x0, 5) - ] + BitField("bcchC6Lo", 0x0, 3), + BitField("bsicC6", 0x0, 5) + ] class GprsMeasurementResults(Packet): """GPRS Measurement Results Section 10.5.2.20a""" name = "GPRS Measurement Results" fields_desc = [ - BitField("cValue", 0x0, 6), - BitField("rxqualHi", 0x0, 2), - BitField("rxqL", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("signVar", 0x0, 6) - ] + BitField("cValue", 0x0, 6), + BitField("rxqualHi", 0x0, 2), + BitField("rxqL", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("signVar", 0x0, 6) + ] # len 3 to 10 @@ -9848,16 +9849,16 @@ class MobileAllocation(Packet): """Mobile Allocation Section 10.5.2.21""" name = "Mobile Allocation" fields_desc = [ - XByteField("lengthMA", None), - ByteField("maC64", 0x12), - ByteField("maC56", None), # optional fields start here - ByteField("maC48", None), - ByteField("maC40", None), - ByteField("maC32", None), - ByteField("maC24", None), - ByteField("maC16", None), - ByteField("maC8", None) - ] + XByteField("lengthMA", None), + ByteField("maC64", 0x12), + ByteField("maC56", None), # optional fields start here + ByteField("maC48", None), + ByteField("maC40", None), + ByteField("maC32", None), + ByteField("maC24", None), + ByteField("maC16", None), + ByteField("maC8", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -9873,14 +9874,14 @@ class MobileTimeDifference(Packet): """Mobile Time Difference Section 10.5.2.21a""" name = "Mobile Time Difference" fields_desc = [ - XByteField("lengthMTD", 0x5), - ByteField("valueHi", 0x0), - ByteField("valueCnt", 0x0), - BitField("valueLow", 0x0, 5), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1) - ] + XByteField("lengthMTD", 0x5), + ByteField("valueHi", 0x0), + ByteField("valueCnt", 0x0), + BitField("valueLow", 0x0, 5), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1) + ] # min 4 octets max 8 @@ -9892,29 +9893,29 @@ class MultiRateConfiguration(Packet): # packet, for example having only 6 bytes, the last 4 bytes are named # "Spare" in the specs. Here they are named "threshold2" fields_desc = [ - XByteField("lengthMRC", None), + XByteField("lengthMRC", None), - BitField("mrVersion", 0x0, 3), - BitField("spare", 0x0, 1), - BitField("icmi", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("startMode", 0x0, 2), + BitField("mrVersion", 0x0, 3), + BitField("spare", 0x0, 1), + BitField("icmi", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("startMode", 0x0, 2), - ByteField("amrCodec", None), + ByteField("amrCodec", None), - BitField("spare", None, 2), - BitField("threshold1", None, 6), + BitField("spare", None, 2), + BitField("threshold1", None, 6), - BitField("hysteresis1", None, 4), - BitField("threshold2", None, 4), + BitField("hysteresis1", None, 4), + BitField("threshold2", None, 4), - BitField("threshold2cnt", None, 2), - BitField("hysteresis2", None, 4), - BitField("threshold3", None, 2), + BitField("threshold2cnt", None, 2), + BitField("hysteresis2", None, 4), + BitField("threshold3", None, 2), - BitField("threshold3cnt", None, 4), - BitField("hysteresis3", None, 4) - ] + BitField("threshold3cnt", None, 4), + BitField("hysteresis3", None, 4) + ] def post_build(self, p, pay): # we set the length @@ -9932,22 +9933,22 @@ class MultislotAllocation(Packet): """Multislot Allocation Section 10.5.2.21b""" name = "Multislot Allocation" fields_desc = [ - XByteField("lengthMSA", None), - BitField("ext0", 0x1, 1), - BitField("da", 0x0, 7), - ConditionalField(BitField("ext1", 0x1, 1), # optional - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("ua", 0x0, 7), - lambda pkt: pkt.ext0 == 0), - ByteField("chan1", None), - ByteField("chan2", None), - ByteField("chan3", None), - ByteField("chan4", None), - ByteField("chan5", None), - ByteField("chan6", None), - ByteField("chan7", None), - ByteField("chan8", None) - ] + XByteField("lengthMSA", None), + BitField("ext0", 0x1, 1), + BitField("da", 0x0, 7), + ConditionalField(BitField("ext1", 0x1, 1), # optional + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("ua", 0x0, 7), + lambda pkt: pkt.ext0 == 0), + ByteField("chan1", None), + ByteField("chan2", None), + ByteField("chan3", None), + ByteField("chan4", None), + ByteField("chan5", None), + ByteField("chan6", None), + ByteField("chan7", None), + ByteField("chan8", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -9955,7 +9956,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthMSA is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -9963,40 +9964,40 @@ class NcMode(Packet): """NC mode Section 10.5.2.21c""" name = "NC Mode" fields_desc = [ - BitField("spare", 0x0, 2), - BitField("ncMode", 0x0, 2) - ] + BitField("spare", 0x0, 2), + BitField("ncMode", 0x0, 2) + ] class NeighbourCellsDescription(Packet): """Neighbour Cells Description Section 10.5.2.22""" name = "Neighbour Cells Description" fields_desc = [ - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("extInd", 0x0, 1), - BitField("baInd", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - BitField("120bits", 0x0, 120) - ] + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("extInd", 0x0, 1), + BitField("baInd", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + BitField("120bits", 0x0, 120) + ] class NeighbourCellsDescription2(Packet): """Neighbour Cells Description 2 Section 10.5.2.22a""" name = "Neighbour Cells Description 2" fields_desc = [ - BitField("bit128", 0x0, 1), - BitField("multiband", 0x0, 2), - BitField("baInd", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), - BitField("120bits", 0x0, 120) - ] + BitField("bit128", 0x0, 1), + BitField("multiband", 0x0, 2), + BitField("baInd", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), + BitField("120bits", 0x0, 120) + ] # len 4 @@ -10013,184 +10014,184 @@ class DedicatedModeOrTBF(Packet): """Dedicated mode or TBF Section 10.5.2.25b""" name = "Dedicated Mode or TBF" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("tma", 0x0, 1), - BitField("downlink", 0x0, 1), - BitField("td", 0x0, 1) - ] + BitField("spare", 0x0, 1), + BitField("tma", 0x0, 1), + BitField("downlink", 0x0, 1), + BitField("td", 0x0, 1) + ] class PageMode(Packet): """Page Mode Section 10.5.2.26""" name = "Page Mode" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("pm", 0x0, 2) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("pm", 0x0, 2) + ] class NccPermitted(Packet): """NCC Permitted Section 10.5.2.27""" name = "NCC Permited" fields_desc = [ - ByteField("nccPerm", 0x0) - ] + ByteField("nccPerm", 0x0) + ] class PowerCommand(Packet): """Power Command Section 10.5.2.28""" name = "Power Command" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("spare2", 0x0, 1), - BitField("powerLvl", 0x0, 5) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("spare2", 0x0, 1), + BitField("powerLvl", 0x0, 5) + ] class PowerCommandAndAccessType(Packet): """Power Command and access type Section 10.5.2.28a""" name = "Power Command and Access Type" fields_desc = [ - BitField("atc", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("powerLvl", 0x0, 5) - ] + BitField("atc", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("powerLvl", 0x0, 5) + ] class RachControlParameters(Packet): """RACH Control Parameters Section 10.5.2.29""" name = "RACH Control Parameters" fields_desc = [ - BitField("maxRetrans", 0x0, 2), - BitField("txInteger", 0x0, 4), - BitField("cellBarrAccess", 0x0, 1), - BitField("re", 0x0, 1), - BitField("ACC15", 0x0, 1), - BitField("ACC14", 0x0, 1), - BitField("ACC13", 0x0, 1), - BitField("ACC12", 0x0, 1), - BitField("ACC11", 0x0, 1), - BitField("ACC10", 0x0, 1), - BitField("ACC09", 0x0, 1), - BitField("ACC08", 0x0, 1), - BitField("ACC07", 0x0, 1), - BitField("ACC06", 0x0, 1), - BitField("ACC05", 0x0, 1), - BitField("ACC04", 0x0, 1), - BitField("ACC03", 0x0, 1), - BitField("ACC02", 0x0, 1), - BitField("ACC01", 0x0, 1), - BitField("ACC00", 0x0, 1), - ] + BitField("maxRetrans", 0x0, 2), + BitField("txInteger", 0x0, 4), + BitField("cellBarrAccess", 0x0, 1), + BitField("re", 0x0, 1), + BitField("ACC15", 0x0, 1), + BitField("ACC14", 0x0, 1), + BitField("ACC13", 0x0, 1), + BitField("ACC12", 0x0, 1), + BitField("ACC11", 0x0, 1), + BitField("ACC10", 0x0, 1), + BitField("ACC09", 0x0, 1), + BitField("ACC08", 0x0, 1), + BitField("ACC07", 0x0, 1), + BitField("ACC06", 0x0, 1), + BitField("ACC05", 0x0, 1), + BitField("ACC04", 0x0, 1), + BitField("ACC03", 0x0, 1), + BitField("ACC02", 0x0, 1), + BitField("ACC01", 0x0, 1), + BitField("ACC00", 0x0, 1), + ] class RequestReference(Packet): """Request Reference Section 10.5.2.30""" name = "Request Reference" fields_desc = [ - ByteField("ra", 0x0), - BitField("t1", 0x0, 5), - BitField("t3Hi", 0x0, 3), - BitField("t3Lo", 0x0, 3), - BitField("t2", 0x0, 5) - ] + ByteField("ra", 0x0), + BitField("t1", 0x0, 5), + BitField("t3Hi", 0x0, 3), + BitField("t3Lo", 0x0, 3), + BitField("t2", 0x0, 5) + ] class RrCause(Packet): """RR Cause Section 10.5.2.31""" name = "RR Cause" fields_desc = [ - ByteField("rrCause", 0x0) - ] + ByteField("rrCause", 0x0) + ] class StartingTime(Packet): """Starting Time Section 10.5.2.38""" name = "Starting Time" fields_desc = [ - ByteField("ra", 0x0), - BitField("t1", 0x0, 5), - BitField("t3Hi", 0x0, 3), - BitField("t3Lo", 0x0, 3), - BitField("t2", 0x0, 5) - ] + ByteField("ra", 0x0), + BitField("t1", 0x0, 5), + BitField("t3Hi", 0x0, 3), + BitField("t3Lo", 0x0, 3), + BitField("t2", 0x0, 5) + ] class SynchronizationIndication(Packet): """Synchronization Indication Section 10.5.2.39""" name = "Synchronization Indication" fields_desc = [ - BitField("nci", 0x0, 1), - BitField("rot", 0x0, 1), - BitField("si", 0x0, 2) - ] + BitField("nci", 0x0, 1), + BitField("rot", 0x0, 1), + BitField("si", 0x0, 2) + ] class TimingAdvance(Packet): """Timing Advance Section 10.5.2.40""" name = "Timing Advance" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1), - BitField("timingVal", 0x0, 6) - ] + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1), + BitField("timingVal", 0x0, 6) + ] class TimeDifference(Packet): """ Time Difference Section 10.5.2.41""" name = "Time Difference" fields_desc = [ - XByteField("lengthTD", 0x3), - ByteField("timeValue", 0x0) - ] + XByteField("lengthTD", 0x3), + ByteField("timeValue", 0x0) + ] class Tlli(Packet): """ TLLI Section Section 10.5.2.41a""" name = "TLLI" fields_desc = [ - ByteField("value", 0x0), - ByteField("value1", 0x0), - ByteField("value2", 0x0), - ByteField("value3", 0x0) - ] + ByteField("value", 0x0), + ByteField("value1", 0x0), + ByteField("value2", 0x0), + ByteField("value3", 0x0) + ] class TmsiPTmsi(Packet): """ TMSI/P-TMSI Section 10.5.2.42""" name = "TMSI/P-TMSI" fields_desc = [ - ByteField("value", 0x0), - ByteField("value1", 0x0), - ByteField("value2", 0x0), - ByteField("value3", 0x0) - ] + ByteField("value", 0x0), + ByteField("value1", 0x0), + ByteField("value2", 0x0), + ByteField("value3", 0x0) + ] class VgcsTargetModeIdentication(Packet): """ VGCS target Mode Indication 10.5.2.42a""" name = "VGCS Target Mode Indication" fields_desc = [ - XByteField("lengthVTMI", 0x2), - BitField("targerMode", 0x0, 2), - BitField("cipherKeyNb", 0x0, 4), - BitField("spare", 0x0, 1), - BitField("spare1", 0x0, 1) - ] + XByteField("lengthVTMI", 0x2), + BitField("targerMode", 0x0, 2), + BitField("cipherKeyNb", 0x0, 4), + BitField("spare", 0x0, 1), + BitField("spare1", 0x0, 1) + ] class WaitIndication(Packet): """ Wait Indication Section 10.5.2.43""" name = "Wait Indication" fields_desc = [ # asciiart of specs strange - ByteField("timeoutVal", 0x0) - ] + ByteField("timeoutVal", 0x0) + ] -#class Si10RestOctets(Packet): +# class Si10RestOctets(Packet): # """SI10 rest octets 10.5.2.44""" # name = "SI10 rest octets" # fields_desc = [ @@ -10202,56 +10203,56 @@ class ExtendedMeasurementResults(Packet): name = "Extended Measurement Results" fields_desc = [ - BitField("scUsed", None, 1), - BitField("dtxUsed", None, 1), - BitField("rxLevC0", None, 6), + BitField("scUsed", None, 1), + BitField("dtxUsed", None, 1), + BitField("rxLevC0", None, 6), - BitField("rxLevC1", None, 6), - BitField("rxLevC2Hi", None, 2), + BitField("rxLevC1", None, 6), + BitField("rxLevC2Hi", None, 2), - BitField("rxLevC2Lo", None, 4), - BitField("rxLevC3Hi", None, 4), + BitField("rxLevC2Lo", None, 4), + BitField("rxLevC3Hi", None, 4), - BitField("rxLevC3Lo", None, 3), - BitField("rxLevC4", None, 5), + BitField("rxLevC3Lo", None, 3), + BitField("rxLevC4", None, 5), - BitField("rxLevC5", None, 6), - BitField("rxLevC6Hi", None, 2), + BitField("rxLevC5", None, 6), + BitField("rxLevC6Hi", None, 2), - BitField("rxLevC6Lo", None, 4), - BitField("rxLevC7Hi", None, 4), + BitField("rxLevC6Lo", None, 4), + BitField("rxLevC7Hi", None, 4), - BitField("rxLevC7Lo", None, 2), - BitField("rxLevC8", None, 6), + BitField("rxLevC7Lo", None, 2), + BitField("rxLevC8", None, 6), - BitField("rxLevC9", None, 6), - BitField("rxLevC10Hi", None, 2), + BitField("rxLevC9", None, 6), + BitField("rxLevC10Hi", None, 2), - BitField("rxLevC10Lo", None, 4), - BitField("rxLevC11Hi", None, 4), + BitField("rxLevC10Lo", None, 4), + BitField("rxLevC11Hi", None, 4), - BitField("rxLevC13Lo", None, 2), - BitField("rxLevC12", None, 6), + BitField("rxLevC13Lo", None, 2), + BitField("rxLevC12", None, 6), - BitField("rxLevC13", None, 6), - BitField("rxLevC14Hi", None, 2), + BitField("rxLevC13", None, 6), + BitField("rxLevC14Hi", None, 2), - BitField("rxLevC14Lo", None, 4), - BitField("rxLevC15Hi", None, 4), + BitField("rxLevC14Lo", None, 4), + BitField("rxLevC15Hi", None, 4), - BitField("rxLevC15Lo", None, 2), - BitField("rxLevC16", None, 6), + BitField("rxLevC15Lo", None, 2), + BitField("rxLevC16", None, 6), - BitField("rxLevC17", None, 6), - BitField("rxLevC18Hi", None, 2), + BitField("rxLevC17", None, 6), + BitField("rxLevC18Hi", None, 2), - BitField("rxLevC18Lo", None, 4), - BitField("rxLevC19Hi", None, 4), + BitField("rxLevC18Lo", None, 4), + BitField("rxLevC19Hi", None, 4), - BitField("rxLevC19Lo", None, 2), - BitField("rxLevC20", None, 6) - ] + BitField("rxLevC19Lo", None, 2), + BitField("rxLevC20", None, 6) + ] # len 17 @@ -10260,44 +10261,44 @@ class ExtendedMeasurementFrequencyList(Packet): name = "Extended Measurement Frequency List" fields_desc = [ - BitField("bit128", 0x0, 1), - BitField("bit127", 0x0, 1), - BitField("spare", 0x0, 1), - BitField("seqCode", 0x0, 1), - BitField("bit124", 0x0, 1), - BitField("bit123", 0x0, 1), - BitField("bit122", 0x0, 1), - BitField("bit121", 0x0, 1), + BitField("bit128", 0x0, 1), + BitField("bit127", 0x0, 1), + BitField("spare", 0x0, 1), + BitField("seqCode", 0x0, 1), + BitField("bit124", 0x0, 1), + BitField("bit123", 0x0, 1), + BitField("bit122", 0x0, 1), + BitField("bit121", 0x0, 1), - BitField("bitsRest", 0x0, 128) - ] + BitField("bitsRest", 0x0, 128) + ] class SuspensionCause(Packet): """Suspension Cause Section 10.5.2.47""" name = "Suspension Cause" fields_desc = [ - ByteField("suspVal", 0x0) - ] + ByteField("suspVal", 0x0) + ] class ApduID(Packet): """APDU Flags Section 10.5.2.48""" name = "Apdu Id" fields_desc = [ - BitField("id", None, 4) - ] + BitField("id", None, 4) + ] class ApduFlags(Packet): """APDU Flags Section 10.5.2.49""" name = "Apdu Flags" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("cr", 0x0, 1), - BitField("firstSeg", 0x0, 1), - BitField("lastSeg", 0x0, 1) - ] + BitField("spare", 0x0, 1), + BitField("cr", 0x0, 1), + BitField("firstSeg", 0x0, 1), + BitField("lastSeg", 0x0, 1) + ] # len 1 to max L3 (251) (done) @@ -10305,258 +10306,258 @@ class ApduData(Packet): """APDU Data Section 10.5.2.50""" name = "Apdu Data" fields_desc = [ - XByteField("lengthAD", None), - #optional - ByteField("apuInfo1", None), - ByteField("apuInfo2", None), - ByteField("apuInfo3", None), - ByteField("apuInfo4", None), - ByteField("apuInfo5", None), - ByteField("apuInfo6", None), - ByteField("apuInfo7", None), - ByteField("apuInfo8", None), - ByteField("apuInfo9", None), - ByteField("apuInfo10", None), - ByteField("apuInfo11", None), - ByteField("apuInfo12", None), - ByteField("apuInfo13", None), - ByteField("apuInfo14", None), - ByteField("apuInfo15", None), - ByteField("apuInfo16", None), - ByteField("apuInfo17", None), - ByteField("apuInfo18", None), - ByteField("apuInfo19", None), - ByteField("apuInfo20", None), - ByteField("apuInfo21", None), - ByteField("apuInfo22", None), - ByteField("apuInfo23", None), - ByteField("apuInfo24", None), - ByteField("apuInfo25", None), - ByteField("apuInfo26", None), - ByteField("apuInfo27", None), - ByteField("apuInfo28", None), - ByteField("apuInfo29", None), - ByteField("apuInfo30", None), - ByteField("apuInfo31", None), - ByteField("apuInfo32", None), - ByteField("apuInfo33", None), - ByteField("apuInfo34", None), - ByteField("apuInfo35", None), - ByteField("apuInfo36", None), - ByteField("apuInfo37", None), - ByteField("apuInfo38", None), - ByteField("apuInfo39", None), - ByteField("apuInfo40", None), - ByteField("apuInfo41", None), - ByteField("apuInfo42", None), - ByteField("apuInfo43", None), - ByteField("apuInfo44", None), - ByteField("apuInfo45", None), - ByteField("apuInfo46", None), - ByteField("apuInfo47", None), - ByteField("apuInfo48", None), - ByteField("apuInfo49", None), - ByteField("apuInfo50", None), - ByteField("apuInfo51", None), - ByteField("apuInfo52", None), - ByteField("apuInfo53", None), - ByteField("apuInfo54", None), - ByteField("apuInfo55", None), - ByteField("apuInfo56", None), - ByteField("apuInfo57", None), - ByteField("apuInfo58", None), - ByteField("apuInfo59", None), - ByteField("apuInfo60", None), - ByteField("apuInfo61", None), - ByteField("apuInfo62", None), - ByteField("apuInfo63", None), - ByteField("apuInfo64", None), - ByteField("apuInfo65", None), - ByteField("apuInfo66", None), - ByteField("apuInfo67", None), - ByteField("apuInfo68", None), - ByteField("apuInfo69", None), - ByteField("apuInfo70", None), - ByteField("apuInfo71", None), - ByteField("apuInfo72", None), - ByteField("apuInfo73", None), - ByteField("apuInfo74", None), - ByteField("apuInfo75", None), - ByteField("apuInfo76", None), - ByteField("apuInfo77", None), - ByteField("apuInfo78", None), - ByteField("apuInfo79", None), - ByteField("apuInfo80", None), - ByteField("apuInfo81", None), - ByteField("apuInfo82", None), - ByteField("apuInfo83", None), - ByteField("apuInfo84", None), - ByteField("apuInfo85", None), - ByteField("apuInfo86", None), - ByteField("apuInfo87", None), - ByteField("apuInfo88", None), - ByteField("apuInfo89", None), - ByteField("apuInfo90", None), - ByteField("apuInfo91", None), - ByteField("apuInfo92", None), - ByteField("apuInfo93", None), - ByteField("apuInfo94", None), - ByteField("apuInfo95", None), - ByteField("apuInfo96", None), - ByteField("apuInfo97", None), - ByteField("apuInfo98", None), - ByteField("apuInfo99", None), - ByteField("apuInfo100", None), - ByteField("apuInfo101", None), - ByteField("apuInfo102", None), - ByteField("apuInfo103", None), - ByteField("apuInfo104", None), - ByteField("apuInfo105", None), - ByteField("apuInfo106", None), - ByteField("apuInfo107", None), - ByteField("apuInfo108", None), - ByteField("apuInfo109", None), - ByteField("apuInfo110", None), - ByteField("apuInfo111", None), - ByteField("apuInfo112", None), - ByteField("apuInfo113", None), - ByteField("apuInfo114", None), - ByteField("apuInfo115", None), - ByteField("apuInfo116", None), - ByteField("apuInfo117", None), - ByteField("apuInfo118", None), - ByteField("apuInfo119", None), - ByteField("apuInfo120", None), - ByteField("apuInfo121", None), - ByteField("apuInfo122", None), - ByteField("apuInfo123", None), - ByteField("apuInfo124", None), - ByteField("apuInfo125", None), - ByteField("apuInfo126", None), - ByteField("apuInfo127", None), - ByteField("apuInfo128", None), - ByteField("apuInfo129", None), - ByteField("apuInfo130", None), - ByteField("apuInfo131", None), - ByteField("apuInfo132", None), - ByteField("apuInfo133", None), - ByteField("apuInfo134", None), - ByteField("apuInfo135", None), - ByteField("apuInfo136", None), - ByteField("apuInfo137", None), - ByteField("apuInfo138", None), - ByteField("apuInfo139", None), - ByteField("apuInfo140", None), - ByteField("apuInfo141", None), - ByteField("apuInfo142", None), - ByteField("apuInfo143", None), - ByteField("apuInfo144", None), - ByteField("apuInfo145", None), - ByteField("apuInfo146", None), - ByteField("apuInfo147", None), - ByteField("apuInfo148", None), - ByteField("apuInfo149", None), - ByteField("apuInfo150", None), - ByteField("apuInfo151", None), - ByteField("apuInfo152", None), - ByteField("apuInfo153", None), - ByteField("apuInfo154", None), - ByteField("apuInfo155", None), - ByteField("apuInfo156", None), - ByteField("apuInfo157", None), - ByteField("apuInfo158", None), - ByteField("apuInfo159", None), - ByteField("apuInfo160", None), - ByteField("apuInfo161", None), - ByteField("apuInfo162", None), - ByteField("apuInfo163", None), - ByteField("apuInfo164", None), - ByteField("apuInfo165", None), - ByteField("apuInfo166", None), - ByteField("apuInfo167", None), - ByteField("apuInfo168", None), - ByteField("apuInfo169", None), - ByteField("apuInfo170", None), - ByteField("apuInfo171", None), - ByteField("apuInfo172", None), - ByteField("apuInfo173", None), - ByteField("apuInfo174", None), - ByteField("apuInfo175", None), - ByteField("apuInfo176", None), - ByteField("apuInfo177", None), - ByteField("apuInfo178", None), - ByteField("apuInfo179", None), - ByteField("apuInfo180", None), - ByteField("apuInfo181", None), - ByteField("apuInfo182", None), - ByteField("apuInfo183", None), - ByteField("apuInfo184", None), - ByteField("apuInfo185", None), - ByteField("apuInfo186", None), - ByteField("apuInfo187", None), - ByteField("apuInfo188", None), - ByteField("apuInfo189", None), - ByteField("apuInfo190", None), - ByteField("apuInfo191", None), - ByteField("apuInfo192", None), - ByteField("apuInfo193", None), - ByteField("apuInfo194", None), - ByteField("apuInfo195", None), - ByteField("apuInfo196", None), - ByteField("apuInfo197", None), - ByteField("apuInfo198", None), - ByteField("apuInfo199", None), - ByteField("apuInfo200", None), - ByteField("apuInfo201", None), - ByteField("apuInfo202", None), - ByteField("apuInfo203", None), - ByteField("apuInfo204", None), - ByteField("apuInfo205", None), - ByteField("apuInfo206", None), - ByteField("apuInfo207", None), - ByteField("apuInfo208", None), - ByteField("apuInfo209", None), - ByteField("apuInfo210", None), - ByteField("apuInfo211", None), - ByteField("apuInfo212", None), - ByteField("apuInfo213", None), - ByteField("apuInfo214", None), - ByteField("apuInfo215", None), - ByteField("apuInfo216", None), - ByteField("apuInfo217", None), - ByteField("apuInfo218", None), - ByteField("apuInfo219", None), - ByteField("apuInfo220", None), - ByteField("apuInfo221", None), - ByteField("apuInfo222", None), - ByteField("apuInfo223", None), - ByteField("apuInfo224", None), - ByteField("apuInfo225", None), - ByteField("apuInfo226", None), - ByteField("apuInfo227", None), - ByteField("apuInfo228", None), - ByteField("apuInfo229", None), - ByteField("apuInfo230", None), - ByteField("apuInfo231", None), - ByteField("apuInfo232", None), - ByteField("apuInfo233", None), - ByteField("apuInfo234", None), - ByteField("apuInfo235", None), - ByteField("apuInfo236", None), - ByteField("apuInfo237", None), - ByteField("apuInfo238", None), - ByteField("apuInfo239", None), - ByteField("apuInfo240", None), - ByteField("apuInfo241", None), - ByteField("apuInfo242", None), - ByteField("apuInfo243", None), - ByteField("apuInfo244", None), - ByteField("apuInfo245", None), - ByteField("apuInfo246", None), - ByteField("apuInfo247", None), - ByteField("apuInfo248", None), - ByteField("apuInfo249", None) - ] + XByteField("lengthAD", None), + # optional + ByteField("apuInfo1", None), + ByteField("apuInfo2", None), + ByteField("apuInfo3", None), + ByteField("apuInfo4", None), + ByteField("apuInfo5", None), + ByteField("apuInfo6", None), + ByteField("apuInfo7", None), + ByteField("apuInfo8", None), + ByteField("apuInfo9", None), + ByteField("apuInfo10", None), + ByteField("apuInfo11", None), + ByteField("apuInfo12", None), + ByteField("apuInfo13", None), + ByteField("apuInfo14", None), + ByteField("apuInfo15", None), + ByteField("apuInfo16", None), + ByteField("apuInfo17", None), + ByteField("apuInfo18", None), + ByteField("apuInfo19", None), + ByteField("apuInfo20", None), + ByteField("apuInfo21", None), + ByteField("apuInfo22", None), + ByteField("apuInfo23", None), + ByteField("apuInfo24", None), + ByteField("apuInfo25", None), + ByteField("apuInfo26", None), + ByteField("apuInfo27", None), + ByteField("apuInfo28", None), + ByteField("apuInfo29", None), + ByteField("apuInfo30", None), + ByteField("apuInfo31", None), + ByteField("apuInfo32", None), + ByteField("apuInfo33", None), + ByteField("apuInfo34", None), + ByteField("apuInfo35", None), + ByteField("apuInfo36", None), + ByteField("apuInfo37", None), + ByteField("apuInfo38", None), + ByteField("apuInfo39", None), + ByteField("apuInfo40", None), + ByteField("apuInfo41", None), + ByteField("apuInfo42", None), + ByteField("apuInfo43", None), + ByteField("apuInfo44", None), + ByteField("apuInfo45", None), + ByteField("apuInfo46", None), + ByteField("apuInfo47", None), + ByteField("apuInfo48", None), + ByteField("apuInfo49", None), + ByteField("apuInfo50", None), + ByteField("apuInfo51", None), + ByteField("apuInfo52", None), + ByteField("apuInfo53", None), + ByteField("apuInfo54", None), + ByteField("apuInfo55", None), + ByteField("apuInfo56", None), + ByteField("apuInfo57", None), + ByteField("apuInfo58", None), + ByteField("apuInfo59", None), + ByteField("apuInfo60", None), + ByteField("apuInfo61", None), + ByteField("apuInfo62", None), + ByteField("apuInfo63", None), + ByteField("apuInfo64", None), + ByteField("apuInfo65", None), + ByteField("apuInfo66", None), + ByteField("apuInfo67", None), + ByteField("apuInfo68", None), + ByteField("apuInfo69", None), + ByteField("apuInfo70", None), + ByteField("apuInfo71", None), + ByteField("apuInfo72", None), + ByteField("apuInfo73", None), + ByteField("apuInfo74", None), + ByteField("apuInfo75", None), + ByteField("apuInfo76", None), + ByteField("apuInfo77", None), + ByteField("apuInfo78", None), + ByteField("apuInfo79", None), + ByteField("apuInfo80", None), + ByteField("apuInfo81", None), + ByteField("apuInfo82", None), + ByteField("apuInfo83", None), + ByteField("apuInfo84", None), + ByteField("apuInfo85", None), + ByteField("apuInfo86", None), + ByteField("apuInfo87", None), + ByteField("apuInfo88", None), + ByteField("apuInfo89", None), + ByteField("apuInfo90", None), + ByteField("apuInfo91", None), + ByteField("apuInfo92", None), + ByteField("apuInfo93", None), + ByteField("apuInfo94", None), + ByteField("apuInfo95", None), + ByteField("apuInfo96", None), + ByteField("apuInfo97", None), + ByteField("apuInfo98", None), + ByteField("apuInfo99", None), + ByteField("apuInfo100", None), + ByteField("apuInfo101", None), + ByteField("apuInfo102", None), + ByteField("apuInfo103", None), + ByteField("apuInfo104", None), + ByteField("apuInfo105", None), + ByteField("apuInfo106", None), + ByteField("apuInfo107", None), + ByteField("apuInfo108", None), + ByteField("apuInfo109", None), + ByteField("apuInfo110", None), + ByteField("apuInfo111", None), + ByteField("apuInfo112", None), + ByteField("apuInfo113", None), + ByteField("apuInfo114", None), + ByteField("apuInfo115", None), + ByteField("apuInfo116", None), + ByteField("apuInfo117", None), + ByteField("apuInfo118", None), + ByteField("apuInfo119", None), + ByteField("apuInfo120", None), + ByteField("apuInfo121", None), + ByteField("apuInfo122", None), + ByteField("apuInfo123", None), + ByteField("apuInfo124", None), + ByteField("apuInfo125", None), + ByteField("apuInfo126", None), + ByteField("apuInfo127", None), + ByteField("apuInfo128", None), + ByteField("apuInfo129", None), + ByteField("apuInfo130", None), + ByteField("apuInfo131", None), + ByteField("apuInfo132", None), + ByteField("apuInfo133", None), + ByteField("apuInfo134", None), + ByteField("apuInfo135", None), + ByteField("apuInfo136", None), + ByteField("apuInfo137", None), + ByteField("apuInfo138", None), + ByteField("apuInfo139", None), + ByteField("apuInfo140", None), + ByteField("apuInfo141", None), + ByteField("apuInfo142", None), + ByteField("apuInfo143", None), + ByteField("apuInfo144", None), + ByteField("apuInfo145", None), + ByteField("apuInfo146", None), + ByteField("apuInfo147", None), + ByteField("apuInfo148", None), + ByteField("apuInfo149", None), + ByteField("apuInfo150", None), + ByteField("apuInfo151", None), + ByteField("apuInfo152", None), + ByteField("apuInfo153", None), + ByteField("apuInfo154", None), + ByteField("apuInfo155", None), + ByteField("apuInfo156", None), + ByteField("apuInfo157", None), + ByteField("apuInfo158", None), + ByteField("apuInfo159", None), + ByteField("apuInfo160", None), + ByteField("apuInfo161", None), + ByteField("apuInfo162", None), + ByteField("apuInfo163", None), + ByteField("apuInfo164", None), + ByteField("apuInfo165", None), + ByteField("apuInfo166", None), + ByteField("apuInfo167", None), + ByteField("apuInfo168", None), + ByteField("apuInfo169", None), + ByteField("apuInfo170", None), + ByteField("apuInfo171", None), + ByteField("apuInfo172", None), + ByteField("apuInfo173", None), + ByteField("apuInfo174", None), + ByteField("apuInfo175", None), + ByteField("apuInfo176", None), + ByteField("apuInfo177", None), + ByteField("apuInfo178", None), + ByteField("apuInfo179", None), + ByteField("apuInfo180", None), + ByteField("apuInfo181", None), + ByteField("apuInfo182", None), + ByteField("apuInfo183", None), + ByteField("apuInfo184", None), + ByteField("apuInfo185", None), + ByteField("apuInfo186", None), + ByteField("apuInfo187", None), + ByteField("apuInfo188", None), + ByteField("apuInfo189", None), + ByteField("apuInfo190", None), + ByteField("apuInfo191", None), + ByteField("apuInfo192", None), + ByteField("apuInfo193", None), + ByteField("apuInfo194", None), + ByteField("apuInfo195", None), + ByteField("apuInfo196", None), + ByteField("apuInfo197", None), + ByteField("apuInfo198", None), + ByteField("apuInfo199", None), + ByteField("apuInfo200", None), + ByteField("apuInfo201", None), + ByteField("apuInfo202", None), + ByteField("apuInfo203", None), + ByteField("apuInfo204", None), + ByteField("apuInfo205", None), + ByteField("apuInfo206", None), + ByteField("apuInfo207", None), + ByteField("apuInfo208", None), + ByteField("apuInfo209", None), + ByteField("apuInfo210", None), + ByteField("apuInfo211", None), + ByteField("apuInfo212", None), + ByteField("apuInfo213", None), + ByteField("apuInfo214", None), + ByteField("apuInfo215", None), + ByteField("apuInfo216", None), + ByteField("apuInfo217", None), + ByteField("apuInfo218", None), + ByteField("apuInfo219", None), + ByteField("apuInfo220", None), + ByteField("apuInfo221", None), + ByteField("apuInfo222", None), + ByteField("apuInfo223", None), + ByteField("apuInfo224", None), + ByteField("apuInfo225", None), + ByteField("apuInfo226", None), + ByteField("apuInfo227", None), + ByteField("apuInfo228", None), + ByteField("apuInfo229", None), + ByteField("apuInfo230", None), + ByteField("apuInfo231", None), + ByteField("apuInfo232", None), + ByteField("apuInfo233", None), + ByteField("apuInfo234", None), + ByteField("apuInfo235", None), + ByteField("apuInfo236", None), + ByteField("apuInfo237", None), + ByteField("apuInfo238", None), + ByteField("apuInfo239", None), + ByteField("apuInfo240", None), + ByteField("apuInfo241", None), + ByteField("apuInfo242", None), + ByteField("apuInfo243", None), + ByteField("apuInfo244", None), + ByteField("apuInfo245", None), + ByteField("apuInfo246", None), + ByteField("apuInfo247", None), + ByteField("apuInfo248", None), + ByteField("apuInfo249", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -10577,262 +10578,262 @@ class NetworkName(Packet): name = "Network Name" fields_desc = [ - XByteField("lengthNN", None), - - BitField("ext", 0x1, 1), - BitField("codingScheme", 0x0, 3), - BitField("addCi", 0x0, 1), - BitField("nbSpare", 0x0, 3), - # optional - ByteField("txtString1", None), - ByteField("txtString2", None), - ByteField("txtString3", None), - ByteField("txtString4", None), - ByteField("txtString5", None), - ByteField("txtString6", None), - ByteField("txtString7", None), - ByteField("txtString8", None), - ByteField("txtString9", None), - ByteField("txtString10", None), - ByteField("txtString11", None), - ByteField("txtString12", None), - ByteField("txtString13", None), - ByteField("txtString14", None), - ByteField("txtString15", None), - ByteField("txtString16", None), - ByteField("txtString17", None), - ByteField("txtString18", None), - ByteField("txtString19", None), - ByteField("txtString20", None), - ByteField("txtString21", None), - ByteField("txtString22", None), - ByteField("txtString23", None), - ByteField("txtString24", None), - ByteField("txtString25", None), - ByteField("txtString26", None), - ByteField("txtString27", None), - ByteField("txtString28", None), - ByteField("txtString29", None), - ByteField("txtString30", None), - ByteField("txtString31", None), - ByteField("txtString32", None), - ByteField("txtString33", None), - ByteField("txtString34", None), - ByteField("txtString35", None), - ByteField("txtString36", None), - ByteField("txtString37", None), - ByteField("txtString38", None), - ByteField("txtString39", None), - ByteField("txtString40", None), - ByteField("txtString41", None), - ByteField("txtString42", None), - ByteField("txtString43", None), - ByteField("txtString44", None), - ByteField("txtString45", None), - ByteField("txtString46", None), - ByteField("txtString47", None), - ByteField("txtString48", None), - ByteField("txtString49", None), - ByteField("txtString50", None), - ByteField("txtString51", None), - ByteField("txtString52", None), - ByteField("txtString53", None), - ByteField("txtString54", None), - ByteField("txtString55", None), - ByteField("txtString56", None), - ByteField("txtString57", None), - ByteField("txtString58", None), - ByteField("txtString59", None), - ByteField("txtString60", None), - ByteField("txtString61", None), - ByteField("txtString62", None), - ByteField("txtString63", None), - ByteField("txtString64", None), - ByteField("txtString65", None), - ByteField("txtString66", None), - ByteField("txtString67", None), - ByteField("txtString68", None), - ByteField("txtString69", None), - ByteField("txtString70", None), - ByteField("txtString71", None), - ByteField("txtString72", None), - ByteField("txtString73", None), - ByteField("txtString74", None), - ByteField("txtString75", None), - ByteField("txtString76", None), - ByteField("txtString77", None), - ByteField("txtString78", None), - ByteField("txtString79", None), - ByteField("txtString80", None), - ByteField("txtString81", None), - ByteField("txtString82", None), - ByteField("txtString83", None), - ByteField("txtString84", None), - ByteField("txtString85", None), - ByteField("txtString86", None), - ByteField("txtString87", None), - ByteField("txtString88", None), - ByteField("txtString89", None), - ByteField("txtString90", None), - ByteField("txtString91", None), - ByteField("txtString92", None), - ByteField("txtString93", None), - ByteField("txtString94", None), - ByteField("txtString95", None), - ByteField("txtString96", None), - ByteField("txtString97", None), - ByteField("txtString98", None), - ByteField("txtString99", None), - ByteField("txtString100", None), - ByteField("txtString101", None), - ByteField("txtString102", None), - ByteField("txtString103", None), - ByteField("txtString104", None), - ByteField("txtString105", None), - ByteField("txtString106", None), - ByteField("txtString107", None), - ByteField("txtString108", None), - ByteField("txtString109", None), - ByteField("txtString110", None), - ByteField("txtString111", None), - ByteField("txtString112", None), - ByteField("txtString113", None), - ByteField("txtString114", None), - ByteField("txtString115", None), - ByteField("txtString116", None), - ByteField("txtString117", None), - ByteField("txtString118", None), - ByteField("txtString119", None), - ByteField("txtString120", None), - ByteField("txtString121", None), - ByteField("txtString122", None), - ByteField("txtString123", None), - ByteField("txtString124", None), - ByteField("txtString125", None), - ByteField("txtString126", None), - ByteField("txtString127", None), - ByteField("txtString128", None), - ByteField("txtString129", None), - ByteField("txtString130", None), - ByteField("txtString131", None), - ByteField("txtString132", None), - ByteField("txtString133", None), - ByteField("txtString134", None), - ByteField("txtString135", None), - ByteField("txtString136", None), - ByteField("txtString137", None), - ByteField("txtString138", None), - ByteField("txtString139", None), - ByteField("txtString140", None), - ByteField("txtString141", None), - ByteField("txtString142", None), - ByteField("txtString143", None), - ByteField("txtString144", None), - ByteField("txtString145", None), - ByteField("txtString146", None), - ByteField("txtString147", None), - ByteField("txtString148", None), - ByteField("txtString149", None), - ByteField("txtString150", None), - ByteField("txtString151", None), - ByteField("txtString152", None), - ByteField("txtString153", None), - ByteField("txtString154", None), - ByteField("txtString155", None), - ByteField("txtString156", None), - ByteField("txtString157", None), - ByteField("txtString158", None), - ByteField("txtString159", None), - ByteField("txtString160", None), - ByteField("txtString161", None), - ByteField("txtString162", None), - ByteField("txtString163", None), - ByteField("txtString164", None), - ByteField("txtString165", None), - ByteField("txtString166", None), - ByteField("txtString167", None), - ByteField("txtString168", None), - ByteField("txtString169", None), - ByteField("txtString170", None), - ByteField("txtString171", None), - ByteField("txtString172", None), - ByteField("txtString173", None), - ByteField("txtString174", None), - ByteField("txtString175", None), - ByteField("txtString176", None), - ByteField("txtString177", None), - ByteField("txtString178", None), - ByteField("txtString179", None), - ByteField("txtString180", None), - ByteField("txtString181", None), - ByteField("txtString182", None), - ByteField("txtString183", None), - ByteField("txtString184", None), - ByteField("txtString185", None), - ByteField("txtString186", None), - ByteField("txtString187", None), - ByteField("txtString188", None), - ByteField("txtString189", None), - ByteField("txtString190", None), - ByteField("txtString191", None), - ByteField("txtString192", None), - ByteField("txtString193", None), - ByteField("txtString194", None), - ByteField("txtString195", None), - ByteField("txtString196", None), - ByteField("txtString197", None), - ByteField("txtString198", None), - ByteField("txtString199", None), - ByteField("txtString200", None), - ByteField("txtString201", None), - ByteField("txtString202", None), - ByteField("txtString203", None), - ByteField("txtString204", None), - ByteField("txtString205", None), - ByteField("txtString206", None), - ByteField("txtString207", None), - ByteField("txtString208", None), - ByteField("txtString209", None), - ByteField("txtString210", None), - ByteField("txtString211", None), - ByteField("txtString212", None), - ByteField("txtString213", None), - ByteField("txtString214", None), - ByteField("txtString215", None), - ByteField("txtString216", None), - ByteField("txtString217", None), - ByteField("txtString218", None), - ByteField("txtString219", None), - ByteField("txtString220", None), - ByteField("txtString221", None), - ByteField("txtString222", None), - ByteField("txtString223", None), - ByteField("txtString224", None), - ByteField("txtString225", None), - ByteField("txtString226", None), - ByteField("txtString227", None), - ByteField("txtString228", None), - ByteField("txtString229", None), - ByteField("txtString230", None), - ByteField("txtString231", None), - ByteField("txtString232", None), - ByteField("txtString233", None), - ByteField("txtString234", None), - ByteField("txtString235", None), - ByteField("txtString236", None), - ByteField("txtString237", None), - ByteField("txtString238", None), - ByteField("txtString239", None), - ByteField("txtString240", None), - ByteField("txtString241", None), - ByteField("txtString242", None), - ByteField("txtString243", None), - ByteField("txtString244", None), - ByteField("txtString245", None), - ByteField("txtString246", None), - ByteField("txtString247", None), - ByteField("txtString248", None) - ] + XByteField("lengthNN", None), + + BitField("ext", 0x1, 1), + BitField("codingScheme", 0x0, 3), + BitField("addCi", 0x0, 1), + BitField("nbSpare", 0x0, 3), + # optional + ByteField("txtString1", None), + ByteField("txtString2", None), + ByteField("txtString3", None), + ByteField("txtString4", None), + ByteField("txtString5", None), + ByteField("txtString6", None), + ByteField("txtString7", None), + ByteField("txtString8", None), + ByteField("txtString9", None), + ByteField("txtString10", None), + ByteField("txtString11", None), + ByteField("txtString12", None), + ByteField("txtString13", None), + ByteField("txtString14", None), + ByteField("txtString15", None), + ByteField("txtString16", None), + ByteField("txtString17", None), + ByteField("txtString18", None), + ByteField("txtString19", None), + ByteField("txtString20", None), + ByteField("txtString21", None), + ByteField("txtString22", None), + ByteField("txtString23", None), + ByteField("txtString24", None), + ByteField("txtString25", None), + ByteField("txtString26", None), + ByteField("txtString27", None), + ByteField("txtString28", None), + ByteField("txtString29", None), + ByteField("txtString30", None), + ByteField("txtString31", None), + ByteField("txtString32", None), + ByteField("txtString33", None), + ByteField("txtString34", None), + ByteField("txtString35", None), + ByteField("txtString36", None), + ByteField("txtString37", None), + ByteField("txtString38", None), + ByteField("txtString39", None), + ByteField("txtString40", None), + ByteField("txtString41", None), + ByteField("txtString42", None), + ByteField("txtString43", None), + ByteField("txtString44", None), + ByteField("txtString45", None), + ByteField("txtString46", None), + ByteField("txtString47", None), + ByteField("txtString48", None), + ByteField("txtString49", None), + ByteField("txtString50", None), + ByteField("txtString51", None), + ByteField("txtString52", None), + ByteField("txtString53", None), + ByteField("txtString54", None), + ByteField("txtString55", None), + ByteField("txtString56", None), + ByteField("txtString57", None), + ByteField("txtString58", None), + ByteField("txtString59", None), + ByteField("txtString60", None), + ByteField("txtString61", None), + ByteField("txtString62", None), + ByteField("txtString63", None), + ByteField("txtString64", None), + ByteField("txtString65", None), + ByteField("txtString66", None), + ByteField("txtString67", None), + ByteField("txtString68", None), + ByteField("txtString69", None), + ByteField("txtString70", None), + ByteField("txtString71", None), + ByteField("txtString72", None), + ByteField("txtString73", None), + ByteField("txtString74", None), + ByteField("txtString75", None), + ByteField("txtString76", None), + ByteField("txtString77", None), + ByteField("txtString78", None), + ByteField("txtString79", None), + ByteField("txtString80", None), + ByteField("txtString81", None), + ByteField("txtString82", None), + ByteField("txtString83", None), + ByteField("txtString84", None), + ByteField("txtString85", None), + ByteField("txtString86", None), + ByteField("txtString87", None), + ByteField("txtString88", None), + ByteField("txtString89", None), + ByteField("txtString90", None), + ByteField("txtString91", None), + ByteField("txtString92", None), + ByteField("txtString93", None), + ByteField("txtString94", None), + ByteField("txtString95", None), + ByteField("txtString96", None), + ByteField("txtString97", None), + ByteField("txtString98", None), + ByteField("txtString99", None), + ByteField("txtString100", None), + ByteField("txtString101", None), + ByteField("txtString102", None), + ByteField("txtString103", None), + ByteField("txtString104", None), + ByteField("txtString105", None), + ByteField("txtString106", None), + ByteField("txtString107", None), + ByteField("txtString108", None), + ByteField("txtString109", None), + ByteField("txtString110", None), + ByteField("txtString111", None), + ByteField("txtString112", None), + ByteField("txtString113", None), + ByteField("txtString114", None), + ByteField("txtString115", None), + ByteField("txtString116", None), + ByteField("txtString117", None), + ByteField("txtString118", None), + ByteField("txtString119", None), + ByteField("txtString120", None), + ByteField("txtString121", None), + ByteField("txtString122", None), + ByteField("txtString123", None), + ByteField("txtString124", None), + ByteField("txtString125", None), + ByteField("txtString126", None), + ByteField("txtString127", None), + ByteField("txtString128", None), + ByteField("txtString129", None), + ByteField("txtString130", None), + ByteField("txtString131", None), + ByteField("txtString132", None), + ByteField("txtString133", None), + ByteField("txtString134", None), + ByteField("txtString135", None), + ByteField("txtString136", None), + ByteField("txtString137", None), + ByteField("txtString138", None), + ByteField("txtString139", None), + ByteField("txtString140", None), + ByteField("txtString141", None), + ByteField("txtString142", None), + ByteField("txtString143", None), + ByteField("txtString144", None), + ByteField("txtString145", None), + ByteField("txtString146", None), + ByteField("txtString147", None), + ByteField("txtString148", None), + ByteField("txtString149", None), + ByteField("txtString150", None), + ByteField("txtString151", None), + ByteField("txtString152", None), + ByteField("txtString153", None), + ByteField("txtString154", None), + ByteField("txtString155", None), + ByteField("txtString156", None), + ByteField("txtString157", None), + ByteField("txtString158", None), + ByteField("txtString159", None), + ByteField("txtString160", None), + ByteField("txtString161", None), + ByteField("txtString162", None), + ByteField("txtString163", None), + ByteField("txtString164", None), + ByteField("txtString165", None), + ByteField("txtString166", None), + ByteField("txtString167", None), + ByteField("txtString168", None), + ByteField("txtString169", None), + ByteField("txtString170", None), + ByteField("txtString171", None), + ByteField("txtString172", None), + ByteField("txtString173", None), + ByteField("txtString174", None), + ByteField("txtString175", None), + ByteField("txtString176", None), + ByteField("txtString177", None), + ByteField("txtString178", None), + ByteField("txtString179", None), + ByteField("txtString180", None), + ByteField("txtString181", None), + ByteField("txtString182", None), + ByteField("txtString183", None), + ByteField("txtString184", None), + ByteField("txtString185", None), + ByteField("txtString186", None), + ByteField("txtString187", None), + ByteField("txtString188", None), + ByteField("txtString189", None), + ByteField("txtString190", None), + ByteField("txtString191", None), + ByteField("txtString192", None), + ByteField("txtString193", None), + ByteField("txtString194", None), + ByteField("txtString195", None), + ByteField("txtString196", None), + ByteField("txtString197", None), + ByteField("txtString198", None), + ByteField("txtString199", None), + ByteField("txtString200", None), + ByteField("txtString201", None), + ByteField("txtString202", None), + ByteField("txtString203", None), + ByteField("txtString204", None), + ByteField("txtString205", None), + ByteField("txtString206", None), + ByteField("txtString207", None), + ByteField("txtString208", None), + ByteField("txtString209", None), + ByteField("txtString210", None), + ByteField("txtString211", None), + ByteField("txtString212", None), + ByteField("txtString213", None), + ByteField("txtString214", None), + ByteField("txtString215", None), + ByteField("txtString216", None), + ByteField("txtString217", None), + ByteField("txtString218", None), + ByteField("txtString219", None), + ByteField("txtString220", None), + ByteField("txtString221", None), + ByteField("txtString222", None), + ByteField("txtString223", None), + ByteField("txtString224", None), + ByteField("txtString225", None), + ByteField("txtString226", None), + ByteField("txtString227", None), + ByteField("txtString228", None), + ByteField("txtString229", None), + ByteField("txtString230", None), + ByteField("txtString231", None), + ByteField("txtString232", None), + ByteField("txtString233", None), + ByteField("txtString234", None), + ByteField("txtString235", None), + ByteField("txtString236", None), + ByteField("txtString237", None), + ByteField("txtString238", None), + ByteField("txtString239", None), + ByteField("txtString240", None), + ByteField("txtString241", None), + ByteField("txtString242", None), + ByteField("txtString243", None), + ByteField("txtString244", None), + ByteField("txtString245", None), + ByteField("txtString246", None), + ByteField("txtString247", None), + ByteField("txtString248", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -10848,76 +10849,76 @@ class TimeZone(Packet): """Time Zone Section 10.5.3.8""" name = "Time Zone" fields_desc = [ - ByteField("timeZone", 0x0), - ] + ByteField("timeZone", 0x0), + ] class TimeZoneAndTime(Packet): """Time Zone and Time Section 10.5.3.9""" name = "Time Zone and Time" fields_desc = [ - ByteField("year", 0x0), - ByteField("month", 0x0), - ByteField("day", 0x0), - ByteField("hour", 0x0), - ByteField("minute", 0x0), - ByteField("second", 0x0), - ByteField("timeZone", 0x0) - ] + ByteField("year", 0x0), + ByteField("month", 0x0), + ByteField("day", 0x0), + ByteField("hour", 0x0), + ByteField("minute", 0x0), + ByteField("second", 0x0), + ByteField("timeZone", 0x0) + ] class CtsPermission(Packet): """CTS permission Section 10.5.3.10""" name = "Cts Permission" fields_desc = [ - ] + ] class LsaIdentifier(Packet): """LSA Identifier Section 10.5.3.11""" name = "Lsa Identifier" fields_desc = [ - ByteField("lsaID", 0x0), - ByteField("lsaID1", 0x0), - ByteField("lsaID2", 0x0) - ] + ByteField("lsaID", 0x0), + ByteField("lsaID1", 0x0), + ByteField("lsaID2", 0x0) + ] # # 10.5.4 Call control information elements # -#10.5.4.1 Extensions of codesets +# 10.5.4.1 Extensions of codesets # This is only text and no packet class LockingShiftProcedure(Packet): """Locking shift procedure Section 10.5.4.2""" name = "Locking Shift Procedure" fields_desc = [ - BitField("lockShift", 0x0, 1), - BitField("codesetId", 0x0, 3) - ] + BitField("lockShift", 0x0, 1), + BitField("codesetId", 0x0, 3) + ] class NonLockingShiftProcedure(Packet): """Non-locking shift procedure Section 10.5.4.3""" name = "Non-locking Shift Procedure" fields_desc = [ - BitField("nonLockShift", 0x1, 1), - BitField("codesetId", 0x0, 3) - ] + BitField("nonLockShift", 0x1, 1), + BitField("codesetId", 0x0, 3) + ] class AuxiliaryStates(Packet): """Auxiliary states Section 10.5.4.4""" name = "Auxiliary States" fields_desc = [ - XByteField("lengthAS", 0x3), - BitField("ext", 0x1, 1), - BitField("spare", 0x0, 3), - BitField("holdState", 0x0, 2), - BitField("mptyState", 0x0, 2) - ] + XByteField("lengthAS", 0x3), + BitField("ext", 0x1, 1), + BitField("spare", 0x0, 3), + BitField("holdState", 0x0, 2), + BitField("mptyState", 0x0, 2) + ] # len 3 to 15 @@ -10926,131 +10927,131 @@ class BearerCapability(Packet): name = "Bearer Capability" fields_desc = [ - XByteField("lengthBC", None), - - BitField("ext0", 0x1, 1), - BitField("radioChReq", 0x1, 2), - BitField("codingStd", 0x0, 1), - BitField("transMode", 0x0, 1), - BitField("infoTransCa", 0x0, 3), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("coding", None, 1), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("spare", None, 2), - lambda pkt: pkt.ext0 == 0), - ConditionalField(BitField("speechVers", 0x0, 4), - lambda pkt: pkt.ext0 == 0), - - ConditionalField(BitField("ext2", 0x1, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("compress", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("structure", None, 2), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("dupMode", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("config", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("nirr", None, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("establi", 0x0, 1), - lambda pkt: pkt.ext1 == 0), - - BitField("ext3", None, 1), - BitField("accessId", None, 2), - BitField("rateAda", None, 2), - BitField("signaling", None, 3), - - ConditionalField(BitField("ext4", None, 1), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("otherITC", None, 2), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("otherRate", None, 2), - lambda pkt: pkt.ext3 == 0), - ConditionalField(BitField("spare1", 0x0, 3), - lambda pkt: pkt.ext3 == 0), - - ConditionalField(BitField("ext5", 0x1, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("hdr", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("multiFr", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("mode", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("lli", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("assig", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("inbNeg", None, 1), - lambda pkt: pkt.ext4 == 0), - ConditionalField(BitField("spare2", 0x0, 1), - lambda pkt: pkt.ext4 == 0), - - BitField("ext6", None, 1), - BitField("layer1Id", None, 2), - BitField("userInf", None, 4), - BitField("sync", None, 1), - - ConditionalField(BitField("ext7", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("stopBit", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("negoc", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("nbDataBit", None, 1), - lambda pkt: pkt.ext6 == 0), - ConditionalField(BitField("userRate", None, 4), - lambda pkt: pkt.ext6 == 0), - - ConditionalField(BitField("ext8", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("interRate", None, 2), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("nicTX", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("nicRX", None, 1), - lambda pkt: pkt.ext7 == 0), - ConditionalField(BitField("parity", None, 3), - lambda pkt: pkt.ext7 == 0), - - ConditionalField(BitField("ext9", None, 1), - lambda pkt: pkt.ext8 == 0), - ConditionalField(BitField("connEle", None, 2), - lambda pkt: pkt.ext8 == 0), - ConditionalField(BitField("modemType", None, 5), - lambda pkt: pkt.ext8 == 0), - - ConditionalField(BitField("ext10", None, 1), - lambda pkt: pkt.ext9 == 0), - ConditionalField(BitField("otherModemType", None, 2), - lambda pkt: pkt.ext9 == 0), - ConditionalField(BitField("netUserRate", None, 5), - lambda pkt: pkt.ext9 == 0), - - ConditionalField(BitField("ext11", None, 1), - lambda pkt: pkt.ext10 == 0), - ConditionalField(BitField("chanCoding", None, 4), - lambda pkt: pkt.ext10 == 0), - ConditionalField(BitField("maxTrafficChan", None, 3), - lambda pkt: pkt.ext10 == 0), - - ConditionalField(BitField("ext12", None, 1), - lambda pkt: pkt.ext11 == 0), - ConditionalField(BitField("uimi", None, 3), - lambda pkt: pkt.ext11 == 0), - ConditionalField(BitField("airInterfaceUserRate", None, 4), - lambda pkt: pkt.ext11 == 0), - - ConditionalField(BitField("ext13", 0x1, 1), - lambda pkt: pkt.ext12 == 0), - ConditionalField(BitField("layer2Ch", None, 2), - lambda pkt: pkt.ext12 == 0), - ConditionalField(BitField("userInfoL2", 0x0, 5), - lambda pkt: pkt.ext12 == 0) - ] + XByteField("lengthBC", None), + + BitField("ext0", 0x1, 1), + BitField("radioChReq", 0x1, 2), + BitField("codingStd", 0x0, 1), + BitField("transMode", 0x0, 1), + BitField("infoTransCa", 0x0, 3), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("coding", None, 1), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("spare", None, 2), + lambda pkt: pkt.ext0 == 0), + ConditionalField(BitField("speechVers", 0x0, 4), + lambda pkt: pkt.ext0 == 0), + + ConditionalField(BitField("ext2", 0x1, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("compress", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("structure", None, 2), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("dupMode", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("config", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("nirr", None, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("establi", 0x0, 1), + lambda pkt: pkt.ext1 == 0), + + BitField("ext3", None, 1), + BitField("accessId", None, 2), + BitField("rateAda", None, 2), + BitField("signaling", None, 3), + + ConditionalField(BitField("ext4", None, 1), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("otherITC", None, 2), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("otherRate", None, 2), + lambda pkt: pkt.ext3 == 0), + ConditionalField(BitField("spare1", 0x0, 3), + lambda pkt: pkt.ext3 == 0), + + ConditionalField(BitField("ext5", 0x1, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("hdr", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("multiFr", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("mode", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("lli", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("assig", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("inbNeg", None, 1), + lambda pkt: pkt.ext4 == 0), + ConditionalField(BitField("spare2", 0x0, 1), + lambda pkt: pkt.ext4 == 0), + + BitField("ext6", None, 1), + BitField("layer1Id", None, 2), + BitField("userInf", None, 4), + BitField("sync", None, 1), + + ConditionalField(BitField("ext7", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("stopBit", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("negoc", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("nbDataBit", None, 1), + lambda pkt: pkt.ext6 == 0), + ConditionalField(BitField("userRate", None, 4), + lambda pkt: pkt.ext6 == 0), + + ConditionalField(BitField("ext8", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("interRate", None, 2), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("nicTX", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("nicRX", None, 1), + lambda pkt: pkt.ext7 == 0), + ConditionalField(BitField("parity", None, 3), + lambda pkt: pkt.ext7 == 0), + + ConditionalField(BitField("ext9", None, 1), + lambda pkt: pkt.ext8 == 0), + ConditionalField(BitField("connEle", None, 2), + lambda pkt: pkt.ext8 == 0), + ConditionalField(BitField("modemType", None, 5), + lambda pkt: pkt.ext8 == 0), + + ConditionalField(BitField("ext10", None, 1), + lambda pkt: pkt.ext9 == 0), + ConditionalField(BitField("otherModemType", None, 2), + lambda pkt: pkt.ext9 == 0), + ConditionalField(BitField("netUserRate", None, 5), + lambda pkt: pkt.ext9 == 0), + + ConditionalField(BitField("ext11", None, 1), + lambda pkt: pkt.ext10 == 0), + ConditionalField(BitField("chanCoding", None, 4), + lambda pkt: pkt.ext10 == 0), + ConditionalField(BitField("maxTrafficChan", None, 3), + lambda pkt: pkt.ext10 == 0), + + ConditionalField(BitField("ext12", None, 1), + lambda pkt: pkt.ext11 == 0), + ConditionalField(BitField("uimi", None, 3), + lambda pkt: pkt.ext11 == 0), + ConditionalField(BitField("airInterfaceUserRate", None, 4), + lambda pkt: pkt.ext11 == 0), + + ConditionalField(BitField("ext13", 0x1, 1), + lambda pkt: pkt.ext12 == 0), + ConditionalField(BitField("layer2Ch", None, 2), + lambda pkt: pkt.ext12 == 0), + ConditionalField(BitField("userInfoL2", 0x0, 5), + lambda pkt: pkt.ext12 == 0) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11058,7 +11059,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthBC is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -11066,20 +11067,20 @@ class CallControlCapabilities(Packet): """Call Control Capabilities Section 10.5.4.5a""" name = "Call Control Capabilities" fields_desc = [ - XByteField("lengthCCC", 0x3), - BitField("spare", 0x0, 6), - BitField("pcp", 0x0, 1), - BitField("dtmf", 0x0, 1) - ] + XByteField("lengthCCC", 0x3), + BitField("spare", 0x0, 6), + BitField("pcp", 0x0, 1), + BitField("dtmf", 0x0, 1) + ] class CallState(Packet): """Call State Section 10.5.4.6""" name = "Call State" fields_desc = [ - BitField("codingStd", 0x0, 2), - BitField("stateValue", 0x0, 6) - ] + BitField("codingStd", 0x0, 2), + BitField("stateValue", 0x0, 6) + ] # len 3 to 43 @@ -11087,111 +11088,111 @@ class CalledPartyBcdNumber(Packet): """Called party BCD number Section 10.5.4.7""" name = "Called Party BCD Number" fields_desc = [ - XByteField("lengthCPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("nbPlanId", 0x0, 4), - # optional - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), - - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), - - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), - - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), - - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), - - BitField("nbDigit22", None, 4), - BitField("nbDigit21", None, 4), - BitField("nbDigit24", None, 4), - BitField("nbDigit23", None, 4), - - BitField("nbDigit26", None, 4), - BitField("nbDigit25", None, 4), - BitField("nbDigit28", None, 4), - BitField("nbDigit27", None, 4), - - BitField("nbDigit30", None, 4), - BitField("nbDigit29", None, 4), - BitField("nbDigit32", None, 4), - BitField("nbDigit31", None, 4), - - BitField("nbDigit34", None, 4), - BitField("nbDigit33", None, 4), - BitField("nbDigit36", None, 4), - BitField("nbDigit35", None, 4), - - BitField("nbDigit38", None, 4), - BitField("nbDigit37", None, 4), - BitField("nbDigit40", None, 4), - BitField("nbDigit39", None, 4), -# ^^^^^^ 20 first optional bytes ^^^^^^^^^^^^^^^ - BitField("nbDigit42", None, 4), - BitField("nbDigit41", None, 4), - BitField("nbDigit44", None, 4), - BitField("nbDigit43", None, 4), - - BitField("nbDigit46", None, 4), - BitField("nbDigit45", None, 4), - BitField("nbDigit48", None, 4), - BitField("nbDigit47", None, 4), - - BitField("nbDigit50", None, 4), - BitField("nbDigit49", None, 4), - BitField("nbDigit52", None, 4), - BitField("nbDigit51", None, 4), - - BitField("nbDigit54", None, 4), - BitField("nbDigit53", None, 4), - BitField("nbDigit56", None, 4), - BitField("nbDigit55", None, 4), - - BitField("nbDigit58", None, 4), - BitField("nbDigit57", None, 4), - BitField("nbDigit60", None, 4), - BitField("nbDigit59", None, 4), - - BitField("nbDigit62", None, 4), - BitField("nbDigit61", None, 4), - BitField("nbDigit64", None, 4), - BitField("nbDigit63", None, 4), - - BitField("nbDigit66", None, 4), - BitField("nbDigit65", None, 4), - BitField("nbDigit68", None, 4), - BitField("nbDigit67", None, 4), - - BitField("nbDigit70", None, 4), - BitField("nbDigit69", None, 4), - BitField("nbDigit72", None, 4), - BitField("nbDigit71", None, 4), - - BitField("nbDigit74", None, 4), - BitField("nbDigit73", None, 4), - BitField("nbDigit76", None, 4), - BitField("nbDigit75", None, 4), - - BitField("nbDigit78", None, 4), - BitField("nbDigit77", None, 4), - BitField("nbDigit80", None, 4), - BitField("nbDigit79", None, 4), - ] + XByteField("lengthCPBN", None), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("nbPlanId", 0x0, 4), + # optional + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), + + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), + + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), + + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), + + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), + + BitField("nbDigit22", None, 4), + BitField("nbDigit21", None, 4), + BitField("nbDigit24", None, 4), + BitField("nbDigit23", None, 4), + + BitField("nbDigit26", None, 4), + BitField("nbDigit25", None, 4), + BitField("nbDigit28", None, 4), + BitField("nbDigit27", None, 4), + + BitField("nbDigit30", None, 4), + BitField("nbDigit29", None, 4), + BitField("nbDigit32", None, 4), + BitField("nbDigit31", None, 4), + + BitField("nbDigit34", None, 4), + BitField("nbDigit33", None, 4), + BitField("nbDigit36", None, 4), + BitField("nbDigit35", None, 4), + + BitField("nbDigit38", None, 4), + BitField("nbDigit37", None, 4), + BitField("nbDigit40", None, 4), + BitField("nbDigit39", None, 4), + # ^^^^^^ 20 first optional bytes ^^^^^^^^^^^^^^^ + BitField("nbDigit42", None, 4), + BitField("nbDigit41", None, 4), + BitField("nbDigit44", None, 4), + BitField("nbDigit43", None, 4), + + BitField("nbDigit46", None, 4), + BitField("nbDigit45", None, 4), + BitField("nbDigit48", None, 4), + BitField("nbDigit47", None, 4), + + BitField("nbDigit50", None, 4), + BitField("nbDigit49", None, 4), + BitField("nbDigit52", None, 4), + BitField("nbDigit51", None, 4), + + BitField("nbDigit54", None, 4), + BitField("nbDigit53", None, 4), + BitField("nbDigit56", None, 4), + BitField("nbDigit55", None, 4), + + BitField("nbDigit58", None, 4), + BitField("nbDigit57", None, 4), + BitField("nbDigit60", None, 4), + BitField("nbDigit59", None, 4), + + BitField("nbDigit62", None, 4), + BitField("nbDigit61", None, 4), + BitField("nbDigit64", None, 4), + BitField("nbDigit63", None, 4), + + BitField("nbDigit66", None, 4), + BitField("nbDigit65", None, 4), + BitField("nbDigit68", None, 4), + BitField("nbDigit67", None, 4), + + BitField("nbDigit70", None, 4), + BitField("nbDigit69", None, 4), + BitField("nbDigit72", None, 4), + BitField("nbDigit71", None, 4), + + BitField("nbDigit74", None, 4), + BitField("nbDigit73", None, 4), + BitField("nbDigit76", None, 4), + BitField("nbDigit75", None, 4), + + BitField("nbDigit78", None, 4), + BitField("nbDigit77", None, 4), + BitField("nbDigit80", None, 4), + BitField("nbDigit79", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11208,34 +11209,34 @@ class CalledPartySubaddress(Packet): """Called party subaddress Section 10.5.4.8""" name = "Called Party Subaddress" fields_desc = [ - XByteField("lengthCPS", None), - # optional - BitField("ext", None, 1), - BitField("subAddr", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + XByteField("lengthCPS", None), + # optional + BitField("ext", None, 1), + BitField("subAddr", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11252,50 +11253,50 @@ class CallingPartyBcdNumber(Packet): """Called party subaddress Section 10.5.4.9""" name = "Called Party Subaddress" fields_desc = [ - XByteField("lengthCPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("nbPlanId", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", None, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", None, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", 0x0, 2), - lambda pkt: pkt.ext == 0), + XByteField("lengthCPBN", None), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("nbPlanId", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", None, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", None, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", 0x0, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), - ] + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11303,7 +11304,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthCPBN is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -11312,34 +11313,34 @@ class CallingPartySubaddress(Packet): """Calling party subaddress Section 10.5.4.10""" name = "Calling Party Subaddress" fields_desc = [ - XByteField("lengthCPS", None), - # optional - BitField("ext1", None, 1), - BitField("typeAddr", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + XByteField("lengthCPS", None), + # optional + BitField("ext1", None, 1), + BitField("typeAddr", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11357,49 +11358,49 @@ class Cause(Packet): name = "Cause" fields_desc = [ - XByteField("lengthC", None), - - BitField("ext", 0x1, 1), - BitField("codingStd", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("location", 0x0, 4), - - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("recommendation", 0x1, 7), - lambda pkt: pkt.ext == 0), - # optional - BitField("ext2", None, 1), - BitField("causeValue", None, 7), - - ByteField("diagnositc0", None), - ByteField("diagnositc1", None), - ByteField("diagnositc2", None), - ByteField("diagnositc3", None), - ByteField("diagnositc4", None), - ByteField("diagnositc5", None), - ByteField("diagnositc6", None), - ByteField("diagnositc7", None), - ByteField("diagnositc8", None), - ByteField("diagnositc9", None), - ByteField("diagnositc10", None), - ByteField("diagnositc11", None), - ByteField("diagnositc12", None), - ByteField("diagnositc13", None), - ByteField("diagnositc14", None), - ByteField("diagnositc15", None), - ByteField("diagnositc16", None), - ByteField("diagnositc17", None), - ByteField("diagnositc18", None), - ByteField("diagnositc19", None), - ByteField("diagnositc20", None), - ByteField("diagnositc21", None), - ByteField("diagnositc22", None), - ByteField("diagnositc23", None), - ByteField("diagnositc24", None), - ByteField("diagnositc25", None), - ByteField("diagnositc26", None), - ] + XByteField("lengthC", None), + + BitField("ext", 0x1, 1), + BitField("codingStd", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("location", 0x0, 4), + + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("recommendation", 0x1, 7), + lambda pkt: pkt.ext == 0), + # optional + BitField("ext2", None, 1), + BitField("causeValue", None, 7), + + ByteField("diagnositc0", None), + ByteField("diagnositc1", None), + ByteField("diagnositc2", None), + ByteField("diagnositc3", None), + ByteField("diagnositc4", None), + ByteField("diagnositc5", None), + ByteField("diagnositc6", None), + ByteField("diagnositc7", None), + ByteField("diagnositc8", None), + ByteField("diagnositc9", None), + ByteField("diagnositc10", None), + ByteField("diagnositc11", None), + ByteField("diagnositc12", None), + ByteField("diagnositc13", None), + ByteField("diagnositc14", None), + ByteField("diagnositc15", None), + ByteField("diagnositc16", None), + ByteField("diagnositc17", None), + ByteField("diagnositc18", None), + ByteField("diagnositc19", None), + ByteField("diagnositc20", None), + ByteField("diagnositc21", None), + ByteField("diagnositc22", None), + ByteField("diagnositc23", None), + ByteField("diagnositc24", None), + ByteField("diagnositc25", None), + ByteField("diagnositc26", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11407,7 +11408,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthC is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -11415,22 +11416,22 @@ class ClirSuppression(Packet): """CLIR suppression Section 10.5.4.11a""" name = "Clir Suppression" fields_desc = [ - ] + ] class ClirInvocation(Packet): """CLIR invocation Section 10.5.4.11b""" name = "Clir Invocation" fields_desc = [ - ] + ] class CongestionLevel(Packet): """Congestion level Section 10.5.4.12""" name = "Congestion Level" fields_desc = [ - BitField("notDef", 0x0, 4) # not defined by the std - ] + BitField("notDef", 0x0, 4) # not defined by the std + ] # len 3 to 14 @@ -11439,51 +11440,51 @@ class ConnectedNumber(Packet): name = "Connected Number" fields_desc = [ - XByteField("lengthCN", None), + XByteField("lengthCN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("typePlanId", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", None, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", None, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", None, 2), - lambda pkt: pkt.ext == 0), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("typePlanId", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", None, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", None, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", None, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4) - ] + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11491,7 +11492,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthCN is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -11501,34 +11502,34 @@ class ConnectedSubaddress(Packet): name = "Connected Subaddress" fields_desc = [ - XByteField("lengthCS", None), - # optional - BitField("ext", None, 1), - BitField("typeOfSub", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + XByteField("lengthCS", None), + # optional + BitField("ext", None, 1), + BitField("typeOfSub", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11545,258 +11546,258 @@ class Facility(Packet): """Facility Section 10.5.4.15""" name = "Facility" fields_desc = [ - XByteField("lengthF", None), - # optional - ByteField("facilityInfo1", None), - ByteField("facilityInfo2", None), - ByteField("facilityInfo3", None), - ByteField("facilityInfo4", None), - ByteField("facilityInfo5", None), - ByteField("facilityInfo6", None), - ByteField("facilityInfo7", None), - ByteField("facilityInfo8", None), - ByteField("facilityInfo9", None), - ByteField("facilityInfo10", None), - ByteField("facilityInfo11", None), - ByteField("facilityInfo12", None), - ByteField("facilityInfo13", None), - ByteField("facilityInfo14", None), - ByteField("facilityInfo15", None), - ByteField("facilityInfo16", None), - ByteField("facilityInfo17", None), - ByteField("facilityInfo18", None), - ByteField("facilityInfo19", None), - ByteField("facilityInfo20", None), - ByteField("facilityInfo21", None), - ByteField("facilityInfo22", None), - ByteField("facilityInfo23", None), - ByteField("facilityInfo24", None), - ByteField("facilityInfo25", None), - ByteField("facilityInfo26", None), - ByteField("facilityInfo27", None), - ByteField("facilityInfo28", None), - ByteField("facilityInfo29", None), - ByteField("facilityInfo30", None), - ByteField("facilityInfo31", None), - ByteField("facilityInfo32", None), - ByteField("facilityInfo33", None), - ByteField("facilityInfo34", None), - ByteField("facilityInfo35", None), - ByteField("facilityInfo36", None), - ByteField("facilityInfo37", None), - ByteField("facilityInfo38", None), - ByteField("facilityInfo39", None), - ByteField("facilityInfo40", None), - ByteField("facilityInfo41", None), - ByteField("facilityInfo42", None), - ByteField("facilityInfo43", None), - ByteField("facilityInfo44", None), - ByteField("facilityInfo45", None), - ByteField("facilityInfo46", None), - ByteField("facilityInfo47", None), - ByteField("facilityInfo48", None), - ByteField("facilityInfo49", None), - ByteField("facilityInfo50", None), - ByteField("facilityInfo51", None), - ByteField("facilityInfo52", None), - ByteField("facilityInfo53", None), - ByteField("facilityInfo54", None), - ByteField("facilityInfo55", None), - ByteField("facilityInfo56", None), - ByteField("facilityInfo57", None), - ByteField("facilityInfo58", None), - ByteField("facilityInfo59", None), - ByteField("facilityInfo60", None), - ByteField("facilityInfo61", None), - ByteField("facilityInfo62", None), - ByteField("facilityInfo63", None), - ByteField("facilityInfo64", None), - ByteField("facilityInfo65", None), - ByteField("facilityInfo66", None), - ByteField("facilityInfo67", None), - ByteField("facilityInfo68", None), - ByteField("facilityInfo69", None), - ByteField("facilityInfo70", None), - ByteField("facilityInfo71", None), - ByteField("facilityInfo72", None), - ByteField("facilityInfo73", None), - ByteField("facilityInfo74", None), - ByteField("facilityInfo75", None), - ByteField("facilityInfo76", None), - ByteField("facilityInfo77", None), - ByteField("facilityInfo78", None), - ByteField("facilityInfo79", None), - ByteField("facilityInfo80", None), - ByteField("facilityInfo81", None), - ByteField("facilityInfo82", None), - ByteField("facilityInfo83", None), - ByteField("facilityInfo84", None), - ByteField("facilityInfo85", None), - ByteField("facilityInfo86", None), - ByteField("facilityInfo87", None), - ByteField("facilityInfo88", None), - ByteField("facilityInfo89", None), - ByteField("facilityInfo90", None), - ByteField("facilityInfo91", None), - ByteField("facilityInfo92", None), - ByteField("facilityInfo93", None), - ByteField("facilityInfo94", None), - ByteField("facilityInfo95", None), - ByteField("facilityInfo96", None), - ByteField("facilityInfo97", None), - ByteField("facilityInfo98", None), - ByteField("facilityInfo99", None), - ByteField("facilityInfo100", None), - ByteField("facilityInfo101", None), - ByteField("facilityInfo102", None), - ByteField("facilityInfo103", None), - ByteField("facilityInfo104", None), - ByteField("facilityInfo105", None), - ByteField("facilityInfo106", None), - ByteField("facilityInfo107", None), - ByteField("facilityInfo108", None), - ByteField("facilityInfo109", None), - ByteField("facilityInfo110", None), - ByteField("facilityInfo111", None), - ByteField("facilityInfo112", None), - ByteField("facilityInfo113", None), - ByteField("facilityInfo114", None), - ByteField("facilityInfo115", None), - ByteField("facilityInfo116", None), - ByteField("facilityInfo117", None), - ByteField("facilityInfo118", None), - ByteField("facilityInfo119", None), - ByteField("facilityInfo120", None), - ByteField("facilityInfo121", None), - ByteField("facilityInfo122", None), - ByteField("facilityInfo123", None), - ByteField("facilityInfo124", None), - ByteField("facilityInfo125", None), - ByteField("facilityInfo126", None), - ByteField("facilityInfo127", None), - ByteField("facilityInfo128", None), - ByteField("facilityInfo129", None), - ByteField("facilityInfo130", None), - ByteField("facilityInfo131", None), - ByteField("facilityInfo132", None), - ByteField("facilityInfo133", None), - ByteField("facilityInfo134", None), - ByteField("facilityInfo135", None), - ByteField("facilityInfo136", None), - ByteField("facilityInfo137", None), - ByteField("facilityInfo138", None), - ByteField("facilityInfo139", None), - ByteField("facilityInfo140", None), - ByteField("facilityInfo141", None), - ByteField("facilityInfo142", None), - ByteField("facilityInfo143", None), - ByteField("facilityInfo144", None), - ByteField("facilityInfo145", None), - ByteField("facilityInfo146", None), - ByteField("facilityInfo147", None), - ByteField("facilityInfo148", None), - ByteField("facilityInfo149", None), - ByteField("facilityInfo150", None), - ByteField("facilityInfo151", None), - ByteField("facilityInfo152", None), - ByteField("facilityInfo153", None), - ByteField("facilityInfo154", None), - ByteField("facilityInfo155", None), - ByteField("facilityInfo156", None), - ByteField("facilityInfo157", None), - ByteField("facilityInfo158", None), - ByteField("facilityInfo159", None), - ByteField("facilityInfo160", None), - ByteField("facilityInfo161", None), - ByteField("facilityInfo162", None), - ByteField("facilityInfo163", None), - ByteField("facilityInfo164", None), - ByteField("facilityInfo165", None), - ByteField("facilityInfo166", None), - ByteField("facilityInfo167", None), - ByteField("facilityInfo168", None), - ByteField("facilityInfo169", None), - ByteField("facilityInfo170", None), - ByteField("facilityInfo171", None), - ByteField("facilityInfo172", None), - ByteField("facilityInfo173", None), - ByteField("facilityInfo174", None), - ByteField("facilityInfo175", None), - ByteField("facilityInfo176", None), - ByteField("facilityInfo177", None), - ByteField("facilityInfo178", None), - ByteField("facilityInfo179", None), - ByteField("facilityInfo180", None), - ByteField("facilityInfo181", None), - ByteField("facilityInfo182", None), - ByteField("facilityInfo183", None), - ByteField("facilityInfo184", None), - ByteField("facilityInfo185", None), - ByteField("facilityInfo186", None), - ByteField("facilityInfo187", None), - ByteField("facilityInfo188", None), - ByteField("facilityInfo189", None), - ByteField("facilityInfo190", None), - ByteField("facilityInfo191", None), - ByteField("facilityInfo192", None), - ByteField("facilityInfo193", None), - ByteField("facilityInfo194", None), - ByteField("facilityInfo195", None), - ByteField("facilityInfo196", None), - ByteField("facilityInfo197", None), - ByteField("facilityInfo198", None), - ByteField("facilityInfo199", None), - ByteField("facilityInfo200", None), - ByteField("facilityInfo201", None), - ByteField("facilityInfo202", None), - ByteField("facilityInfo203", None), - ByteField("facilityInfo204", None), - ByteField("facilityInfo205", None), - ByteField("facilityInfo206", None), - ByteField("facilityInfo207", None), - ByteField("facilityInfo208", None), - ByteField("facilityInfo209", None), - ByteField("facilityInfo210", None), - ByteField("facilityInfo211", None), - ByteField("facilityInfo212", None), - ByteField("facilityInfo213", None), - ByteField("facilityInfo214", None), - ByteField("facilityInfo215", None), - ByteField("facilityInfo216", None), - ByteField("facilityInfo217", None), - ByteField("facilityInfo218", None), - ByteField("facilityInfo219", None), - ByteField("facilityInfo220", None), - ByteField("facilityInfo221", None), - ByteField("facilityInfo222", None), - ByteField("facilityInfo223", None), - ByteField("facilityInfo224", None), - ByteField("facilityInfo225", None), - ByteField("facilityInfo226", None), - ByteField("facilityInfo227", None), - ByteField("facilityInfo228", None), - ByteField("facilityInfo229", None), - ByteField("facilityInfo230", None), - ByteField("facilityInfo231", None), - ByteField("facilityInfo232", None), - ByteField("facilityInfo233", None), - ByteField("facilityInfo234", None), - ByteField("facilityInfo235", None), - ByteField("facilityInfo236", None), - ByteField("facilityInfo237", None), - ByteField("facilityInfo238", None), - ByteField("facilityInfo239", None), - ByteField("facilityInfo240", None), - ByteField("facilityInfo241", None), - ByteField("facilityInfo242", None), - ByteField("facilityInfo243", None), - ByteField("facilityInfo244", None), - ByteField("facilityInfo245", None), - ByteField("facilityInfo246", None), - ByteField("facilityInfo247", None), - ByteField("facilityInfo248", None), - ByteField("facilityInfo249", None) - ] + XByteField("lengthF", None), + # optional + ByteField("facilityInfo1", None), + ByteField("facilityInfo2", None), + ByteField("facilityInfo3", None), + ByteField("facilityInfo4", None), + ByteField("facilityInfo5", None), + ByteField("facilityInfo6", None), + ByteField("facilityInfo7", None), + ByteField("facilityInfo8", None), + ByteField("facilityInfo9", None), + ByteField("facilityInfo10", None), + ByteField("facilityInfo11", None), + ByteField("facilityInfo12", None), + ByteField("facilityInfo13", None), + ByteField("facilityInfo14", None), + ByteField("facilityInfo15", None), + ByteField("facilityInfo16", None), + ByteField("facilityInfo17", None), + ByteField("facilityInfo18", None), + ByteField("facilityInfo19", None), + ByteField("facilityInfo20", None), + ByteField("facilityInfo21", None), + ByteField("facilityInfo22", None), + ByteField("facilityInfo23", None), + ByteField("facilityInfo24", None), + ByteField("facilityInfo25", None), + ByteField("facilityInfo26", None), + ByteField("facilityInfo27", None), + ByteField("facilityInfo28", None), + ByteField("facilityInfo29", None), + ByteField("facilityInfo30", None), + ByteField("facilityInfo31", None), + ByteField("facilityInfo32", None), + ByteField("facilityInfo33", None), + ByteField("facilityInfo34", None), + ByteField("facilityInfo35", None), + ByteField("facilityInfo36", None), + ByteField("facilityInfo37", None), + ByteField("facilityInfo38", None), + ByteField("facilityInfo39", None), + ByteField("facilityInfo40", None), + ByteField("facilityInfo41", None), + ByteField("facilityInfo42", None), + ByteField("facilityInfo43", None), + ByteField("facilityInfo44", None), + ByteField("facilityInfo45", None), + ByteField("facilityInfo46", None), + ByteField("facilityInfo47", None), + ByteField("facilityInfo48", None), + ByteField("facilityInfo49", None), + ByteField("facilityInfo50", None), + ByteField("facilityInfo51", None), + ByteField("facilityInfo52", None), + ByteField("facilityInfo53", None), + ByteField("facilityInfo54", None), + ByteField("facilityInfo55", None), + ByteField("facilityInfo56", None), + ByteField("facilityInfo57", None), + ByteField("facilityInfo58", None), + ByteField("facilityInfo59", None), + ByteField("facilityInfo60", None), + ByteField("facilityInfo61", None), + ByteField("facilityInfo62", None), + ByteField("facilityInfo63", None), + ByteField("facilityInfo64", None), + ByteField("facilityInfo65", None), + ByteField("facilityInfo66", None), + ByteField("facilityInfo67", None), + ByteField("facilityInfo68", None), + ByteField("facilityInfo69", None), + ByteField("facilityInfo70", None), + ByteField("facilityInfo71", None), + ByteField("facilityInfo72", None), + ByteField("facilityInfo73", None), + ByteField("facilityInfo74", None), + ByteField("facilityInfo75", None), + ByteField("facilityInfo76", None), + ByteField("facilityInfo77", None), + ByteField("facilityInfo78", None), + ByteField("facilityInfo79", None), + ByteField("facilityInfo80", None), + ByteField("facilityInfo81", None), + ByteField("facilityInfo82", None), + ByteField("facilityInfo83", None), + ByteField("facilityInfo84", None), + ByteField("facilityInfo85", None), + ByteField("facilityInfo86", None), + ByteField("facilityInfo87", None), + ByteField("facilityInfo88", None), + ByteField("facilityInfo89", None), + ByteField("facilityInfo90", None), + ByteField("facilityInfo91", None), + ByteField("facilityInfo92", None), + ByteField("facilityInfo93", None), + ByteField("facilityInfo94", None), + ByteField("facilityInfo95", None), + ByteField("facilityInfo96", None), + ByteField("facilityInfo97", None), + ByteField("facilityInfo98", None), + ByteField("facilityInfo99", None), + ByteField("facilityInfo100", None), + ByteField("facilityInfo101", None), + ByteField("facilityInfo102", None), + ByteField("facilityInfo103", None), + ByteField("facilityInfo104", None), + ByteField("facilityInfo105", None), + ByteField("facilityInfo106", None), + ByteField("facilityInfo107", None), + ByteField("facilityInfo108", None), + ByteField("facilityInfo109", None), + ByteField("facilityInfo110", None), + ByteField("facilityInfo111", None), + ByteField("facilityInfo112", None), + ByteField("facilityInfo113", None), + ByteField("facilityInfo114", None), + ByteField("facilityInfo115", None), + ByteField("facilityInfo116", None), + ByteField("facilityInfo117", None), + ByteField("facilityInfo118", None), + ByteField("facilityInfo119", None), + ByteField("facilityInfo120", None), + ByteField("facilityInfo121", None), + ByteField("facilityInfo122", None), + ByteField("facilityInfo123", None), + ByteField("facilityInfo124", None), + ByteField("facilityInfo125", None), + ByteField("facilityInfo126", None), + ByteField("facilityInfo127", None), + ByteField("facilityInfo128", None), + ByteField("facilityInfo129", None), + ByteField("facilityInfo130", None), + ByteField("facilityInfo131", None), + ByteField("facilityInfo132", None), + ByteField("facilityInfo133", None), + ByteField("facilityInfo134", None), + ByteField("facilityInfo135", None), + ByteField("facilityInfo136", None), + ByteField("facilityInfo137", None), + ByteField("facilityInfo138", None), + ByteField("facilityInfo139", None), + ByteField("facilityInfo140", None), + ByteField("facilityInfo141", None), + ByteField("facilityInfo142", None), + ByteField("facilityInfo143", None), + ByteField("facilityInfo144", None), + ByteField("facilityInfo145", None), + ByteField("facilityInfo146", None), + ByteField("facilityInfo147", None), + ByteField("facilityInfo148", None), + ByteField("facilityInfo149", None), + ByteField("facilityInfo150", None), + ByteField("facilityInfo151", None), + ByteField("facilityInfo152", None), + ByteField("facilityInfo153", None), + ByteField("facilityInfo154", None), + ByteField("facilityInfo155", None), + ByteField("facilityInfo156", None), + ByteField("facilityInfo157", None), + ByteField("facilityInfo158", None), + ByteField("facilityInfo159", None), + ByteField("facilityInfo160", None), + ByteField("facilityInfo161", None), + ByteField("facilityInfo162", None), + ByteField("facilityInfo163", None), + ByteField("facilityInfo164", None), + ByteField("facilityInfo165", None), + ByteField("facilityInfo166", None), + ByteField("facilityInfo167", None), + ByteField("facilityInfo168", None), + ByteField("facilityInfo169", None), + ByteField("facilityInfo170", None), + ByteField("facilityInfo171", None), + ByteField("facilityInfo172", None), + ByteField("facilityInfo173", None), + ByteField("facilityInfo174", None), + ByteField("facilityInfo175", None), + ByteField("facilityInfo176", None), + ByteField("facilityInfo177", None), + ByteField("facilityInfo178", None), + ByteField("facilityInfo179", None), + ByteField("facilityInfo180", None), + ByteField("facilityInfo181", None), + ByteField("facilityInfo182", None), + ByteField("facilityInfo183", None), + ByteField("facilityInfo184", None), + ByteField("facilityInfo185", None), + ByteField("facilityInfo186", None), + ByteField("facilityInfo187", None), + ByteField("facilityInfo188", None), + ByteField("facilityInfo189", None), + ByteField("facilityInfo190", None), + ByteField("facilityInfo191", None), + ByteField("facilityInfo192", None), + ByteField("facilityInfo193", None), + ByteField("facilityInfo194", None), + ByteField("facilityInfo195", None), + ByteField("facilityInfo196", None), + ByteField("facilityInfo197", None), + ByteField("facilityInfo198", None), + ByteField("facilityInfo199", None), + ByteField("facilityInfo200", None), + ByteField("facilityInfo201", None), + ByteField("facilityInfo202", None), + ByteField("facilityInfo203", None), + ByteField("facilityInfo204", None), + ByteField("facilityInfo205", None), + ByteField("facilityInfo206", None), + ByteField("facilityInfo207", None), + ByteField("facilityInfo208", None), + ByteField("facilityInfo209", None), + ByteField("facilityInfo210", None), + ByteField("facilityInfo211", None), + ByteField("facilityInfo212", None), + ByteField("facilityInfo213", None), + ByteField("facilityInfo214", None), + ByteField("facilityInfo215", None), + ByteField("facilityInfo216", None), + ByteField("facilityInfo217", None), + ByteField("facilityInfo218", None), + ByteField("facilityInfo219", None), + ByteField("facilityInfo220", None), + ByteField("facilityInfo221", None), + ByteField("facilityInfo222", None), + ByteField("facilityInfo223", None), + ByteField("facilityInfo224", None), + ByteField("facilityInfo225", None), + ByteField("facilityInfo226", None), + ByteField("facilityInfo227", None), + ByteField("facilityInfo228", None), + ByteField("facilityInfo229", None), + ByteField("facilityInfo230", None), + ByteField("facilityInfo231", None), + ByteField("facilityInfo232", None), + ByteField("facilityInfo233", None), + ByteField("facilityInfo234", None), + ByteField("facilityInfo235", None), + ByteField("facilityInfo236", None), + ByteField("facilityInfo237", None), + ByteField("facilityInfo238", None), + ByteField("facilityInfo239", None), + ByteField("facilityInfo240", None), + ByteField("facilityInfo241", None), + ByteField("facilityInfo242", None), + ByteField("facilityInfo243", None), + ByteField("facilityInfo244", None), + ByteField("facilityInfo245", None), + ByteField("facilityInfo246", None), + ByteField("facilityInfo247", None), + ByteField("facilityInfo248", None), + ByteField("facilityInfo249", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11808,27 +11809,27 @@ def post_build(self, p, pay): return p + pay -#len 2 to 5 +# len 2 to 5 class HighLayerCompatibility(Packet): """High layer compatibility Section 10.5.4.16""" name = "High Layer Compatibility" fields_desc = [ - XByteField("lengthHLC", None), - # optional - BitField("ext", None, 1), - BitField("codingStd", None, 2), - BitField("interpret", None, 3), - BitField("presMeth", None, 2), + XByteField("lengthHLC", None), + # optional + BitField("ext", None, 1), + BitField("codingStd", None, 2), + BitField("interpret", None, 3), + BitField("presMeth", None, 2), - BitField("ext1", None, 1), - BitField("highLayerId", None, 7), + BitField("ext1", None, 1), + BitField("highLayerId", None, 7), - ConditionalField(BitField("ext2", 0x1, 1), - lambda pkt: pkt.ext1 == 0), - ConditionalField(BitField("exHiLayerId", 0x0, 7), - lambda pkt: pkt.ext1 == 0), - ] + ConditionalField(BitField("ext2", 0x1, 1), + lambda pkt: pkt.ext1 == 0), + ConditionalField(BitField("exHiLayerId", 0x0, 7), + lambda pkt: pkt.ext1 == 0), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11836,11 +11837,11 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthHLC is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay # # 10.5.4.16.1 Static conditions for the high layer -# compatibility IE contents +# compatibility IE contents # @@ -11848,9 +11849,9 @@ class KeypadFacility(Packet): """Keypad facility Section 10.5.4.17""" name = "Keypad Facility" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("keyPadInfo", 0x0, 7) - ] + BitField("spare", 0x0, 1), + BitField("keyPadInfo", 0x0, 7) + ] # len 2 to 15 @@ -11859,22 +11860,22 @@ class LowLayerCompatibility(Packet): name = "Low Layer Compatibility" fields_desc = [ - XByteField("lengthLLC", None), - # optional - ByteField("rest0", None), - ByteField("rest1", None), - ByteField("rest2", None), - ByteField("rest3", None), - ByteField("rest4", None), - ByteField("rest5", None), - ByteField("rest6", None), - ByteField("rest7", None), - ByteField("rest8", None), - ByteField("rest9", None), - ByteField("rest10", None), - ByteField("rest11", None), - ByteField("rest12", None) - ] + XByteField("lengthLLC", None), + # optional + ByteField("rest0", None), + ByteField("rest1", None), + ByteField("rest2", None), + ByteField("rest3", None), + ByteField("rest4", None), + ByteField("rest5", None), + ByteField("rest6", None), + ByteField("rest7", None), + ByteField("rest8", None), + ByteField("rest9", None), + ByteField("rest10", None), + ByteField("rest11", None), + ByteField("rest12", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11890,39 +11891,39 @@ class MoreData(Packet): """More data Section 10.5.4.19""" name = "More Data" fields_desc = [ - ] + ] class NotificationIndicator(Packet): """Notification indicator Section 10.5.4.20""" name = "Notification Indicator" fields_desc = [ - BitField("ext1", 0x1, 1), - BitField("notifDesc", 0x0, 7) - ] + BitField("ext1", 0x1, 1), + BitField("notifDesc", 0x0, 7) + ] class ProgressIndicator(Packet): """Progress indicator Section 10.5.4.21""" name = "Progress Indicator" fields_desc = [ - XByteField("lengthPI", 0x2), - BitField("ext", 0x1, 1), - BitField("codingStd", 0x0, 2), - BitField("spare", 0x0, 1), - BitField("location", 0x0, 4), - BitField("ext1", 0x1, 1), - BitField("progressDesc", 0x0, 7) - ] + XByteField("lengthPI", 0x2), + BitField("ext", 0x1, 1), + BitField("codingStd", 0x0, 2), + BitField("spare", 0x0, 1), + BitField("location", 0x0, 4), + BitField("ext1", 0x1, 1), + BitField("progressDesc", 0x0, 7) + ] class RecallType(Packet): """Recall type $(CCBS)$ Section 10.5.4.21a""" name = "Recall Type $(CCBS)$" fields_desc = [ - BitField("spare", 0x0, 5), - BitField("recallType", 0x0, 3) - ] + BitField("spare", 0x0, 5), + BitField("recallType", 0x0, 3) + ] # len 3 to 19 @@ -11931,66 +11932,66 @@ class RedirectingPartyBcdNumber(Packet): name = "Redirecting Party BCD Number" fields_desc = [ - XByteField("lengthRPBN", None), + XByteField("lengthRPBN", None), - BitField("ext", 0x1, 1), - BitField("typeNb", 0x0, 3), - BitField("numberingPlan", 0x0, 4), - # optional - ConditionalField(BitField("ext1", 0x1, 1), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("presId", 0x0, 2), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("spare", 0x0, 3), - lambda pkt: pkt.ext == 0), - ConditionalField(BitField("screenId", 0x0, 2), - lambda pkt: pkt.ext == 0), + BitField("ext", 0x1, 1), + BitField("typeNb", 0x0, 3), + BitField("numberingPlan", 0x0, 4), + # optional + ConditionalField(BitField("ext1", 0x1, 1), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("presId", 0x0, 2), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("spare", 0x0, 3), + lambda pkt: pkt.ext == 0), + ConditionalField(BitField("screenId", 0x0, 2), + lambda pkt: pkt.ext == 0), - BitField("nbDigit2", None, 4), - BitField("nbDigit1", None, 4), + BitField("nbDigit2", None, 4), + BitField("nbDigit1", None, 4), - BitField("nbDigit4", None, 4), - BitField("nbDigit3", None, 4), + BitField("nbDigit4", None, 4), + BitField("nbDigit3", None, 4), - BitField("nbDigit6", None, 4), - BitField("nbDigit5", None, 4), + BitField("nbDigit6", None, 4), + BitField("nbDigit5", None, 4), - BitField("nbDigit8", None, 4), - BitField("nbDigit7", None, 4), + BitField("nbDigit8", None, 4), + BitField("nbDigit7", None, 4), - BitField("nbDigit10", None, 4), - BitField("nbDigit9", None, 4), + BitField("nbDigit10", None, 4), + BitField("nbDigit9", None, 4), - BitField("nbDigit12", None, 4), - BitField("nbDigit11", None, 4), + BitField("nbDigit12", None, 4), + BitField("nbDigit11", None, 4), - BitField("nbDigit14", None, 4), - BitField("nbDigit13", None, 4), + BitField("nbDigit14", None, 4), + BitField("nbDigit13", None, 4), - BitField("nbDigit16", None, 4), - BitField("nbDigit15", None, 4), + BitField("nbDigit16", None, 4), + BitField("nbDigit15", None, 4), - BitField("nbDigit18", None, 4), - BitField("nbDigit17", None, 4), + BitField("nbDigit18", None, 4), + BitField("nbDigit17", None, 4), - BitField("nbDigit20", None, 4), - BitField("nbDigit19", None, 4), + BitField("nbDigit20", None, 4), + BitField("nbDigit19", None, 4), - BitField("nbDigit22", None, 4), - BitField("nbDigit21", None, 4), + BitField("nbDigit22", None, 4), + BitField("nbDigit21", None, 4), - BitField("nbDigit24", None, 4), - BitField("nbDigit23", None, 4), + BitField("nbDigit24", None, 4), + BitField("nbDigit23", None, 4), - BitField("nbDigit26", None, 4), - BitField("nbDigit25", None, 4), + BitField("nbDigit26", None, 4), + BitField("nbDigit25", None, 4), - BitField("nbDigit28", None, 4), - BitField("nbDigit27", None, 4), + BitField("nbDigit28", None, 4), + BitField("nbDigit27", None, 4), - BitField("nbDigit30", None, 4), - BitField("nbDigit29", None, 4), - ] + BitField("nbDigit30", None, 4), + BitField("nbDigit29", None, 4), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -11998,7 +11999,7 @@ def post_build(self, p, pay): if res[0] != 0: p = p[:-res[0]] if self.lengthRPBN is None: - p = struct.pack(">B", len(p)-1) + p[1:] + p = struct.pack(">B", len(p) - 1) + p[1:] return p + pay @@ -12008,34 +12009,34 @@ class RedirectingPartySubaddress(Packet): name = "Redirecting Party BCD Number" fields_desc = [ - XByteField("lengthRPS", None), - # optional - BitField("ext", None, 1), - BitField("typeSub", None, 3), - BitField("oddEven", None, 1), - BitField("spare", None, 3), - - ByteField("subInfo0", None), - ByteField("subInfo1", None), - ByteField("subInfo2", None), - ByteField("subInfo3", None), - ByteField("subInfo4", None), - ByteField("subInfo5", None), - ByteField("subInfo6", None), - ByteField("subInfo7", None), - ByteField("subInfo8", None), - ByteField("subInfo9", None), - ByteField("subInfo10", None), - ByteField("subInfo11", None), - ByteField("subInfo12", None), - ByteField("subInfo13", None), - ByteField("subInfo14", None), - ByteField("subInfo15", None), - ByteField("subInfo16", None), - ByteField("subInfo17", None), - ByteField("subInfo18", None), - ByteField("subInfo19", None) - ] + XByteField("lengthRPS", None), + # optional + BitField("ext", None, 1), + BitField("typeSub", None, 3), + BitField("oddEven", None, 1), + BitField("spare", None, 3), + + ByteField("subInfo0", None), + ByteField("subInfo1", None), + ByteField("subInfo2", None), + ByteField("subInfo3", None), + ByteField("subInfo4", None), + ByteField("subInfo5", None), + ByteField("subInfo6", None), + ByteField("subInfo7", None), + ByteField("subInfo8", None), + ByteField("subInfo9", None), + ByteField("subInfo10", None), + ByteField("subInfo11", None), + ByteField("subInfo12", None), + ByteField("subInfo13", None), + ByteField("subInfo14", None), + ByteField("subInfo15", None), + ByteField("subInfo16", None), + ByteField("subInfo17", None), + ByteField("subInfo18", None), + ByteField("subInfo19", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -12051,8 +12052,8 @@ class RepeatIndicator(Packet): """Repeat indicator Section 10.5.4.22""" name = "Repeat Indicator" fields_desc = [ - BitField("repeatIndic", 0x0, 4) - ] + BitField("repeatIndic", 0x0, 4) + ] # no upper length min 2(max for L3) (251) @@ -12060,258 +12061,258 @@ class SetupContainer(Packet): """SETUP Container $(CCBS)$ Section 10.5.4.22b""" name = "Setup Container $(CCBS)$" fields_desc = [ - XByteField("lengthSC", None), - # optional - ByteField("mess1", None), - ByteField("mess2", None), - ByteField("mess3", None), - ByteField("mess4", None), - ByteField("mess5", None), - ByteField("mess6", None), - ByteField("mess7", None), - ByteField("mess8", None), - ByteField("mess9", None), - ByteField("mess10", None), - ByteField("mess11", None), - ByteField("mess12", None), - ByteField("mess13", None), - ByteField("mess14", None), - ByteField("mess15", None), - ByteField("mess16", None), - ByteField("mess17", None), - ByteField("mess18", None), - ByteField("mess19", None), - ByteField("mess20", None), - ByteField("mess21", None), - ByteField("mess22", None), - ByteField("mess23", None), - ByteField("mess24", None), - ByteField("mess25", None), - ByteField("mess26", None), - ByteField("mess27", None), - ByteField("mess28", None), - ByteField("mess29", None), - ByteField("mess30", None), - ByteField("mess31", None), - ByteField("mess32", None), - ByteField("mess33", None), - ByteField("mess34", None), - ByteField("mess35", None), - ByteField("mess36", None), - ByteField("mess37", None), - ByteField("mess38", None), - ByteField("mess39", None), - ByteField("mess40", None), - ByteField("mess41", None), - ByteField("mess42", None), - ByteField("mess43", None), - ByteField("mess44", None), - ByteField("mess45", None), - ByteField("mess46", None), - ByteField("mess47", None), - ByteField("mess48", None), - ByteField("mess49", None), - ByteField("mess50", None), - ByteField("mess51", None), - ByteField("mess52", None), - ByteField("mess53", None), - ByteField("mess54", None), - ByteField("mess55", None), - ByteField("mess56", None), - ByteField("mess57", None), - ByteField("mess58", None), - ByteField("mess59", None), - ByteField("mess60", None), - ByteField("mess61", None), - ByteField("mess62", None), - ByteField("mess63", None), - ByteField("mess64", None), - ByteField("mess65", None), - ByteField("mess66", None), - ByteField("mess67", None), - ByteField("mess68", None), - ByteField("mess69", None), - ByteField("mess70", None), - ByteField("mess71", None), - ByteField("mess72", None), - ByteField("mess73", None), - ByteField("mess74", None), - ByteField("mess75", None), - ByteField("mess76", None), - ByteField("mess77", None), - ByteField("mess78", None), - ByteField("mess79", None), - ByteField("mess80", None), - ByteField("mess81", None), - ByteField("mess82", None), - ByteField("mess83", None), - ByteField("mess84", None), - ByteField("mess85", None), - ByteField("mess86", None), - ByteField("mess87", None), - ByteField("mess88", None), - ByteField("mess89", None), - ByteField("mess90", None), - ByteField("mess91", None), - ByteField("mess92", None), - ByteField("mess93", None), - ByteField("mess94", None), - ByteField("mess95", None), - ByteField("mess96", None), - ByteField("mess97", None), - ByteField("mess98", None), - ByteField("mess99", None), - ByteField("mess100", None), - ByteField("mess101", None), - ByteField("mess102", None), - ByteField("mess103", None), - ByteField("mess104", None), - ByteField("mess105", None), - ByteField("mess106", None), - ByteField("mess107", None), - ByteField("mess108", None), - ByteField("mess109", None), - ByteField("mess110", None), - ByteField("mess111", None), - ByteField("mess112", None), - ByteField("mess113", None), - ByteField("mess114", None), - ByteField("mess115", None), - ByteField("mess116", None), - ByteField("mess117", None), - ByteField("mess118", None), - ByteField("mess119", None), - ByteField("mess120", None), - ByteField("mess121", None), - ByteField("mess122", None), - ByteField("mess123", None), - ByteField("mess124", None), - ByteField("mess125", None), - ByteField("mess126", None), - ByteField("mess127", None), - ByteField("mess128", None), - ByteField("mess129", None), - ByteField("mess130", None), - ByteField("mess131", None), - ByteField("mess132", None), - ByteField("mess133", None), - ByteField("mess134", None), - ByteField("mess135", None), - ByteField("mess136", None), - ByteField("mess137", None), - ByteField("mess138", None), - ByteField("mess139", None), - ByteField("mess140", None), - ByteField("mess141", None), - ByteField("mess142", None), - ByteField("mess143", None), - ByteField("mess144", None), - ByteField("mess145", None), - ByteField("mess146", None), - ByteField("mess147", None), - ByteField("mess148", None), - ByteField("mess149", None), - ByteField("mess150", None), - ByteField("mess151", None), - ByteField("mess152", None), - ByteField("mess153", None), - ByteField("mess154", None), - ByteField("mess155", None), - ByteField("mess156", None), - ByteField("mess157", None), - ByteField("mess158", None), - ByteField("mess159", None), - ByteField("mess160", None), - ByteField("mess161", None), - ByteField("mess162", None), - ByteField("mess163", None), - ByteField("mess164", None), - ByteField("mess165", None), - ByteField("mess166", None), - ByteField("mess167", None), - ByteField("mess168", None), - ByteField("mess169", None), - ByteField("mess170", None), - ByteField("mess171", None), - ByteField("mess172", None), - ByteField("mess173", None), - ByteField("mess174", None), - ByteField("mess175", None), - ByteField("mess176", None), - ByteField("mess177", None), - ByteField("mess178", None), - ByteField("mess179", None), - ByteField("mess180", None), - ByteField("mess181", None), - ByteField("mess182", None), - ByteField("mess183", None), - ByteField("mess184", None), - ByteField("mess185", None), - ByteField("mess186", None), - ByteField("mess187", None), - ByteField("mess188", None), - ByteField("mess189", None), - ByteField("mess190", None), - ByteField("mess191", None), - ByteField("mess192", None), - ByteField("mess193", None), - ByteField("mess194", None), - ByteField("mess195", None), - ByteField("mess196", None), - ByteField("mess197", None), - ByteField("mess198", None), - ByteField("mess199", None), - ByteField("mess200", None), - ByteField("mess201", None), - ByteField("mess202", None), - ByteField("mess203", None), - ByteField("mess204", None), - ByteField("mess205", None), - ByteField("mess206", None), - ByteField("mess207", None), - ByteField("mess208", None), - ByteField("mess209", None), - ByteField("mess210", None), - ByteField("mess211", None), - ByteField("mess212", None), - ByteField("mess213", None), - ByteField("mess214", None), - ByteField("mess215", None), - ByteField("mess216", None), - ByteField("mess217", None), - ByteField("mess218", None), - ByteField("mess219", None), - ByteField("mess220", None), - ByteField("mess221", None), - ByteField("mess222", None), - ByteField("mess223", None), - ByteField("mess224", None), - ByteField("mess225", None), - ByteField("mess226", None), - ByteField("mess227", None), - ByteField("mess228", None), - ByteField("mess229", None), - ByteField("mess230", None), - ByteField("mess231", None), - ByteField("mess232", None), - ByteField("mess233", None), - ByteField("mess234", None), - ByteField("mess235", None), - ByteField("mess236", None), - ByteField("mess237", None), - ByteField("mess238", None), - ByteField("mess239", None), - ByteField("mess240", None), - ByteField("mess241", None), - ByteField("mess242", None), - ByteField("mess243", None), - ByteField("mess244", None), - ByteField("mess245", None), - ByteField("mess246", None), - ByteField("mess247", None), - ByteField("mess248", None), - ByteField("mess249", None), - ] + XByteField("lengthSC", None), + # optional + ByteField("mess1", None), + ByteField("mess2", None), + ByteField("mess3", None), + ByteField("mess4", None), + ByteField("mess5", None), + ByteField("mess6", None), + ByteField("mess7", None), + ByteField("mess8", None), + ByteField("mess9", None), + ByteField("mess10", None), + ByteField("mess11", None), + ByteField("mess12", None), + ByteField("mess13", None), + ByteField("mess14", None), + ByteField("mess15", None), + ByteField("mess16", None), + ByteField("mess17", None), + ByteField("mess18", None), + ByteField("mess19", None), + ByteField("mess20", None), + ByteField("mess21", None), + ByteField("mess22", None), + ByteField("mess23", None), + ByteField("mess24", None), + ByteField("mess25", None), + ByteField("mess26", None), + ByteField("mess27", None), + ByteField("mess28", None), + ByteField("mess29", None), + ByteField("mess30", None), + ByteField("mess31", None), + ByteField("mess32", None), + ByteField("mess33", None), + ByteField("mess34", None), + ByteField("mess35", None), + ByteField("mess36", None), + ByteField("mess37", None), + ByteField("mess38", None), + ByteField("mess39", None), + ByteField("mess40", None), + ByteField("mess41", None), + ByteField("mess42", None), + ByteField("mess43", None), + ByteField("mess44", None), + ByteField("mess45", None), + ByteField("mess46", None), + ByteField("mess47", None), + ByteField("mess48", None), + ByteField("mess49", None), + ByteField("mess50", None), + ByteField("mess51", None), + ByteField("mess52", None), + ByteField("mess53", None), + ByteField("mess54", None), + ByteField("mess55", None), + ByteField("mess56", None), + ByteField("mess57", None), + ByteField("mess58", None), + ByteField("mess59", None), + ByteField("mess60", None), + ByteField("mess61", None), + ByteField("mess62", None), + ByteField("mess63", None), + ByteField("mess64", None), + ByteField("mess65", None), + ByteField("mess66", None), + ByteField("mess67", None), + ByteField("mess68", None), + ByteField("mess69", None), + ByteField("mess70", None), + ByteField("mess71", None), + ByteField("mess72", None), + ByteField("mess73", None), + ByteField("mess74", None), + ByteField("mess75", None), + ByteField("mess76", None), + ByteField("mess77", None), + ByteField("mess78", None), + ByteField("mess79", None), + ByteField("mess80", None), + ByteField("mess81", None), + ByteField("mess82", None), + ByteField("mess83", None), + ByteField("mess84", None), + ByteField("mess85", None), + ByteField("mess86", None), + ByteField("mess87", None), + ByteField("mess88", None), + ByteField("mess89", None), + ByteField("mess90", None), + ByteField("mess91", None), + ByteField("mess92", None), + ByteField("mess93", None), + ByteField("mess94", None), + ByteField("mess95", None), + ByteField("mess96", None), + ByteField("mess97", None), + ByteField("mess98", None), + ByteField("mess99", None), + ByteField("mess100", None), + ByteField("mess101", None), + ByteField("mess102", None), + ByteField("mess103", None), + ByteField("mess104", None), + ByteField("mess105", None), + ByteField("mess106", None), + ByteField("mess107", None), + ByteField("mess108", None), + ByteField("mess109", None), + ByteField("mess110", None), + ByteField("mess111", None), + ByteField("mess112", None), + ByteField("mess113", None), + ByteField("mess114", None), + ByteField("mess115", None), + ByteField("mess116", None), + ByteField("mess117", None), + ByteField("mess118", None), + ByteField("mess119", None), + ByteField("mess120", None), + ByteField("mess121", None), + ByteField("mess122", None), + ByteField("mess123", None), + ByteField("mess124", None), + ByteField("mess125", None), + ByteField("mess126", None), + ByteField("mess127", None), + ByteField("mess128", None), + ByteField("mess129", None), + ByteField("mess130", None), + ByteField("mess131", None), + ByteField("mess132", None), + ByteField("mess133", None), + ByteField("mess134", None), + ByteField("mess135", None), + ByteField("mess136", None), + ByteField("mess137", None), + ByteField("mess138", None), + ByteField("mess139", None), + ByteField("mess140", None), + ByteField("mess141", None), + ByteField("mess142", None), + ByteField("mess143", None), + ByteField("mess144", None), + ByteField("mess145", None), + ByteField("mess146", None), + ByteField("mess147", None), + ByteField("mess148", None), + ByteField("mess149", None), + ByteField("mess150", None), + ByteField("mess151", None), + ByteField("mess152", None), + ByteField("mess153", None), + ByteField("mess154", None), + ByteField("mess155", None), + ByteField("mess156", None), + ByteField("mess157", None), + ByteField("mess158", None), + ByteField("mess159", None), + ByteField("mess160", None), + ByteField("mess161", None), + ByteField("mess162", None), + ByteField("mess163", None), + ByteField("mess164", None), + ByteField("mess165", None), + ByteField("mess166", None), + ByteField("mess167", None), + ByteField("mess168", None), + ByteField("mess169", None), + ByteField("mess170", None), + ByteField("mess171", None), + ByteField("mess172", None), + ByteField("mess173", None), + ByteField("mess174", None), + ByteField("mess175", None), + ByteField("mess176", None), + ByteField("mess177", None), + ByteField("mess178", None), + ByteField("mess179", None), + ByteField("mess180", None), + ByteField("mess181", None), + ByteField("mess182", None), + ByteField("mess183", None), + ByteField("mess184", None), + ByteField("mess185", None), + ByteField("mess186", None), + ByteField("mess187", None), + ByteField("mess188", None), + ByteField("mess189", None), + ByteField("mess190", None), + ByteField("mess191", None), + ByteField("mess192", None), + ByteField("mess193", None), + ByteField("mess194", None), + ByteField("mess195", None), + ByteField("mess196", None), + ByteField("mess197", None), + ByteField("mess198", None), + ByteField("mess199", None), + ByteField("mess200", None), + ByteField("mess201", None), + ByteField("mess202", None), + ByteField("mess203", None), + ByteField("mess204", None), + ByteField("mess205", None), + ByteField("mess206", None), + ByteField("mess207", None), + ByteField("mess208", None), + ByteField("mess209", None), + ByteField("mess210", None), + ByteField("mess211", None), + ByteField("mess212", None), + ByteField("mess213", None), + ByteField("mess214", None), + ByteField("mess215", None), + ByteField("mess216", None), + ByteField("mess217", None), + ByteField("mess218", None), + ByteField("mess219", None), + ByteField("mess220", None), + ByteField("mess221", None), + ByteField("mess222", None), + ByteField("mess223", None), + ByteField("mess224", None), + ByteField("mess225", None), + ByteField("mess226", None), + ByteField("mess227", None), + ByteField("mess228", None), + ByteField("mess229", None), + ByteField("mess230", None), + ByteField("mess231", None), + ByteField("mess232", None), + ByteField("mess233", None), + ByteField("mess234", None), + ByteField("mess235", None), + ByteField("mess236", None), + ByteField("mess237", None), + ByteField("mess238", None), + ByteField("mess239", None), + ByteField("mess240", None), + ByteField("mess241", None), + ByteField("mess242", None), + ByteField("mess243", None), + ByteField("mess244", None), + ByteField("mess245", None), + ByteField("mess246", None), + ByteField("mess247", None), + ByteField("mess248", None), + ByteField("mess249", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -12327,8 +12328,8 @@ class Signal(Packet): """Signal Section 10.5.4.23""" name = "Signal" fields_desc = [ - ByteField("sigValue", 0x0) - ] + ByteField("sigValue", 0x0) + ] # length 2 to max for L3 message (251) @@ -12336,258 +12337,258 @@ class SsVersionIndicator(Packet): """SS Version Indicator Section 10.5.4.24""" name = "SS Version Indicator" fields_desc = [ - XByteField("lengthSVI", None), - # optional - ByteField("info1", None), - ByteField("info2", None), - ByteField("info3", None), - ByteField("info4", None), - ByteField("info5", None), - ByteField("info6", None), - ByteField("info7", None), - ByteField("info8", None), - ByteField("info9", None), - ByteField("info10", None), - ByteField("info11", None), - ByteField("info12", None), - ByteField("info13", None), - ByteField("info14", None), - ByteField("info15", None), - ByteField("info16", None), - ByteField("info17", None), - ByteField("info18", None), - ByteField("info19", None), - ByteField("info20", None), - ByteField("info21", None), - ByteField("info22", None), - ByteField("info23", None), - ByteField("info24", None), - ByteField("info25", None), - ByteField("info26", None), - ByteField("info27", None), - ByteField("info28", None), - ByteField("info29", None), - ByteField("info30", None), - ByteField("info31", None), - ByteField("info32", None), - ByteField("info33", None), - ByteField("info34", None), - ByteField("info35", None), - ByteField("info36", None), - ByteField("info37", None), - ByteField("info38", None), - ByteField("info39", None), - ByteField("info40", None), - ByteField("info41", None), - ByteField("info42", None), - ByteField("info43", None), - ByteField("info44", None), - ByteField("info45", None), - ByteField("info46", None), - ByteField("info47", None), - ByteField("info48", None), - ByteField("info49", None), - ByteField("info50", None), - ByteField("info51", None), - ByteField("info52", None), - ByteField("info53", None), - ByteField("info54", None), - ByteField("info55", None), - ByteField("info56", None), - ByteField("info57", None), - ByteField("info58", None), - ByteField("info59", None), - ByteField("info60", None), - ByteField("info61", None), - ByteField("info62", None), - ByteField("info63", None), - ByteField("info64", None), - ByteField("info65", None), - ByteField("info66", None), - ByteField("info67", None), - ByteField("info68", None), - ByteField("info69", None), - ByteField("info70", None), - ByteField("info71", None), - ByteField("info72", None), - ByteField("info73", None), - ByteField("info74", None), - ByteField("info75", None), - ByteField("info76", None), - ByteField("info77", None), - ByteField("info78", None), - ByteField("info79", None), - ByteField("info80", None), - ByteField("info81", None), - ByteField("info82", None), - ByteField("info83", None), - ByteField("info84", None), - ByteField("info85", None), - ByteField("info86", None), - ByteField("info87", None), - ByteField("info88", None), - ByteField("info89", None), - ByteField("info90", None), - ByteField("info91", None), - ByteField("info92", None), - ByteField("info93", None), - ByteField("info94", None), - ByteField("info95", None), - ByteField("info96", None), - ByteField("info97", None), - ByteField("info98", None), - ByteField("info99", None), - ByteField("info100", None), - ByteField("info101", None), - ByteField("info102", None), - ByteField("info103", None), - ByteField("info104", None), - ByteField("info105", None), - ByteField("info106", None), - ByteField("info107", None), - ByteField("info108", None), - ByteField("info109", None), - ByteField("info110", None), - ByteField("info111", None), - ByteField("info112", None), - ByteField("info113", None), - ByteField("info114", None), - ByteField("info115", None), - ByteField("info116", None), - ByteField("info117", None), - ByteField("info118", None), - ByteField("info119", None), - ByteField("info120", None), - ByteField("info121", None), - ByteField("info122", None), - ByteField("info123", None), - ByteField("info124", None), - ByteField("info125", None), - ByteField("info126", None), - ByteField("info127", None), - ByteField("info128", None), - ByteField("info129", None), - ByteField("info130", None), - ByteField("info131", None), - ByteField("info132", None), - ByteField("info133", None), - ByteField("info134", None), - ByteField("info135", None), - ByteField("info136", None), - ByteField("info137", None), - ByteField("info138", None), - ByteField("info139", None), - ByteField("info140", None), - ByteField("info141", None), - ByteField("info142", None), - ByteField("info143", None), - ByteField("info144", None), - ByteField("info145", None), - ByteField("info146", None), - ByteField("info147", None), - ByteField("info148", None), - ByteField("info149", None), - ByteField("info150", None), - ByteField("info151", None), - ByteField("info152", None), - ByteField("info153", None), - ByteField("info154", None), - ByteField("info155", None), - ByteField("info156", None), - ByteField("info157", None), - ByteField("info158", None), - ByteField("info159", None), - ByteField("info160", None), - ByteField("info161", None), - ByteField("info162", None), - ByteField("info163", None), - ByteField("info164", None), - ByteField("info165", None), - ByteField("info166", None), - ByteField("info167", None), - ByteField("info168", None), - ByteField("info169", None), - ByteField("info170", None), - ByteField("info171", None), - ByteField("info172", None), - ByteField("info173", None), - ByteField("info174", None), - ByteField("info175", None), - ByteField("info176", None), - ByteField("info177", None), - ByteField("info178", None), - ByteField("info179", None), - ByteField("info180", None), - ByteField("info181", None), - ByteField("info182", None), - ByteField("info183", None), - ByteField("info184", None), - ByteField("info185", None), - ByteField("info186", None), - ByteField("info187", None), - ByteField("info188", None), - ByteField("info189", None), - ByteField("info190", None), - ByteField("info191", None), - ByteField("info192", None), - ByteField("info193", None), - ByteField("info194", None), - ByteField("info195", None), - ByteField("info196", None), - ByteField("info197", None), - ByteField("info198", None), - ByteField("info199", None), - ByteField("info200", None), - ByteField("info201", None), - ByteField("info202", None), - ByteField("info203", None), - ByteField("info204", None), - ByteField("info205", None), - ByteField("info206", None), - ByteField("info207", None), - ByteField("info208", None), - ByteField("info209", None), - ByteField("info210", None), - ByteField("info211", None), - ByteField("info212", None), - ByteField("info213", None), - ByteField("info214", None), - ByteField("info215", None), - ByteField("info216", None), - ByteField("info217", None), - ByteField("info218", None), - ByteField("info219", None), - ByteField("info220", None), - ByteField("info221", None), - ByteField("info222", None), - ByteField("info223", None), - ByteField("info224", None), - ByteField("info225", None), - ByteField("info226", None), - ByteField("info227", None), - ByteField("info228", None), - ByteField("info229", None), - ByteField("info230", None), - ByteField("info231", None), - ByteField("info232", None), - ByteField("info233", None), - ByteField("info234", None), - ByteField("info235", None), - ByteField("info236", None), - ByteField("info237", None), - ByteField("info238", None), - ByteField("info239", None), - ByteField("info240", None), - ByteField("info241", None), - ByteField("info242", None), - ByteField("info243", None), - ByteField("info244", None), - ByteField("info245", None), - ByteField("info246", None), - ByteField("info247", None), - ByteField("info248", None), - ByteField("info249", None), - ] + XByteField("lengthSVI", None), + # optional + ByteField("info1", None), + ByteField("info2", None), + ByteField("info3", None), + ByteField("info4", None), + ByteField("info5", None), + ByteField("info6", None), + ByteField("info7", None), + ByteField("info8", None), + ByteField("info9", None), + ByteField("info10", None), + ByteField("info11", None), + ByteField("info12", None), + ByteField("info13", None), + ByteField("info14", None), + ByteField("info15", None), + ByteField("info16", None), + ByteField("info17", None), + ByteField("info18", None), + ByteField("info19", None), + ByteField("info20", None), + ByteField("info21", None), + ByteField("info22", None), + ByteField("info23", None), + ByteField("info24", None), + ByteField("info25", None), + ByteField("info26", None), + ByteField("info27", None), + ByteField("info28", None), + ByteField("info29", None), + ByteField("info30", None), + ByteField("info31", None), + ByteField("info32", None), + ByteField("info33", None), + ByteField("info34", None), + ByteField("info35", None), + ByteField("info36", None), + ByteField("info37", None), + ByteField("info38", None), + ByteField("info39", None), + ByteField("info40", None), + ByteField("info41", None), + ByteField("info42", None), + ByteField("info43", None), + ByteField("info44", None), + ByteField("info45", None), + ByteField("info46", None), + ByteField("info47", None), + ByteField("info48", None), + ByteField("info49", None), + ByteField("info50", None), + ByteField("info51", None), + ByteField("info52", None), + ByteField("info53", None), + ByteField("info54", None), + ByteField("info55", None), + ByteField("info56", None), + ByteField("info57", None), + ByteField("info58", None), + ByteField("info59", None), + ByteField("info60", None), + ByteField("info61", None), + ByteField("info62", None), + ByteField("info63", None), + ByteField("info64", None), + ByteField("info65", None), + ByteField("info66", None), + ByteField("info67", None), + ByteField("info68", None), + ByteField("info69", None), + ByteField("info70", None), + ByteField("info71", None), + ByteField("info72", None), + ByteField("info73", None), + ByteField("info74", None), + ByteField("info75", None), + ByteField("info76", None), + ByteField("info77", None), + ByteField("info78", None), + ByteField("info79", None), + ByteField("info80", None), + ByteField("info81", None), + ByteField("info82", None), + ByteField("info83", None), + ByteField("info84", None), + ByteField("info85", None), + ByteField("info86", None), + ByteField("info87", None), + ByteField("info88", None), + ByteField("info89", None), + ByteField("info90", None), + ByteField("info91", None), + ByteField("info92", None), + ByteField("info93", None), + ByteField("info94", None), + ByteField("info95", None), + ByteField("info96", None), + ByteField("info97", None), + ByteField("info98", None), + ByteField("info99", None), + ByteField("info100", None), + ByteField("info101", None), + ByteField("info102", None), + ByteField("info103", None), + ByteField("info104", None), + ByteField("info105", None), + ByteField("info106", None), + ByteField("info107", None), + ByteField("info108", None), + ByteField("info109", None), + ByteField("info110", None), + ByteField("info111", None), + ByteField("info112", None), + ByteField("info113", None), + ByteField("info114", None), + ByteField("info115", None), + ByteField("info116", None), + ByteField("info117", None), + ByteField("info118", None), + ByteField("info119", None), + ByteField("info120", None), + ByteField("info121", None), + ByteField("info122", None), + ByteField("info123", None), + ByteField("info124", None), + ByteField("info125", None), + ByteField("info126", None), + ByteField("info127", None), + ByteField("info128", None), + ByteField("info129", None), + ByteField("info130", None), + ByteField("info131", None), + ByteField("info132", None), + ByteField("info133", None), + ByteField("info134", None), + ByteField("info135", None), + ByteField("info136", None), + ByteField("info137", None), + ByteField("info138", None), + ByteField("info139", None), + ByteField("info140", None), + ByteField("info141", None), + ByteField("info142", None), + ByteField("info143", None), + ByteField("info144", None), + ByteField("info145", None), + ByteField("info146", None), + ByteField("info147", None), + ByteField("info148", None), + ByteField("info149", None), + ByteField("info150", None), + ByteField("info151", None), + ByteField("info152", None), + ByteField("info153", None), + ByteField("info154", None), + ByteField("info155", None), + ByteField("info156", None), + ByteField("info157", None), + ByteField("info158", None), + ByteField("info159", None), + ByteField("info160", None), + ByteField("info161", None), + ByteField("info162", None), + ByteField("info163", None), + ByteField("info164", None), + ByteField("info165", None), + ByteField("info166", None), + ByteField("info167", None), + ByteField("info168", None), + ByteField("info169", None), + ByteField("info170", None), + ByteField("info171", None), + ByteField("info172", None), + ByteField("info173", None), + ByteField("info174", None), + ByteField("info175", None), + ByteField("info176", None), + ByteField("info177", None), + ByteField("info178", None), + ByteField("info179", None), + ByteField("info180", None), + ByteField("info181", None), + ByteField("info182", None), + ByteField("info183", None), + ByteField("info184", None), + ByteField("info185", None), + ByteField("info186", None), + ByteField("info187", None), + ByteField("info188", None), + ByteField("info189", None), + ByteField("info190", None), + ByteField("info191", None), + ByteField("info192", None), + ByteField("info193", None), + ByteField("info194", None), + ByteField("info195", None), + ByteField("info196", None), + ByteField("info197", None), + ByteField("info198", None), + ByteField("info199", None), + ByteField("info200", None), + ByteField("info201", None), + ByteField("info202", None), + ByteField("info203", None), + ByteField("info204", None), + ByteField("info205", None), + ByteField("info206", None), + ByteField("info207", None), + ByteField("info208", None), + ByteField("info209", None), + ByteField("info210", None), + ByteField("info211", None), + ByteField("info212", None), + ByteField("info213", None), + ByteField("info214", None), + ByteField("info215", None), + ByteField("info216", None), + ByteField("info217", None), + ByteField("info218", None), + ByteField("info219", None), + ByteField("info220", None), + ByteField("info221", None), + ByteField("info222", None), + ByteField("info223", None), + ByteField("info224", None), + ByteField("info225", None), + ByteField("info226", None), + ByteField("info227", None), + ByteField("info228", None), + ByteField("info229", None), + ByteField("info230", None), + ByteField("info231", None), + ByteField("info232", None), + ByteField("info233", None), + ByteField("info234", None), + ByteField("info235", None), + ByteField("info236", None), + ByteField("info237", None), + ByteField("info238", None), + ByteField("info239", None), + ByteField("info240", None), + ByteField("info241", None), + ByteField("info242", None), + ByteField("info243", None), + ByteField("info244", None), + ByteField("info245", None), + ByteField("info246", None), + ByteField("info247", None), + ByteField("info248", None), + ByteField("info249", None), + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -12605,146 +12606,146 @@ class UserUser(Packet): name = "User-User" fields_desc = [ - XByteField("lengthUU", None), # dynamic length of field depending - # of the type of message - # let user decide which length he - # wants to take - # => more fuzzing options - ByteField("userUserPD", 0x0), - # optional - ByteField("userUserInfo1", None), - ByteField("userUserInfo2", None), - ByteField("userUserInfo3", None), - ByteField("userUserInfo4", None), - ByteField("userUserInfo5", None), - ByteField("userUserInfo6", None), - ByteField("userUserInfo7", None), - ByteField("userUserInfo8", None), - ByteField("userUserInfo9", None), - ByteField("userUserInfo10", None), - ByteField("userUserInfo11", None), - ByteField("userUserInfo12", None), - ByteField("userUserInfo13", None), - ByteField("userUserInfo14", None), - ByteField("userUserInfo15", None), - ByteField("userUserInfo16", None), - ByteField("userUserInfo17", None), - ByteField("userUserInfo18", None), - ByteField("userUserInfo19", None), - ByteField("userUserInfo20", None), - ByteField("userUserInfo21", None), - ByteField("userUserInfo22", None), - ByteField("userUserInfo23", None), - ByteField("userUserInfo24", None), - ByteField("userUserInfo25", None), - ByteField("userUserInfo26", None), - ByteField("userUserInfo27", None), - ByteField("userUserInfo28", None), - ByteField("userUserInfo29", None), - ByteField("userUserInfo30", None), - ByteField("userUserInfo31", None), - ByteField("userUserInfo32", None), - # long packet - ByteField("userUserInfo33", None), - ByteField("userUserInfo34", None), - ByteField("userUserInfo35", None), - ByteField("userUserInfo36", None), - ByteField("userUserInfo37", None), - ByteField("userUserInfo38", None), - ByteField("userUserInfo39", None), - ByteField("userUserInfo40", None), - ByteField("userUserInfo41", None), - ByteField("userUserInfo42", None), - ByteField("userUserInfo43", None), - ByteField("userUserInfo44", None), - ByteField("userUserInfo45", None), - ByteField("userUserInfo46", None), - ByteField("userUserInfo47", None), - ByteField("userUserInfo48", None), - ByteField("userUserInfo49", None), - ByteField("userUserInfo50", None), - ByteField("userUserInfo51", None), - ByteField("userUserInfo52", None), - ByteField("userUserInfo53", None), - ByteField("userUserInfo54", None), - ByteField("userUserInfo55", None), - ByteField("userUserInfo56", None), - ByteField("userUserInfo57", None), - ByteField("userUserInfo58", None), - ByteField("userUserInfo59", None), - ByteField("userUserInfo60", None), - ByteField("userUserInfo61", None), - ByteField("userUserInfo62", None), - ByteField("userUserInfo63", None), - ByteField("userUserInfo64", None), - ByteField("userUserInfo65", None), - ByteField("userUserInfo66", None), - ByteField("userUserInfo67", None), - ByteField("userUserInfo68", None), - ByteField("userUserInfo69", None), - ByteField("userUserInfo70", None), - ByteField("userUserInfo71", None), - ByteField("userUserInfo72", None), - ByteField("userUserInfo73", None), - ByteField("userUserInfo74", None), - ByteField("userUserInfo75", None), - ByteField("userUserInfo76", None), - ByteField("userUserInfo77", None), - ByteField("userUserInfo78", None), - ByteField("userUserInfo79", None), - ByteField("userUserInfo80", None), - ByteField("userUserInfo81", None), - ByteField("userUserInfo82", None), - ByteField("userUserInfo83", None), - ByteField("userUserInfo84", None), - ByteField("userUserInfo85", None), - ByteField("userUserInfo86", None), - ByteField("userUserInfo87", None), - ByteField("userUserInfo88", None), - ByteField("userUserInfo89", None), - ByteField("userUserInfo90", None), - ByteField("userUserInfo91", None), - ByteField("userUserInfo92", None), - ByteField("userUserInfo93", None), - ByteField("userUserInfo94", None), - ByteField("userUserInfo95", None), - ByteField("userUserInfo96", None), - ByteField("userUserInfo97", None), - ByteField("userUserInfo98", None), - ByteField("userUserInfo99", None), - ByteField("userUserInfo100", None), - ByteField("userUserInfo101", None), - ByteField("userUserInfo102", None), - ByteField("userUserInfo103", None), - ByteField("userUserInfo104", None), - ByteField("userUserInfo105", None), - ByteField("userUserInfo106", None), - ByteField("userUserInfo107", None), - ByteField("userUserInfo108", None), - ByteField("userUserInfo109", None), - ByteField("userUserInfo110", None), - ByteField("userUserInfo111", None), - ByteField("userUserInfo112", None), - ByteField("userUserInfo113", None), - ByteField("userUserInfo114", None), - ByteField("userUserInfo115", None), - ByteField("userUserInfo116", None), - ByteField("userUserInfo117", None), - ByteField("userUserInfo118", None), - ByteField("userUserInfo119", None), - ByteField("userUserInfo120", None), - ByteField("userUserInfo121", None), - ByteField("userUserInfo122", None), - ByteField("userUserInfo123", None), - ByteField("userUserInfo124", None), - ByteField("userUserInfo125", None), - ByteField("userUserInfo126", None), - ByteField("userUserInfo127", None), - ByteField("userUserInfo128", None), - ByteField("userUserInfo129", None), - ByteField("userUserInfo130", None), - ByteField("userUserInfo131", None) - ] + XByteField("lengthUU", None), # dynamic length of field depending + # of the type of message + # let user decide which length he + # wants to take + # => more fuzzing options + ByteField("userUserPD", 0x0), + # optional + ByteField("userUserInfo1", None), + ByteField("userUserInfo2", None), + ByteField("userUserInfo3", None), + ByteField("userUserInfo4", None), + ByteField("userUserInfo5", None), + ByteField("userUserInfo6", None), + ByteField("userUserInfo7", None), + ByteField("userUserInfo8", None), + ByteField("userUserInfo9", None), + ByteField("userUserInfo10", None), + ByteField("userUserInfo11", None), + ByteField("userUserInfo12", None), + ByteField("userUserInfo13", None), + ByteField("userUserInfo14", None), + ByteField("userUserInfo15", None), + ByteField("userUserInfo16", None), + ByteField("userUserInfo17", None), + ByteField("userUserInfo18", None), + ByteField("userUserInfo19", None), + ByteField("userUserInfo20", None), + ByteField("userUserInfo21", None), + ByteField("userUserInfo22", None), + ByteField("userUserInfo23", None), + ByteField("userUserInfo24", None), + ByteField("userUserInfo25", None), + ByteField("userUserInfo26", None), + ByteField("userUserInfo27", None), + ByteField("userUserInfo28", None), + ByteField("userUserInfo29", None), + ByteField("userUserInfo30", None), + ByteField("userUserInfo31", None), + ByteField("userUserInfo32", None), + # long packet + ByteField("userUserInfo33", None), + ByteField("userUserInfo34", None), + ByteField("userUserInfo35", None), + ByteField("userUserInfo36", None), + ByteField("userUserInfo37", None), + ByteField("userUserInfo38", None), + ByteField("userUserInfo39", None), + ByteField("userUserInfo40", None), + ByteField("userUserInfo41", None), + ByteField("userUserInfo42", None), + ByteField("userUserInfo43", None), + ByteField("userUserInfo44", None), + ByteField("userUserInfo45", None), + ByteField("userUserInfo46", None), + ByteField("userUserInfo47", None), + ByteField("userUserInfo48", None), + ByteField("userUserInfo49", None), + ByteField("userUserInfo50", None), + ByteField("userUserInfo51", None), + ByteField("userUserInfo52", None), + ByteField("userUserInfo53", None), + ByteField("userUserInfo54", None), + ByteField("userUserInfo55", None), + ByteField("userUserInfo56", None), + ByteField("userUserInfo57", None), + ByteField("userUserInfo58", None), + ByteField("userUserInfo59", None), + ByteField("userUserInfo60", None), + ByteField("userUserInfo61", None), + ByteField("userUserInfo62", None), + ByteField("userUserInfo63", None), + ByteField("userUserInfo64", None), + ByteField("userUserInfo65", None), + ByteField("userUserInfo66", None), + ByteField("userUserInfo67", None), + ByteField("userUserInfo68", None), + ByteField("userUserInfo69", None), + ByteField("userUserInfo70", None), + ByteField("userUserInfo71", None), + ByteField("userUserInfo72", None), + ByteField("userUserInfo73", None), + ByteField("userUserInfo74", None), + ByteField("userUserInfo75", None), + ByteField("userUserInfo76", None), + ByteField("userUserInfo77", None), + ByteField("userUserInfo78", None), + ByteField("userUserInfo79", None), + ByteField("userUserInfo80", None), + ByteField("userUserInfo81", None), + ByteField("userUserInfo82", None), + ByteField("userUserInfo83", None), + ByteField("userUserInfo84", None), + ByteField("userUserInfo85", None), + ByteField("userUserInfo86", None), + ByteField("userUserInfo87", None), + ByteField("userUserInfo88", None), + ByteField("userUserInfo89", None), + ByteField("userUserInfo90", None), + ByteField("userUserInfo91", None), + ByteField("userUserInfo92", None), + ByteField("userUserInfo93", None), + ByteField("userUserInfo94", None), + ByteField("userUserInfo95", None), + ByteField("userUserInfo96", None), + ByteField("userUserInfo97", None), + ByteField("userUserInfo98", None), + ByteField("userUserInfo99", None), + ByteField("userUserInfo100", None), + ByteField("userUserInfo101", None), + ByteField("userUserInfo102", None), + ByteField("userUserInfo103", None), + ByteField("userUserInfo104", None), + ByteField("userUserInfo105", None), + ByteField("userUserInfo106", None), + ByteField("userUserInfo107", None), + ByteField("userUserInfo108", None), + ByteField("userUserInfo109", None), + ByteField("userUserInfo110", None), + ByteField("userUserInfo111", None), + ByteField("userUserInfo112", None), + ByteField("userUserInfo113", None), + ByteField("userUserInfo114", None), + ByteField("userUserInfo115", None), + ByteField("userUserInfo116", None), + ByteField("userUserInfo117", None), + ByteField("userUserInfo118", None), + ByteField("userUserInfo119", None), + ByteField("userUserInfo120", None), + ByteField("userUserInfo121", None), + ByteField("userUserInfo122", None), + ByteField("userUserInfo123", None), + ByteField("userUserInfo124", None), + ByteField("userUserInfo125", None), + ByteField("userUserInfo126", None), + ByteField("userUserInfo127", None), + ByteField("userUserInfo128", None), + ByteField("userUserInfo129", None), + ByteField("userUserInfo130", None), + ByteField("userUserInfo131", None) + ] def post_build(self, p, pay): a = [getattr(self, fld.name) for fld in self.fields_desc] @@ -12760,20 +12761,20 @@ class AlertingPattern(Packet): """Alerting Pattern 10.5.4.26""" name = "Alerting Pattern" fields_desc = [ - XByteField("lengthAP", 0x3), - BitField("spare", 0x0, 4), - BitField("alertingValue", 0x0, 4) - ] + XByteField("lengthAP", 0x3), + BitField("spare", 0x0, 4), + BitField("alertingValue", 0x0, 4) + ] class AllowedActions(Packet): """Allowed actions $(CCBS)$ Section 10.5.4.26""" name = "Allowed Actions $(CCBS)$" fields_desc = [ - XByteField("lengthAP", 0x3), - BitField("CCBS", 0x0, 1), - BitField("spare", 0x0, 7) - ] + XByteField("lengthAP", 0x3), + BitField("CCBS", 0x0, 1), + BitField("spare", 0x0, 7) + ] # @@ -12785,9 +12786,9 @@ class AttachType(Packet): """Attach type Section 10.5.5.2""" name = "Attach Type" fields_desc = [ - BitField("spare", 0x0, 1), - BitField("type", 0x1, 3) - ] + BitField("spare", 0x0, 1), + BitField("type", 0x1, 3) + ] if __name__ == "__main__":