12 #ifndef TOR_GEOIP_STATS_H
13 #define TOR_GEOIP_STATS_H
15 #include "core/or/dos.h"
45 #define GEOIP_NS_RESPONSE_NUM 6
91 unsigned int action:2;
101 const tor_addr_t *addr,
const char *transport_name,
105 const char *transport_name,
107 size_t geoip_client_cache_total_allocation(
void);
108 size_t geoip_client_cache_handle_oom(time_t now,
size_t min_remove_bytes);
113 char **country_str,
char **ipver_str);
time_t geoip_entry_stats_write(time_t now)
int geoip_get_client_history(geoip_client_action_t action, char **country_str, char **ipver_str)
void geoip_reset_entry_stats(time_t now)
char * geoip_format_bridge_stats(time_t now)
time_t geoip_dirreq_stats_write(time_t now)
@ DIRREQ_CIRC_QUEUE_FLUSHED
@ DIRREQ_CHANNEL_BUFFER_FLUSHED
@ DIRREQ_IS_FOR_NETWORK_STATUS
@ DIRREQ_FLUSHING_DIR_CONN_FINISHED
void geoip_dirreq_stats_init(time_t now)
void geoip_bridge_stats_init(time_t now)
char * geoip_get_request_history(void)
void geoip_change_dirreq_state(uint64_t dirreq_id, dirreq_type_t type, dirreq_state_t new_state)
void geoip_note_ns_response(geoip_ns_response_t response)
void geoip_remove_old_clients(time_t cutoff)
void geoip_bridge_stats_term(void)
void geoip_entry_stats_init(time_t now)
void geoip_dirreq_stats_term(void)
@ GEOIP_CLIENT_NETWORKSTATUS
char * geoip_format_dirreq_stats(time_t now)
char * geoip_get_bridge_stats_controller(time_t)
void geoip_start_dirreq(uint64_t dirreq_id, size_t response_size, dirreq_type_t type)
void geoip_note_client_seen(geoip_client_action_t action, const tor_addr_t *addr, const char *transport_name, time_t now)
char * format_client_stats_heartbeat(time_t now)
char * geoip_get_transport_history(void)
void geoip_reset_dirreq_stats(time_t now)
char * geoip_format_entry_stats(time_t now)
const char * geoip_get_bridge_stats_extrainfo(time_t)
void geoip_stats_free_all(void)
void geoip_entry_stats_term(void)
int should_record_bridge_info(const or_options_t *options)
time_t geoip_bridge_stats_write(time_t now)
@ GEOIP_REJECT_NOT_MODIFIED
@ GEOIP_REJECT_NOT_ENOUGH_SIGS
@ GEOIP_REJECT_UNAVAILABLE
unsigned int last_seen_in_minutes