1 /* $NetBSD: lib_strbuf.c,v 1.4 2016/01/08 21:35:38 christos 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 13 #include "ntp_fp.h" 14 #include "ntp_stdlib.h" 15 #include "lib_strbuf.h" 16 17 18 /* 19 * Storage declarations 20 */ 21 int debug; 22 libbufstr lib_stringbuf[LIB_NUMBUF]; 23 int lib_nextbuf; 24 int ipv4_works; 25 int ipv6_works; 26 int lib_inited; 27 28 29 /* 30 * initialization routine. Might be needed if the code is ROMized. 31 */ 32 void 33 init_lib(void) 34 { 35 if (lib_inited) 36 return; 37 ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4()); 38 ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6()); 39 init_systime(); 40 lib_inited = TRUE; 41 } 42