From f906d9be111bd8eb55cad8478fdab8f20a10a13d Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 06:12:36 +0000 Subject: Replace bwlist by bw_file and add bw file terminator constant --- src/feature/dircache/dirserv.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/feature/dircache/dirserv.h b/src/feature/dircache/dirserv.h index deff9df347..ffc50b5222 100644 --- a/src/feature/dircache/dirserv.h +++ b/src/feature/dircache/dirserv.h @@ -49,6 +49,13 @@ typedef enum { /** Maximum allowable length of a version line in a networkstatus. */ #define MAX_V_LINE_LEN 128 +/** Maximum allowable length of bandwidth headers in a bandwidth file */ +#define MAX_BW_FILE_HEADER_COUNT_IN_VOTE 50 + +/** Terminatore that separates bandwidth file headers from bandwidth file + * relay lines */ +#define BW_FILE_HEADERS_TERMINATOR "=====\n" + /** Ways to convert a spoolable_resource_t to a bunch of bytes. */ typedef enum dir_spool_source_t { DIR_SPOOL_SERVER_BY_DIGEST=1, DIR_SPOOL_SERVER_BY_FP, @@ -216,7 +223,7 @@ dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str, int dirserv_read_measured_bandwidths(const char *from_file, smartlist_t *routerstatuses, - smartlist_t *bwlist_headers); + smartlist_t *bw_file_headers); int dirserv_read_guardfraction_file(const char *fname, smartlist_t *vote_routerstatuses); -- cgit v1.2.3-54-g00ecf