Provided by: nfstest_3.2-2_all bug

NAME

       packet.application.ntp4 - NTP module

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)

CLASSES

   class NTP1(NTP4)
       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
       )

   class NTP2(NTP4)
       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
       )

   class NTP3(NTP4)
       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
       )

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

              pktt:  Packet trace object (packet.pktt.Pktt) so this layer has
                     access to the parent layers.

   class NTPExtField(baseobj.BaseObj)
       NTP extension field

       Methods defined here:
       ---------------------

       __init__(self, unpack)
       Constructor which takes the Unpack object as input

   class NTP_TimeStamp(packet.utils.DateStr)
       NTP timestamp

   class ntp4_mode(packet.utils.Enum)
       enum ntp4_mode

FUNCTIONS

       NTP(pktt)
       Wrapper function to select correct NTP object

       ntp_timestamp(unpack)
       Get NTP timestamp

SEE ALSO

       baseobj(3), packet.utils(3)

BUGS

       No known bugs.

AUTHOR

       Jorge Mora (mora@netapp.com)