aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_connection.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-05-02 16:35:22 +0300
committerNick Mathewson <nickm@torproject.org>2017-07-07 11:12:26 -0400
commitdc3a2037f54bcef14b7021b847edd91d36bf4514 (patch)
treef2c13af32ad0d5f85aa2fb1c7927129033821427 /src/test/test_connection.h
parent43a73f6eb648632552a20dd17f5736550df75e10 (diff)
downloadtor-dc3a2037f54bcef14b7021b847edd91d36bf4514.tar.gz
tor-dc3a2037f54bcef14b7021b847edd91d36bf4514.zip
test: Move some test code to test helpers.
Move code to create connection streams and rend_data structures to test_helpers so that we can use them from the e2e rendezvous circuit unittests.
Diffstat (limited to 'src/test/test_connection.h')
-rw-r--r--src/test/test_connection.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/test_connection.h b/src/test/test_connection.h
new file mode 100644
index 0000000000..392783b53b
--- /dev/null
+++ b/src/test/test_connection.h
@@ -0,0 +1,13 @@
+/* Copyright (c) 2014-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/** Some constants used by test_connection and helpers */
+#define TEST_CONN_FAMILY (AF_INET)
+#define TEST_CONN_ADDRESS "127.0.0.1"
+#define TEST_CONN_PORT (12345)
+#define TEST_CONN_ADDRESS_PORT "127.0.0.1:12345"
+#define TEST_CONN_FD_INIT 50
+
+void test_conn_lookup_addr_helper(const char *address,
+ int family, tor_addr_t *addr);
+