aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-05-27 17:52:46 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-05-27 19:13:31 +0200
commit54c97c9133ebbeea6aed9b4526b19fbc0d88377b (patch)
tree4357577684ab5acc0928b543ef88b002d325a9c3 /src/or/or.h
parentbf7e5d6553acd8d8ce37e80586083620d66d0160 (diff)
downloadtor-54c97c9133ebbeea6aed9b4526b19fbc0d88377b.tar.gz
tor-54c97c9133ebbeea6aed9b4526b19fbc0d88377b.zip
Change the way how directories that are configured with --enable-geoip-stats write geoip stats to disk.
- Write geoip stats to disk every 24 hours, not every hour. - Remove configuration options and define reasonable defaults. - Clear history of client requests every 24 hours (which wasn't done at all before).
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index deb388ab26..c13ca0b50f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2528,7 +2528,7 @@ typedef struct {
* the bridge authority guess which countries have blocked access to us. */
int BridgeRecordUsageByCountry;
-#ifdef ENABLE_GEOIP_STATS
+#if 0
/** If true, and Tor is built with GEOIP_STATS support, and we're a
* directory, record how many directory requests we get from each country. */
int DirRecordUsageByCountry;
@@ -3583,6 +3583,15 @@ int dnsserv_launch_request(const char *name, int is_reverse);
/********************************* geoip.c **************************/
+/** Round all GeoIP results to the next multiple of this value, to avoid
+ * leaking information. */
+#define DIR_RECORD_USAGE_GRANULARITY 8
+/** Time interval: Flush geoip data to disk this often. */
+#define DIR_RECORD_USAGE_RETAIN_IPS (24*60*60)
+/** How long do we have to have observed per-country request history before
+ * we are willing to talk about it? */
+#define DIR_RECORD_USAGE_MIN_OBSERVATION_TIME (24*60*60)
+
#ifdef GEOIP_PRIVATE
int geoip_parse_entry(const char *line);
#endif
@@ -3614,7 +3623,6 @@ char *geoip_get_request_history(time_t now, geoip_client_action_t action);
int getinfo_helper_geoip(control_connection_t *control_conn,
const char *question, char **answer);
void geoip_free_all(void);
-void dump_geoip_stats(void);
/********************************* hibernate.c **********************/