NTP4(3) | ntp4 1.0 | NTP4(3) |
packet.application.ntp4 - NTP module
Decode NTP layer.
RFC 1059 Network Time Protocol (Version 1) RFC 1119 Network Time Protocol (Version 2) RFC 1305 Network Time Protocol (Version 3) RFC 5905 Network Time Protocol (Version 4)
NTP4 object Usage: from packet.application.ntp4 import NTP4 # Decode NTP4 layer x = NTP4(pktt) Object definition: NTP4( leap = int, # Leap Indicator version = int, # NTP version mode = int, # Leap Indicator stratum = int, # Packet Stratum poll = int, # Maximum interval between successive messages precision = float, # Precision of system clock delay = float, # Root delay dispersion = float, # Root dispersion refid = string, # Reference ID tstamp = float, # Reference timestamp org_tstamp = float, # Origin timestamp rec_tstamp = float, # Receive timestamp xmt_tstamp = float, # Transit timestamp fields = list, # Extension fields keyid = int, # Key identifier digest = string, # Message digest )
NTP4 object Usage: from packet.application.ntp4 import NTP4 # Decode NTP4 layer x = NTP4(pktt) Object definition: NTP4( leap = int, # Leap Indicator version = int, # NTP version mode = int, # Leap Indicator stratum = int, # Packet Stratum poll = int, # Maximum interval between successive messages precision = float, # Precision of system clock delay = float, # Root delay dispersion = float, # Root dispersion refid = string, # Reference ID tstamp = float, # Reference timestamp org_tstamp = float, # Origin timestamp rec_tstamp = float, # Receive timestamp xmt_tstamp = float, # Transit timestamp fields = list, # Extension fields keyid = int, # Key identifier digest = string, # Message digest )
NTP4 object Usage: from packet.application.ntp4 import NTP4 # Decode NTP4 layer x = NTP4(pktt) Object definition: NTP4( leap = int, # Leap Indicator version = int, # NTP version mode = int, # Leap Indicator stratum = int, # Packet Stratum poll = int, # Maximum interval between successive messages precision = float, # Precision of system clock delay = float, # Root delay dispersion = float, # Root dispersion refid = string, # Reference ID tstamp = float, # Reference timestamp org_tstamp = float, # Origin timestamp rec_tstamp = float, # Receive timestamp xmt_tstamp = float, # Transit timestamp fields = list, # Extension fields keyid = int, # Key identifier digest = string, # Message digest )
NTP4 object Usage: from packet.application.ntp4 import NTP4 # Decode NTP4 layer x = NTP4(pktt) Object definition: NTP4( leap = int, # Leap Indicator version = int, # NTP version mode = int, # Leap Indicator stratum = int, # Packet Stratum poll = int, # Maximum interval between successive messages precision = float, # Precision of system clock delay = float, # Root delay dispersion = float, # Root dispersion refid = string, # Reference ID tstamp = float, # Reference timestamp org_tstamp = float, # Origin timestamp rec_tstamp = float, # Receive timestamp xmt_tstamp = float, # Transit timestamp fields = list, # Extension fields keyid = int, # Key identifier digest = string, # Message digest )
Methods defined here: ---------------------
__init__(self, pktt) Constructor Initialize object's private data.
Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.
NTP extension field
Methods defined here: ---------------------
__init__(self, unpack) Constructor which takes the Unpack object as input
NTP timestamp
enum ntp4_mode
NTP(pktt) Wrapper function to select correct NTP object
ntp_timestamp(unpack) Get NTP timestamp
baseobj(3), packet.utils(3)
No known bugs.
Jorge Mora (mora@netapp.com)
21 March 2023 | NFStest 3.2 |