freebsd-dev/libntp/lib_strbuf.c
Cy Schubert b5e14a1344 Vendor import ntp 4.2.8.
Reviewed by:	roberto
Security:	VUXML: 4033d826-87dd-11e4-9079-3c970e169bc2
Security:	http://www.kb.cert.org/vuls/id/852879
Security:	CVE-2014-9293
Security	CVE-2014-9294
Security	CVE-2014-9295
Security	CVE-2014-9296
2014-12-20 22:52:39 +00:00

40 lines
633 B
C

/*
* lib_strbuf - library string storage
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <isc/net.h>
#include <isc/result.h>
#include "ntp_fp.h"
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
/*
* Storage declarations
*/
int debug;
libbufstr lib_stringbuf[LIB_NUMBUF];
int lib_nextbuf;
int ipv4_works;
int ipv6_works;
int lib_inited;
/*
* initialization routine. Might be needed if the code is ROMized.
*/
void
init_lib(void)
{
if (lib_inited)
return;
ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
init_systime();
lib_inited = TRUE;
}