Struct peel_ip::layer4::ntp::NtpPacket [] [src]

pub struct NtpPacket {
    pub li: u8,
    pub version: u8,
    pub mode: u8,
    pub stratum: u8,
    pub poll: i8,
    pub precision: i8,
    pub root_delay: u32,
    pub root_dispersion: u32,
    pub ref_id: u32,
    pub ts_ref: u64,
    pub ts_orig: u64,
    pub ts_recv: u64,
    pub ts_xmit: u64,
    pub auth: Option<(u32, Vec<u8>)>,
}

Representation of a Network Time Protocol packet

Fields

Leap Indicator (2 Bit) This field is used to warn of an impending leap second

NTP version number (3 Bit)

Mode (3 Bit)

Stratum level of the local clock

The maximum interval between messages in seconds to the nearest power of two

Precision of the local clock in seconds to the nearest power of two

The total round trip delay to the primary reference source, in seconds with the fraction point between bits 15 and 16. Positive and negative values are valid

The maximum error relative to the primary reference source in seconds with the fraction point between bits 15 and 16. Only positive values greater than zero are valid

Reference clock identifier. Used to identify the particular reference clock.

Reference timestamp. The local time at which the local clock was last set or corrected.

Originate timestamp. The local time when the client sent the request.

Receive timestamp. The local time when the request was received by the server.

Transmit timestamp. The local time when the reply was sent from the server.

Authenticator. (0 or 96 Bit) See section 7.5 of [RFC5905] and [RFC7822]

Trait Implementations

impl Debug for NtpPacket
[src]

Formats the value using the given formatter.

impl Eq for NtpPacket
[src]

impl PartialEq for NtpPacket
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.