diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-10 13:37:25 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-14 01:46:17 +0200 |
commit | 59dd9de8581c0cf0a0bd572f8d67b1be2b2a4274 (patch) | |
tree | 15f13cbb58042225fbf9a539cc9918cb3c92fcd2 /src/or/or.h | |
parent | 8f1a973669284e5662bd6f23bc96ecfafa57c554 (diff) | |
download | tor-59dd9de8581c0cf0a0bd572f8d67b1be2b2a4274.tar.gz tor-59dd9de8581c0cf0a0bd572f8d67b1be2b2a4274.zip |
Write number of rejected requests to geoip-stats file.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index f298d53c27..a6aca94f82 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3647,6 +3647,26 @@ typedef enum { void geoip_note_client_seen(geoip_client_action_t action, uint32_t addr, time_t now); void geoip_remove_old_clients(time_t cutoff); +/** Indicates either a positive reply or a reason for rejectng a network + * status request that will be included in geoip statistics. */ +typedef enum { + /** Request is answered successfully. */ + GEOIP_SUCCESS = 0, + /** V3 network status is not signed by a sufficient number of requested + * authorities. */ + GEOIP_REJECT_NOT_ENOUGH_SIGS = 1, + /** Requested network status object is unavailable. */ + GEOIP_REJECT_UNAVAILABLE = 2, + /** Requested network status not found. */ + GEOIP_REJECT_NOT_FOUND = 3, + /** Network status has not been modified since If-Modified-Since time. */ + GEOIP_REJECT_NOT_MODIFIED = 4, + /** Directory is busy. */ + GEOIP_REJECT_BUSY = 5, +} geoip_ns_response_t; +#define GEOIP_NS_RESPONSE_NUM 6 +void geoip_note_ns_response(geoip_client_action_t action, + geoip_ns_response_t response); time_t geoip_get_history_start(void); char *geoip_get_client_history(time_t now, geoip_client_action_t action); char *geoip_get_request_history(time_t now, geoip_client_action_t action); |