scapy.contrib.stamp
STAMP (Simple Two-Way Active Measurement Protocol) - RFC 8762.
引用
- class scapy.contrib.stamp.ErrorEstimate(_pkt, /, *, S=0, Z=0, scale=0, multiplier=1)[源代码]
基类:
PacketThe Error Estimate specifies the estimate of the error and synchronization. The format of the Error Estimate field (defined in Section 4.1.2 of RFC 4656) is reported below:
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |S|Z| Scale | Multiplier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Sis interpreted as follows:Value
Description
0
there is no notion of external synchronization for the time source
1
the party generating the timestamp has a clock that is synchronized to UTC using an external source
Zis interpreted as follows (defined in Section 2.3 of RFC 8186):Value
Description
0
NTP 64-bit format of a timestamp
1
PTPv2 truncated format of a timestamp
ScaleandMultiplierare linked by the following relationship:ErrorEstimate = Multiplier*2^(-32)*2^Scale (in seconds)
引用
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |S|Z| SCALE | MULTIPLIER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ErrorEstimateErrorEstimate fields S
0Z
0scale
BitField(6 bits)0multiplier
1
- guess_payload_class(payload: str) Packet_metaclass[源代码]
- class scapy.contrib.stamp.STAMPSessionReflectorTestUnauthenticated(_pkt, /, *, seq=0, ts=None, err_estimate=<ErrorEstimate |>, ssid=1, ts_rx=None, seq_sender=0, ts_sender=None, err_estimate_sender=<ErrorEstimate |>, mbz1=0, ttl_sender=255, mbz2=0, tlv_objects=[])[源代码]
基类:
PacketExtended STAMP Session-Reflector Test Packet in Unauthenticated Mode.
The format (defined in Section 3 of RFC 8972) is shown below:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Estimate | SSID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receive Timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Session-Sender Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Session-Sender Timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Session-Sender Error Estimate | MBZ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Ses-Sender TTL | MBZ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ TLVs ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
引用
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEQ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TS | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERR ESTIMATE | SSID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TS RX | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEQ SENDER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TS SENDER | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERR ESTIMATE SENDER | MBZ1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TTL SENDER | MBZ2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TLV OBJECTS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. STAMPSessionReflectorTestUnauthenticatedSTAMPSessionReflectorTestUnauthenticated fields seq
0ts
MultipleTypeField(TimeStampField, UTCTimeField)0err_estimate
<ErrorEstimate |>ssid
1ts_rx
MultipleTypeField(TimeStampField, UTCTimeField)0seq_sender
0ts_sender
MultipleTypeField(TimeStampField, UTCTimeField)0err_estimate_sender
<ErrorEstimate |>mbz1
0ttl_sender
255mbz2
0tlv_objects
[]
- class scapy.contrib.stamp.STAMPSessionSenderTestUnauthenticated(_pkt, /, *, seq=0, ts=None, err_estimate=<ErrorEstimate |>, ssid=1, mbz=0, tlv_objects=[])[源代码]
基类:
PacketExtended STAMP Session-Sender Test Packet in Unauthenticated Mode.
The format (defined in Section 3 of RFC 8972) is shown below:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Estimate | SSID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | MBZ (28 octets) | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ TLVs ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
引用
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEQ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TS | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERR ESTIMATE | SSID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MBZ | + + | | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TLV OBJECTS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. STAMPSessionSenderTestUnauthenticatedSTAMPSessionSenderTestUnauthenticated fields seq
0ts
MultipleTypeField(TimeStampField, UTCTimeField)0err_estimate
<ErrorEstimate |>ssid
1mbz
0tlv_objects
[]
- class scapy.contrib.stamp.STAMPTestTLV(_pkt, /, *, flags=<Flag 0 ()>, type=None, len=0, value=b'')[源代码]
基类:
PacketThe STAMP Test TLV defined in Section 4 of [RFC 8972] provides a flexible extension mechanism for optional informational elements.
The TLV Format in a STAMP Test packet is reported below:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |STAMP TLV Flags| Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Value ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Field
Description
STAMP TLV Flags
8-bit field; for the details about the STAMP TLV Flags Format, see RFC 8972
Type
characterizes the interpretation of the Value field
Length
the length of the Value field in octets
Value
interpreted according to the value of the Type field
引用
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FLAGS | TYPE | LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. STAMPTestTLVSTAMPTestTLV fields flags
<Flag 0 ()>type
Nonelen
0value
b''
- registered_stamp_tlv = {None: <class 'scapy.contrib.stamp.STAMPTestTLV'>}