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