xref: /freebsd/contrib/ntp/include/ntp_config.h (revision 9c2daa00c2315f101948c7144d62af5d5fb515cf)
1224ba2bdSOllivier Robert /*
2224ba2bdSOllivier Robert  * Configuration file name
3224ba2bdSOllivier Robert  */
4224ba2bdSOllivier Robert #ifndef CONFIG_FILE
5224ba2bdSOllivier Robert # ifndef SYS_WINNT
6224ba2bdSOllivier Robert #  define	CONFIG_FILE "/etc/ntp.conf"
7224ba2bdSOllivier Robert # else /* SYS_WINNT */
8224ba2bdSOllivier Robert #  define	CONFIG_FILE	"%windir%\\system32\\drivers\\etc\\ntp.conf"
9224ba2bdSOllivier Robert #  define	ALT_CONFIG_FILE "%windir%\\ntp.conf"
109c2daa00SOllivier Robert #  define	NTP_KEYSDIR	"%windir%\\system32\\drivers\\etc"
11224ba2bdSOllivier Robert # endif /* SYS_WINNT */
12224ba2bdSOllivier Robert #endif /* not CONFIG_FILE */
13224ba2bdSOllivier Robert 
14224ba2bdSOllivier Robert /*
15224ba2bdSOllivier Robert  * Types of entries we understand.
16224ba2bdSOllivier Robert  */
17224ba2bdSOllivier Robert #define CONFIG_UNKNOWN		0
18224ba2bdSOllivier Robert 
19224ba2bdSOllivier Robert /*
20224ba2bdSOllivier Robert  * Command keywords
21224ba2bdSOllivier Robert  */
22224ba2bdSOllivier Robert #define CONFIG_PEER		1
23224ba2bdSOllivier Robert #define CONFIG_SERVER		2
24224ba2bdSOllivier Robert #define CONFIG_AUTOMAX		3
25224ba2bdSOllivier Robert #define CONFIG_DRIFTFILE	4
26224ba2bdSOllivier Robert #define CONFIG_BROADCAST	5
27224ba2bdSOllivier Robert #define CONFIG_BROADCASTCLIENT	6
28224ba2bdSOllivier Robert #define CONFIG_AUTHENTICATE	7
29224ba2bdSOllivier Robert #define CONFIG_KEYS		8
30224ba2bdSOllivier Robert #define CONFIG_REVOKE		9
31224ba2bdSOllivier Robert #define CONFIG_PPS		10
32224ba2bdSOllivier Robert #define CONFIG_RESTRICT		11
33224ba2bdSOllivier Robert #define CONFIG_BDELAY		12
34224ba2bdSOllivier Robert #define CONFIG_TRUSTEDKEY	13
35224ba2bdSOllivier Robert #define CONFIG_REQUESTKEY	14
36224ba2bdSOllivier Robert #define CONFIG_CONTROLKEY	15
37224ba2bdSOllivier Robert #define CONFIG_TRAP		16
38224ba2bdSOllivier Robert #define CONFIG_FUDGE		17
39224ba2bdSOllivier Robert #define CONFIG_TINKER		18
40224ba2bdSOllivier Robert #define CONFIG_STATSDIR		19
41224ba2bdSOllivier Robert #define CONFIG_FILEGEN		20
42224ba2bdSOllivier Robert #define CONFIG_STATISTICS	21
43224ba2bdSOllivier Robert #define CONFIG_PIDFILE		22
44224ba2bdSOllivier Robert #define CONFIG_SETVAR		23
459c2daa00SOllivier Robert #define CONFIG_DISCARD		24
469c2daa00SOllivier Robert #define CONFIG_ADJ		25
47224ba2bdSOllivier Robert #define CONFIG_MULTICASTCLIENT	26
48224ba2bdSOllivier Robert #define CONFIG_ENABLE		27
49224ba2bdSOllivier Robert #define CONFIG_DISABLE		28
50224ba2bdSOllivier Robert #define CONFIG_PHONE		29
51224ba2bdSOllivier Robert #define CONFIG_LOGFILE		30
52224ba2bdSOllivier Robert #define CONFIG_LOGCONFIG	31
53224ba2bdSOllivier Robert #define CONFIG_MANYCASTCLIENT	32
54224ba2bdSOllivier Robert #define CONFIG_MANYCASTSERVER	33
559c2daa00SOllivier Robert #define CONFIG_TOS		34
569c2daa00SOllivier Robert #define CONFIG_TTL		35
57224ba2bdSOllivier Robert #define CONFIG_INCLUDEFILE      36
589c2daa00SOllivier Robert #define CONFIG_KEYSDIR		37
599c2daa00SOllivier Robert #define CONFIG_CDELAY		38
609c2daa00SOllivier Robert #ifdef OPENSSL
619c2daa00SOllivier Robert #define CONFIG_CRYPTO		39
629c2daa00SOllivier Robert #endif /* OPENSSL */
63224ba2bdSOllivier Robert 
64224ba2bdSOllivier Robert /*
65224ba2bdSOllivier Robert  * "peer", "server", "broadcast" modifier keywords
66224ba2bdSOllivier Robert  */
67224ba2bdSOllivier Robert #define CONF_MOD_VERSION	1
68224ba2bdSOllivier Robert #define CONF_MOD_KEY		2
69224ba2bdSOllivier Robert #define CONF_MOD_MINPOLL	3
70224ba2bdSOllivier Robert #define CONF_MOD_MAXPOLL	4
71224ba2bdSOllivier Robert #define CONF_MOD_PREFER		5
72224ba2bdSOllivier Robert #define CONF_MOD_BURST		6
73224ba2bdSOllivier Robert #define CONF_MOD_IBURST		7
74224ba2bdSOllivier Robert #define CONF_MOD_SKEY		8
75224ba2bdSOllivier Robert #define CONF_MOD_TTL		9
76224ba2bdSOllivier Robert #define CONF_MOD_MODE		10
77224ba2bdSOllivier Robert #define CONF_MOD_NOSELECT 	11
78224ba2bdSOllivier Robert 
79224ba2bdSOllivier Robert /*
80224ba2bdSOllivier Robert  * "restrict" modifier keywords
81224ba2bdSOllivier Robert  */
82224ba2bdSOllivier Robert #define CONF_RES_MASK		1
83224ba2bdSOllivier Robert #define CONF_RES_IGNORE		2
84224ba2bdSOllivier Robert #define CONF_RES_NOSERVE	3
85224ba2bdSOllivier Robert #define CONF_RES_NOTRUST	4
86224ba2bdSOllivier Robert #define CONF_RES_NOQUERY	5
87224ba2bdSOllivier Robert #define CONF_RES_NOMODIFY	6
88224ba2bdSOllivier Robert #define CONF_RES_NOPEER		7
89224ba2bdSOllivier Robert #define CONF_RES_NOTRAP		8
90224ba2bdSOllivier Robert #define CONF_RES_LPTRAP		9
91224ba2bdSOllivier Robert #define CONF_RES_NTPPORT	10
92224ba2bdSOllivier Robert #define CONF_RES_LIMITED	11
93224ba2bdSOllivier Robert #define CONF_RES_VERSION	12
94224ba2bdSOllivier Robert #define CONF_RES_DEMOBILIZE	13
95224ba2bdSOllivier Robert 
96224ba2bdSOllivier Robert /*
97224ba2bdSOllivier Robert  * "trap" modifier keywords
98224ba2bdSOllivier Robert  */
99224ba2bdSOllivier Robert #define CONF_TRAP_PORT		1
100224ba2bdSOllivier Robert #define CONF_TRAP_INTERFACE	2
101224ba2bdSOllivier Robert 
102224ba2bdSOllivier Robert /*
103224ba2bdSOllivier Robert  * "fudge" modifier keywords
104224ba2bdSOllivier Robert  */
105224ba2bdSOllivier Robert #define CONF_FDG_TIME1		1
106224ba2bdSOllivier Robert #define CONF_FDG_TIME2		2
107224ba2bdSOllivier Robert #define CONF_FDG_STRATUM	3
108224ba2bdSOllivier Robert #define CONF_FDG_REFID		4
109224ba2bdSOllivier Robert #define CONF_FDG_FLAG1		5
110224ba2bdSOllivier Robert #define CONF_FDG_FLAG2		6
111224ba2bdSOllivier Robert #define CONF_FDG_FLAG3		7
112224ba2bdSOllivier Robert #define CONF_FDG_FLAG4		8
113224ba2bdSOllivier Robert 
114224ba2bdSOllivier Robert /*
115224ba2bdSOllivier Robert  * "filegen" modifier keywords
116224ba2bdSOllivier Robert  */
117224ba2bdSOllivier Robert #define CONF_FGEN_FILE		1
118224ba2bdSOllivier Robert #define CONF_FGEN_TYPE		2
119224ba2bdSOllivier Robert #define CONF_FGEN_FLAG_LINK	3
120224ba2bdSOllivier Robert #define CONF_FGEN_FLAG_NOLINK	4
121224ba2bdSOllivier Robert #define CONF_FGEN_FLAG_ENABLE	5
122224ba2bdSOllivier Robert #define CONF_FGEN_FLAG_DISABLE	6
123224ba2bdSOllivier Robert 
124224ba2bdSOllivier Robert /*
125224ba2bdSOllivier Robert  * "pps" modifier keywords
126224ba2bdSOllivier Robert  */
127224ba2bdSOllivier Robert #define CONF_PPS_ASSERT		1
128224ba2bdSOllivier Robert #define CONF_PPS_CLEAR		2
129224ba2bdSOllivier Robert #define CONF_PPS_HARDPPS	3
130224ba2bdSOllivier Robert 
131224ba2bdSOllivier Robert /*
1329c2daa00SOllivier Robert  * "discard" modifier keywords
1339c2daa00SOllivier Robert  */
1349c2daa00SOllivier Robert #define CONF_DISCARD_AVERAGE	1
1359c2daa00SOllivier Robert #define CONF_DISCARD_MINIMUM	2
1369c2daa00SOllivier Robert #define	CONF_DISCARD_MONITOR	3
1379c2daa00SOllivier Robert 
1389c2daa00SOllivier Robert /*
139224ba2bdSOllivier Robert  * "tinker" modifier keywords
140224ba2bdSOllivier Robert  */
141224ba2bdSOllivier Robert #define CONF_CLOCK_MAX		1
142224ba2bdSOllivier Robert #define CONF_CLOCK_PANIC	2
143224ba2bdSOllivier Robert #define CONF_CLOCK_PHI		3
144224ba2bdSOllivier Robert #define CONF_CLOCK_MINSTEP	4
1459c2daa00SOllivier Robert #define CONF_CLOCK_ALLAN	5
1469c2daa00SOllivier Robert #define CONF_CLOCK_HUFFPUFF	6
1479c2daa00SOllivier Robert #define CONF_CLOCK_FREQ		7
148224ba2bdSOllivier Robert 
1499c2daa00SOllivier Robert /*
1509c2daa00SOllivier Robert  * "tos" modifier keywords
1519c2daa00SOllivier Robert  */
1529c2daa00SOllivier Robert #define CONF_TOS_MINCLOCK	1
1539c2daa00SOllivier Robert #define CONF_TOS_MINSANE	2
1549c2daa00SOllivier Robert #define CONF_TOS_FLOOR		3
1559c2daa00SOllivier Robert #define CONF_TOS_CEILING	4
1569c2daa00SOllivier Robert #define CONF_TOS_COHORT		5
1579c2daa00SOllivier Robert 
1589c2daa00SOllivier Robert #ifdef OPENSSL
159224ba2bdSOllivier Robert /*
160224ba2bdSOllivier Robert  * "crypto" modifier keywords
161224ba2bdSOllivier Robert  */
1629c2daa00SOllivier Robert #define	CONF_CRYPTO_RSA		1
1639c2daa00SOllivier Robert #define	CONF_CRYPTO_SIGN	2
1649c2daa00SOllivier Robert #define CONF_CRYPTO_LEAP	3
1659c2daa00SOllivier Robert #define CONF_CRYPTO_CERT	4
1669c2daa00SOllivier Robert #define CONF_CRYPTO_RAND	5
1679c2daa00SOllivier Robert #define CONF_CRYPTO_KEYS	6
1689c2daa00SOllivier Robert #define	CONF_CRYPTO_IFFPAR	7
1699c2daa00SOllivier Robert #define CONF_CRYPTO_GQPAR	8
1709c2daa00SOllivier Robert #define CONF_CRYPTO_MVPAR	9
1719c2daa00SOllivier Robert #define CONF_CRYPTO_PW		10
1729c2daa00SOllivier Robert #endif /* OPENSSL */
1739c2daa00SOllivier Robert 
1749c2daa00SOllivier Robert /*
1759c2daa00SOllivier Robert  * Address selection, IPv4 or IPv6
1769c2daa00SOllivier Robert  */
1779c2daa00SOllivier Robert #define	CONF_ADDR_IPV4		1
1789c2daa00SOllivier Robert #define	CONF_ADDR_IPV6		2
179