summaryrefslogtreecommitdiff
path: root/src/or/entrynodes.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-18 09:17:02 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-18 09:17:02 -0500
commit96211bcf714ac739f605dc0b5b8754418080591f (patch)
tree7c677d7993a65df2df28171dc7695a4dbab80937 /src/or/entrynodes.h
parent164eeefb9360e20d358f3a08157c5b6227d98ac7 (diff)
parent5c34a53068f5556f5648dfe522030983f552a1fd (diff)
downloadtor-96211bcf714ac739f605dc0b5b8754418080591f.tar.gz
tor-96211bcf714ac739f605dc0b5b8754418080591f.zip
Merge branch 'bug9321_rerebase'
Conflicts: src/or/dirvote.h src/test/include.am src/test/test_entrynodes.c
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r--src/or/entrynodes.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index 7f3a4fb29c..35bd748d0d 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -160,5 +160,21 @@ int validate_pluggable_transports_config(void);
double pathbias_get_close_success_count(entry_guard_t *guard);
double pathbias_get_use_success_count(entry_guard_t *guard);
+/** Contains the bandwidth of a relay as a guard and as a non-guard
+ * after the guardfraction has been considered. */
+typedef struct guardfraction_bandwidth_t {
+ /* Bandwidth as a guard after guardfraction has been considered. */
+ int guard_bw;
+ /* Bandwidth as a non-guard after guardfraction has been considered. */
+ int non_guard_bw;
+} guardfraction_bandwidth_t;
+
+int should_apply_guardfraction(const networkstatus_t *ns);
+
+void
+guard_get_guardfraction_bandwidth(guardfraction_bandwidth_t *guardfraction_bw,
+ int orig_bandwidth,
+ uint32_t guardfraction_percentage);
+
#endif