logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

packet.application.ntp4 - NTP module

Author

       Jorge Mora (mora@netapp.com)

NFStest 3.2                                       21 March 2023                                          NTP4(3)

Bugs

       No known bugs.

Classes

classNTP1(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
       )

   classNTP2(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
       )

   classNTP3(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
       )

   classNTP4(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
       )

       Methodsdefinedhere:
       ---------------------

       __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.

   classNTPExtField(baseobj.BaseObj)
       NTP extension field

       Methodsdefinedhere:
       ---------------------

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

   classNTP_TimeStamp(packet.utils.DateStr)
       NTP timestamp

   classntp4_mode(packet.utils.Enum)
       enum ntp4_mode

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)

Functions

NTP(pktt)
       Wrapper function to select correct NTP object

       ntp_timestamp(unpack)
       Get NTP timestamp

Name

       packet.application.ntp4 - NTP module

See Also

baseobj(3),packet.utils(3)

See Also