xref: /freebsd/contrib/ntp/ntpd/ntpdbase-opts.def (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
1#include autogen-version.def
2
3include = <<- _EOF_
4	#ifdef __windows
5	  extern int atoi(const char *);
6	#else
7	# include <stdlib.h>
8	#endif
9	_EOF_;
10
11flag = {
12    name      = ipv4;
13    value     = 4;
14    flags-cant = ipv6;
15    descrip   = "Force IPv4 DNS name resolution";
16    doc = <<-  _EndOfDoc_
17	Force DNS resolution of following host names on the command line
18	to the IPv4 namespace.
19	_EndOfDoc_;
20};
21
22flag = {
23    name      = ipv6;
24    value     = 6;
25    flags-cant = ipv4;
26    descrip   = "Force IPv6 DNS name resolution";
27    doc = <<-  _EndOfDoc_
28	Force DNS resolution of following host names on the command line
29	to the IPv6 namespace.
30	_EndOfDoc_;
31};
32
33flag = {
34    name      = authreq;
35    value     = a;
36    descrip   = "Require crypto authentication";
37    flags-cant = authnoreq;
38    doc = <<-  _EndOfDoc_
39	Require cryptographic authentication for broadcast client,
40	multicast client and symmetric passive associations.
41	This is the default.
42	_EndOfDoc_;
43};
44
45flag = {
46    name      = authnoreq;
47    value     = A;
48    descrip   = "Do not require crypto authentication";
49    flags-cant = authreq;
50    doc = <<-  _EndOfDoc_
51	Do not require cryptographic authentication for broadcast client,
52	multicast client and symmetric passive associations.
53	This is almost never a good idea.
54	_EndOfDoc_;
55};
56
57flag = {
58    name      = bcastsync;
59    value     = b;
60    descrip   = "Allow us to sync to broadcast servers";
61    doc = <<-  _EndOfDoc_
62	_EndOfDoc_;
63};
64
65flag = {
66    name      = configfile;
67    value     = c;
68    arg-type  = string;
69    descrip   = "configuration file name";
70    doc = <<-  _EndOfDoc_
71	The name and path of the configuration file,
72	@file{/etc/ntp.conf}
73	by default.
74	_EndOfDoc_;
75};
76
77#include debug-opt.def
78
79flag = {
80    name      = driftfile;
81    value     = f;
82    arg-type  = string;
83    descrip   = "frequency drift file name";
84    doc = <<-  _EndOfDoc_
85	The name and path of the frequency file,
86	@file{/etc/ntp.drift}
87	by default.
88	This is the same operation as the
89	@code{driftfile} @kbd{driftfile}
90	configuration specification in the
91	@file{/etc/ntp.conf}
92	file.
93	_EndOfDoc_;
94};
95
96flag = {
97    name      = panicgate;
98    value     = g;
99    max       = NOLIMIT;
100    descrip   = "Allow the first adjustment to be Big";
101    doc = <<-  _EndOfDoc_
102	Normally,
103	@code{ntpd}
104	exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
105	@code{ntpd}
106	will exit with a message to the system log. This option can be used with the
107	@code{-q}
108	and
109	@code{-x}
110	options.
111	See the
112	@code{tinker}
113	configuration file directive for other options.
114	_EndOfDoc_;
115};
116
117flag = {
118    name      = force_step_once;
119    value     = G;
120    descrip   = "Step any initial offset correction.";
121    doc = <<-  _EndOfDoc_
122	Normally,
123	@code{ntpd}
124	steps the time if the time offset exceeds the step threshold,
125	which is 128 ms by default, and otherwise slews the time.
126	This option forces the initial offset correction to be stepped,
127	so the highest time accuracy can be achieved quickly.
128	However, this may also cause the time to be stepped back
129	so this option must not be used if
130	applications requiring monotonic time are running.
131	See the @code{tinker} configuration file directive for other options.
132	_EndOfDoc_;
133};
134
135flag = {
136    ifdef     = HAVE_DROPROOT;
137    name      = jaildir;
138    value     = i;
139    arg-type  = string;
140    descrip   = "Jail directory";
141    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
142    doc = <<-  _EndOfDoc_
143	Chroot the server to the directory
144	@kbd{jaildir}
145	.
146	This option also implies that the server attempts to drop root privileges at startup.
147	You may need to also specify a
148	@code{-u}
149	option.
150	This option is only available if the OS supports adjusting the clock
151	without full root privileges.
152	This option is supported under NetBSD (configure with
153	@code{--enable-clockctl}) or Linux (configure with
154	@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
155	_EndOfDoc_;
156};
157
158flag = {
159    name      = interface;
160    value     = I;
161    arg-type  = string;
162    descrip   = "Listen on an interface name or address";
163    max       = NOLIMIT;
164    arg-name  = iface;
165    stack-arg;
166    doc = <<-  _EndOfDoc_
167	Open the network address given, or all the addresses associated with the
168	given interface name.  This option may appear multiple times.  This option
169	also implies not opening other addresses, except wildcard and localhost.
170	This option is deprecated. Please consider using the configuration file
171	@code{interface} command, which is more versatile.
172	_EndOfDoc_;
173};
174
175flag = {
176    name      = keyfile;
177    value     = k;
178    arg-type  = string;
179    descrip   = "path to symmetric keys";
180    doc = <<-  _EndOfDoc_
181	Specify the name and path of the symmetric key file.
182	@file{/etc/ntp.keys}
183	is the default.
184	This is the same operation as the
185	@code{keys} @kbd{keyfile}
186	configuration file directive.
187	_EndOfDoc_;
188};
189
190flag = {
191    name      = logfile;
192    value     = l;
193    arg-type  = string;
194    descrip   = "path to the log file";
195    doc = <<-  _EndOfDoc_
196	Specify the name and path of the log file.
197	The default is the system log file.
198	This is the same operation as the
199	@code{logfile} @kbd{logfile}
200	configuration file directive.
201	_EndOfDoc_;
202};
203
204flag = {
205    name      = novirtualips;
206    value     = L;
207    descrip   = "Do not listen to virtual interfaces";
208    doc = <<-  _EndOfDoc_
209	Do not listen to virtual interfaces, defined as those with
210	names containing a colon.  This option is deprecated.  Please
211	consider using the configuration file @code{interface} command, which
212	is more versatile.
213	_EndOfDoc_;
214};
215
216flag = {
217    ifdef     = SYS_WINNT;
218    name      = modifymmtimer;
219    value     = M;
220    descrip   = "Modify Multimedia Timer (Windows only)";
221    doc = <<-  _EndOfDoc_
222	Set the Windows Multimedia Timer to highest resolution.  This
223	ensures the resolution does not change while ntpd is running,
224	avoiding timekeeping glitches associated with changes.
225	_EndOfDoc_;
226};
227
228flag = {
229    name      = nofork;
230    value     = n;
231    flags-cant = wait-sync;
232    descrip   = "Do not fork";
233    doc = <<-  _EndOfDoc_
234	_EndOfDoc_;
235};
236
237flag = {
238    name      = nice;
239    value     = N;
240    descrip   = "Run at high priority";
241    doc = <<-  _EndOfDoc_
242	To the extent permitted by the operating system, run
243	@code{ntpd}
244	at the highest priority.
245	_EndOfDoc_;
246};
247
248flag = {
249    name      = pidfile;
250    value     = p;
251    arg-type  = string;
252    descrip   = "path to the PID file";
253    doc = <<-  _EndOfDoc_
254	Specify the name and path of the file used to record
255	@code{ntpd}'s
256	process ID.
257	This is the same operation as the
258	@code{pidfile} @kbd{pidfile}
259	configuration file directive.
260	_EndOfDoc_;
261};
262
263flag = {
264    name      = priority;
265    value     = P;
266    arg-type  = number;
267    descrip   = "Process priority";
268    doc = <<-  _EndOfDoc_
269	To the extent permitted by the operating system, run
270	@code{ntpd}
271	at the specified
272	@code{sched_setscheduler(SCHED_FIFO)}
273	priority.
274	_EndOfDoc_;
275};
276
277flag = {
278    name      = quit;
279    value     = q;
280    flags-cant = saveconfigquit;
281    flags-cant = wait-sync;
282    descrip   = "Set the time and quit";
283    doc = <<-  _EndOfDoc_
284	@code{ntpd}
285	will not daemonize and will exit after the clock is first
286	synchronized.  This behavior mimics that of the
287	@code{ntpdate}
288	program, which will soon be replaced with a shell script.
289	The
290	@code{-g}
291	and
292	@code{-x}
293	options can be used with this option.
294	Note: The kernel time discipline is disabled with this option.
295	_EndOfDoc_;
296};
297
298flag = {
299    name      = propagationdelay;
300    value     = r;
301    arg-type  = string;
302    descrip   = "Broadcast/propagation delay";
303    doc = <<-  _EndOfDoc_
304	Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
305	_EndOfDoc_;
306};
307
308flag = {
309    ifdef     = SAVECONFIG;
310    name      = saveconfigquit;
311    arg-type  = string;
312    flags-cant = quit;
313    flags-cant = wait-sync;
314    descrip   = "Save parsed configuration and quit";
315    doc = <<-  _EndOfDoc_
316	Cause @code{ntpd} to parse its startup configuration file and save an
317	equivalent to the given filename and exit.  This option was
318	designed for automated testing.
319	_EndOfDoc_;
320};
321
322flag = {
323    name      = statsdir;
324    value     = s;
325    arg-type  = string;
326    descrip   = "Statistics file location";
327    doc = <<-  _EndOfDoc_
328	Specify the directory path for files created by the statistics facility.
329	This is the same operation as the
330	@code{statsdir} @kbd{statsdir}
331	configuration file directive.
332	_EndOfDoc_;
333};
334
335flag = {
336    name      = trustedkey;
337    value     = t;
338    arg-type  = string;
339    descrip   = "Trusted key number";
340    max       = NOLIMIT;
341    arg-name  = tkey;
342    stack-arg;
343    doc = <<-  _EndOfDoc_
344	Add the specified key number to the trusted key list.
345	_EndOfDoc_;
346};
347
348flag = {
349    ifdef     = HAVE_DROPROOT;
350    name      = user;
351    value     = u;
352    arg-type  = string;
353    descrip   = "Run as userid (or userid:groupid)";
354    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
355    doc = <<-  _EndOfDoc_
356	Specify a user, and optionally a group, to switch to.
357	This option is only available if the OS supports adjusting the clock
358	without full root privileges.
359	This option is supported under NetBSD (configure with
360	@code{--enable-clockctl}) or Linux (configure with
361	@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
362	_EndOfDoc_;
363};
364
365flag = {
366    name      = updateinterval;
367    value     = U;
368    arg-type  = number;
369    descrip   = "interval in seconds between scans for new or dropped interfaces";
370    doc = <<-  _EndOfDoc_
371	Give the time in seconds between two scans for new or dropped interfaces.
372	For systems with routing socket support the scans will be performed shortly after the interface change
373	has been detected by the system.
374	Use 0 to disable scanning. 60 seconds is the minimum time between scans.
375	_EndOfDoc_;
376};
377
378flag = {
379    name      = var;
380/*    value     = v;	Bug 817 */
381    arg-type  = string;
382    descrip   = "make ARG an ntp variable (RW)";
383    max       = NOLIMIT;
384    arg-name  = nvar;
385    stack-arg;
386    doc = <<-  _EndOfDoc_
387	_EndOfDoc_;
388};
389
390flag = {
391    name      = dvar;
392/*    value     = V;	Bug 817 */
393    arg-type  = string;
394    descrip   = "make ARG an ntp variable (RW|DEF)";
395    max       = NOLIMIT;
396    arg-name  = ndvar;
397    stack-arg;
398    doc = <<-  _EndOfDoc_
399	_EndOfDoc_;
400};
401
402flag = {
403    ifdef     = HAVE_WORKING_FORK;
404    name      = wait-sync;
405    value     = w;
406    arg-type  = number;
407    flags-cant = nofork;
408    flags-cant = quit;
409    flags-cant = saveconfigquit;
410    descrip   = "Seconds to wait for first clock sync";
411    doc = <<-  _EndOfDoc_
412	If greater than zero, alters @code{ntpd}'s behavior when forking to
413	daemonize.  Instead of exiting with status 0 immediately after
414	the fork, the parent waits up to the specified number of
415	seconds for the child to first synchronize the clock.  The exit
416	status is zero (success) if the clock was synchronized,
417	otherwise it is @code{ETIMEDOUT}.
418	This provides the option for a script starting @code{ntpd} to easily
419	wait for the first set of the clock before proceeding.
420	_EndOfDoc_;
421/*
422** XXX: is it "first set" or is it more?  If it's only "first set" then
423** that's not the same as SYNC.
424*/
425};
426
427flag = {
428    name      = slew;
429    value     = x;
430    descrip   = "Slew up to 600 seconds";
431    doc = <<-  _EndOfDoc_
432	Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
433	This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
434	Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
435	Thus, an adjustment as much as 600 s will take almost 14 days to complete.
436	This option can be used with the
437	@code{-g}
438	and
439	@code{-q}
440	options.
441	See the
442	@code{tinker}
443	configuration file directive for other options.
444	Note: The kernel time discipline is disabled with this option.
445	_EndOfDoc_;
446};
447
448flag = {
449    ifdef     = SYS_WINNT;
450    name      = usepcc;
451    descrip   = "Use CPU cycle counter (Windows only)";
452    doc = <<-  _EndOfDoc_
453	Attempt to substitute the CPU counter for @code{QueryPerformanceCounter}.
454	The CPU counter and @code{QueryPerformanceCounter} are compared, and if
455	they have the same frequency, the CPU counter (RDTSC on x86) is
456	used directly, saving the overhead of a system call.
457	_EndOfDoc_;
458};
459
460flag = {
461    ifdef     = SYS_WINNT;
462    name      = pccfreq;
463    arg-type  = string;
464    descrip   = "Force CPU cycle counter use (Windows only)";
465    doc = <<-  _EndOfDoc_
466	Force substitution the CPU counter for @code{QueryPerformanceCounter}.
467	The CPU counter (RDTSC on x86) is used unconditionally with the
468	given frequency (in Hz).
469	_EndOfDoc_;
470};
471
472flag = {
473    ifdef     = HAVE_DNSREGISTRATION;
474    name      = mdns;
475    value     = m;
476    descrip   = "Register with mDNS as a NTP server";
477    doc = <<-  _EndOfDoc_
478	Registers as an NTP server with the local mDNS server which allows
479	the server to be discovered via mDNS client lookup.
480	_EndOfDoc_;
481};
482