summaryrefslogtreecommitdiff
path: root/src/or/dirserv.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-04-18 11:13:36 -0400
committerNick Mathewson <nickm@torproject.org>2013-04-18 11:13:36 -0400
commit8362f8854aa3e36b766724226a3baec4d325c1c0 (patch)
treed309eb1c3b9502b4323405f1a312f04dd868077c /src/or/dirserv.h
parentcd1cdae0fac33bca359b34dae4062fe87a351661 (diff)
parent4b15606fa2848f5112599865eb7b15ef2178e66a (diff)
downloadtor-8362f8854aa3e36b766724226a3baec4d325c1c0.tar.gz
tor-8362f8854aa3e36b766724226a3baec4d325c1c0.zip
Merge branch 'less_charbuf_rebased' into maint-0.2.4
Conflicts: src/or/dirserv.c src/or/dirserv.h src/test/test_dir.c
Diffstat (limited to 'src/or/dirserv.h')
-rw-r--r--src/or/dirserv.h25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/or/dirserv.h b/src/or/dirserv.h
index d6eb4ab77f..f9d36d760f 100644
--- a/src/or/dirserv.h
+++ b/src/or/dirserv.h
@@ -29,28 +29,6 @@
/** Maximum allowable length of a version line in a networkstatus. */
#define MAX_V_LINE_LEN 128
-/** Length of "r Authority BadDirectory BadExit Exit Fast Guard HSDir Named
- * Running Stable Unnamed V2Dir Valid\n". */
-#define MAX_FLAG_LINE_LEN 96
-/** Length of "w" line for weighting. Currently at most
- * "w Bandwidth=<uint32t> Measured=<uint32t>\n" */
-#define MAX_WEIGHT_LINE_LEN (12+10+10+10+1)
-/** Maximum length of an exit policy summary line. */
-#define MAX_POLICY_LINE_LEN (3+MAX_EXITPOLICY_SUMMARY_LEN)
-/** Amount of space to allocate for each entry: r, s, and v lines. */
-#define RS_ENTRY_LEN \
- ( /* first line */ \
- MAX_NICKNAME_LEN+BASE64_DIGEST_LEN*2+ISO_TIME_LEN+INET_NTOA_BUF_LEN+ \
- 5*2 /* ports */ + 10 /* punctuation */ + \
- /* second line */ \
- MAX_FLAG_LINE_LEN + \
- /* weight line */ \
- MAX_WEIGHT_LINE_LEN + \
- /* p line. */ \
- MAX_POLICY_LINE_LEN + \
- /* v line. */ \
- MAX_V_LINE_LEN \
- )
int connection_dirserv_flushed_some(dir_connection_t *conn);
@@ -128,7 +106,7 @@ size_t dirserv_estimate_data_size(smartlist_t *fps, int is_serverdescs,
int compressed);
size_t dirserv_estimate_microdesc_size(const smartlist_t *fps, int compressed);
-int routerstatus_format_entry(char *buf, size_t buf_len,
+char *routerstatus_format_entry(
const routerstatus_t *rs, const char *platform,
routerstatus_format_type_t format,
const vote_routerstatus_t *vrs);
@@ -154,6 +132,7 @@ int dirserv_get_measured_bw_cache_size(void);
int dirserv_query_measured_bw_cache_kb(const char *node_id, long *bw_out,
time_t *as_of_out);
int dirserv_has_measured_bw(const char *node_id);
+cached_dir_t *generate_v2_networkstatus_opinion(void);
#endif
int dirserv_read_measured_bandwidths(const char *from_file,