diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-30 15:41:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-30 15:41:46 -0400 |
commit | fa1d47293b62fd378a7e43cf3ce3e7bb3be884e3 (patch) | |
tree | b80ab67323274c8ae1e2f8097278e923c5d5d243 /src/or/router.h | |
parent | 21de9d46e264ceb14f3fe59d17210d82f2499637 (diff) | |
parent | 7f0fb8e6083128ff20b30d8cd29c220e9427d95e (diff) | |
download | tor-fa1d47293b62fd378a7e43cf3ce3e7bb3be884e3.tar.gz tor-fa1d47293b62fd378a7e43cf3ce3e7bb3be884e3.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
The conflicts were mainly caused by the routerinfo->node transition.
Conflicts:
src/or/circuitbuild.c
src/or/command.c
src/or/connection_edge.c
src/or/directory.c
src/or/dirserv.c
src/or/relay.c
src/or/rendservice.c
src/or/routerlist.c
Diffstat (limited to 'src/or/router.h')
-rw-r--r-- | src/or/router.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/or/router.h b/src/or/router.h index 2e5d44f356..e208eb1228 100644 --- a/src/or/router.h +++ b/src/or/router.h @@ -85,6 +85,30 @@ 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 *node_get_description(char *buf, const node_t *node); +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 *node_describe(const node_t *node); +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); |