diff options
Diffstat (limited to 'src/feature/stats/geoip.h')
-rw-r--r-- | src/feature/stats/geoip.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/feature/stats/geoip.h b/src/feature/stats/geoip.h deleted file mode 100644 index 1ca04cdff6..0000000000 --- a/src/feature/stats/geoip.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2001 Matej Pfajfar. - * Copyright (c) 2001-2004, Roger Dingledine. - * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. - * Copyright (c) 2007-2018, The Tor Project, Inc. */ -/* See LICENSE for licensing information */ - -/** - * \file geoip.h - * \brief Header file for geoip.c. - **/ - -#ifndef TOR_GEOIP_H -#define TOR_GEOIP_H - -#include "lib/net/nettypes.h" -#include "lib/testsupport/testsupport.h" -#include "lib/cc/torint.h" - -#ifdef GEOIP_PRIVATE -STATIC int geoip_parse_entry(const char *line, sa_family_t family); -STATIC void clear_geoip_db(void); -#endif /* defined(GEOIP_PRIVATE) */ - -struct in6_addr; -struct tor_addr_t; - -int geoip_get_country_by_ipv4(uint32_t ipaddr); -int geoip_get_country_by_ipv6(const struct in6_addr *addr); - -/** A per-country GeoIP record. */ -typedef struct geoip_country_t { - char countrycode[3]; -} geoip_country_t; - -struct smartlist_t; -const struct smartlist_t *geoip_get_countries(void); - -int geoip_load_file(sa_family_t family, const char *filename, int severity); -MOCK_DECL(int, geoip_get_country_by_addr, (const struct tor_addr_t *addr)); -MOCK_DECL(int, geoip_get_n_countries, (void)); -const char *geoip_get_country_name(country_t num); -MOCK_DECL(int, geoip_is_loaded, (sa_family_t family)); -const char *geoip_db_digest(sa_family_t family); -MOCK_DECL(country_t, geoip_get_country, (const char *countrycode)); - -void geoip_free_all(void); - -#endif /* !defined(TOR_GEOIP_H) */ |