16 #define MAX_BW_FILE_HEADER_COUNT_IN_VOTE 50
20 #define BW_FILE_HEADERS_TERMINATOR "=====\n"
38 typedef struct measured_bw_line_t {
45 #define MAX_MEASUREMENT_AGE (3*24*60*60)
48 int line_is_after_headers);
STATIC int measured_bw_line_apply(measured_bw_line_t *parsed_line, smartlist_t *routerstatuses)
STATIC void dirserv_expire_measured_bw_cache(time_t now)
STATIC void dirserv_cache_measured_bw(const measured_bw_line_t *parsed_line, time_t as_of)
STATIC int measured_bw_line_parse(measured_bw_line_t *out, const char *orig_line, int line_is_after_headers)
uint32_t dirserv_get_credible_bandwidth_kb(const routerinfo_t *ri)
int dirserv_get_measured_bw_cache_size(void)
int dirserv_read_measured_bandwidths(const char *from_file, smartlist_t *routerstatuses, smartlist_t *bw_file_headers, uint8_t *digest_out)
void dirserv_count_measured_bws(const smartlist_t *routers)
int dirserv_get_last_n_measured_bws(void)
int dirserv_has_measured_bw(const char *node_id)
int dirserv_query_measured_bw_cache_kb(const char *node_id, long *bw_out, time_t *as_of_out)
void dirserv_clear_measured_bw_cache(void)
#define MAX_HEX_NICKNAME_LEN