scapy.layers.ntp

NTP (Network Time Protocol). References : RFC 5905, RC 1305, ntpd source code

class scapy.layers.ntp.NTP(_pkt, /)[源代码]

基类:Packet

Base class that allows easier instantiation of a NTP packet from binary data.

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]

Returns the right class for the given data.

mysummary()[源代码]
pre_dissect(s)[源代码]

Check that the payload is long enough to build a NTP packet.

class scapy.layers.ntp.NTPAuthenticator(_pkt, /, *, padding=b'', key_id=0, dgst=b'')[源代码]

基类:Packet

Packet handling the "authenticator" part of a NTP packet, as defined in RFC 5905.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            PADDING            |             KEY ID            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |              DGST             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. NTPAuthenticator                       
NTPAuthenticator fields

padding

_NTPAuthenticatorPaddingField

b''

key_id

IntField

0

dgst

XStrFixedLenField

b''

class scapy.layers.ntp.NTPClockStatusPacket(_pkt, /, *, clock_status=0, code=0)[源代码]

基类:Packet

Packet handling the clock status fields.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  CLOCK STATUS |      CODE     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. NTPClockStatusPacket                     
NTPClockStatusPacket fields

clock_status

BitEnumField

0

code

BitField (8 bits)

0

class scapy.layers.ntp.NTPConfPeer(_pkt, /, *, peeraddr='0.0.0.0', hmode=0, version=0, minpoll=0, maxpoll=0, flags=<Flag 0 ()>, ttl=0, unused1=0, keyid=0, keystr=b'', v6_flag=0, unused2=0, peeraddr6='::')[源代码]

基类:Packet

Structure for passing peer configuration information.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            PEERADDR                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     HMODE     |    VERSION    |    MINPOLL    |    MAXPOLL    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     |      TTL      |            UNUSED1            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             KEYID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             KEYSTR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED2                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           PEERADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPConfPeer                         
NTPConfPeer fields

peeraddr

IPField

'0.0.0.0'

hmode

ByteField

0

version

ByteField

0

minpoll

ByteField

0

maxpoll

ByteField

0

flags

FlagsField

<Flag 0 ()>

ttl

ByteField

0

unused1

ShortField

0

keyid

IntField

0

keystr

StrFixedLenField

b''

v6_flag

IntField

0

unused2

IntField

0

peeraddr6

IP6Field

'::'

class scapy.layers.ntp.NTPConfRestrict(_pkt, /, *, addr='0.0.0.0', mask='0.0.0.0', flags=<Flag 0 ()>, m_flags=0, v6_flag=0, addr6='::', mask6='::')[源代码]

基类:Packet

Structure used for specifying restrict entries.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ADDR                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              MASK                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             FLAGS             |            M FLAGS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ADDR6                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             MASK6                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPConfRestrict                       
NTPConfRestrict fields

addr

IPField

'0.0.0.0'

mask

IPField

'0.0.0.0'

flags

FlagsField

<Flag 0 ()>

m_flags

ShortField

0

v6_flag

IntField

0

addr6

IP6Field

'::'

mask6

IP6Field

'::'

class scapy.layers.ntp.NTPConfTrap(_pkt, /, *, local_address='0.0.0.0', trap_address='0.0.0.0', trap_port=0, unused=0, v6_flag=0, local_address6='::', trap_address6='::')[源代码]

基类:Packet

Structure used to pass add/clear trap information to the client

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         LOCAL ADDRESS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          TRAP ADDRESS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TRAP PORT           |             UNUSED            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         LOCAL ADDRESS6                        |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         TRAP ADDRESS6                         |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPConfTrap                         
NTPConfTrap fields

local_address

IPField

'0.0.0.0'

trap_address

IPField

'0.0.0.0'

trap_port

ShortField

0

unused

ShortField

0

v6_flag

IntField

0

local_address6

IP6Field

'::'

trap_address6

IP6Field

'::'

class scapy.layers.ntp.NTPConfUnpeer(_pkt, /, *, peeraddr='0.0.0.0', v6_flag=0, peeraddr6='::')[源代码]

基类:Packet

Structure for passing peer deletion information.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            PEERADDR                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           PEERADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. NTPConfUnpeer                        
NTPConfUnpeer fields

peeraddr

IPField

'0.0.0.0'

v6_flag

IntField

0

peeraddr6

IP6Field

'::'

class scapy.layers.ntp.NTPControl(_pkt, /, *, zeros=0, version=2, mode=6, response=0, err=0, more=0, op_code=0, sequence=0, status_word=b'', status=0, association_id=0, offset=0, count=None, data=b'', authenticator=b'')[源代码]

基类:NTP

Packet handling NTP mode 6 / "Control" messages.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|ZER|VERSI| MODE|R|E|M| OP CODE |            SEQUENCE           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          STATUS WORD          |             STATUS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         ASSOCIATION ID        |             OFFSET            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             COUNT             |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         AUTHENTICATOR         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPControl                          
NTPControl fields

zeros

BitField (2 bits)

0

version

BitField (3 bits)

2

mode

BitEnumField

6

response

BitField (1 bit)

0

err

BitField (1 bit)

0

more

BitField (1 bit)

0

op_code

BitEnumField

0

sequence

ShortField

0

status_word

NTPControlStatusField (Cond)

b''

status

ShortField (Cond)

0

association_id

ShortField

0

offset

ShortField

0

count

ShortField

None

data

MayEnd

b''

authenticator

PacketField

b''

match_subclass = True
post_build(p, pay)[源代码]
class scapy.layers.ntp.NTPControlDataPacketLenField(name: str, default: Packet, cls: Union[Callable[[bytes], Packet], Type[Packet]]  # noqa: E501, length_from: Optional[Callable[[Packet], int]]  # noqa: E501 = None)[源代码]

基类:PacketLenField

PacketField handling the "data" field of NTP control messages.

getfield(pkt, s)[源代码]
m2i(pkt, m)[源代码]
class scapy.layers.ntp.NTPControlStatusField(name: str, default: Optional[K], pkt_cls: Union[Callable[[bytes], Packet], Type[Packet]]  # noqa: E501)[源代码]

基类:PacketField

This field provides better readability for the "status" field.

m2i(pkt, m)[源代码]
class scapy.layers.ntp.NTPErrorStatusPacket(_pkt, /, *, error_code=0, reserved=0)[源代码]

基类:Packet

Packet handling the error status fields.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   ERROR CODE  |    RESERVED   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. NTPErrorStatusPacket                     
NTPErrorStatusPacket fields

error_code

BitEnumField

0

reserved

BitField (8 bits)

0

class scapy.layers.ntp.NTPExtPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]]  # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]]  # noqa: E501 = None, max_count: Optional[int] = None)[源代码]

基类:PacketListField

PacketListField handling NTPv4 extensions (NTPExtension list).

getfield(pkt, s)[源代码]
m2i(pkt, m)[源代码]
class scapy.layers.ntp.NTPExtension(_pkt, /, *, type=0, len=0, value=b'')[源代码]

基类:Packet

Packet handling a NTPv4 extension.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. NTPExtension                         
NTPExtension fields

type

ShortField

0

len

ShortField

0

value

PadField

b''

class scapy.layers.ntp.NTPExtensions(_pkt, /, *, extensions=[], mac=<NTPAuthenticator  |>)[源代码]

基类:Packet

Packet handling the NTPv4 extensions and the "MAC part" of the 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           EXTENSIONS          |              MAC              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. NTPExtensions                        
NTPExtensions fields

extensions

NTPExtPacketListField

[]

mac

PacketField

<NTPAuthenticator  |>

class scapy.layers.ntp.NTPHeader(_pkt, /, *, leap=0, version=4, mode=3, stratum=2, poll=10, precision=0, delay=0, dispersion=0, id='127.0.0.1', ref_id=b'', ref=0, orig=None, recv=0, sent=None)[源代码]

基类:NTP

Packet handling the RFC 5905 NTP 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|LEA|VERSI| MODE|    STRATUM    |      POLL     |   PRECISION   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DELAY                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           DISPERSION                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             REF ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              REF                              |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ORIG                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RECV                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SENT                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. NTPHeader                          
NTPHeader fields

leap

BitEnumField

0

version

BitField (3 bits)

4

mode

BitEnumField

3

stratum

BitField (8 bits)

2

poll

BitField (8 bits)

10

precision

BitField (8 bits)

0

delay

FixedPointField (32 bits)

0

dispersion

FixedPointField (32 bits)

0

id

IPField (Cond)

'127.0.0.1'

ref_id

StrFixedLenEnumField (Cond)

b''

ref

TimeStampField (64 bits)

0

orig

TimeStampField (64 bits)

None

recv

TimeStampField (64 bits)

0

sent

TimeStampField (64 bits)

None

guess_payload_class(payload)[源代码]

Handles NTPv4 extensions and MAC part (when authentication is used.)

match_subclass = True
class scapy.layers.ntp.NTPInfoAuth(_pkt, /, *, timereset=0, numkeys=0, numfreekeys=0, keylookups=0, keynotfound=0, encryptions=0, decryptions=0, expired=0, keyuncached=0)[源代码]

基类:Packet

Structure used to return information concerning the authentication module.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            NUMKEYS                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          NUMFREEKEYS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           KEYLOOKUPS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          KEYNOTFOUND                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          ENCRYPTIONS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          DECRYPTIONS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            EXPIRED                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          KEYUNCACHED                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPInfoAuth                         
NTPInfoAuth fields

timereset

IntField

0

numkeys

IntField

0

numfreekeys

IntField

0

keylookups

IntField

0

keynotfound

IntField

0

encryptions

IntField

0

decryptions

IntField

0

expired

IntField

0

keyuncached

IntField

0

class scapy.layers.ntp.NTPInfoControl(_pkt, /, *, ctltimereset=0, numctlreq=0, numctlbadpkts=0, numctlresponses=0, numctlfrags=0, numctlerrors=0, numctltooshort=0, numctlinputresp=0, numctlinputfrag=0, numctlinputerr=0, numctlbadoffset=0, numctlbadversion=0, numctldatatooshort=0, numctlbadop=0, numasyncmsgs=0)[源代码]

基类:Packet

Structure used to return statistics from the control module.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          CTLTIMERESET                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           NUMCTLREQ                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         NUMCTLBADPKTS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        NUMCTLRESPONSES                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          NUMCTLFRAGS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          NUMCTLERRORS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         NUMCTLTOOSHORT                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        NUMCTLINPUTRESP                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        NUMCTLINPUTFRAG                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         NUMCTLINPUTERR                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        NUMCTLBADOFFSET                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        NUMCTLBADVERSION                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       NUMCTLDATATOOSHORT                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          NUMCTLBADOP                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          NUMASYNCMSGS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoControl                        
NTPInfoControl fields

ctltimereset

IntField

0

numctlreq

IntField

0

numctlbadpkts

IntField

0

numctlresponses

IntField

0

numctlfrags

IntField

0

numctlerrors

IntField

0

numctltooshort

IntField

0

numctlinputresp

IntField

0

numctlinputfrag

IntField

0

numctlinputerr

IntField

0

numctlbadoffset

IntField

0

numctlbadversion

IntField

0

numctldatatooshort

IntField

0

numctlbadop

IntField

0

numasyncmsgs

IntField

0

class scapy.layers.ntp.NTPInfoIOStats(_pkt, /, *, timereset=0, totalrecvbufs=0, freerecvbufs=0, fullrecvbufs=0, lowwater=0, dropped=0, ignored=0, received=0, sent=0, notsent=0, interrupts=0, int_received=0)[源代码]

基类:Packet

I/O statistics.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         TOTALRECVBUFS         |          FREERECVBUFS         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          FULLRECVBUFS         |            LOWWATER           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DROPPED                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IGNORED                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RECEIVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SENT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            NOTSENT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           INTERRUPTS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          INT RECEIVED                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoIOStats                        
NTPInfoIOStats fields

timereset

IntField

0

totalrecvbufs

ShortField

0

freerecvbufs

ShortField

0

fullrecvbufs

ShortField

0

lowwater

ShortField

0

dropped

IntField

0

ignored

IntField

0

received

IntField

0

sent

IntField

0

notsent

IntField

0

interrupts

IntField

0

int_received

IntField

0

class scapy.layers.ntp.NTPInfoIfStatsIPv4(_pkt, /, *, unaddr='0.0.0.0', unbcast='0.0.0.0', unmask='0.0.0.0', v6_flag=0, ifname=b'', flags=0, last_ttl=0, num_mcast=0, received=0, sent=0, notsent=0, uptime=0, scopeid=0, ifindex=0, ifnum=0, peercnt=0, family=0, ignore_packets=0, action=0, _filler0=0)[源代码]

基类:Packet

Interface statistics.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UNADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNBCAST                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UNMASK                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             IFNAME                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LAST TTL                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           NUM MCAST                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RECEIVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SENT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            NOTSENT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UPTIME                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SCOPEID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IFINDEX                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             IFNUM                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            PEERCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             FAMILY            | IGNORE PACKETS|     ACTION    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FILLER0                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. NTPInfoIfStatsIPv4                      
NTPInfoIfStatsIPv4 fields

unaddr

PadField

'0.0.0.0'

unbcast

PadField

'0.0.0.0'

unmask

PadField

'0.0.0.0'

v6_flag

IntField

0

ifname

StrFixedLenField

b''

flags

IntField

0

last_ttl

IntField

0

num_mcast

IntField

0

received

IntField

0

sent

IntField

0

notsent

IntField

0

uptime

IntField

0

scopeid

IntField

0

ifindex

IntField

0

ifnum

IntField

0

peercnt

IntField

0

family

ShortField

0

ignore_packets

ByteField

0

action

ByteField

0

_filler0

IntField

0

class scapy.layers.ntp.NTPInfoIfStatsIPv6(_pkt, /, *, unaddr='::', unbcast='::', unmask='::', v6_flag=0, ifname=b'', flags=0, last_ttl=0, num_mcast=0, received=0, sent=0, notsent=0, uptime=0, scopeid=0, ifindex=0, ifnum=0, peercnt=0, family=0, ignore_packets=0, action=0, _filler0=0)[源代码]

基类:Packet

Interface statistics.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UNADDR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNBCAST                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UNMASK                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             IFNAME                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LAST TTL                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           NUM MCAST                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RECEIVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SENT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            NOTSENT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UPTIME                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SCOPEID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IFINDEX                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             IFNUM                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            PEERCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             FAMILY            | IGNORE PACKETS|     ACTION    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FILLER0                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. NTPInfoIfStatsIPv6                      
NTPInfoIfStatsIPv6 fields

unaddr

IP6Field

'::'

unbcast

IP6Field

'::'

unmask

IP6Field

'::'

v6_flag

IntField

0

ifname

StrFixedLenField

b''

flags

IntField

0

last_ttl

IntField

0

num_mcast

IntField

0

received

IntField

0

sent

IntField

0

notsent

IntField

0

uptime

IntField

0

scopeid

IntField

0

ifindex

IntField

0

ifnum

IntField

0

peercnt

IntField

0

family

ShortField

0

ignore_packets

ByteField

0

action

ByteField

0

_filler0

IntField

0

class scapy.layers.ntp.NTPInfoKernel(_pkt, /, *, offset=0, freq=0, maxerror=0, esterror=0, status=0, shift=0, constant=0, precision=0, tolerance=0, ppsfreq=0, jitter=0, stabil=0, jitcnt=0, calcnt=0, errcnt=0, stbcnt=0)[源代码]

基类:Packet

Structure used for returning kernel pll/PPS information

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             OFFSET                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              FREQ                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            MAXERROR                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            ESTERROR                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             STATUS            |             SHIFT             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            CONSTANT                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           PRECISION                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TOLERANCE                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            PPSFREQ                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             JITTER                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             STABIL                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             JITCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             CALCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ERRCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             STBCNT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. NTPInfoKernel                        
NTPInfoKernel fields

offset

IntField

0

freq

IntField

0

maxerror

IntField

0

esterror

IntField

0

status

ShortField

0

shift

ShortField

0

constant

IntField

0

precision

IntField

0

tolerance

IntField

0

ppsfreq

IntField

0

jitter

IntField

0

stabil

IntField

0

jitcnt

IntField

0

calcnt

IntField

0

errcnt

IntField

0

stbcnt

IntField

0

class scapy.layers.ntp.NTPInfoLoop(_pkt, /, *, last_offset=0, drift_comp=0, compliance=0, watchdog_timer=0)[源代码]

基类:Packet

Loop filter variables.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          LAST OFFSET                          |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           DRIFT COMP                          |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           COMPLIANCE                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         WATCHDOG TIMER                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPInfoLoop                         
NTPInfoLoop fields

last_offset

TimeStampField (64 bits)

0

drift_comp

TimeStampField (64 bits)

0

compliance

IntField

0

watchdog_timer

IntField

0

class scapy.layers.ntp.NTPInfoMemStats(_pkt, /, *, timereset=0, totalpeermem=0, freepeermem=0, findpeer_calls=0, allocations=0, demobilizations=0, hashcount=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])[源代码]

基类:Packet

Peer memory statistics.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          TOTALPEERMEM         |          FREEPEERMEM          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         FINDPEER CALLS                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          ALLOCATIONS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        DEMOBILIZATIONS                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           HASHCOUNT           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoMemStats                       
NTPInfoMemStats fields

timereset

IntField

0

totalpeermem

ShortField

0

freepeermem

ShortField

0

findpeer_calls

IntField

0

allocations

IntField

0

demobilizations

IntField

0

hashcount

FieldListField

[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

class scapy.layers.ntp.NTPInfoMonitor1(_pkt, /, *, lasttime=0, firsttime=0, lastdrop=0, count=0, addr='0.0.0.0', daddr='0.0.0.0', flags=0, port=0, mode=0, version=0, v6_flag=0, unused1=0, addr6='::', daddr6='::')[源代码]

基类:Packet

Structure used for returning monitor data.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LASTTIME                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           FIRSTTIME                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LASTDROP                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COUNT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ADDR                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DADDR                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PORT             |      MODE     |    VERSION    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED1                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ADDR6                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DADDR6                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoMonitor1                       
NTPInfoMonitor1 fields

lasttime

IntField

0

firsttime

IntField

0

lastdrop

IntField

0

count

IntField

0

addr

IPField

'0.0.0.0'

daddr

IPField

'0.0.0.0'

flags

IntField

0

port

ShortField

0

mode

ByteField

0

version

ByteField

0

v6_flag

IntField

0

unused1

IntField

0

addr6

IP6Field

'::'

daddr6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoPeer(_pkt, /, *, dstaddr='0.0.0.0', srcaddr='0.0.0.0', srcport=0, flags=<Flag 0 ()>, leap=0, hmode=0, pmode=0, stratum=0, ppoll=0, hpoll=0, precision=0, version=0, unused8=0, reach=0, unreach=0, flash=0, ttl=0, flash2=0, associd=0, keyid=0, pkeyid=0, refid=0, timer=0, rootdelay=0, rootdispersion=0, reftime=0, org=0, rec=0, xmt=0, filtdelay=[0, 0, 0, 0, 0, 0, 0, 0], filtoffset=[0, 0, 0, 0, 0, 0, 0, 0], order=[0, 0, 0, 0, 0, 0, 0, 0], delay=0, dispersion=0, offset=0, selectdisp=0, unused1=0, unused2=0, unused3=0, unused4=0, unused5=0, unused6=0, unused7=0, estbdelay=0, v6_flag=0, unused9=0, dstaddr6='::', srcaddr6='::')[源代码]

基类:Packet

Peer information structure.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DSTADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SRCADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SRCPORT            |     FLAGS     |      LEAP     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     HMODE     |     PMODE     |    STRATUM    |     PPOLL     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     HPOLL     |   PRECISION   |    VERSION    |    UNUSED8    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     REACH     |    UNREACH    |     FLASH     |      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             FLASH2            |            ASSOCID            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             KEYID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PKEYID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             REFID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             TIMER                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           ROOTDELAY                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         ROOTDISPERSION                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            REFTIME                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ORG                              |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              REC                              |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              XMT                              |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           FILTDELAY           |           FILTOFFSET          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             ORDER             |             DELAY             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |           DISPERSION          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |             OFFSET            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |           SELECTDISP          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED1            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED2            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED3            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED4            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED5            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED6            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED7            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |           ESTBDELAY           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            V6 FLAG            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            UNUSED9            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            DSTADDR6           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            SRCADDR6           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPInfoPeer                         
NTPInfoPeer fields

dstaddr

IPField

'0.0.0.0'

srcaddr

IPField

'0.0.0.0'

srcport

ShortField

0

flags

FlagsField

<Flag 0 ()>

leap

ByteField

0

hmode

ByteEnumField

0

pmode

ByteField

0

stratum

ByteField

0

ppoll

ByteField

0

hpoll

ByteField

0

precision

SignedByteField

0

version

ByteField

0

unused8

ByteField

0

reach

ByteField

0

unreach

ByteField

0

flash

XByteField

0

ttl

ByteField

0

flash2

XLEShortField

0

associd

ShortField

0

keyid

LEIntField

0

pkeyid

IntField

0

refid

IPField

0

timer

IntField

0

rootdelay

FixedPointField (32 bits)

0

rootdispersion

FixedPointField (32 bits)

0

reftime

TimeStampField (64 bits)

0

org

TimeStampField (64 bits)

0

rec

TimeStampField (64 bits)

0

xmt

TimeStampField (64 bits)

0

filtdelay

FieldListField

[0, 0, 0, 0, 0, 0, 0, 0]

filtoffset

FieldListField

[0, 0, 0, 0, 0, 0, 0, 0]

order

FieldListField

[0, 0, 0, 0, 0, 0, 0, 0]

delay

FixedPointField (32 bits)

0

dispersion

FixedPointField (32 bits)

0

offset

TimeStampField (64 bits)

0

selectdisp

FixedPointField (32 bits)

0

unused1

IntField

0

unused2

IntField

0

unused3

IntField

0

unused4

IntField

0

unused5

IntField

0

unused6

IntField

0

unused7

IntField

0

estbdelay

FixedPointField (32 bits)

0

v6_flag

IntField

0

unused9

IntField

0

dstaddr6

IP6Field

'::'

srcaddr6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoPeerList(_pkt, /, *, addr='0.0.0.0', port=0, hmode=0, flags=<Flag 0 ()>, v6_flag=0, unused1=0, addr6='::')[源代码]

基类:Packet

Used to return raw lists of peers.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ADDR                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PORT             |     HMODE     |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED1                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ADDR6                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoPeerList                       
NTPInfoPeerList fields

addr

IPField

'0.0.0.0'

port

ShortField

0

hmode

ByteEnumField

0

flags

FlagsField

<Flag 0 ()>

v6_flag

IntField

0

unused1

IntField

0

addr6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoPeerStats(_pkt, /, *, dstaddr='0.0.0.0', srcaddr='0.0.0.0', srcport=0, flags=<Flag 0 ()>, timereset=0, timereceived=0, timetosend=0, timereachable=0, sent=0, unused1=0, processed=0, unused2=0, badauth=0, bogusorg=0, oldpkt=0, unused3=0, unused4=0, seldisp=0, selbroken=0, unused5=0, candidate=0, unused6=0, unused7=0, unused8=0, v6_flag=0, unused9=0, dstaddr6='::', srcaddr6='::')[源代码]

基类:Packet

Peer statistics structure.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DSTADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SRCADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SRCPORT            |             FLAGS             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          TIMERECEIVED                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMETOSEND                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         TIMEREACHABLE                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SENT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED1                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           PROCESSED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED2                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BADAUTH                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BOGUSORG                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             OLDPKT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED3                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED4                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SELDISP                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SELBROKEN                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED5                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   CANDIDATE   |    UNUSED6    |    UNUSED7    |    UNUSED8    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED9                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DSTADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SRCADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. NTPInfoPeerStats                       
NTPInfoPeerStats fields

dstaddr

IPField

'0.0.0.0'

srcaddr

IPField

'0.0.0.0'

srcport

ShortField

0

flags

FlagsField

<Flag 0 ()>

timereset

IntField

0

timereceived

IntField

0

timetosend

IntField

0

timereachable

IntField

0

sent

IntField

0

unused1

IntField

0

processed

IntField

0

unused2

IntField

0

badauth

IntField

0

bogusorg

IntField

0

oldpkt

IntField

0

unused3

IntField

0

unused4

IntField

0

seldisp

IntField

0

selbroken

IntField

0

unused5

IntField

0

candidate

ByteField

0

unused6

ByteField

0

unused7

ByteField

0

unused8

ByteField

0

v6_flag

IntField

0

unused9

IntField

0

dstaddr6

IP6Field

'::'

srcaddr6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoPeerSummary(_pkt, /, *, dstaddr='0.0.0.0', srcaddr='0.0.0.0', srcport=0, stratum=0, hpoll=0, ppoll=0, reach=0, flags=<Flag 0 ()>, hmode={0: 'reserved', 1: 'symmetric active', 2: 'symmetric passive', 3: 'client', 4: 'server', 5: 'broadcast', 6: 'NTP control message', 7: 'reserved for private use'}, delay=0, offset=0, dispersion=0, v6_flag=0, unused1=0, dstaddr6='::', srcaddr6='::')[源代码]

基类:Packet

Sort of the info that ntpdc returns by default.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DSTADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SRCADDR                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SRCPORT            |    STRATUM    |     HPOLL     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     PPOLL     |     REACH     |     FLAGS     |     HMODE     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DELAY                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             OFFSET                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           DISPERSION                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED1                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DSTADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            SRCADDR6                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. NTPInfoPeerSummary                      
NTPInfoPeerSummary fields

dstaddr

IPField

'0.0.0.0'

srcaddr

IPField

'0.0.0.0'

srcport

ShortField

0

stratum

ByteField

0

hpoll

ByteField

0

ppoll

ByteField

0

reach

ByteField

0

flags

FlagsField

<Flag 0 ()>

hmode

ByteField

{0: 'reserved', 1: 'symmetric active', 2: 'symmetric passive', 3: 'client', 4: 'server', 5: 'broadcast', 6: 'NTP control message', 7: 'reserved for private use'}

delay

FixedPointField (32 bits)

0

offset

TimeStampField (64 bits)

0

dispersion

FixedPointField (32 bits)

0

v6_flag

IntField

0

unused1

IntField

0

dstaddr6

IP6Field

'::'

srcaddr6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoSys(_pkt, /, *, peer='0.0.0.0', peer_mode=0, leap=0, stratum=0, precision=0, rootdelay=0, rootdispersion=0, refid=0, reftime=0, poll=0, flags=<Flag 0 ()>, unused1=0, unused2=0, unused3=0, bdelay=0, frequency=0, authdelay=0, stability=0, v6_flag=0, unused4=0, peer6='::')[源代码]

基类:Packet

System info. Mostly the sys.* variables, plus a few unique to the implementation.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              PEER                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   PEER MODE   |      LEAP     |    STRATUM    |   PRECISION   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           ROOTDELAY                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         ROOTDISPERSION                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             REFID                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            REFTIME                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              POLL                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     FLAGS     |    UNUSED1    |    UNUSED2    |    UNUSED3    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             BDELAY                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           FREQUENCY                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           AUTHDELAY                           |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           STABILITY                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            V6 FLAG                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            UNUSED4                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PEER6                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPInfoSys                          
NTPInfoSys fields

peer

IPField

'0.0.0.0'

peer_mode

ByteField

0

leap

ByteField

0

stratum

ByteField

0

precision

ByteField

0

rootdelay

FixedPointField (32 bits)

0

rootdispersion

FixedPointField (32 bits)

0

refid

IPField

0

reftime

TimeStampField (64 bits)

0

poll

IntField

0

flags

FlagsField

<Flag 0 ()>

unused1

ByteField

0

unused2

ByteField

0

unused3

ByteField

0

bdelay

FixedPointField (32 bits)

0

frequency

FixedPointField (32 bits)

0

authdelay

TimeStampField (64 bits)

0

stability

FixedPointField (32 bits)

0

v6_flag

IntField

0

unused4

IntField

0

peer6

IP6Field

'::'

class scapy.layers.ntp.NTPInfoSysStats(_pkt, /, *, timeup=0, timereset=0, denied=0, oldversionpkt=0, newversionpkt=0, unknownversion=0, badlength=0, processed=0, badauth=0, received=0, limitrejected=0)[源代码]

基类:Packet

System stats. These are collected in the protocol module.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             TIMEUP                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DENIED                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         OLDVERSIONPKT                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         NEWVERSIONPKT                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         UNKNOWNVERSION                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           BADLENGTH                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           PROCESSED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BADAUTH                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RECEIVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         LIMITREJECTED                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPInfoSysStats                       
NTPInfoSysStats fields

timeup

IntField

0

timereset

IntField

0

denied

IntField

0

oldversionpkt

IntField

0

newversionpkt

IntField

0

unknownversion

IntField

0

badlength

IntField

0

processed

IntField

0

badauth

IntField

0

received

IntField

0

limitrejected

IntField

0

class scapy.layers.ntp.NTPInfoTimerStats(_pkt, /, *, timereset=0, alarms=0, overflows=0, xmtcalls=0)[源代码]

基类:Packet

Timer stats.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMERESET                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ALARMS                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           OVERFLOWS                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            XMTCALLS                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. NTPInfoTimerStats                      
NTPInfoTimerStats fields

timereset

IntField

0

alarms

IntField

0

overflows

IntField

0

xmtcalls

IntField

0

class scapy.layers.ntp.NTPPeerStatusDataPacket(_pkt, /, *, association_id=0, peer_status=<NTPPeerStatusPacket  |>)[源代码]

基类:Packet

Packet handling the data field when op_code is CTL_OP_READSTAT and the association_id field is null.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         ASSOCIATION ID        |          PEER STATUS          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. NTPPeerStatusDataPacket                   
NTPPeerStatusDataPacket fields

association_id

ShortField

0

peer_status

PacketField

<NTPPeerStatusPacket  |>

class scapy.layers.ntp.NTPPeerStatusPacket(_pkt, /, *, configured=0, auth_enabled=0, authentic=0, reachability=0, reserved=0, peer_sel=0, peer_event_counter=0, peer_event_code=0)[源代码]

基类:Packet

Packet handling the peer status fields.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C|A|A|R|R|PEER |PEER EV|PEER EV|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. NTPPeerStatusPacket                     
NTPPeerStatusPacket fields

configured

BitField (1 bit)

0

auth_enabled

BitField (1 bit)

0

authentic

BitField (1 bit)

0

reachability

BitField (1 bit)

0

reserved

BitField (1 bit)

0

peer_sel

BitEnumField

0

peer_event_counter

BitField (4 bits)

0

peer_event_code

BitEnumField

0

class scapy.layers.ntp.NTPPrivate(_pkt, /, *, response=0, more=0, version=2, mode=7, auth=0, seq=0, implementation=0, request_code=0, err=0, nb_items=0, mbz=0, data_item_size=0, req_data=[], data=[], authenticator=b'')[源代码]

基类:NTP

Packet handling the private (mode 7) messages.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|M|VERSI| MODE|A|     SEQ     | IMPLEMENTATION|  REQUEST CODE |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  ERR  |        NB ITEMS       |  MBZ  |     DATA ITEM SIZE    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            REQ DATA           |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         AUTHENTICATOR         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. NTPPrivate                          
NTPPrivate fields

response

BitField (1 bit)

0

more

BitField (1 bit)

0

version

BitField (3 bits)

2

mode

BitEnumField

7

auth

BitField (1 bit)

0

seq

BitField (7 bits)

0

implementation

ByteEnumField

0

request_code

ByteEnumField

0

err

BitEnumField

0

nb_items

BitField (12 bits)

0

mbz

BitField (4 bits)

0

data_item_size

BitField (12 bits)

0

req_data

NTPPrivateReqPacketListField (Cond)

[]

data

NTPPrivateRespPacketListField (Cond)

[]

authenticator

PacketField (Cond)

b''

match_subclass = True
class scapy.layers.ntp.NTPPrivatePktTail(_pkt, /, *, tstamp=0, key_id=0, dgst=b'')[源代码]

基类:Packet

include/ntp_request.h The req_pkt_tail structure is used by ntpd to adjust for different packet sizes that may arrive.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             TSTAMP                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             KEY ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DGST             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. NTPPrivatePktTail                      
NTPPrivatePktTail fields

tstamp

TimeStampField (64 bits)

0

key_id

IntField

0

dgst

XStrFixedLenField

b''

class scapy.layers.ntp.NTPPrivateReqPacket(_pkt, /, *, req_data=b'')[源代码]

基类:Packet

Packet handling request data.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            REQ DATA           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. NTPPrivateReqPacket                     
NTPPrivateReqPacket fields

req_data

StrField

b''

class scapy.layers.ntp.NTPPrivateReqPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]]  # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]]  # noqa: E501 = None, max_count: Optional[int] = None)[源代码]

基类:PacketListField

Handles specific request packets.

getfield(pkt, s)[源代码]
m2i(pkt, s)[源代码]
class scapy.layers.ntp.NTPPrivateRespPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]]  # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]]  # noqa: E501 = None, max_count: Optional[int] = None)[源代码]

基类:PacketListField

PacketListField handling the response data.

getfield(pkt, s)[源代码]
m2i(pkt, s)[源代码]
class scapy.layers.ntp.NTPStatusPacket(_pkt, /, *, status=0)[源代码]

基类:Packet

Packet handling a non specific status word.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             STATUS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. NTPStatusPacket                       
NTPStatusPacket fields

status

ShortField

0

class scapy.layers.ntp.NTPSystemStatusPacket(_pkt, /, *, leap_indicator=0, clock_source=0, system_event_counter=0, system_event_code=0)[源代码]

基类:Packet

Packet handling the system status fields.

aliastypes
extract_padding(s)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|LEA|CLOCK SOURC|SYSTEM |SYSTEM |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. NTPSystemStatusPacket                    
NTPSystemStatusPacket fields

leap_indicator

BitEnumField

0

clock_source

BitEnumField

0

system_event_counter

BitField (4 bits)

0

system_event_code

BitEnumField

0

class scapy.layers.ntp.TimeStampField(name, default)[源代码]

基类:FixedPointField

This field handles the timestamp fields in the NTP header.

any2i(pkt, val)[源代码]
i2m(pkt, val)[源代码]
i2repr(pkt, val)[源代码]
class scapy.layers.ntp.XLEShortField(name: str, default: int | None)[源代码]

基类:LEShortField

XShortField which value is encoded in little endian.

i2repr(pkt, x)[源代码]