diff options
author | juga0 <juga@riseup.net> | 2018-06-30 06:12:36 +0000 |
---|---|---|
committer | juga0 <juga@riseup.net> | 2018-07-16 14:43:49 +0000 |
commit | f906d9be111bd8eb55cad8478fdab8f20a10a13d (patch) | |
tree | 95f70a25185e0ff24b4323dae601486635d7e8f7 /src/feature/dircache | |
parent | d79c65772bd88b7b2810750237057fafbe8ea076 (diff) | |
download | tor-f906d9be111bd8eb55cad8478fdab8f20a10a13d.tar.gz tor-f906d9be111bd8eb55cad8478fdab8f20a10a13d.zip |
Replace bwlist by bw_file
and add bw file terminator constant
Diffstat (limited to 'src/feature/dircache')
-rw-r--r-- | src/feature/dircache/dirserv.h | 9 |
1 files changed, 8 insertions, 1 deletions
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); |