aboutsummaryrefslogtreecommitdiff
path: root/src/or/networkstatus.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-26 09:22:04 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-16 11:06:16 -0500
commit039bd01767d42961cb16ff4914481332b52cf8db (patch)
tree52048c96bd405e8dbe544ae97889185cd048a3bb /src/or/networkstatus.h
parent2ea5aa71823f385e36f20e643a20996dcb164464 (diff)
downloadtor-039bd01767d42961cb16ff4914481332b52cf8db.tar.gz
tor-039bd01767d42961cb16ff4914481332b52cf8db.zip
Add a wrapper for a common networkstatus param pattern
We frequently want to check a networkstatus parameter only when it isn't overridden from the torrc file.
Diffstat (limited to 'src/or/networkstatus.h')
-rw-r--r--src/or/networkstatus.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index 71f36b69ed..4b3854db0c 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -111,6 +111,11 @@ int32_t networkstatus_get_param(const networkstatus_t *ns,
const char *param_name,
int32_t default_val, int32_t min_val,
int32_t max_val);
+int32_t networkstatus_get_overridable_param(const networkstatus_t *ns,
+ int32_t torrc_value,
+ const char *param_name,
+ int32_t default_val,
+ int32_t min_val, int32_t max_val);
int getinfo_helper_networkstatus(control_connection_t *conn,
const char *question, char **answer,
const char **errmsg);