xref: /freebsd/contrib/ntp/ntpd/ntpdbase-opts.def (revision f305e6eaf8d98d9c2ca7ca97791e84521f25b801)
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    ifdef     = HAVE_DROPROOT;
119    name      = jaildir;
120    value     = i;
121    arg-type  = string;
122    descrip   = "Jail directory";
123    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
124    doc = <<-  _EndOfDoc_
125	Chroot the server to the directory
126	@kbd{jaildir}
127	.
128	This option also implies that the server attempts to drop root privileges at startup.
129	You may need to also specify a
130	@code{-u}
131	option.
132	This option is only available if the OS supports adjusting the clock
133	without full root privileges.
134	This option is supported under NetBSD (configure with
135	@code{--enable-clockctl}) or Linux (configure with
136	@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
137	_EndOfDoc_;
138};
139
140flag = {
141    name      = interface;
142    value     = I;
143    arg-type  = string;
144    descrip   = "Listen on an interface name or address";
145    max       = NOLIMIT;
146    arg-name  = iface;
147    stack-arg;
148    doc = <<-  _EndOfDoc_
149	Open the network address given, or all the addresses associated with the
150	given interface name.  This option may appear multiple times.  This option
151	also implies not opening other addresses, except wildcard and localhost.
152	This option is deprecated. Please consider using the configuration file
153	@code{interface} command, which is more versatile.
154	_EndOfDoc_;
155};
156
157flag = {
158    name      = keyfile;
159    value     = k;
160    arg-type  = string;
161    descrip   = "path to symmetric keys";
162    doc = <<-  _EndOfDoc_
163	Specify the name and path of the symmetric key file.
164	@file{/etc/ntp.keys}
165	is the default.
166	This is the same operation as the
167	@code{keys} @kbd{keyfile}
168	configuration file directive.
169	_EndOfDoc_;
170};
171
172flag = {
173    name      = logfile;
174    value     = l;
175    arg-type  = string;
176    descrip   = "path to the log file";
177    doc = <<-  _EndOfDoc_
178	Specify the name and path of the log file.
179	The default is the system log file.
180	This is the same operation as the
181	@code{logfile} @kbd{logfile}
182	configuration file directive.
183	_EndOfDoc_;
184};
185
186flag = {
187    name      = novirtualips;
188    value     = L;
189    descrip   = "Do not listen to virtual interfaces";
190    doc = <<-  _EndOfDoc_
191	Do not listen to virtual interfaces, defined as those with
192	names containing a colon.  This option is deprecated.  Please
193	consider using the configuration file @code{interface} command, which
194	is more versatile.
195	_EndOfDoc_;
196};
197
198flag = {
199    ifdef     = SYS_WINNT;
200    name      = modifymmtimer;
201    value     = M;
202    descrip   = "Modify Multimedia Timer (Windows only)";
203    doc = <<-  _EndOfDoc_
204	Set the Windows Multimedia Timer to highest resolution.  This
205	ensures the resolution does not change while ntpd is running,
206	avoiding timekeeping glitches associated with changes.
207	_EndOfDoc_;
208};
209
210flag = {
211    name      = nofork;
212    value     = n;
213    flags-cant = wait-sync;
214    descrip   = "Do not fork";
215    doc = <<-  _EndOfDoc_
216	_EndOfDoc_;
217};
218
219flag = {
220    name      = nice;
221    value     = N;
222    descrip   = "Run at high priority";
223    doc = <<-  _EndOfDoc_
224	To the extent permitted by the operating system, run
225	@code{ntpd}
226	at the highest priority.
227	_EndOfDoc_;
228};
229
230flag = {
231    name      = pidfile;
232    value     = p;
233    arg-type  = string;
234    descrip   = "path to the PID file";
235    doc = <<-  _EndOfDoc_
236	Specify the name and path of the file used to record
237	@code{ntpd}'s
238	process ID.
239	This is the same operation as the
240	@code{pidfile} @kbd{pidfile}
241	configuration file directive.
242	_EndOfDoc_;
243};
244
245flag = {
246    name      = priority;
247    value     = P;
248    arg-type  = number;
249    descrip   = "Process priority";
250    doc = <<-  _EndOfDoc_
251	To the extent permitted by the operating system, run
252	@code{ntpd}
253	at the specified
254	@code{sched_setscheduler(SCHED_FIFO)}
255	priority.
256	_EndOfDoc_;
257};
258
259flag = {
260    name      = quit;
261    value     = q;
262    flags-cant = saveconfigquit;
263    flags-cant = wait-sync;
264    descrip   = "Set the time and quit";
265    doc = <<-  _EndOfDoc_
266	@code{ntpd}
267	will not daemonize and will exit after the clock is first
268	synchronized.  This behavior mimics that of the
269	@code{ntpdate}
270	program, which will soon be replaced with a shell script.
271	The
272	@code{-g}
273	and
274	@code{-x}
275	options can be used with this option.
276	Note: The kernel time discipline is disabled with this option.
277	_EndOfDoc_;
278};
279
280flag = {
281    name      = propagationdelay;
282    value     = r;
283    arg-type  = string;
284    descrip   = "Broadcast/propagation delay";
285    doc = <<-  _EndOfDoc_
286	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.
287	_EndOfDoc_;
288};
289
290flag = {
291    ifdef     = SAVECONFIG;
292    name      = saveconfigquit;
293    arg-type  = string;
294    flags-cant = quit;
295    flags-cant = wait-sync;
296    descrip   = "Save parsed configuration and quit";
297    doc = <<-  _EndOfDoc_
298	Cause @code{ntpd} to parse its startup configuration file and save an
299	equivalent to the given filename and exit.  This option was
300	designed for automated testing.
301	_EndOfDoc_;
302};
303
304flag = {
305    name      = statsdir;
306    value     = s;
307    arg-type  = string;
308    descrip   = "Statistics file location";
309    doc = <<-  _EndOfDoc_
310	Specify the directory path for files created by the statistics facility.
311	This is the same operation as the
312	@code{statsdir} @kbd{statsdir}
313	configuration file directive.
314	_EndOfDoc_;
315};
316
317flag = {
318    name      = trustedkey;
319    value     = t;
320    arg-type  = string;
321    descrip   = "Trusted key number";
322    max       = NOLIMIT;
323    arg-name  = tkey;
324    stack-arg;
325    doc = <<-  _EndOfDoc_
326	Add the specified key number to the trusted key list.
327	_EndOfDoc_;
328};
329
330flag = {
331    ifdef     = HAVE_DROPROOT;
332    name      = user;
333    value     = u;
334    arg-type  = string;
335    descrip   = "Run as userid (or userid:groupid)";
336    omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
337    doc = <<-  _EndOfDoc_
338	Specify a user, and optionally a group, to switch to.
339	This option is only available if the OS supports adjusting the clock
340	without full root privileges.
341	This option is supported under NetBSD (configure with
342	@code{--enable-clockctl}) or Linux (configure with
343	@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
344	_EndOfDoc_;
345};
346
347flag = {
348    name      = updateinterval;
349    value     = U;
350    arg-type  = number;
351    descrip   = "interval in seconds between scans for new or dropped interfaces";
352    doc = <<-  _EndOfDoc_
353	Give the time in seconds between two scans for new or dropped interfaces.
354	For systems with routing socket support the scans will be performed shortly after the interface change
355	has been detected by the system.
356	Use 0 to disable scanning. 60 seconds is the minimum time between scans.
357	_EndOfDoc_;
358};
359
360flag = {
361    name      = var;
362/*    value     = v;	Bug 817 */
363    arg-type  = string;
364    descrip   = "make ARG an ntp variable (RW)";
365    max       = NOLIMIT;
366    arg-name  = nvar;
367    stack-arg;
368    doc = <<-  _EndOfDoc_
369	_EndOfDoc_;
370};
371
372flag = {
373    name      = dvar;
374/*    value     = V;	Bug 817 */
375    arg-type  = string;
376    descrip   = "make ARG an ntp variable (RW|DEF)";
377    max       = NOLIMIT;
378    arg-name  = ndvar;
379    stack-arg;
380    doc = <<-  _EndOfDoc_
381	_EndOfDoc_;
382};
383
384flag = {
385    ifdef     = HAVE_WORKING_FORK;
386    name      = wait-sync;
387    value     = w;
388    arg-type  = number;
389    flags-cant = nofork;
390    flags-cant = quit;
391    flags-cant = saveconfigquit;
392    descrip   = "Seconds to wait for first clock sync";
393    doc = <<-  _EndOfDoc_
394	If greater than zero, alters @code{ntpd}'s behavior when forking to
395	daemonize.  Instead of exiting with status 0 immediately after
396	the fork, the parent waits up to the specified number of
397	seconds for the child to first synchronize the clock.  The exit
398	status is zero (success) if the clock was synchronized,
399	otherwise it is @code{ETIMEDOUT}.
400	This provides the option for a script starting @code{ntpd} to easily
401	wait for the first set of the clock before proceeding.
402	_EndOfDoc_;
403/*
404** XXX: is it "first set" or is it more?  If it's only "first set" then
405** that's not the same as SYNC.
406*/
407};
408
409flag = {
410    name      = slew;
411    value     = x;
412    descrip   = "Slew up to 600 seconds";
413    doc = <<-  _EndOfDoc_
414	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.
415	This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
416	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.
417	Thus, an adjustment as much as 600 s will take almost 14 days to complete.
418	This option can be used with the
419	@code{-g}
420	and
421	@code{-q}
422	options.
423	See the
424	@code{tinker}
425	configuration file directive for other options.
426	Note: The kernel time discipline is disabled with this option.
427	_EndOfDoc_;
428};
429
430flag = {
431    ifdef     = SYS_WINNT;
432    name      = usepcc;
433    descrip   = "Use CPU cycle counter (Windows only)";
434    doc = <<-  _EndOfDoc_
435	Attempt to substitute the CPU counter for @code{QueryPerformanceCounter}.
436	The CPU counter and @code{QueryPerformanceCounter} are compared, and if
437	they have the same frequency, the CPU counter (RDTSC on x86) is
438	used directly, saving the overhead of a system call.
439	_EndOfDoc_;
440};
441
442flag = {
443    ifdef     = SYS_WINNT;
444    name      = pccfreq;
445    arg-type  = string;
446    descrip   = "Force CPU cycle counter use (Windows only)";
447    doc = <<-  _EndOfDoc_
448	Force substitution the CPU counter for @code{QueryPerformanceCounter}.
449	The CPU counter (RDTSC on x86) is used unconditionally with the
450	given frequency (in Hz).
451	_EndOfDoc_;
452};
453
454flag = {
455    ifdef     = HAVE_DNSREGISTRATION;
456    name      = mdns;
457    value     = m;
458    descrip   = "Register with mDNS as a NTP server";
459    doc = <<-  _EndOfDoc_
460	Registers as an NTP server with the local mDNS server which allows
461	the server to be discovered via mDNS client lookup.
462	_EndOfDoc_;
463};
464