geoip_test.c revision 3759f10fc543747668b1ca4b4671f35b0dea8445
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Permission to use, copy, modify, and/or distribute this software for any
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * purpose with or without fee is hereby granted, provided that the above
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * copyright notice and this permission notice appear in all copies.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * PERFORMANCE OF THIS SOFTWARE.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy/* We use GeoIP databases from the 'geoip' system test */
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy#define TEST_GEOIP_DATA "../../../bin/tests/system/geoip/data"
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Helper functions
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * (Mostly copied from bin/named/geoip.c)
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedyinit_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy fprintf(stderr, "GeoIP %s (type %d) DB not available\n",
goto fail;
goto fail;
fail:
if (fallback != 0)
#ifdef _WIN32
#ifdef HAVE_GEOIP_V6
static isc_boolean_t
static isc_boolean_t
static isc_boolean_t
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
dns_test_end();
#ifdef HAVE_GEOIP
return (atf_no_error());