aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-11-03 20:12:41 +0000
committerNick Mathewson <nickm@torproject.org>2007-11-03 20:12:41 +0000
commitbf2717ff3d02e1c8527d6e6c8f14349813ba0e72 (patch)
tree04adbaff4490763f3b91a27445a800287c48722b /src/or/or.h
parentc217be996d55560b6fbb2932ab498372306b2379 (diff)
downloadtor-bf2717ff3d02e1c8527d6e6c8f14349813ba0e72.tar
tor-bf2717ff3d02e1c8527d6e6c8f14349813ba0e72.tar.gz
r14678@tombo: nickm | 2007-11-03 16:12:31 -0400
Try to make hidden service directory lookup functions a bit more efficient: go for fewer O(n) operations, and look at the consensus rather than the routerinfo list. svn:r12361
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 04f94602b..f6c80ce96 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2912,10 +2912,8 @@ char *directory_dump_request_log(void);
int router_supports_extrainfo(const char *identity_digest, int is_authority);
void directory_post_to_hs_dir(smartlist_t *desc_ids, smartlist_t *descs,
- const char *service_id, int seconds_valid,
- smartlist_t *hs_dirs);
-void directory_get_from_hs_dir(const char *desc_id, const char *query,
- smartlist_t *hs_dirs);
+ const char *service_id, int seconds_valid);
+void directory_get_from_hs_dir(const char *desc_id, const char *query);
time_t download_status_increment_failure(download_status_t *dls,
int status_code, const char *item,
@@ -3191,6 +3189,8 @@ routerstatus_t *networkstatus_v2_find_entry(networkstatus_v2_t *ns,
const char *digest);
routerstatus_t *networkstatus_vote_find_entry(networkstatus_vote_t *ns,
const char *digest);
+int networkstatus_vote_find_entry_idx(networkstatus_vote_t *ns,
+ const char *digest, int *found_out);
const smartlist_t *networkstatus_get_v2_list(void);
download_status_t *router_get_dl_status_by_descriptor_digest(const char *d);
routerstatus_t *router_get_consensus_status_by_id(const char *digest);
@@ -3779,17 +3779,18 @@ void routerlist_assert_ok(routerlist_t *rl);
const char *esc_router_info(routerinfo_t *router);
void routers_sort_by_identity(smartlist_t *routers);
-smartlist_t *hid_serv_create_routing_table(void);
+smartlist_t *hid_serv_create_routing_table_st(void);
int hid_serv_have_enough_directories(const smartlist_t *hs_dirs);
int hid_serv_get_responsible_directories(smartlist_t *responsible_dirs,
- const char *id,
- const smartlist_t *hs_dirs);
+ const char *id);
+#if 0
routerinfo_t *hid_serv_next_directory(const char *id,
const smartlist_t *hs_dirs);
routerinfo_t *hid_serv_previous_directory(const char *id,
const smartlist_t *hs_dirs);
-int hid_serv_acting_as_directory(const smartlist_t *hs_dirs);
-int hid_serv_responsible_for_desc_id(const char *id, smartlist_t *hs_dirs);
+#endif
+int hid_serv_acting_as_directory(void);
+int hid_serv_responsible_for_desc_id(const char *id);
/********************************* routerparse.c ************************/