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
li: u8
Leap Indicator (2 Bit) This field is used to warn of an impending leap second
version: u8
NTP version number (3 Bit)
mode: u8
Mode (3 Bit)
stratum: u8
Stratum level of the local clock
poll: i8
The maximum interval between messages in seconds to the nearest power of two
precision: i8
Precision of the local clock in seconds to the nearest power of two
root_delay: u32
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
root_dispersion: u32
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
ref_id: u32
Reference clock identifier. Used to identify the particular reference clock.
ts_ref: u64
Reference timestamp. The local time at which the local clock was last set or corrected.
ts_orig: u64
Originate timestamp. The local time when the client sent the request.
ts_recv: u64
Receive timestamp. The local time when the request was received by the server.
ts_xmit: u64
Transmit timestamp. The local time when the reply was sent from the server.
auth: Option<(u32, Vec<u8>)>
Authenticator. (0 or 96 Bit) See section 7.5 of [RFC5905] and [RFC7822]