summaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-25 15:39:24 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-25 15:39:24 -0400
commit70539e3d5e357521616a083a69712605b7b98c23 (patch)
tree86de66335cd30e0e29111c65286eccd74a7cac76 /src/feature/relay
parent9385b7ec5f6effce97ae26aa6cda08df5b90309b (diff)
downloadtor-70539e3d5e357521616a083a69712605b7b98c23.tar.gz
tor-70539e3d5e357521616a083a69712605b7b98c23.zip
Move all authdir_mode_*() functions into authmode.h
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/router.c51
-rw-r--r--src/feature/relay/router.h6
2 files changed, 0 insertions, 57 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 3e19c7b619..cc5c424fec 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -1348,57 +1348,6 @@ net_is_completely_disabled(void)
return get_options()->DisableNetwork || we_are_fully_hibernating();
}
-/** Return true iff we believe ourselves to be an authoritative
- * directory server.
- */
-int
-authdir_mode(const or_options_t *options)
-{
- return options->AuthoritativeDir != 0;
-}
-/** Return true iff we are an authoritative directory server that is
- * authoritative about receiving and serving descriptors of type
- * <b>purpose</b> on its dirport.
- */
-int
-authdir_mode_handles_descs(const or_options_t *options, int purpose)
-{
- if (BUG(purpose < 0)) /* Deprecated. */
- return authdir_mode(options);
- else if (purpose == ROUTER_PURPOSE_GENERAL)
- return authdir_mode_v3(options);
- else if (purpose == ROUTER_PURPOSE_BRIDGE)
- return authdir_mode_bridge(options);
- else
- return 0;
-}
-/** Return true iff we are an authoritative directory server that
- * publishes its own network statuses.
- */
-int
-authdir_mode_publishes_statuses(const or_options_t *options)
-{
- if (authdir_mode_bridge(options))
- return 0;
- return authdir_mode(options);
-}
-/** Return true iff we are an authoritative directory server that
- * tests reachability of the descriptors it learns about.
- */
-int
-authdir_mode_tests_reachability(const or_options_t *options)
-{
- return authdir_mode(options);
-}
-/** Return true iff we believe ourselves to be a bridge authoritative
- * directory server.
- */
-int
-authdir_mode_bridge(const or_options_t *options)
-{
- return authdir_mode(options) && options->BridgeAuthoritativeDir != 0;
-}
-
/** Return true iff we are trying to be a server.
*/
MOCK_IMPL(int,
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index 52c4ac0bd6..7b33069aac 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -61,12 +61,6 @@ int dir_server_mode(const or_options_t *options);
int net_is_disabled(void);
int net_is_completely_disabled(void);
-int authdir_mode(const or_options_t *options);
-int authdir_mode_handles_descs(const or_options_t *options, int purpose);
-int authdir_mode_publishes_statuses(const or_options_t *options);
-int authdir_mode_tests_reachability(const or_options_t *options);
-int authdir_mode_bridge(const or_options_t *options);
-
uint16_t router_get_active_listener_port_by_type_af(int listener_type,
sa_family_t family);
uint16_t router_get_advertised_or_port(const or_options_t *options);