aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitpadding.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-03-13 13:21:52 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2019-03-13 13:35:52 +0200
commitcdaff26f91ff6e3dceca6054157bbcf976713398 (patch)
tree84e65d0115e0d0afd0c80bbf2c0f260b4f1c18d6 /src/core/or/circuitpadding.h
parent32c821c47b56471802a6c6c0f2286eb41d07238b (diff)
downloadtor-cdaff26f91ff6e3dceca6054157bbcf976713398.tar.gz
tor-cdaff26f91ff6e3dceca6054157bbcf976713398.zip
circpad: Machines MUST have strictly increasing histogram edges.
Add a basic validation function for the histograms. It can be a building block for the future
Diffstat (limited to 'src/core/or/circuitpadding.h')
-rw-r--r--src/core/or/circuitpadding.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/or/circuitpadding.h b/src/core/or/circuitpadding.h
index 2c763f46ef..54039fa59a 100644
--- a/src/core/or/circuitpadding.h
+++ b/src/core/or/circuitpadding.h
@@ -291,7 +291,7 @@ typedef struct circpad_state_t {
/** The histogram itself: an array of uint16s of tokens, whose
* widths are exponentially spaced, in microseconds.
*
- * This array must have histogram_len elements that are (non-strictly)
+ * This array must have histogram_len elements that are strictly
* monotonically increasing. */
circpad_hist_token_t histogram[CIRCPAD_MAX_HISTOGRAM_LEN];
/* The histogram bin edges in usec.
@@ -730,6 +730,10 @@ histogram_get_bin_upper_bound(const circpad_machine_state_t *mi,
#ifdef TOR_UNIT_TESTS
extern smartlist_t *origin_padding_machines;
extern smartlist_t *relay_padding_machines;
+
+STATIC void
+register_padding_machine(circpad_machine_spec_t *machine,
+ smartlist_t *machine_list);
#endif
#endif