diff options
author | Caio Valente <valentecaio95@gmail.com> | 2018-03-06 20:42:32 +0100 |
---|---|---|
committer | Caio Valente <valentecaio95@gmail.com> | 2018-03-06 20:42:32 +0100 |
commit | 8775c93a996fd864b1747c04eebe51534425ff51 (patch) | |
tree | 3e6c8b02de242582b8be67d537f47bc167fc83b5 /src/or/router.h | |
parent | 699bb803baba942c6bcd50542183b283fa191163 (diff) | |
download | tor-8775c93a996fd864b1747c04eebe51534425ff51.tar.gz tor-8775c93a996fd864b1747c04eebe51534425ff51.zip |
Refactor: suppress duplicated functions from router.c and encapsulate NODE_DESC_BUF_LEN constant.
Also encapsulates format_node_description().
Closes ticket 25432.
Diffstat (limited to 'src/or/router.h')
-rw-r--r-- | src/or/router.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/or/router.h b/src/or/router.h index 7f50308956..e5efe577e3 100644 --- a/src/or/router.h +++ b/src/or/router.h @@ -123,24 +123,6 @@ 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); |