.\" DO NOT MODIFY THIS FILE!  It was generated by setup.py 1.2.
.TH NTP4 3 "21 March 2023" "NFStest 3.2" "ntp4 1.0"
.SH NAME
packet.application.ntp4 - NTP module
.SH DESCRIPTION

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)
.SH CLASSES
.SS class NTP1(NTP4)
.nf
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
)

.fi
.SS class NTP2(NTP4)
.nf
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
)

.fi
.SS class NTP3(NTP4)
.nf
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
)

.fi
.SS class NTP4(baseobj.BaseObj)
.nf
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
)

.P
.B Methods defined here:
---------------------
.P
.B __init__(self, pktt)
Constructor

Initialize object's private data.

.RS
.TP
.B
pktt:
Packet trace object (packet.pktt.Pktt) so this layer has
access to the parent layers.
.RE
.fi
.SS class NTPExtField(baseobj.BaseObj)
.nf
NTP extension field

.P
.B Methods defined here:
---------------------
.P
.B __init__(self, unpack)
Constructor which takes the Unpack object as input
.fi
.SS class NTP_TimeStamp(packet.utils.DateStr)
.nf
NTP timestamp

.fi
.SS class ntp4_mode(packet.utils.Enum)
.nf
enum ntp4_mode

.fi
.SH FUNCTIONS
.nf
.B NTP(pktt)
Wrapper function to select correct NTP object
.P
.B ntp_timestamp(unpack)
Get NTP timestamp
.SH SEE ALSO
.BR baseobj(3),
.BR packet.utils(3)

.SH BUGS
No known bugs.
.SH AUTHOR
Jorge Mora (mora@netapp.com)