xref: /freebsd/contrib/ntp/include/ntp_config.h (revision a35d88931c87cfe6bd38f01d7bad22140b3b38f3)
1 /*
2  * Configuration file name
3  */
4 #ifndef CONFIG_FILE
5 # ifndef SYS_WINNT
6 #  define	CONFIG_FILE "/etc/ntp.conf"
7 # else /* SYS_WINNT */
8 #  define	CONFIG_FILE	"%windir%\\system32\\drivers\\etc\\ntp.conf"
9 #  define	ALT_CONFIG_FILE "%windir%\\ntp.conf"
10 #  define	NTP_KEYSDIR	"%windir%\\system32\\drivers\\etc"
11 # endif /* SYS_WINNT */
12 #endif /* not CONFIG_FILE */
13 
14 /*
15  * Types of entries we understand.
16  */
17 #define CONFIG_UNKNOWN		0
18 
19 /*
20  * Command keywords
21  */
22 #define CONFIG_PEER		1
23 #define CONFIG_SERVER		2
24 #define CONFIG_AUTOMAX		3
25 #define CONFIG_DRIFTFILE	4
26 #define CONFIG_BROADCAST	5
27 #define CONFIG_BROADCASTCLIENT	6
28 #define CONFIG_AUTHENTICATE	7
29 #define CONFIG_KEYS		8
30 #define CONFIG_REVOKE		9
31 #define CONFIG_PPS		10
32 #define CONFIG_RESTRICT		11
33 #define CONFIG_BDELAY		12
34 #define CONFIG_TRUSTEDKEY	13
35 #define CONFIG_REQUESTKEY	14
36 #define CONFIG_CONTROLKEY	15
37 #define CONFIG_TRAP		16
38 #define CONFIG_FUDGE		17
39 #define CONFIG_TINKER		18
40 #define CONFIG_STATSDIR		19
41 #define CONFIG_FILEGEN		20
42 #define CONFIG_STATISTICS	21
43 #define CONFIG_PIDFILE		22
44 #define CONFIG_SETVAR		23
45 #define CONFIG_DISCARD		24
46 #define CONFIG_ADJ		25
47 #define CONFIG_MULTICASTCLIENT	26
48 #define CONFIG_ENABLE		27
49 #define CONFIG_DISABLE		28
50 #define CONFIG_PHONE		29
51 #define CONFIG_LOGFILE		30
52 #define CONFIG_LOGCONFIG	31
53 #define CONFIG_MANYCASTCLIENT	32
54 #define CONFIG_MANYCASTSERVER	33
55 #define CONFIG_TOS		34
56 #define CONFIG_TTL		35
57 #define CONFIG_INCLUDEFILE      36
58 #define CONFIG_KEYSDIR		37
59 #define CONFIG_CDELAY		38
60 #ifdef OPENSSL
61 #define CONFIG_CRYPTO		39
62 #endif /* OPENSSL */
63 
64 /*
65  * "peer", "server", "broadcast" modifier keywords
66  */
67 #define CONF_MOD_VERSION	1
68 #define CONF_MOD_KEY		2
69 #define CONF_MOD_MINPOLL	3
70 #define CONF_MOD_MAXPOLL	4
71 #define CONF_MOD_PREFER		5
72 #define CONF_MOD_BURST		6
73 #define CONF_MOD_IBURST		7
74 #define CONF_MOD_SKEY		8
75 #define CONF_MOD_TTL		9
76 #define CONF_MOD_MODE		10
77 #define CONF_MOD_NOSELECT 	11
78 
79 /*
80  * "restrict" modifier keywords
81  */
82 #define CONF_RES_MASK		1
83 #define CONF_RES_IGNORE		2
84 #define CONF_RES_NOSERVE	3
85 #define CONF_RES_NOTRUST	4
86 #define CONF_RES_NOQUERY	5
87 #define CONF_RES_NOMODIFY	6
88 #define CONF_RES_NOPEER		7
89 #define CONF_RES_NOTRAP		8
90 #define CONF_RES_LPTRAP		9
91 #define CONF_RES_NTPPORT	10
92 #define CONF_RES_LIMITED	11
93 #define CONF_RES_VERSION	12
94 #define CONF_RES_DEMOBILIZE	13
95 
96 /*
97  * "trap" modifier keywords
98  */
99 #define CONF_TRAP_PORT		1
100 #define CONF_TRAP_INTERFACE	2
101 
102 /*
103  * "fudge" modifier keywords
104  */
105 #define CONF_FDG_TIME1		1
106 #define CONF_FDG_TIME2		2
107 #define CONF_FDG_STRATUM	3
108 #define CONF_FDG_REFID		4
109 #define CONF_FDG_FLAG1		5
110 #define CONF_FDG_FLAG2		6
111 #define CONF_FDG_FLAG3		7
112 #define CONF_FDG_FLAG4		8
113 
114 /*
115  * "filegen" modifier keywords
116  */
117 #define CONF_FGEN_FILE		1
118 #define CONF_FGEN_TYPE		2
119 #define CONF_FGEN_FLAG_LINK	3
120 #define CONF_FGEN_FLAG_NOLINK	4
121 #define CONF_FGEN_FLAG_ENABLE	5
122 #define CONF_FGEN_FLAG_DISABLE	6
123 
124 /*
125  * "pps" modifier keywords
126  */
127 #define CONF_PPS_ASSERT		1
128 #define CONF_PPS_CLEAR		2
129 #define CONF_PPS_HARDPPS	3
130 
131 /*
132  * "discard" modifier keywords
133  */
134 #define CONF_DISCARD_AVERAGE	1
135 #define CONF_DISCARD_MINIMUM	2
136 #define	CONF_DISCARD_MONITOR	3
137 
138 /*
139  * "tinker" modifier keywords
140  */
141 #define CONF_CLOCK_MAX		1
142 #define CONF_CLOCK_PANIC	2
143 #define CONF_CLOCK_PHI		3
144 #define CONF_CLOCK_MINSTEP	4
145 #define CONF_CLOCK_ALLAN	5
146 #define CONF_CLOCK_HUFFPUFF	6
147 #define CONF_CLOCK_FREQ		7
148 
149 /*
150  * "tos" modifier keywords
151  */
152 #define CONF_TOS_MINCLOCK	1
153 #define CONF_TOS_MINSANE	2
154 #define CONF_TOS_FLOOR		3
155 #define CONF_TOS_CEILING	4
156 #define CONF_TOS_COHORT		5
157 
158 #ifdef OPENSSL
159 /*
160  * "crypto" modifier keywords
161  */
162 #define	CONF_CRYPTO_RSA		1
163 #define	CONF_CRYPTO_SIGN	2
164 #define CONF_CRYPTO_LEAP	3
165 #define CONF_CRYPTO_CERT	4
166 #define CONF_CRYPTO_RAND	5
167 #define CONF_CRYPTO_KEYS	6
168 #define	CONF_CRYPTO_IFFPAR	7
169 #define CONF_CRYPTO_GQPAR	8
170 #define CONF_CRYPTO_MVPAR	9
171 #define CONF_CRYPTO_PW		10
172 #endif /* OPENSSL */
173 
174 /*
175  * Address selection, IPv4 or IPv6
176  */
177 #define	CONF_ADDR_IPV4		1
178 #define	CONF_ADDR_IPV6		2
179