packet.application.ntp4 - Man Page

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

Referenced By

packet.transport.udp(3).

14 February 2017 NFStest 2.1.5 ntp4 1.0