xref: /freebsd/contrib/ntp/sntp/tests/sntptest.c (revision 61e21613)
1 
2 #include "config.h"
3 #include "sntptest.h"
4 
5 void
6 sntptest(void) {
7 	optionSaveState(&sntpOptions);
8 }
9 
10 
11 void
12 sntptest_destroy(void) {
13 	optionRestore(&sntpOptions);
14 }
15 
16 
17 void
18 ActivateOption(const char* option, const char* argument) {
19 
20 	const int ARGV_SIZE = 4;
21 
22 	char* opts[ARGV_SIZE];
23 
24 	opts[0] = estrdup("sntpopts");
25 	opts[1] = estrdup(option);
26 	opts[2] = estrdup(argument);
27 	opts[3] = estrdup("127.0.0.1");
28 
29 	optionProcess(&sntpOptions, COUNTOF(opts), opts);
30 }
31 
32