aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-03-31 13:48:20 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2012-03-31 13:48:20 +0200
commitda6e0993dc4a0037933a522e2f578c145f6538cc (patch)
tree77b0f6caf8269fd90d24860349276423651ea4b5 /src/common/address.h
parent458718d4975661831fa21d9f2653932e17c1bae0 (diff)
downloadtor-da6e0993dc4a0037933a522e2f578c145f6538cc.tar.gz
tor-da6e0993dc4a0037933a522e2f578c145f6538cc.zip
Generalize fmt_addr() to support IPv6 decorations.
Diffstat (limited to 'src/common/address.h')
-rw-r--r--src/common/address.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/address.h b/src/common/address.h
index ede035d642..bdb14eb390 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -135,7 +135,9 @@ tor_addr_eq_ipv4h(const tor_addr_t *a, uint32_t u)
int tor_addr_lookup(const char *name, uint16_t family, tor_addr_t *addr_out);
char *tor_dup_addr(const tor_addr_t *addr) ATTR_MALLOC;
-const char *fmt_addr(const tor_addr_t *addr);
+#define fmt_addr(a) fmt_addr_impl(a, 0)
+#define fmt_and_decorate_addr(a) fmt_addr_impl(a, 1)
+const char *fmt_addr_impl(const tor_addr_t *addr, int decorate);
const char * fmt_addr32(uint32_t addr);
int get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr);