diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-05 10:58:19 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-19 13:19:08 -0500 |
commit | a34885bc8035eb29524749582c16ce4ec8fbc715 (patch) | |
tree | e9754d86f0165eaabf9dfd50a80d439f759434ce /src/feature/hs/hs_common.h | |
parent | 2444629c86e3368ebd6c9ee1b54aa5a5959fa398 (diff) | |
download | tor-a34885bc8035eb29524749582c16ce4ec8fbc715.tar.gz tor-a34885bc8035eb29524749582c16ce4ec8fbc715.zip |
hs: Rename service config port object
Remove it from rendservice.c and move everything related to hs_common.{c|h}.
Related to #40266
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_common.h')
-rw-r--r-- | src/feature/hs/hs_common.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/feature/hs/hs_common.h b/src/feature/hs/hs_common.h index 4a9c7a9918..894b0e4844 100644 --- a/src/feature/hs/hs_common.h +++ b/src/feature/hs/hs_common.h @@ -150,7 +150,7 @@ typedef enum { /** 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 { +typedef struct hs_port_config_t { /** The incoming HS virtual port we're mapping */ uint16_t virtual_port; /** Is this an AF_UNIX port? */ @@ -161,7 +161,7 @@ typedef struct rend_service_port_config_t { 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; +} hs_port_config_t; void hs_init(void); void hs_free_all(void); @@ -260,6 +260,11 @@ void hs_purge_hid_serv_from_last_hid_serv_requests(const char *desc_id); void hs_purge_last_hid_serv_requests(void); int hs_set_conn_addr_port(const smartlist_t *ports, edge_connection_t *conn); +hs_port_config_t *hs_parse_port_config(const char *string, const char *sep, + char **err_msg_out); +void hs_port_config_free_(hs_port_config_t *p); +#define hs_port_config_free(p) \ + FREE_AND_NULL(hs_port_config_t, hs_port_config_free_, (p)) void hs_inc_rdv_stream_counter(origin_circuit_t *circ); void hs_dec_rdv_stream_counter(origin_circuit_t *circ); |