summaryrefslogtreecommitdiff
path: root/src/common/address.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-16 11:20:59 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-16 11:20:59 -0500
commit2cee38f76a46860e2fb29fbd95ba36b332aa38c6 (patch)
tree3b2cbaeff1472c8d23c18f3e88bc4735bbb22bcc /src/common/address.c
parentb310929ee36f0a88389dca53124506115c850c3b (diff)
parent20292ec4974b777d430e7962cc38349c5f82b220 (diff)
downloadtor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.tar.gz
tor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.zip
Merge branch 'prop271_030_v1_squashed'
Diffstat (limited to 'src/common/address.c')
-rw-r--r--src/common/address.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c
index fa6630ef92..c89e8797c6 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -2122,3 +2122,11 @@ tor_addr_port_new(const tor_addr_t *addr, uint16_t port)
return ap;
}
+/** Return true iff <a>a</b> and <b>b</b> are the same address and port */
+int
+tor_addr_port_eq(const tor_addr_port_t *a,
+ const tor_addr_port_t *b)
+{
+ return tor_addr_eq(&a->addr, &b->addr) && a->port == b->port;
+}
+