diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-30 08:33:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-30 08:33:59 -0400 |
commit | ac9d08f66a3e5fd3fb3d456c4146b57c5ce1f1d6 (patch) | |
tree | 942abab1c2dcb5af24db7d10a7b8607c692ecf48 /src/feature/dircache/dirserv.h | |
parent | 811ed8cf9f58d8480244483f4ad012ea9dca42ef (diff) | |
parent | 6d59ab16a0aebf74b793c174f8e724b2fbcbbb64 (diff) | |
download | tor-ac9d08f66a3e5fd3fb3d456c4146b57c5ce1f1d6.tar.gz tor-ac9d08f66a3e5fd3fb3d456c4146b57c5ce1f1d6.zip |
Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased'
Diffstat (limited to 'src/feature/dircache/dirserv.h')
-rw-r--r-- | src/feature/dircache/dirserv.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/feature/dircache/dirserv.h b/src/feature/dircache/dirserv.h index b1b8cee5fc..9be4bf9db2 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, @@ -217,7 +224,8 @@ dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str, #endif /* defined(DIRSERV_PRIVATE) */ int dirserv_read_measured_bandwidths(const char *from_file, - smartlist_t *routerstatuses); + smartlist_t *routerstatuses, + smartlist_t *bw_file_headers); int dirserv_read_guardfraction_file(const char *fname, smartlist_t *vote_routerstatuses); |