diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-12 15:55:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-12 15:55:20 +0000 |
commit | 0068415b800ef78fb75466f5c36544db6686a76a (patch) | |
tree | 3672411378a92dd055849337c24743fcc427f5e3 /src/or/or.h | |
parent | 43ef5a3e374cef58bb86cdf8b66e660046b01abc (diff) | |
download | tor-0068415b800ef78fb75466f5c36544db6686a76a.tar tor-0068415b800ef78fb75466f5c36544db6686a76a.tar.gz |
Add an implementation of trusted_dir_server logic to switch towards simply remembering an addr/port/keyid for each trusted dir server
svn:r2443
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index e8a4355ed..b8a72ae2b 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -900,6 +900,9 @@ typedef struct { uint32_t HttpProxyAddr; /**< Parsed IPv4 addr for http proxy, if any */ uint16_t HttpProxyPort; /**< Parsed port for http proxy, if any */ + struct config_line_t *DirServers; /**< List of configuration lines + * for directory servers. */ + } or_options_t; /* XXX are these good enough defaults? */ @@ -1397,8 +1400,17 @@ int is_legal_nickname_or_hexdigest(const char *s); /********************************* routerlist.c ***************************/ +typedef struct trusted_dir_server_t { + char *address; + uint32_t addr; + uint16_t dir_port; + char digest[DIGEST_LEN]; + int is_running; +} trusted_dir_server_t; + int router_reload_router_list(void); routerinfo_t *router_pick_directory_server(int requireauth, int requireothers); +trusted_dir_server_t *router_pick_trusteddirserver(int requireothers); int all_directory_servers_down(void); struct smartlist_t; void routerlist_add_friends(struct smartlist_t *sl, routerinfo_t *router); @@ -1440,6 +1452,7 @@ void routerlist_update_from_runningrouters(routerlist_t *list, int router_update_status_from_smartlist(routerinfo_t *r, time_t list_time, smartlist_t *running_list); +void add_trusted_dir_server(const char *addr, uint16_t port,const char *digest); /********************************* routerparse.c ************************/ |