scapy.contrib.ltp

NOTICE This software/technical data was produced for the U.S. Government under Prime Contract No. NASA-03001 and JPL Contract No. 1295026 and is subject to FAR 52.227-14 (6/87) Rights in Data General, and Article GP-51, Rights in Data General, respectively. This software is publicly released under MITRE case #12-3054

class scapy.contrib.ltp.LTP(_pkt, /, *, version=0, flags=0, SessionOriginator=0, SessionNumber=0, HeaderExtensionCount=None, TrailerExtensionCount=None, HeaderExtensions=[], DATA_ClientServiceID=0, DATA_PayloadOffset=0, DATA_PayloadLength=None, CheckpointSerialNo=0, ReportSerialNo=0, LTP_Payload=[], RA_ReportSerialNo=0, ReportCheckpointSerialNo=0, ReportUpperBound=0, ReportLowerBound=0, ReportReceptionClaimCount=None, ReportReceptionClaims=[], CancelFromSenderReason=15, CancelFromReceiverReason=15, CancelAckToBlockSender=0, CancelAckToBlockReceiver=0, TrailerExtensions=[])[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSION| FLAGS |       SESSIONORIGINATOR       | SESSIONNUMBER |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |HEADERE|TRAILER|        HEADEREXTENSIONS       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      DATA CLIENTSERVICEID     |       DATA PAYLOADOFFSET      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       DATA PAYLOADLENGTH      |       CHECKPOINTSERIALNO      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         REPORTSERIALNO        |          LTP PAYLOAD          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       RA REPORTSERIALNO       |    REPORTCHECKPOINTSERIALNO   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        REPORTUPPERBOUND       |        REPORTLOWERBOUND       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   REPORTRECEPTIONCLAIMCOUNT   |     REPORTRECEPTIONCLAIMS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|CANCELFROMSENDE|CANCELFROMRECEI|     CANCELACKTOBLOCKSENDER    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    CANCELACKTOBLOCKRECEIVER   |       TRAILEREXTENSIONS       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                             Fig. LTP                             
LTP fields

version

BitField (4 bits)

0

flags

BitEnumField

0

SessionOriginator

SDNV2

0

SessionNumber

SDNV2

0

HeaderExtensionCount

BitFieldLenField (4 bits)

None

TrailerExtensionCount

BitFieldLenField (4 bits)

None

HeaderExtensions

PacketListField

[]

DATA_ClientServiceID

SDNV2 (Cond)

0

DATA_PayloadOffset

SDNV2 (Cond)

0

DATA_PayloadLength

SDNV2FieldLenField (Cond)

None

CheckpointSerialNo

SDNV2 (Cond)

0

ReportSerialNo

SDNV2 (Cond)

0

LTP_Payload

PacketListField (Cond)

[]

RA_ReportSerialNo

SDNV2 (Cond)

0

ReportCheckpointSerialNo

SDNV2 (Cond)

0

ReportUpperBound

SDNV2 (Cond)

0

ReportLowerBound

SDNV2 (Cond)

0

ReportReceptionClaimCount

SDNV2FieldLenField (Cond)

None

ReportReceptionClaims

PacketListField (Cond)

[]

CancelFromSenderReason

ByteEnumField (Cond)

15

CancelFromReceiverReason

ByteEnumField (Cond)

15

CancelAckToBlockSender

SDNV2 (Cond)

0

CancelAckToBlockReceiver

SDNV2 (Cond)

0

TrailerExtensions

PacketListField

[]

mysummary()[源代码]
class scapy.contrib.ltp.LTPReceptionClaim(_pkt, /, *, ReceptionClaimOffset=0, ReceptionClaimLength=0)[源代码]

基类:Packet

aliastypes
default_payload_class(pay)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      RECEPTIONCLAIMOFFSET     |      RECEPTIONCLAIMLENGTH     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. LTPReceptionClaim                      
LTPReceptionClaim fields

ReceptionClaimOffset

SDNV2

0

ReceptionClaimLength

SDNV2

0

class scapy.contrib.ltp.LTPex(_pkt, /, *, ExTag=0, ExLength=None, ExData=b'')[源代码]

基类:Packet

aliastypes
default_payload_class(pay)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     EXTAG     |            EXLENGTH           |     EXDATA    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                            Fig. LTPex                            
LTPex fields

ExTag

ByteEnumField

0

ExLength

SDNV2FieldLenField

None

ExData

StrLenField

b''

scapy.contrib.ltp.ltp_bind_payload(cls, lambd)[源代码]

Bind payload class to the LTP packets.

参数:
  • cls -- the class to bind

  • lambd -- lambda that will be called to check whether or not the cls should be used ex: lambda pkt: ...