summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-12-17 22:44:11 +0000
committerNick Mathewson <nickm@torproject.org>2007-12-17 22:44:11 +0000
commit820159cac540b4777fb639de663d72f04690e2a2 (patch)
tree19c9e2111094adf957641203ffb9e95b260e997a /src/or/or.h
parent7412008d1457300535c751060991e7ea8ffa2279 (diff)
downloadtor-820159cac540b4777fb639de663d72f04690e2a2.tar.gz
tor-820159cac540b4777fb639de663d72f04690e2a2.zip
r15530@tombo: nickm | 2007-12-17 16:54:03 -0500
First wodge of geoip code so bridges can figure out which countries are blocking them. svn:r12845
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index c9b3a6d836..da9a6f3ac4 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2315,6 +2315,10 @@ typedef struct {
/** DOCDOC here and in tor.1 */
int LearnAuthorityAddrFromCerts;
+ /** DOCDOC here and in tor.1 */
+ int BridgeRecordUsageByCountry;
+ char *GEOIPFile;
+
} or_options_t;
/** Persistent state for an onion router, as saved to disk. */
@@ -3192,6 +3196,21 @@ void dnsserv_resolved(edge_connection_t *conn,
void dnsserv_reject_request(edge_connection_t *conn);
void dnsserv_launch_request(const char *name, int is_reverse);
+/********************************* geoip.c **************************/
+
+#ifdef GEOIP_PRIVATE
+void geoip_add_entry(uint32_t low, uint32_t high, const char *country);
+#endif
+int geoip_load_file(const char *filename);
+int geoip_get_country_by_ip(uint32_t ipaddr);
+int geoip_get_n_countries(void);
+const char *geoip_get_country_name(int num);
+int geoip_is_loaded(void);
+void geoip_note_client_seen(uint32_t addr, time_t now);
+void geoip_remove_old_clients(time_t cutoff);
+char *geoip_get_client_history(time_t now);
+void geoip_free_all(void);
+
/********************************* hibernate.c **********************/
int accounting_parse_options(or_options_t *options, int validate_only);