lib_strbuf.c revision 1.1.1.1
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 */
18char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
19int lib_nextbuf;
20int ipv4_works;
21int ipv6_works;
22int lib_inited = 0;
23
24/*
25 * initialization routine.  Might be needed if the code is ROMized.
26 */
27void
28init_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