NTP_PACKET Structure

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
NTP_PACKET Structure
C
typedef struct {
  struct {
    BYTE mode : 3;
    BYTE versionNumber : 3;
    BYTE leapIndicator : 2;
  } flags;
  BYTE stratum;
  CHAR poll;
  CHAR precision;
  DWORD root_delay;
  DWORD root_dispersion;
  DWORD ref_identifier;
  DWORD ref_ts_secs;
  DWORD ref_ts_fraq;
  DWORD orig_ts_secs;
  DWORD orig_ts_fraq;
  DWORD recv_ts_secs;
  DWORD recv_ts_fraq;
  DWORD tx_ts_secs;
  DWORD tx_ts_fraq;
} NTP_PACKET;
Description

Defines the structure of an NTP packet

Members
Members 
Description 
struct {
BYTE mode : 3;
BYTE versionNumber : 3;
BYTE leapIndicator : 2;
} flags; 
Flags for the packet 
BYTE mode : 3; 
NTP mode 
BYTE versionNumber : 3; 
SNTP version number 
BYTE leapIndicator : 2; 
Leap second indicator 
BYTE stratum; 
Stratum level of local clock 
CHAR poll; 
Poll interval 
CHAR precision; 
Precision (seconds to nearest power of 2) 
DWORD root_delay; 
Root delay between local machine and server 
DWORD root_dispersion; 
Root dispersion (maximum error) 
DWORD ref_identifier; 
Reference clock identifier 
DWORD ref_ts_secs; 
Reference timestamp (in seconds) 
DWORD ref_ts_fraq; 
Reference timestamp (fractions) 
DWORD orig_ts_secs; 
Origination timestamp (in seconds) 
DWORD orig_ts_fraq; 
Origination timestamp (fractions) 
DWORD recv_ts_secs; 
Time at which request arrived at sender (seconds) 
DWORD recv_ts_fraq; 
Time at which request arrived at sender (fractions) 
DWORD tx_ts_secs; 
Time at which request left sender (seconds) 
DWORD tx_ts_fraq; 
Time at which request left sender (fractions) 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.