summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-04 18:35:03 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-04 18:35:03 +0000
commitd46b8a3eac7983795756297cca2d69a5aa5e3ad3 (patch)
treeba91853b7e28c2bcd70d014373f98a3126923f93 /src/or/or.h
parent4a03959b10b9db3d47485e7ffb1848e1553cd601 (diff)
downloadtor-d46b8a3eac7983795756297cca2d69a5aa5e3ad3.tar.gz
tor-d46b8a3eac7983795756297cca2d69a5aa5e3ad3.zip
Stop being so aggressive about fetching dir info if your DirPort is
on but your ORPort is off. Add a new config option BridgeRelay that specifies you want to be a bridge relay. Right now the only difference is that it makes you answer begin_dir requests, and it makes you cache dir info, even if your DirPort isn't on. Refactor directory_caches_dir_info() into some more functions. svn:r12668
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index d992d7cdc6..ddafcd3d20 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2084,6 +2084,10 @@ typedef struct {
int UseBridges; /**< Boolean: should we start all circuits with a bridge? */
config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
+ int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make
+ * this explicit so we can change how we behave in the
+ * future. */
+
/** Boolean: if we know the bridge's digest, should we get new
* descriptors from the bridge authorities or from the bridge itself? */
int UpdateBridgesFromAuthority;
@@ -3025,10 +3029,13 @@ int list_server_status(smartlist_t *routers, char **router_status_out,
int dirserv_dump_directory_to_string(char **dir_out,
crypto_pk_env_t *private_key);
-int directory_caches_dir_info(or_options_t *options);
int directory_fetches_from_authorities(or_options_t *options);
+int directory_fetches_dir_info_like_mirror(or_options_t *options);
+int directory_fetches_dir_info_like_bridge_user(or_options_t *options);
+int directory_caches_dir_info(or_options_t *options);
int directory_permits_begindir_requests(or_options_t *options);
int directory_permits_controller_requests(or_options_t *options);
+int directory_too_idle_to_fetch_descriptors(or_options_t *options, time_t now);
void directory_set_dirty(void);
cached_dir_t *dirserv_get_directory(void);