Lines Matching defs:geoip
23 #include <dns/geoip.h>
30 /* We use GeoIP databases from the 'geoip' system test */
31 #define TEST_GEOIP_DATA "../../../bin/tests/system/geoip/data"
35 * (Mostly copied from bin/named/geoip.c)
37 static dns_geoip_databases_t geoip = {
71 ? "; geoip matches using this database will fail"
104 init_geoip_db(&geoip.country_v4, GEOIP_COUNTRY_EDITION, 0,
107 init_geoip_db(&geoip.country_v6, GEOIP_COUNTRY_EDITION_V6, 0,
111 init_geoip_db(&geoip.city_v4, GEOIP_CITY_EDITION_REV1,
114 init_geoip_db(&geoip.city_v6, GEOIP_CITY_EDITION_REV1_V6,
118 init_geoip_db(&geoip.region, GEOIP_REGION_EDITION_REV1,
120 init_geoip_db(&geoip.isp, GEOIP_ISP_EDITION, 0,
122 init_geoip_db(&geoip.org, GEOIP_ORG_EDITION, 0,
124 init_geoip_db(&geoip.as, GEOIP_ASNUM_EDITION, 0,
126 init_geoip_db(&geoip.domain, GEOIP_DOMAIN_EDITION, 0,
128 init_geoip_db(&geoip.netspeed, GEOIP_NETSPEED_EDITION, 0,
146 return (dns_geoip_match(&na, scope, &geoip, &elt));
163 return (dns_geoip_match(&na, scope, &geoip, &elt));
180 return (dns_geoip_match(&na, scope, &geoip, &elt));
202 /* Use databases from the geoip system test */
205 if (geoip.country_v4 == NULL) {
253 /* Use databases from the geoip system test */
256 if (geoip.country_v6 == NULL) {
293 /* Use databases from the geoip system test */
296 if (geoip.city_v4 == NULL) {
356 /* Use databases from the geoip system test */
359 if (geoip.city_v6 == NULL) {
415 /* Use databases from the geoip system test */
418 if (geoip.region == NULL) {
457 /* Use databases from the geoip system test */
460 if (geoip.region == NULL) {
485 GeoIP_delete(geoip.city_v4);
486 geoip.city_v4 = NULL;
504 GeoIP_delete(geoip.region);
505 geoip.region = NULL;
537 /* Use databases from the geoip system test */
540 if (geoip.as == NULL) {
567 /* Use databases from the geoip system test */
570 if (geoip.isp == NULL) {
596 /* Use databases from the geoip system test */
599 if (geoip.org == NULL) {
625 /* Use databases from the geoip system test */
628 if (geoip.domain == NULL) {
654 /* Use databases from the geoip system test */
657 if (geoip.netspeed == NULL) {
679 atf_tc_set_md_var(tc, "descr", "skipping geoip test");