aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-10-14 16:15:41 -0400
committerNick Mathewson <nickm@torproject.org>2009-10-14 16:15:41 -0400
commit83c3f118db0ae3911ea72403856df9fb08b2d0e5 (patch)
tree9ca6f88f567835462314c426397923996bf8bebb /src/or/or.h
parent95008db08d1bb5d7b608654fc1a115a42cd15252 (diff)
downloadtor-83c3f118db0ae3911ea72403856df9fb08b2d0e5.tar.gz
tor-83c3f118db0ae3911ea72403856df9fb08b2d0e5.zip
Code to parse and access network parameters.
Partial backport of 381766ce4b1145460. Partial backport of 56c6d78520a98fb64.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 319b3a9d10..0c0d8e869e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1655,6 +1655,10 @@ typedef struct networkstatus_t {
* not listed here, the voter has no opinion on what its value should be. */
smartlist_t *known_flags;
+ /** List of key=value strings for the parameters in this vote or
+ * consensus, sorted by key. */
+ smartlist_t *net_params;
+
/** List of networkstatus_voter_info_t. For a vote, only one element
* is included. For a consensus, one element is included for every voter
* whose vote contributed to the consensus. */
@@ -3570,9 +3574,9 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
authority_cert_t *cert);
#ifdef DIRVOTE_PRIVATE
-char *
-format_networkstatus_vote(crypto_pk_env_t *private_key,
- networkstatus_t *v3_ns);
+char *format_networkstatus_vote(crypto_pk_env_t *private_key,
+ networkstatus_t *v3_ns);
+char *dirvote_compute_params(smartlist_t *votes);
#endif
/********************************* dns.c ***************************/
@@ -3787,6 +3791,8 @@ void signed_descs_update_status_from_consensus_networkstatus(
char *networkstatus_getinfo_helper_single(routerstatus_t *rs);
char *networkstatus_getinfo_by_purpose(const char *purpose_string, time_t now);
void networkstatus_dump_bridge_status_to_file(time_t now);
+int32_t networkstatus_get_param(networkstatus_t *ns, const char *param_name,
+ int32_t default_val);
int getinfo_helper_networkstatus(control_connection_t *conn,
const char *question, char **answer);
void networkstatus_free_all(void);