geoip.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2013, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*! \file */
#include <config.h>
#ifdef HAVE_GEOIP
static dns_geoip_databases_t geoip_table = {
};
static void
{
char *info;
}
if (! GeoIP_db_avail(edition)) {
goto fail;
}
"failed to initialize GeoIP %s (type %d) DB%s",
? "geoip matches using this database will fail" : "");
goto fail;
}
"%s", info);
return;
fail:
if (fallback != 0)
}
#endif /* HAVE_GEOIP */
void
ns_geoip_init(void) {
#ifndef HAVE_GEOIP
return;
#else
if (ns_g_geoip == NULL)
#endif
}
void
ns_geoip_load(char *dir) {
#ifndef HAVE_GEOIP
return;
#else
#ifdef _WIN32
#else
#endif
"using \"%s\" as GeoIP directory", dir);
}
method, "Country (IPv4)");
#ifdef HAVE_GEOIP_V6
method, "Country (IPv6)");
#endif
#if defined(HAVE_GEOIP_V6) && defined(HAVE_GEOIP_CITY_V6)
#endif
method, "ISP");
method, "Org");
method, "AS");
method, "Domain");
method, "NetSpeed");
#endif /* HAVE_GEOIP */
}