aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-06-25 00:29:31 +0000
committerNick Mathewson <nickm@torproject.org>2004-06-25 00:29:31 +0000
commit76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7 (patch)
tree8b833310f12954d9ebf61d267c61f87c7481afbf /src/or/or.h
parente9b882554e44641011e3ee5be26e7cc200f3dd71 (diff)
downloadtor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.tar
tor-76f769deb9dab9e68cb2dd49c6a5a852f2ca2cd7.tar.gz
Remaining 008pre1 items done; deferred where more design is needed.
More docs and (way more!) testing needed. Done: - Authdirservers down directories from others. - Generate and use running-routers lists - Cache directories; store across reboots. - Refactor directory parsing a bit; note potential trouble spots. svn:r1985
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index e6a014dc5..496109a31 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -595,10 +595,17 @@ typedef struct {
* published?
*/
time_t published_on;
+ time_t running_routers_updated_on;
/** Which router is claimed to have signed it? */
char *signing_router;
} routerlist_t;
+/* DOCDOC */
+typedef struct running_routers_t {
+ time_t published_on;
+ smartlist_t *running_routers;
+} running_routers_t;
+
/** Holds accounting information for a single step in the layered encryption
* performed by a circuit. Used only at the client edge of a circuit. */
struct crypt_path_t {
@@ -1130,7 +1137,7 @@ int dirserv_parse_fingerprint_file(const char *fname);
int dirserv_router_fingerprint_is_known(const routerinfo_t *router);
void dirserv_free_fingerprint_list();
int dirserv_add_descriptor(const char **desc);
-int dirserv_init_from_directory_string(const char *dir);
+int dirserv_load_from_directory_string(const char *dir);
void dirserv_free_descriptors();
void dirserv_remove_old_servers(void);
int dirserv_dump_directory_to_string(char *s, unsigned int maxlen,
@@ -1352,11 +1359,15 @@ int router_compare_addr_to_exit_policy(uint32_t addr, uint16_t port,
#define ADDR_POLICY_UNKNOWN 1
int router_exit_policy_all_routers_reject(uint32_t addr, uint16_t port);
int router_exit_policy_rejects_all(routerinfo_t *router);
+void running_routers_free(running_routers_t *rr);
+void routerlist_update_from_runningrouters(routerlist_t *list,
+ running_routers_t *rr);
/********************************* routerparse.c ************************/
int router_get_router_hash(const char *s, char *digest);
int router_get_dir_hash(const char *s, char *digest);
+int router_get_runningrouters_hash(const char *s, char *digest);
int router_parse_list_from_string(const char **s,
routerlist_t **dest,
int n_good_nicknames,
@@ -1364,6 +1375,7 @@ int router_parse_list_from_string(const char **s,
int router_parse_routerlist_from_directory(const char *s,
routerlist_t **dest,
crypto_pk_env_t *pkey);
+running_routers_t *router_parse_runningrouters(const char *str);
routerinfo_t *router_parse_entry_from_string(const char *s, const char *end);
int router_add_exit_policy_from_string(routerinfo_t *router, const char *s);
struct exit_policy_t *router_parse_exit_policy_from_string(const char *s);