aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-30 15:18:59 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-30 15:18:59 -0400
commit7e67a240381c76b8d18dab862256b73c72d2711f (patch)
treeed5442c3da86cc761d7d624c3c2873f70d6467e6 /src/or/router.h
parentda7c60dcf310fb9914bfd1b84a34b440ab04900a (diff)
parent3c0d944b076aa552216ca598a6cdc50e77ad1a58 (diff)
downloadtor-7e67a240381c76b8d18dab862256b73c72d2711f.tar.gz
tor-7e67a240381c76b8d18dab862256b73c72d2711f.zip
Merge branch 'bug3045' into maint-0.2.2
Conflicts: src/or/circuitbuild.c
Diffstat (limited to 'src/or/router.h')
-rw-r--r--src/or/router.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/or/router.h b/src/or/router.h
index 95c0a34e2e..a27c1d92c5 100644
--- a/src/or/router.h
+++ b/src/or/router.h
@@ -85,6 +85,28 @@ int extrainfo_dump_to_string(char **s, extrainfo_t *extrainfo,
int is_legal_nickname(const char *s);
int is_legal_nickname_or_hexdigest(const char *s);
int is_legal_hexdigest(const char *s);
+
+/**
+ * Longest allowed output of format_node_description, plus 1 character for
+ * NUL. This allows space for:
+ * "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at"
+ * " [ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]"
+ * plus a terminating NUL.
+ */
+#define NODE_DESC_BUF_LEN (MAX_VERBOSE_NICKNAME_LEN+4+TOR_ADDR_BUF_LEN)
+const char *format_node_description(char *buf,
+ const char *id_digest,
+ int is_named,
+ const char *nickname,
+ const tor_addr_t *addr,
+ uint32_t addr32h);
+const char *router_get_description(char *buf, const routerinfo_t *ri);
+const char *routerstatus_get_description(char *buf, const routerstatus_t *rs);
+const char *extend_info_get_description(char *buf, const extend_info_t *ei);
+const char *router_describe(const routerinfo_t *ri);
+const char *routerstatus_describe(const routerstatus_t *ri);
+const char *extend_info_describe(const extend_info_t *ei);
+
void router_get_verbose_nickname(char *buf, const routerinfo_t *router);
void routerstatus_get_verbose_nickname(char *buf,
const routerstatus_t *router);