Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/bind9/dns
File: geoip.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef DNS_GEOIP_H
[11] Fix | Delete
#define DNS_GEOIP_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file dns/geoip.h
[18] Fix | Delete
* \brief
[19] Fix | Delete
* GeoIP/GeoIP2 data types and function prototypes.
[20] Fix | Delete
*/
[21] Fix | Delete
[22] Fix | Delete
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
[23] Fix | Delete
[24] Fix | Delete
/***
[25] Fix | Delete
*** Imports
[26] Fix | Delete
***/
[27] Fix | Delete
[28] Fix | Delete
#include <stdbool.h>
[29] Fix | Delete
[30] Fix | Delete
#include <isc/lang.h>
[31] Fix | Delete
#include <isc/magic.h>
[32] Fix | Delete
#include <isc/netaddr.h>
[33] Fix | Delete
[34] Fix | Delete
#include <dns/name.h>
[35] Fix | Delete
#include <dns/types.h>
[36] Fix | Delete
#include <dns/iptable.h>
[37] Fix | Delete
[38] Fix | Delete
/***
[39] Fix | Delete
*** Types
[40] Fix | Delete
***/
[41] Fix | Delete
[42] Fix | Delete
typedef enum {
[43] Fix | Delete
dns_geoip_countrycode,
[44] Fix | Delete
dns_geoip_countrycode3,
[45] Fix | Delete
dns_geoip_countryname,
[46] Fix | Delete
dns_geoip_continentcode,
[47] Fix | Delete
dns_geoip_continent,
[48] Fix | Delete
dns_geoip_region,
[49] Fix | Delete
dns_geoip_regionname,
[50] Fix | Delete
dns_geoip_country_code,
[51] Fix | Delete
dns_geoip_country_code3,
[52] Fix | Delete
dns_geoip_country_name,
[53] Fix | Delete
dns_geoip_country_continentcode,
[54] Fix | Delete
dns_geoip_country_continent,
[55] Fix | Delete
dns_geoip_region_countrycode,
[56] Fix | Delete
dns_geoip_region_code,
[57] Fix | Delete
dns_geoip_region_name,
[58] Fix | Delete
dns_geoip_city_countrycode,
[59] Fix | Delete
dns_geoip_city_countrycode3,
[60] Fix | Delete
dns_geoip_city_countryname,
[61] Fix | Delete
dns_geoip_city_region,
[62] Fix | Delete
dns_geoip_city_regionname,
[63] Fix | Delete
dns_geoip_city_name,
[64] Fix | Delete
dns_geoip_city_postalcode,
[65] Fix | Delete
dns_geoip_city_metrocode,
[66] Fix | Delete
dns_geoip_city_areacode,
[67] Fix | Delete
dns_geoip_city_continentcode,
[68] Fix | Delete
dns_geoip_city_continent,
[69] Fix | Delete
dns_geoip_city_timezonecode,
[70] Fix | Delete
dns_geoip_isp_name,
[71] Fix | Delete
dns_geoip_org_name,
[72] Fix | Delete
dns_geoip_as_asnum,
[73] Fix | Delete
dns_geoip_domain_name,
[74] Fix | Delete
dns_geoip_netspeed_id
[75] Fix | Delete
} dns_geoip_subtype_t;
[76] Fix | Delete
[77] Fix | Delete
typedef struct dns_geoip_elem {
[78] Fix | Delete
dns_geoip_subtype_t subtype;
[79] Fix | Delete
void *db;
[80] Fix | Delete
union {
[81] Fix | Delete
char as_string[256];
[82] Fix | Delete
int as_int;
[83] Fix | Delete
};
[84] Fix | Delete
} dns_geoip_elem_t;
[85] Fix | Delete
[86] Fix | Delete
struct dns_geoip_databases {
[87] Fix | Delete
#ifdef HAVE_GEOIP2
[88] Fix | Delete
void *country; /* GeoIP2-Country or GeoLite2-Country */
[89] Fix | Delete
void *city; /* GeoIP2-CIty or GeoLite2-City */
[90] Fix | Delete
void *domain; /* GeoIP2-Domain */
[91] Fix | Delete
void *isp; /* GeoIP2-ISP */
[92] Fix | Delete
void *as; /* GeoIP2-ASN or GeoLite2-ASN */
[93] Fix | Delete
#else /* HAVE_GEOIP */
[94] Fix | Delete
void *country_v4; /* GeoIP DB 1 */
[95] Fix | Delete
void *city_v4; /* GeoIP DB 2 or 6 */
[96] Fix | Delete
void *region; /* GeoIP DB 3 or 7 */
[97] Fix | Delete
void *isp; /* GeoIP DB 4 */
[98] Fix | Delete
void *org; /* GeoIP DB 5 */
[99] Fix | Delete
void *as; /* GeoIP DB 9 */
[100] Fix | Delete
void *netspeed; /* GeoIP DB 10 */
[101] Fix | Delete
void *domain; /* GeoIP DB 11 */
[102] Fix | Delete
void *country_v6; /* GeoIP DB 12 */
[103] Fix | Delete
void *city_v6; /* GeoIP DB 30 or 31 */
[104] Fix | Delete
#endif /* HAVE_GEOIP */
[105] Fix | Delete
};
[106] Fix | Delete
[107] Fix | Delete
/***
[108] Fix | Delete
*** Functions
[109] Fix | Delete
***/
[110] Fix | Delete
[111] Fix | Delete
ISC_LANG_BEGINDECLS
[112] Fix | Delete
[113] Fix | Delete
bool
[114] Fix | Delete
dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
[115] Fix | Delete
const dns_geoip_databases_t *geoip,
[116] Fix | Delete
const dns_geoip_elem_t *elt);
[117] Fix | Delete
[118] Fix | Delete
void
[119] Fix | Delete
dns_geoip_shutdown(void);
[120] Fix | Delete
[121] Fix | Delete
ISC_LANG_ENDDECLS
[122] Fix | Delete
[123] Fix | Delete
#endif /* HAVE_GEOIP | HAVE_GEOIP2 */
[124] Fix | Delete
[125] Fix | Delete
#endif /* DNS_GEOIP_H */
[126] Fix | Delete
[127] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function