aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_common.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-03-08 17:31:36 -0500
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:33 -0400
commitacc7c4ee9578e37a66dff6a09c86bee5777f782d (patch)
tree4be443a03e0419aba50c71334870864b03556bdd /src/or/hs_common.h
parent5e710368b3e9a19862422d4bd43f2c1d8d0ceba8 (diff)
downloadtor-acc7c4ee9578e37a66dff6a09c86bee5777f782d.tar.gz
tor-acc7c4ee9578e37a66dff6a09c86bee5777f782d.zip
prop224: Establish rendezvous circuit for service
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r--src/or/hs_common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h
index 6abcd98319..f9e3f297a9 100644
--- a/src/or/hs_common.h
+++ b/src/or/hs_common.h
@@ -107,6 +107,21 @@ typedef enum {
HS_AUTH_KEY_TYPE_ED25519 = 2,
} hs_auth_key_type_t;
+/* Represents the mapping from a virtual port of a rendezvous service to a
+ * real port on some IP. */
+typedef struct rend_service_port_config_t {
+ /* The incoming HS virtual port we're mapping */
+ uint16_t virtual_port;
+ /* Is this an AF_UNIX port? */
+ unsigned int is_unix_addr:1;
+ /* The outgoing TCP port to use, if !is_unix_addr */
+ uint16_t real_port;
+ /* The outgoing IPv4 or IPv6 address to use, if !is_unix_addr */
+ tor_addr_t real_addr;
+ /* The socket path to connect to, if is_unix_addr */
+ char unix_addr[FLEXIBLE_ARRAY_MEMBER];
+} rend_service_port_config_t;
+
void hs_init(void);
void hs_free_all(void);
@@ -128,6 +143,7 @@ void hs_build_blinded_keypair(const ed25519_keypair_t *kp,
const uint8_t *secret, size_t secret_len,
uint64_t time_period_num,
ed25519_keypair_t *kp_out);
+int hs_service_requires_uptime_circ(const smartlist_t *ports);
void rend_data_free(rend_data_t *data);
rend_data_t *rend_data_dup(const rend_data_t *data);