File: reports.h

package info (click to toggle)
chrony 1.10-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,504 kB
  • ctags: 2,064
  • sloc: ansic: 15,081; sh: 152; makefile: 107
file content (101 lines) | stat: -rw-r--r-- 2,580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
  $Header: /home/richard/myntp/chrony/chrony-1.02/RCS/reports.h,v 1.8 1998/05/29 05:16:56 richard Exp $

  =======================================================================

  chronyd/chronyc - Programs for keeping computer clocks accurate.

  Copyright (C) 1997-1999 Richard P. Curnow
  All rights reserved.

  For conditions of use, refer to the file LICENCE.

  =======================================================================

  Data structure definitions within the daemon for various reports that
  can be generated */

#ifndef GOT_REPORTS_H
#define GOT_REPORTS_H

#include "sysincl.h"

#define REPORT_INVALID_OFFSET 0x80000000

typedef struct {
  unsigned long ip_addr;
  int stratum;
  int poll;
  enum {RPT_NTP_CLIENT, RPT_NTP_PEER, RPT_LOCAL_REFERENCE} mode;
  enum {RPT_SYNC, RPT_UNREACH, RPT_FALSETICKER, RPT_JITTERY, RPT_OTHER} state;

  unsigned long latest_meas_ago; /* seconds */
  long orig_latest_meas; /* microseconds (us) */
  long latest_meas; /* us */
  unsigned long latest_meas_err; /* us */
  long est_offset; /* us */
  unsigned long est_offset_err; /* us */
  long resid_freq; /* ppm * 1000 */
  unsigned long resid_skew; /* ppm * 1000 */
} RPT_SourceReport ;

typedef struct {
  unsigned long ref_id;
  unsigned long stratum;
  struct timeval ref_time;
  struct timeval current_correction;
  double freq_ppm;
  double resid_freq_ppm;
  double skew_ppm;
  double root_delay;
  double root_dispersion;
} RPT_TrackingReport;

typedef struct {
  unsigned long ip_addr;
  unsigned long n_samples;
  unsigned long n_runs;
  unsigned long span_seconds;
  double resid_freq_ppm;
  double skew_ppm;
  double sd_us;
} RPT_SourcestatsReport;

typedef struct {
  unsigned long ref_time;
  unsigned short n_samples;
  unsigned short n_runs;
  unsigned long span_seconds;
  double rtc_seconds_fast;
  double rtc_gain_rate_ppm;
} RPT_RTC_Report;

typedef struct {
  unsigned long client_hits;
  unsigned long peer_hits;
  unsigned long cmd_hits_auth;
  unsigned long cmd_hits_normal;
  unsigned long cmd_hits_bad;
  unsigned long last_ntp_hit_ago;
  unsigned long last_cmd_hit_ago;
} RPT_ClientAccess_Report;

typedef struct {
  unsigned long ip_addr;
  unsigned long client_hits;
  unsigned long peer_hits;
  unsigned long cmd_hits_auth;
  unsigned long cmd_hits_normal;
  unsigned long cmd_hits_bad;
  unsigned long last_ntp_hit_ago;
  unsigned long last_cmd_hit_ago;
} RPT_ClientAccessByIndex_Report;

typedef struct {
  time_t when;
  double slewed_offset;
  double orig_offset;
  double residual;
} RPT_ManualSamplesReport;

#endif GOT_REPORTS_H