chrony_confile/ast/
ntp.rs1use crate::values::*;
7
8#[derive(Debug, Clone, PartialEq)]
9pub struct BindAddressConfig { pub address: String }
10
11#[derive(Debug, Clone, PartialEq)]
12pub struct BindDeviceConfig { pub interface: String }
13
14#[derive(Debug, Clone, PartialEq)]
15pub struct ClientLogLimitConfig { pub limit: ClientLogSize }
16
17#[derive(Debug, Clone, PartialEq)]
18pub struct NtpSignDSocketConfig { pub directory: String }
19
20#[derive(Debug, Clone, PartialEq)]
21pub struct NtsPortConfig { pub port: UdpPort }
22
23#[derive(Debug, Clone, PartialEq)]
24pub struct NtsServerCertConfig { pub file: String }
25
26#[derive(Debug, Clone, PartialEq)]
27pub struct NtsServerKeyConfig { pub file: String }
28
29#[derive(Debug, Clone, PartialEq)]
30pub struct NtsProcessesConfig { pub processes: NtsProcesses }
31
32#[derive(Debug, Clone, PartialEq)]
33pub struct MaxNtsConnectionsConfig { pub connections: u32 }
34
35#[derive(Debug, Clone, PartialEq)]
36pub struct NtsNtpServerConfig { pub hostname: String }
37
38#[derive(Debug, Clone, PartialEq)]
39pub struct NtsRotateConfig { pub interval: u32 }
40
41#[derive(Debug, Clone, PartialEq)]
42pub struct PortConfig { pub port: UdpPort }
43
44#[derive(Debug, Clone, PartialEq)]
45pub struct CmdRateLimitConfig { pub interval: i32, pub burst: i32, pub leak: i32 }
46
47impl Default for CmdRateLimitConfig {
48 fn default() -> Self { Self { interval: -4, burst: 8, leak: 2 } }
49}