summaryrefslogtreecommitdiff
path: root/src/or/router.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-08-23 12:23:00 +0200
committerLinus Nordberg <linus@torproject.org>2012-08-23 22:13:12 +0200
commit3410a46ebc7870c1ded14ef34a8e96f0a48b3994 (patch)
tree71ce013845d4f55893da3508e904d2c256badb25 /src/or/router.h
parent5b0ed1e344f47a584d529221fb9d39e54715732c (diff)
downloadtor-3410a46ebc7870c1ded14ef34a8e96f0a48b3994.tar.gz
tor-3410a46ebc7870c1ded14ef34a8e96f0a48b3994.zip
Move ipv6_preferred from routerinfo_t to node_t.
Move extend_info_from_router() from circuitbuild.c to router.c and make it static. Add get_configured_bridge_by_orports_digest() and have get_configured_bridge_by_routerinfo() and node_is_a_configured_bridge() use it. We now consider all OR ports of a bridge when looking for it. Move node_get_*_orport to nodelist.c. Fix a cut'n'paste error in header of nodelist.h. Add node_assert_ok(). Add router_get_all_orports(). It's duplicating code from node_get_all_orports(). Worth fixing at the cost of complicating the API slightly?
Diffstat (limited to 'src/or/router.h')
-rw-r--r--src/or/router.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/or/router.h b/src/or/router.h
index 81df183953..c43c308496 100644
--- a/src/or/router.h
+++ b/src/or/router.h
@@ -86,17 +86,13 @@ int router_pick_published_address(const or_options_t *options, uint32_t *addr);
int router_rebuild_descriptor(int force);
int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
crypto_pk_t *ident_key);
-void router_get_prim_orport(const routerinfo_t *router,
- tor_addr_port_t *addr_port_out);
-void router_get_pref_orport(const routerinfo_t *router,
- tor_addr_port_t *addr_port_out);
-void router_get_pref_ipv6_orport(const routerinfo_t *router,
- tor_addr_port_t *addr_port_out);
-int router_ipv6_preferred(const routerinfo_t *router);
-int router_has_addr(const routerinfo_t *router, const tor_addr_t *addr);
-int router_has_orport(const routerinfo_t *router, const tor_addr_port_t *orport);
int extrainfo_dump_to_string(char **s, extrainfo_t *extrainfo,
crypto_pk_t *ident_key);
+void router_get_prim_orport(const routerinfo_t *router,
+ tor_addr_port_t *ap_out);
+int router_has_addr(const routerinfo_t *router, const tor_addr_t *addr);
+int router_has_orport(const routerinfo_t *router,
+ const tor_addr_port_t *orport);
int is_legal_nickname(const char *s);
int is_legal_nickname_or_hexdigest(const char *s);
int is_legal_hexdigest(const char *s);
@@ -134,6 +130,8 @@ void router_free_all(void);
const char *router_purpose_to_string(uint8_t p);
uint8_t router_purpose_from_string(const char *s);
+smartlist_t *router_get_all_orports(const routerinfo_t *ri);
+
#ifdef ROUTER_PRIVATE
/* Used only by router.c and test.c */
void get_platform_str(char *platform, size_t len);