From 3b149631f0eb732049e04fa0c89d09c7aa2376f9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:22:53 +0200 Subject: Adding upstream version 1.6.12. Signed-off-by: Daniel Baumann --- libGeoIP/GeoIP_deprecated.c | 248 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 libGeoIP/GeoIP_deprecated.c (limited to 'libGeoIP/GeoIP_deprecated.c') diff --git a/libGeoIP/GeoIP_deprecated.c b/libGeoIP/GeoIP_deprecated.c new file mode 100644 index 0000000..aae3685 --- /dev/null +++ b/libGeoIP/GeoIP_deprecated.c @@ -0,0 +1,248 @@ + +#include "GeoIP_internal.h" + +char *GeoIP_org_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl); +} + +char *GeoIP_org_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl); +} + +char *GeoIP_org_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_name_by_addr_gl(gi, addr, &gl); +} + +char *GeoIP_org_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_name_by_addr_v6_gl(gi, addr, &gl); +} + +char *GeoIP_org_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_name_by_name_gl(gi, name, &gl); +} + +char *GeoIP_org_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_name_by_name_v6_gl(gi, name, &gl); +} + +int GeoIP_last_netmask(GeoIP *gi) { return gi->netmask; } + +unsigned int _GeoIP_seek_record_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return _GeoIP_seek_record_v6_gl(gi, ipnum, &gl); +} + +unsigned int _GeoIP_seek_record(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return _GeoIP_seek_record_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_code_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_code_by_name_v6_gl(gi, name, &gl); +} + +const char *GeoIP_country_code_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_code_by_name_gl(gi, name, &gl); +} + +const char *GeoIP_country_code3_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_code3_by_name_v6_gl(gi, name, &gl); +} + +const char *GeoIP_country_code3_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_code3_by_name_gl(gi, name, &gl); +} + +const char *GeoIP_country_name_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_name_by_name_v6_gl(gi, name, &gl); +} + +const char *GeoIP_country_name_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_country_name_by_name_gl(gi, name, &gl); +} + +int GeoIP_id_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_id_by_name_gl(gi, name, &gl); +} +int GeoIP_id_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_id_by_name_v6_gl(gi, name, &gl); +} + +const char *GeoIP_country_code_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_code_by_addr_v6_gl(gi, addr, &gl); +} +const char *GeoIP_country_code_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_code_by_addr_gl(gi, addr, &gl); +} + +const char *GeoIP_country_code3_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_code3_by_addr_v6_gl(gi, addr, &gl); +} + +const char *GeoIP_country_code3_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_code3_by_addr_gl(gi, addr, &gl); +} + +const char *GeoIP_country_name_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_name_by_addr_v6_gl(gi, addr, &gl); +} +const char *GeoIP_country_name_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_country_name_by_addr_gl(gi, addr, &gl); +} + +const char *GeoIP_country_name_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_country_name_by_ipnum_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_name_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_country_name_by_ipnum_v6_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_code_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_country_code_by_ipnum_v6_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_code_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_country_code_by_ipnum_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_code3_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_country_code3_by_ipnum_gl(gi, ipnum, &gl); +} + +const char *GeoIP_country_code3_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_country_code3_by_ipnum_v6_gl(gi, ipnum, &gl); +} + +int GeoIP_country_id_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_id_by_addr_v6_gl(gi, addr, &gl); +} + +int GeoIP_country_id_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_id_by_addr_gl(gi, addr, &gl); +} +int GeoIP_country_id_by_name_v6(GeoIP *gi, const char *host) { + GeoIPLookup gl; + return GeoIP_id_by_name_v6_gl(gi, host, &gl); +} +int GeoIP_country_id_by_name(GeoIP *gi, const char *host) { + GeoIPLookup gl; + return GeoIP_id_by_name_gl(gi, host, &gl); +} +int GeoIP_id_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_id_by_addr_v6_gl(gi, addr, &gl); +} +int GeoIP_id_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_id_by_addr_gl(gi, addr, &gl); +} + +int GeoIP_id_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_id_by_ipnum_v6_gl(gi, ipnum, &gl); +} +int GeoIP_id_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_id_by_ipnum_gl(gi, ipnum, &gl); +} +void GeoIP_assign_region_by_inetaddr(GeoIP *gi, + unsigned long inetaddr, + GeoIPRegion *region) { + GeoIPLookup gl; + GeoIP_assign_region_by_inetaddr_gl(gi, inetaddr, region, &gl); +} + +void GeoIP_assign_region_by_inetaddr_v6(GeoIP *gi, + geoipv6_t inetaddr, + GeoIPRegion *region) { + GeoIPLookup gl; + GeoIP_assign_region_by_inetaddr_v6_gl(gi, inetaddr, region, &gl); +} + +GeoIPRegion *GeoIP_region_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_region_by_addr_gl(gi, addr, &gl); +} +GeoIPRegion *GeoIP_region_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_region_by_addr_v6_gl(gi, addr, &gl); +} + +GeoIPRegion *GeoIP_region_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_region_by_name_gl(gi, name, &gl); +} +GeoIPRegion *GeoIP_region_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_region_by_name_v6_gl(gi, name, &gl); +} + +GeoIPRegion *GeoIP_region_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_region_by_ipnum_gl(gi, ipnum, &gl); +} +GeoIPRegion *GeoIP_region_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_region_by_ipnum_v6_gl(gi, ipnum, &gl); +} + +char **GeoIP_range_by_ip(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_range_by_ip_gl(gi, addr, &gl); +} + +char *GeoIP_name_by_ipnum(GeoIP *gi, unsigned long ipnum) { + GeoIPLookup gl; + return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl); +} +char *GeoIP_name_by_ipnum_v6(GeoIP *gi, geoipv6_t ipnum) { + GeoIPLookup gl; + return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl); +} +char *GeoIP_name_by_addr(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_name_by_addr_gl(gi, addr, &gl); +} +char *GeoIP_name_by_addr_v6(GeoIP *gi, const char *addr) { + GeoIPLookup gl; + return GeoIP_name_by_addr_v6_gl(gi, addr, &gl); +} + +char *GeoIP_name_by_name(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_name_by_name_gl(gi, name, &gl); +} + +char *GeoIP_name_by_name_v6(GeoIP *gi, const char *name) { + GeoIPLookup gl; + return GeoIP_name_by_name_v6_gl(gi, name, &gl); +} -- cgit v1.2.3