scapy.contrib.gtp

GPRS Tunneling Protocol (GTP)

Spec: 3GPP TS 29.060 and 3GPP TS 29.274 Some IEs: 3GPP TS 24.008

class scapy.contrib.gtp.APNStrLenField(name: str, default: bytes, length_from: Callable[[Packet], int] | None = None, max_length: Any | None = None)[源代码]

基类:StrLenField

i2m(pkt, s)[源代码]
m2i(pkt, s)[源代码]
class scapy.contrib.gtp.GTPCreatePDPContextRequest(_pkt, /, *, IE_list=[<IE_TEIDI  TEIDI=<RandInt> |>, <IE_NSAPI  NSAPI=<RandNum> |>, <IE_GSNAddress  length=4 ipv4_address=<RandIP> |>, <IE_GSNAddress  length=4 ipv4_address=<RandIP> |>, <IE_NotImplementedTLV  ietype=QoS length=15 data=<RandString> |>])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPCreatePDPContextRequest                  
GTPCreatePDPContextRequest fields

IE_list

PacketListField

[<IE_TEIDI  TEIDI=<RandInt> |>, <IE_NSAPI  NSAPI=<RandNum> |>, <IE_GSNAddress  length=4 ipv4_address=<RandIP> |>, <IE_GSNAddress  length=4 ipv4_address=<RandIP> |>, <IE_NotImplementedTLV  ietype=QoS length=15 data=<RandString> |>]

class scapy.contrib.gtp.GTPCreatePDPContextResponse(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPCreatePDPContextResponse                 
GTPCreatePDPContextResponse fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTPDeletePDPContextRequest(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPDeletePDPContextRequest                  
GTPDeletePDPContextRequest fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTPDeletePDPContextResponse(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPDeletePDPContextResponse                 
GTPDeletePDPContextResponse fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTPEchoRequest(_pkt, /)[源代码]

基类:Packet

aliastypes
class scapy.contrib.gtp.GTPEchoResponse(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. GTPEchoResponse                       
GTPEchoResponse fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTPErrorIndication(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. GTPErrorIndication                      
GTPErrorIndication fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTPHeader(_pkt, /, *, version=1, PT=1, reserved=0, E=0, S=0, PN=0, gtp_type=None, length=None, teid=0, seq=0, npdu=0, next_ex=0)[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSI|P|R|E|S|P|    GTP TYPE   |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TEID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SEQ              |      NPDU     |    NEXT EX    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. GTPHeader                          
GTPHeader fields

version

BitField (3 bits)

1

PT

BitField (1 bit)

1

reserved

BitField (1 bit)

0

E

BitField (1 bit)

0

S

BitField (1 bit)

0

PN

BitField (1 bit)

0

gtp_type

ByteEnumField

None

length

ShortField

None

teid

IntField

0

seq

XBitField (Cond) (16 bits)

0

npdu

ByteField (Cond)

0

next_ex

ByteEnumField (Cond)

0

hashret()[源代码]
payload_guess

Possible sublayers: GTPCreatePDPContextRequest, GTPCreatePDPContextResponse, GTPDeletePDPContextRequest, GTPDeletePDPContextResponse, GTPEchoRequest, GTPEchoResponse, GTPPDUNotificationRequest, GTPSupportedExtensionHeadersNotification, GTPUpdatePDPContextRequest, GTPUpdatePDPContextResponse, GTP_PDCP_PDU_ExtensionHeader, GTP_UDPPort_ExtensionHeader

post_build(p, pay)[源代码]
class scapy.contrib.gtp.GTPPDUNotificationRequest(_pkt, /, *, IE_list=[<IE_IMSI  |>, <IE_TEICP  TEICI=<RandInt> |>, <IE_EndUserAddress  PDPTypeNumber=0x21 |>, <IE_AccessPointName  |>, <IE_GSNAddress  |>])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. GTPPDUNotificationRequest                  
GTPPDUNotificationRequest fields

IE_list

PacketListField

[<IE_IMSI  |>, <IE_TEICP  TEICI=<RandInt> |>, <IE_EndUserAddress  PDPTypeNumber=0x21 |>, <IE_AccessPointName  |>, <IE_GSNAddress  |>]

class scapy.contrib.gtp.GTPPDUSessionContainer(_pkt, /, *, ExtHdrLen=None, type=0, QMP=0, dlDelayInd=0, ulDelayInd=0, SNP=0, N3N9DelayInd=0, spareUl1=0, spareDl1=0, PPP=0, RQI=0, QFI=0, PPI=0, spareDl2=0, dlSendTime=0, dlQFISeqNum=0, dlSendTimeRpt=0, dlRecvTime=0, ulSendTime=0, dlDelayRslt=0, ulDelayRslt=0, UlQFISeqNum=0, N3N9DelayRslt=0, NextExtHdr=0, padding=b'')[源代码]

基类:Packet

aliastypes
deprecated_fields: Dict[str, Tuple[str, str]] = {'P': ('PPP', '2.4.5'), 'R': ('RQI', '2.4.5'), 'extraPadding': ('padding', '2.4.5'), 'qmp': ('QMP', '2.4.5')}
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   EXTHDRLEN   |  TYPE |Q|D|U|S|N|S|SPA|P|R|    QFI    | PPI |S|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                       DLSENDTIME                      |
+-+-+-+-+                                                       +
|                                                               |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                      DLQFISEQNUM                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                     DLSENDTIMERPT                     |
+-+-+-+-+                                                       +
|                                                               |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                       DLRECVTIME                      |
+-+-+-+-+                                                       +
|                                                               |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                       ULSENDTIME                      |
+-+-+-+-+                                                       +
|                                                               |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                      DLDELAYRSLT                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                      ULDELAYRSLT                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                  ULQFISEQNUM                  |N3N9DEL|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                       |NEXTEXT|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |            PADDING            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. GTPPDUSessionContainer                    
GTPPDUSessionContainer fields

ExtHdrLen

ByteField

None

type

BitEnumField

0

QMP

BitField (1 bit)

0

dlDelayInd

BitField (Cond) (1 bit)

0

ulDelayInd

BitField (Cond) (1 bit)

0

SNP

BitField (1 bit)

0

N3N9DelayInd

BitField (Cond) (1 bit)

0

spareUl1

XBitField (Cond) (1 bit)

0

spareDl1

XBitField (Cond) (2 bits)

0

PPP

BitField (Cond) (1 bit)

0

RQI

BitField (Cond) (1 bit)

0

QFI

BitField (6 bits)

0

PPI

XBitField (Cond) (3 bits)

0

spareDl2

XBitField (Cond) (5 bits)

0

dlSendTime

XBitField (Cond) (64 bits)

0

dlQFISeqNum

X3BytesField (Cond)

0

dlSendTimeRpt

XBitField (Cond) (64 bits)

0

dlRecvTime

XBitField (Cond) (64 bits)

0

ulSendTime

XBitField (Cond) (64 bits)

0

dlDelayRslt

XBitField (Cond) (32 bits)

0

ulDelayRslt

XBitField (Cond) (32 bits)

0

UlQFISeqNum

XBitField (Cond) (24 bits)

0

N3N9DelayRslt

XBitField (Cond) (32 bits)

0

NextExtHdr

ByteEnumField

0

padding

StrLenField (Cond)

b''

guess_payload_class(payload)[源代码]
post_build(p, pay)[源代码]
post_dissect(s)[源代码]
class scapy.contrib.gtp.GTPSupportedExtensionHeadersNotification(_pkt, /, *, IE_list=[<IE_ExtensionHeaderList  extension_headers=[64, 192] |>])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          Fig. GTPSupportedExtensionHeadersNotification           
GTPSupportedExtensionHeadersNotification fields

IE_list

PacketListField

[<IE_ExtensionHeaderList  extension_headers=[64, 192] |>]

class scapy.contrib.gtp.GTPUpdatePDPContextRequest(_pkt, /, *, IE_list=[<IE_Cause  |>, <IE_Recovery  |>, <IE_TEIDI  TEIDI=<RandInt> |>, <IE_TEICP  TEICI=<RandInt> |>, <IE_ChargingId  Charging_id=<RandInt> |>, <IE_ProtocolConfigurationOptions  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_QoS  |>, <IE_CharginGatewayAddress  |>, <IE_CharginGatewayAddress  |>, <IE_CommonFlags  |>, <IE_APNRestriction  |>, <IE_BearerControlMode  |>, <IE_MSInfoChangeReportingAction  |>, <IE_EvolvedAllocationRetentionPriority  |>, <IE_PrivateExtension  |>])[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPUpdatePDPContextRequest                  
GTPUpdatePDPContextRequest fields

IE_list

PacketListField

[<IE_Cause  |>, <IE_Recovery  |>, <IE_TEIDI  TEIDI=<RandInt> |>, <IE_TEICP  TEICI=<RandInt> |>, <IE_ChargingId  Charging_id=<RandInt> |>, <IE_ProtocolConfigurationOptions  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_GSNAddress  |>, <IE_QoS  |>, <IE_CharginGatewayAddress  |>, <IE_CharginGatewayAddress  |>, <IE_CommonFlags  |>, <IE_APNRestriction  |>, <IE_BearerControlMode  |>, <IE_MSInfoChangeReportingAction  |>, <IE_EvolvedAllocationRetentionPriority  |>, <IE_PrivateExtension  |>]

class scapy.contrib.gtp.GTPUpdatePDPContextResponse(_pkt, /, *, IE_list=[])[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            IE LIST            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTPUpdatePDPContextResponse                 
GTPUpdatePDPContextResponse fields

IE_list

PacketListField

[]

class scapy.contrib.gtp.GTP_ExtensionHeader(_pkt, /)[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
class scapy.contrib.gtp.GTP_PDCP_PDU_ExtensionHeader(_pkt, /, *, length=1, pdcp_pdu=None, next_ex=0)[源代码]

基类:GTP_ExtensionHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LENGTH    |            PDCP PDU           |    NEXT EX    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. GTP_PDCP_PDU_ExtensionHeader                 
GTP_PDCP_PDU_ExtensionHeader fields

length

ByteField

1

pdcp_pdu

ShortField

None

next_ex

ByteEnumField

0

class scapy.contrib.gtp.GTP_UDPPort_ExtensionHeader(_pkt, /, *, length=1, udp_port=None, next_ex=0)[源代码]

基类:GTP_ExtensionHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LENGTH    |            UDP PORT           |    NEXT EX    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. GTP_UDPPort_ExtensionHeader                 
GTP_UDPPort_ExtensionHeader fields

length

ByteField

1

udp_port

ShortField

None

next_ex

ByteEnumField

0

class scapy.contrib.gtp.GTP_U_Header(_pkt, /, *, version=1, PT=1, reserved=0, E=0, S=0, PN=0, gtp_type=None, length=None, teid=0, seq=0, npdu=0, next_ex=0)[源代码]

基类:GTPHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSI|P|R|E|S|P|    GTP TYPE   |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TEID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SEQ              |      NPDU     |    NEXT EX    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. GTP_U_Header                         
GTP_U_Header fields

version

BitField (3 bits)

1

PT

BitField (1 bit)

1

reserved

BitField (1 bit)

0

E

BitField (1 bit)

0

S

BitField (1 bit)

0

PN

BitField (1 bit)

0

gtp_type

ByteEnumField

None

length

ShortField

None

teid

IntField

0

seq

XBitField (Cond) (16 bits)

0

npdu

ByteField (Cond)

0

next_ex

ByteEnumField (Cond)

0

guess_payload_class(payload)[源代码]
payload_guess

Possible sublayers: GTPCreatePDPContextRequest, GTPCreatePDPContextResponse, GTPDeletePDPContextRequest, GTPDeletePDPContextResponse, GTPEchoRequest, GTPEchoResponse, GTPErrorIndication, GTPPDUNotificationRequest, GTPPDUSessionContainer, GTPSupportedExtensionHeadersNotification, GTPUpdatePDPContextRequest, GTPUpdatePDPContextResponse, GTP_PDCP_PDU_ExtensionHeader, GTP_UDPPort_ExtensionHeader

class scapy.contrib.gtp.GTPmorethan1500(_pkt, /, *, IE_Cause=1, IE=1)[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    IE CAUSE   |                       IE                      |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                       Fig. GTPmorethan1500                       
GTPmorethan1500 fields

IE_Cause

ByteEnumField

1

IE

BitField (12000 bits)

1

class scapy.contrib.gtp.IE_APNRestriction(_pkt, /, *, ietype=149, length=1, restriction_type_value=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |RESTRICTION TYP|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. IE_APNRestriction                      
IE_APNRestriction fields

ietype

ByteEnumField

149

length

ShortField

1

restriction_type_value

ByteField

0

class scapy.contrib.gtp.IE_AccessPointName(_pkt, /, *, ietype=131, length=None, APN=b'nternet')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |      APN      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                     Fig. IE_AccessPointName                      
IE_AccessPointName fields

ietype

ByteEnumField

131

length

ShortField

None

APN

APNStrLenField

b'nternet'

post_build(p, pay)[源代码]
class scapy.contrib.gtp.IE_Base(_pkt, /)[源代码]

基类:Packet

aliastypes
extract_padding(pkt)[源代码]
post_build(p, pay)[源代码]
class scapy.contrib.gtp.IE_BearerControlMode(_pkt, /, *, ietype=184, length=1, bearer_control_mode=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |BEARER CONTROL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. IE_BearerControlMode                     
IE_BearerControlMode fields

ietype

ByteEnumField

184

length

ShortField

1

bearer_control_mode

ByteField

0

class scapy.contrib.gtp.IE_Cause(_pkt, /, *, ietype=1, CauseValue=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |   CAUSEVALUE  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IE_Cause                           
IE_Cause fields

ietype

ByteEnumField

1

CauseValue

ByteEnumField

None

class scapy.contrib.gtp.IE_CharginGatewayAddress(_pkt, /, *, ietype=251, length=4, ipv4_address='127.0.0.1', ipv6_address='::1')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |  IPV4 ADDRESS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                               |  IPV6 ADDRESS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. IE_CharginGatewayAddress                   
IE_CharginGatewayAddress fields

ietype

ByteEnumField

251

length

ShortField

4

ipv4_address

IPField (Cond)

'127.0.0.1'

ipv6_address

IP6Field (Cond)

'::1'

class scapy.contrib.gtp.IE_ChargingCharacteristics(_pkt, /, *, ietype=26, Ch_ChSpare=None, normal_charging=None, prepaid_charging=None, flat_rate_charging=None, hot_billing_charging=None, Ch_ChReserved=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |CH CHSP|N|P|F|H| CH CHRESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. IE_ChargingCharacteristics                  
IE_ChargingCharacteristics fields

ietype

ByteEnumField

26

Ch_ChSpare

XBitField (4 bits)

None

normal_charging

XBitField (1 bit)

None

prepaid_charging

XBitField (1 bit)

None

flat_rate_charging

XBitField (1 bit)

None

hot_billing_charging

XBitField (1 bit)

None

Ch_ChReserved

XBitField (8 bits)

0

class scapy.contrib.gtp.IE_ChargingId(_pkt, /, *, ietype=127, Charging_id=<RandInt>)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |                  CHARGING ID                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                        Fig. IE_ChargingId                        
IE_ChargingId fields

ietype

ByteEnumField

127

Charging_id

XIntField

<RandInt>

class scapy.contrib.gtp.IE_CommonFlags(_pkt, /, *, ietype=148, length=None, dual_addr_bearer_fl=0, upgrade_qos_supported=0, nrsn=0, no_qos_nego=0, mbms_cnting_info=0, ran_procedure_ready=0, mbms_service_type=0, prohibit_payload_compression=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |D|U|N|N|M|R|M|P|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. IE_CommonFlags                        
IE_CommonFlags fields

ietype

ByteEnumField

148

length

ShortField

None

dual_addr_bearer_fl

BitField (1 bit)

0

upgrade_qos_supported

BitField (1 bit)

0

nrsn

BitField (1 bit)

0

no_qos_nego

BitField (1 bit)

0

mbms_cnting_info

BitField (1 bit)

0

ran_procedure_ready

BitField (1 bit)

0

mbms_service_type

BitField (1 bit)

0

prohibit_payload_compression

BitField (1 bit)

0

class scapy.contrib.gtp.IE_DirectTunnelFlags(_pkt, /, *, ietype=182, length=1, spare=0, EI=0, GCSI=0, DTI=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |  SPARE  |E|G|D|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. IE_DirectTunnelFlags                     
IE_DirectTunnelFlags fields

ietype

ByteEnumField

182

length

ShortField

1

spare

BitField (5 bits)

0

EI

BitField (1 bit)

0

GCSI

BitField (1 bit)

0

DTI

BitField (1 bit)

0

scapy.contrib.gtp.IE_Dispatcher(s)[源代码]

Choose the correct Information Element class.

class scapy.contrib.gtp.IE_EndUserAddress(_pkt, /, *, ietype=128, length=2, SPARE=15, PDPTypeOrganization=1, PDPTypeNumber=None, PDPAddress=<RandIP>, IPv6_PDPAddress='::1')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            | SPARE |PDPTYPE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PDPTYPENUMBER |                   PDPADDRESS                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |                IPV6 PDPADDRESS                |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                      Fig. IE_EndUserAddress                      
IE_EndUserAddress fields

ietype

ByteEnumField

128

length

ShortField

2

SPARE

BitField (4 bits)

15

PDPTypeOrganization

BitField (4 bits)

1

PDPTypeNumber

XByteField

None

PDPAddress

IPField (Cond)

<RandIP>

IPv6_PDPAddress

IP6Field (Cond)

'::1'

class scapy.contrib.gtp.IE_EvolvedAllocationRetentionPriority(_pkt, /, *, ietype=191, length=1, spare1=0, PCI=0, PL=0, spare2=0, PVI=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |S|P|   PL  |S|P|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. IE_EvolvedAllocationRetentionPriority            
IE_EvolvedAllocationRetentionPriority fields

ietype

ByteEnumField

191

length

ShortField

1

spare1

BitField (1 bit)

0

PCI

BitField (1 bit)

0

PL

XBitField (4 bits)

0

spare2

BitField (1 bit)

0

PVI

BitField (1 bit)

0

class scapy.contrib.gtp.IE_ExtensionHeaderList(_pkt, /, *, ietype=141, length=None, extension_headers=[64, 192])[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |EXTENSION HEADE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                   Fig. IE_ExtensionHeaderList                    
IE_ExtensionHeaderList fields

ietype

ByteEnumField

141

length

FieldLenField

None

extension_headers

FieldListField

[64, 192]

class scapy.contrib.gtp.IE_GSNAddress(_pkt, /, *, ietype=133, length=None, ipv4_address=<RandIP>, ipv6_address='::1')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |  IPV4 ADDRESS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                               |  IPV6 ADDRESS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                               +-+-+-+-+-+-+-+-+
|                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IE_GSNAddress                        
IE_GSNAddress fields

ietype

ByteEnumField

133

length

ShortField

None

ipv4_address

IPField (Cond)

<RandIP>

ipv6_address

IP6Field (Cond)

'::1'

post_build(p, pay)[源代码]
class scapy.contrib.gtp.IE_IMEI(_pkt, /, *, ietype=154, length=None, IMEI=b'')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |      IMEI     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                           Fig. IE_IMEI                           
IE_IMEI fields

ietype

ByteEnumField

154

length

ShortField

None

IMEI

TBCDByteField

b''

class scapy.contrib.gtp.IE_IMSI(_pkt, /, *, ietype=2, imsi=b'719782483801355')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |                      IMSI                     |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                           Fig. IE_IMSI                           
IE_IMSI fields

ietype

ByteEnumField

2

imsi

TBCDByteField

b'719782483801355'

class scapy.contrib.gtp.IE_MSInfoChangeReportingAction(_pkt, /, *, ietype=181, length=1, Action=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |     ACTION    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. IE_MSInfoChangeReportingAction                
IE_MSInfoChangeReportingAction fields

ietype

ByteEnumField

181

length

ShortField

1

Action

ByteField

0

class scapy.contrib.gtp.IE_MSInternationalNumber(_pkt, /, *, ietype=134, length=None, flags=<Flag 145 (Extension++ISDN numbering)>, digits=b'33607080910')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             DIGITS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. IE_MSInternationalNumber                   
IE_MSInternationalNumber fields

ietype

ByteEnumField

134

length

ShortField

None

flags

FlagsField

<Flag 145 (Extension++ISDN numbering)>

digits

TBCDByteField

b'33607080910'

class scapy.contrib.gtp.IE_MSTimeZone(_pkt, /, *, ietype=153, length=None, timezone=0, spare=0, daylight_saving_time=0)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |    TIMEZONE   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   SPARE   |DAY|
+-+-+-+-+-+-+-+-+

                        Fig. IE_MSTimeZone                        
IE_MSTimeZone fields

ietype

ByteEnumField

153

length

ShortField

None

timezone

ByteField

0

spare

BitField (6 bits)

0

daylight_saving_time

XBitField (2 bits)

0

class scapy.contrib.gtp.IE_NSAPI(_pkt, /, *, ietype=20, sparebits=0, NSAPI=<RandNum>)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |SPAREBI| NSAPI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IE_NSAPI                           
IE_NSAPI fields

ietype

ByteEnumField

20

sparebits

XBitField (4 bits)

0

NSAPI

XBitField (4 bits)

<RandNum>

class scapy.contrib.gtp.IE_NotImplementedTLV(_pkt, /, *, ietype=0, length=None, data=b'')[源代码]

基类:Packet

aliastypes
extract_padding(pkt)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |      DATA     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                    Fig. IE_NotImplementedTLV                     
IE_NotImplementedTLV fields

ietype

ByteEnumField

0

length

ShortField

None

data

StrLenField

b''

class scapy.contrib.gtp.IE_PrivateExtension(_pkt, /, *, ietype=255, length=1, extension_identifier=0, extention_value=b'')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |EXTENSION IDENT|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        EXTENTION VALUE        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. IE_PrivateExtension                     
IE_PrivateExtension fields

ietype

ByteEnumField

255

length

ShortField

1

extension_identifier

ByteField

0

extention_value

StrLenField

b''

class scapy.contrib.gtp.IE_ProtocolConfigurationOptions(_pkt, /, *, ietype=132, length=4, Protocol_Configuration=b'')[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |PROTOCOL CONFIG|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

               Fig. IE_ProtocolConfigurationOptions               
IE_ProtocolConfigurationOptions fields

ietype

ByteEnumField

132

length

ShortField

4

Protocol_Configuration

StrLenField

b''

class scapy.contrib.gtp.IE_QoS(_pkt, /, *, ietype=135, length=None, allocation_retention_prioiry=1, spare1=0, delay_class=0, reliability_class=0, peak_troughput=0, spare2=0, precedence_class=0, spare3=0, mean_troughput=0, traffic_class=0, delivery_order=0, delivery_of_err_sdu=0, max_sdu_size=None, max_bitrate_up=None, max_bitrate_down=None, redidual_ber=0, sdu_err_ratio=0, transfer_delay=0, traffic_handling_prio=0, guaranteed_bit_rate_up=None, guaranteed_bit_rate_down=None, spare4=0, signaling_indication=0, source_stats_desc=0, max_bitrate_down_ext=None, guaranteed_bitrate_down_ext=None, max_bitrate_up_ext=None, guaranteed_bitrate_up_ext=None, max_bitrate_down_ext2=None, guaranteed_bitrate_down_ext2=None, max_bitrate_up_ext2=None, guaranteed_bitrate_up_ext2=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |ALLOCATION RETE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|SPA|DELAY|RELIA|PEAK TR|S|PRECE|SPARE|MEAN TROU|TRAFF|DEL|DELIV|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  MAX SDU SIZE | MAX BITRATE UP|MAX BITRATE DOW|REDIDUA|SDU ERR|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|TRANSFER DE|TRA|GUARANTEED BIT |GUARANTEED BIT |SPARE|S|SOURCE |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|MAX BITRATE DOW|GUARANTEED BITR|MAX BITRATE UP |GUARANTEED BITR|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|MAX BITRATE DOW|GUARANTEED BITR|MAX BITRATE UP |GUARANTEED BITR|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. IE_QoS                            
IE_QoS fields

ietype

ByteEnumField

135

length

ShortField

None

allocation_retention_prioiry

ByteField

1

spare1

XBitField (Cond) (2 bits)

0

delay_class

XBitField (Cond) (3 bits)

0

reliability_class

XBitField (Cond) (3 bits)

0

peak_troughput

XBitField (Cond) (4 bits)

0

spare2

BitField (Cond) (1 bit)

0

precedence_class

XBitField (Cond) (3 bits)

0

spare3

XBitField (Cond) (3 bits)

0

mean_troughput

XBitField (Cond) (5 bits)

0

traffic_class

XBitField (Cond) (3 bits)

0

delivery_order

XBitField (Cond) (2 bits)

0

delivery_of_err_sdu

XBitField (Cond) (3 bits)

0

max_sdu_size

ByteField (Cond)

None

max_bitrate_up

ByteField (Cond)

None

max_bitrate_down

ByteField (Cond)

None

redidual_ber

XBitField (Cond) (4 bits)

0

sdu_err_ratio

XBitField (Cond) (4 bits)

0

transfer_delay

XBitField (Cond) (6 bits)

0

traffic_handling_prio

XBitField (Cond) (2 bits)

0

guaranteed_bit_rate_up

ByteField (Cond)

None

guaranteed_bit_rate_down

ByteField (Cond)

None

spare4

XBitField (Cond) (3 bits)

0

signaling_indication

BitField (Cond) (1 bit)

0

source_stats_desc

XBitField (Cond) (4 bits)

0

max_bitrate_down_ext

ByteField (Cond)

None

guaranteed_bitrate_down_ext

ByteField (Cond)

None

max_bitrate_up_ext

ByteField (Cond)

None

guaranteed_bitrate_up_ext

ByteField (Cond)

None

max_bitrate_down_ext2

ByteField (Cond)

None

guaranteed_bitrate_down_ext2

ByteField (Cond)

None

max_bitrate_up_ext2

ByteField (Cond)

None

guaranteed_bitrate_up_ext2

ByteField (Cond)

None

class scapy.contrib.gtp.IE_RATType(_pkt, /, *, ietype=151, length=1, RAT_Type=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |    RAT TYPE   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IE_RATType                          
IE_RATType fields

ietype

ByteEnumField

151

length

ShortField

1

RAT_Type

ByteEnumField

None

class scapy.contrib.gtp.IE_Recovery(_pkt, /, *, ietype=14, restart_counter=24)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |RESTART COUNTER|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IE_Recovery                         
IE_Recovery fields

ietype

ByteEnumField

14

restart_counter

ByteField

24

class scapy.contrib.gtp.IE_ReorderingRequired(_pkt, /, *, ietype=8, reordering_required=254)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |REORDERING REQU|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. IE_ReorderingRequired                    
IE_ReorderingRequired fields

ietype

ByteEnumField

8

reordering_required

ByteEnumField

254

class scapy.contrib.gtp.IE_Routing(_pkt, /, *, ietype=3, MCC=b'', MNC=b'', LAC=None, RAC=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |              MCC              |      MNC      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LAC              |      RAC      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IE_Routing                          
IE_Routing fields

ietype

ByteEnumField

3

MCC

TBCDByteField

b''

MNC

TBCDByteField

b''

LAC

ShortField

None

RAC

ByteField

None

class scapy.contrib.gtp.IE_SelectionMode(_pkt, /, *, ietype=15, SelectionMode=11111100)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    | SELECTIONMODE |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. IE_SelectionMode                       
IE_SelectionMode fields

ietype

ByteEnumField

15

SelectionMode

BitEnumField

11111100

class scapy.contrib.gtp.IE_TEICP(_pkt, /, *, ietype=17, TEICI=<RandInt>)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |                     TEICI                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                          Fig. IE_TEICP                           
IE_TEICP fields

ietype

ByteEnumField

17

TEICI

XIntField

<RandInt>

class scapy.contrib.gtp.IE_TEIDI(_pkt, /, *, ietype=16, TEIDI=<RandInt>)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |                     TEIDI                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                          Fig. IE_TEIDI                           
IE_TEIDI fields

ietype

ByteEnumField

16

TEIDI

XIntField

<RandInt>

class scapy.contrib.gtp.IE_Teardown(_pkt, /, *, ietype=19, indicator=255)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |   INDICATOR   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IE_Teardown                         
IE_Teardown fields

ietype

ByteEnumField

19

indicator

ByteEnumField

255

class scapy.contrib.gtp.IE_TraceReference(_pkt, /, *, ietype=27, Trace_reference=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |        TRACE REFERENCE        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. IE_TraceReference                      
IE_TraceReference fields

ietype

ByteEnumField

27

Trace_reference

XBitField (16 bits)

None

class scapy.contrib.gtp.IE_TraceType(_pkt, /, *, ietype=28, Trace_type=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |           TRACE TYPE          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IE_TraceType                         
IE_TraceType fields

ietype

ByteEnumField

28

Trace_type

XBitField (16 bits)

None

class scapy.contrib.gtp.IE_UserLocationInformation(_pkt, /, *, ietype=152, length=None, type=1, MCC=b'', MNC=b'', LAC=None, SAC=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IETYPE    |             LENGTH            |      TYPE     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MCC              |      MNC      |      LAC      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |              SAC              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. IE_UserLocationInformation                  
IE_UserLocationInformation fields

ietype

ByteEnumField

152

length

ShortField

None

type

ByteField

1

MCC

TBCDByteField

b''

MNC

TBCDByteField

b''

LAC

ShortField

None

SAC

ShortField

None

class scapy.contrib.gtp.QoS_Profile(_pkt, /, *, qos_ei=0, length=None, spare1=0, delay_class=0, reliability_class=0, peak_troughput=0, spare2=0, precedence_class=0, spare3=0, mean_troughput=0, traffic_class=0, delivery_order=0, delivery_of_err_sdu=0, max_sdu_size=None, max_bitrate_up=None, max_bitrate_down=None, redidual_ber=0, sdu_err_ratio=0, transfer_delay=0, traffic_handling_prio=0, guaranteed_bit_rate_up=None, guaranteed_bit_rate_down=None)[源代码]

基类:IE_Base

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     QOS EI    |     LENGTH    |SPA|DELAY|RELIA|PEAK TR|S|PRECE|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|SPARE|MEAN TROU|TRAFF|DEL|DELIV|  MAX SDU SIZE | MAX BITRATE UP|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|MAX BITRATE DOW|REDIDUA|SDU ERR|TRANSFER |TRAFF|GUARANTEED BIT |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|GUARANTEED BIT |
+-+-+-+-+-+-+-+-+

                         Fig. QoS_Profile                         
QoS_Profile fields

qos_ei

ByteField

0

length

ByteField

None

spare1

XBitField (2 bits)

0

delay_class

XBitField (3 bits)

0

reliability_class

XBitField (3 bits)

0

peak_troughput

XBitField (4 bits)

0

spare2

BitField (1 bit)

0

precedence_class

XBitField (3 bits)

0

spare3

XBitField (3 bits)

0

mean_troughput

XBitField (5 bits)

0

traffic_class

XBitField (3 bits)

0

delivery_order

XBitField (2 bits)

0

delivery_of_err_sdu

XBitField (3 bits)

0

max_sdu_size

ByteField

None

max_bitrate_up

ByteField

None

max_bitrate_down

ByteField

None

redidual_ber

XBitField (4 bits)

0

sdu_err_ratio

XBitField (4 bits)

0

transfer_delay

XBitField (5 bits)

0

traffic_handling_prio

XBitField (3 bits)

0

guaranteed_bit_rate_up

ByteField

None

guaranteed_bit_rate_down

ByteField

None

class scapy.contrib.gtp.TBCDByteField(name: str, default: Optional[bytes], length: Optional[int] = None, length_from: Optional[Callable[[Packet], int]]  # noqa: E501 = None)[源代码]

基类:StrFixedLenField

i2h(pkt, val)[源代码]
i2m(pkt, val)[源代码]
m2i(pkt, val)[源代码]