diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-10 16:33:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-12-06 11:28:48 -0500 |
commit | 46a62e3256e078866c68e119d1da2afdb10a8306 (patch) | |
tree | 218fbc743a3b0ced3efe7dbf43609a7b37c1f6ac /src/or/routerlist.h | |
parent | 705ee3b5d4c3a11ffbb68a305a7bf0d081198500 (diff) | |
download | tor-46a62e3256e078866c68e119d1da2afdb10a8306.tar.gz tor-46a62e3256e078866c68e119d1da2afdb10a8306.zip |
Refactor add_trusted_dir_server
Now creating a dir_server_t and adding it are separate functions, and
there are frontend functions for adding a trusted dirserver and a
fallback dirserver.
Diffstat (limited to 'src/or/routerlist.h')
-rw-r--r-- | src/or/routerlist.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/or/routerlist.h b/src/or/routerlist.h index 95867552c2..1d527d0220 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -132,11 +132,16 @@ void router_load_extrainfo_from_string(const char *s, const char *eos, void routerlist_retry_directory_downloads(time_t now); int router_exit_policy_rejects_all(const routerinfo_t *router); -dir_server_t *add_trusted_dir_server(const char *nickname, - const char *address, - uint16_t dir_port, uint16_t or_port, - const char *digest, const char *v3_auth_digest, - dirinfo_type_t type); + +dir_server_t *trusted_dir_server_new(const char *nickname, const char *address, + uint16_t dir_port, uint16_t or_port, + const char *digest, const char *v3_auth_digest, + dirinfo_type_t type); +dir_server_t *fallback_dir_server_new(const tor_addr_t *addr, + uint16_t dir_port, uint16_t or_port, + const char *id_digest); +void dir_server_add(dir_server_t *ent); + void authority_cert_free(authority_cert_t *cert); void clear_dir_servers(void); int any_trusted_dir_is_v1_authority(void); |