xref: /netbsd-src/external/bsd/ntp/dist/libntp/lib_strbuf.c (revision 62a8debe1dc62962e18a1c918def78666141273b)
1 /*	$NetBSD: lib_strbuf.c,v 1.1.1.1 2009/12/13 16:55:03 kardel Exp $	*/
2 
3 /*
4  * lib_strbuf - library string storage
5  */
6 #ifdef HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <isc/net.h>
11 #include <isc/result.h>
12 #include "ntp_stdlib.h"
13 #include "lib_strbuf.h"
14 
15 /*
16  * Storage declarations
17  */
18 char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
19 int lib_nextbuf;
20 int ipv4_works;
21 int ipv6_works;
22 int lib_inited = 0;
23 
24 /*
25  * initialization routine.  Might be needed if the code is ROMized.
26  */
27 void
28 init_lib(void)
29 {
30 	lib_nextbuf = 0;
31 	ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
32 	ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
33 	lib_inited = 1;
34 }
35