]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/sntp/tests/sntptest.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / sntp / tests / sntptest.h
1 #ifndef SNTPTEST_H
2 #define SNTPTEST_H
3
4 #include "ntp_stdlib.h"
5 #include "sntp-opts.h"
6
7
8 sntptest() {
9         optionSaveState(&sntpOptions);
10 }
11
12 sntptest_destroy() {
13         optionRestore(&sntpOptions);
14 }
15
16 void ActivateOption(const char* option, const char* argument) {
17
18         const int ARGV_SIZE = 4;
19
20         char* opts[ARGV_SIZE];
21         
22         opts[0] = estrdup("sntpopts");
23         opts[1] = estrdup(option);
24         opts[2] = estrdup(argument);
25         opts[3] = estrdup("127.0.0.1");
26
27         optionProcess(&sntpOptions, ARGV_SIZE, opts);
28 }
29
30
31 #endif // SNTPTEST_H