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
|
#pragma once
#include "../../config.h"
#include <stddef.h>
enum {
DEFAULT_NTP_PORT = 123,
};
typedef struct {
char *server_address;
int port;
bool quiet;
// truechimer stuff
bool do_truechimers;
char *twarn;
char *tcrit;
char *owarn;
char *ocrit;
// stratum stuff
bool do_stratum;
char *swarn;
char *scrit;
// jitter stuff
bool do_jitter;
char *jwarn;
char *jcrit;
} check_ntp_peer_config;
check_ntp_peer_config check_ntp_peer_config_init() {
check_ntp_peer_config tmp = {
.server_address = NULL,
.port = DEFAULT_NTP_PORT,
.quiet = false,
.do_truechimers = false,
.twarn = "0:",
.tcrit = "0:",
.owarn = "60",
.ocrit = "120",
.do_stratum = false,
.swarn = "-1:16",
.scrit = "-1:16",
.do_jitter = false,
.jwarn = "-1:5000",
.jcrit = "-1:10000",
};
return tmp;
}
|