1999-12-09 13:01:21 +00:00
|
|
|
/*
|
|
|
|
* lib_strbuf - library string storage
|
|
|
|
*/
|
2013-12-04 21:33:17 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
#include <isc/net.h>
|
|
|
|
#include <isc/result.h>
|
2014-12-20 22:52:39 +00:00
|
|
|
|
|
|
|
#include "ntp_fp.h"
|
2001-08-29 14:35:15 +00:00
|
|
|
#include "ntp_stdlib.h"
|
1999-12-09 13:01:21 +00:00
|
|
|
#include "lib_strbuf.h"
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
/*
|
|
|
|
* Storage declarations
|
|
|
|
*/
|
2014-12-20 22:52:39 +00:00
|
|
|
int debug;
|
|
|
|
libbufstr lib_stringbuf[LIB_NUMBUF];
|
|
|
|
int lib_nextbuf;
|
|
|
|
int ipv4_works;
|
|
|
|
int ipv6_works;
|
|
|
|
int lib_inited;
|
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* initialization routine. Might be needed if the code is ROMized.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
init_lib(void)
|
|
|
|
{
|
2014-12-20 22:52:39 +00:00
|
|
|
if (lib_inited)
|
|
|
|
return;
|
2013-12-04 21:33:17 +00:00
|
|
|
ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
|
|
|
|
ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
|
2014-12-20 22:52:39 +00:00
|
|
|
init_systime();
|
|
|
|
lib_inited = TRUE;
|
1999-12-09 13:01:21 +00:00
|
|
|
}
|