summaryrefslogtreecommitdiff
path: root/src/or/routerparse.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-06-30 06:13:44 +0000
committerAndrea Shepard <andrea@torproject.org>2016-06-30 07:03:26 +0000
commit42f089473a50613ae62875ede386861e91123b78 (patch)
tree4a4a69cb6a2c709d4fcaab24edec254ddf1f25c6 /src/or/routerparse.h
parent2154160a2484d852e4a0b509a5f046001d52fd11 (diff)
downloadtor-42f089473a50613ae62875ede386861e91123b78.tar.gz
tor-42f089473a50613ae62875ede386861e91123b78.zip
Unit test for dump_desc_populate_one_file()
Diffstat (limited to 'src/or/routerparse.h')
-rw-r--r--src/or/routerparse.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/routerparse.h b/src/or/routerparse.h
index a96146acf2..6167e5148b 100644
--- a/src/or/routerparse.h
+++ b/src/or/routerparse.h
@@ -89,12 +89,26 @@ void routerparse_init(void);
void routerparse_free_all(void);
#ifdef ROUTERPARSE_PRIVATE
+/*
+ * One entry in the list of dumped descriptors; filename dumped to, length,
+ * SHA-256 and timestamp.
+ */
+
+typedef struct {
+ char *filename;
+ size_t len;
+ uint8_t digest_sha256[DIGEST256_LEN];
+ time_t when;
+} dumped_desc_t;
+
EXTERN(size_t, len_descs_dumped);
EXTERN(smartlist_t *, descs_dumped);
STATIC int routerstatus_parse_guardfraction(const char *guardfraction_str,
networkstatus_t *vote,
vote_routerstatus_t *vote_rs,
routerstatus_t *rs);
+STATIC dumped_desc_t * dump_desc_populate_one_file(const char *dirname,
+ const char *f);
STATIC void dump_desc(const char *desc, const char *type);
STATIC void dump_desc_fifo_cleanup(void);
#endif