]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/libntp/lib_strbuf.c
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / libntp / lib_strbuf.c
1 /*
2  * lib_strbuf - library string storage
3  */
4 #ifdef HAVE_CONFIG_H
5 #include <config.h>
6 #endif
7
8 #include <isc/net.h>
9 #include <isc/result.h>
10
11 #include "ntp_fp.h"
12 #include "ntp_stdlib.h"
13 #include "lib_strbuf.h"
14
15
16 /*
17  * Storage declarations
18  */
19 int             debug;
20 libbufstr       lib_stringbuf[LIB_NUMBUF];
21 int             lib_nextbuf;
22 int             ipv4_works;
23 int             ipv6_works;
24 int             lib_inited;
25
26
27 /*
28  * initialization routine.  Might be needed if the code is ROMized.
29  */
30 void
31 init_lib(void)
32 {
33         if (lib_inited)
34                 return;
35         ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
36         ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
37         init_systime();
38         lib_inited = TRUE;
39 }