xref: /freebsd/contrib/ntp/include/ntp_config.h (revision 884a2a699669ec61e2366e3e358342dbc94be24a)
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_CDELAY		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_END		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 #define CONF_MOD_TRUE		12
79 #define	CONF_MOD_PREEMPT	13
80 #define CONF_MOD_DYNAMIC	14
81 
82 /*
83  * "restrict" modifier keywords
84  */
85 #define CONF_RES_MASK		1
86 #define CONF_RES_IGNORE		2
87 #define CONF_RES_NOSERVE	3
88 #define CONF_RES_NOTRUST	4
89 #define CONF_RES_NOQUERY	5
90 #define CONF_RES_NOMODIFY	6
91 #define CONF_RES_NOPEER		7
92 #define CONF_RES_NOTRAP		8
93 #define CONF_RES_LPTRAP		9
94 #define CONF_RES_NTPPORT	10
95 #define CONF_RES_LIMITED	11
96 #define CONF_RES_VERSION	12
97 #define CONF_RES_DEMOBILIZE	13
98 
99 /*
100  * "trap" modifier keywords
101  */
102 #define CONF_TRAP_PORT		1
103 #define CONF_TRAP_INTERFACE	2
104 
105 /*
106  * "fudge" modifier keywords
107  */
108 #define CONF_FDG_TIME1		1
109 #define CONF_FDG_TIME2		2
110 #define CONF_FDG_STRATUM	3
111 #define CONF_FDG_REFID		4
112 #define CONF_FDG_FLAG1		5
113 #define CONF_FDG_FLAG2		6
114 #define CONF_FDG_FLAG3		7
115 #define CONF_FDG_FLAG4		8
116 
117 /*
118  * "filegen" modifier keywords
119  */
120 #define CONF_FGEN_FILE		1
121 #define CONF_FGEN_TYPE		2
122 #define CONF_FGEN_FLAG_LINK	3
123 #define CONF_FGEN_FLAG_NOLINK	4
124 #define CONF_FGEN_FLAG_ENABLE	5
125 #define CONF_FGEN_FLAG_DISABLE	6
126 
127 /*
128  * "discard" modifier keywords
129  */
130 #define CONF_DISCARD_AVERAGE	1
131 #define CONF_DISCARD_MINIMUM	2
132 #define	CONF_DISCARD_MONITOR	3
133 
134 /*
135  * "tinker" modifier keywords
136  */
137 #define CONF_CLOCK_MAX		1
138 #define CONF_CLOCK_PANIC	2
139 #define CONF_CLOCK_PHI		3
140 #define CONF_CLOCK_MINSTEP	4
141 #define CONF_CLOCK_ALLAN	5
142 #define CONF_CLOCK_HUFFPUFF	6
143 #define CONF_CLOCK_FREQ		7
144 
145 /*
146  * "tos" modifier keywords
147  */
148 #define CONF_TOS_MINCLOCK	1
149 #define	CONF_TOS_MAXCLOCK	2
150 #define CONF_TOS_MINSANE	3
151 #define CONF_TOS_FLOOR		4
152 #define CONF_TOS_CEILING	5
153 #define CONF_TOS_COHORT		6
154 #define CONF_TOS_MINDISP	7
155 #define CONF_TOS_MAXDIST	8
156 #define	CONF_TOS_MAXHOP		9
157 #define	CONF_TOS_BEACON		10
158 #define	CONF_TOS_ORPHAN		11
159 
160 #ifdef OPENSSL
161 /*
162  * "crypto" modifier keywords
163  */
164 #define	CONF_CRYPTO_RSA		1
165 #define	CONF_CRYPTO_SIGN	2
166 #define CONF_CRYPTO_LEAP	3
167 #define CONF_CRYPTO_CERT	4
168 #define CONF_CRYPTO_RAND	5
169 #define CONF_CRYPTO_KEYS	6
170 #define	CONF_CRYPTO_IDENT	7
171 #define	CONF_CRYPTO_IFFPAR	8
172 #define CONF_CRYPTO_GQPAR	9
173 #define CONF_CRYPTO_MVPAR	10
174 #define CONF_CRYPTO_PW		11
175 #endif /* OPENSSL */
176 
177 /*
178  * Address selection, IPv4 or IPv6
179  */
180 #define	CONF_ADDR_IPV4		1
181 #define	CONF_ADDR_IPV6		2
182