1NTP4(3)                            ntp4 1.0                            NTP4(3)
2
3
4

NAME

6       packet.application.ntp4 - NTP module
7

DESCRIPTION

9       Decode NTP layer.
10
11       RFC 1059 Network Time Protocol (Version 1) RFC 1119 Network Time Proto‐
12       col (Version 2) RFC 1305 Network Time Protocol  (Version  3)  RFC  5905
13       Network Time Protocol (Version 4)
14

CLASSES

16   class NTP4(baseobj.BaseObj)
17       NTP4 object
18
19       Usage:
20           from packet.application.ntp4 import NTP4
21
22           # Decode NTP4 layer
23           x = NTP4(pktt)
24
25       Object definition:
26
27       NTP4(
28           leap       = int,    # Leap Indicator
29           version    = int,    # NTP version
30           mode       = int,    # Leap Indicator
31           stratum    = int,    # Packet Stratum
32           poll       = int,    # Maximum interval between successive messages
33           precision  = float,  # Precision of system clock
34           delay      = float,  # Root delay
35           dispersion = float,  # Root dispersion
36           refid      = string, # Reference ID
37           tstamp     = float,  # Reference timestamp
38           org_tstamp = float,  # Origin timestamp
39           rec_tstamp = float,  # Receive timestamp
40           xmt_tstamp = float,  # Transit timestamp
41           fields     = list,   # Extension fields
42           keyid      = int,    # Key identifier
43           digest     = string, # Message digest
44       )
45
46
47       Methods defined here:
48       ---------------------
49
50       __init__(self, pktt)
51       Constructor
52
53       Initialize object's private data.
54
55
56              pktt:  Packet trace object (packet.pktt.Pktt) so this layer has
57                     access to the parent layers.
58
59   class NTPExtField(baseobj.BaseObj)
60       NTP extension field
61
62
63       Methods defined here:
64       ---------------------
65
66       __init__(self, unpack)
67       Constructor which takes the Unpack object as input
68
69   class NTP_TimeStamp(packet.utils.DateStr)
70       NTP timestamp
71
72
73   class ntp4_mode(packet.utils.Enum)
74       enum ntp4_mode
75
76

FUNCTIONS

78   NTP(pktt)
79       Wrapper function to select correct NTP object
80
81   ntp_timestamp(unpack)
82       Get NTP timestamp
83

SEE ALSO

85       baseobj(3), packet.utils(3)
86
87

BUGS

89       No known bugs.
90

AUTHOR

92       Jorge Mora (mora@netapp.com)
93
94
95
96NFStest 2.1.5                  14 February 2017                        NTP4(3)
Impressum