diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-04 13:26:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-04 13:26:37 -0400 |
commit | c35c43d7d9df793c890deb14800e24327fbca452 (patch) | |
tree | 3f6f3623c301b1900fbf58bb84ec86657baebce0 /src/or/hs_common.h | |
parent | bd6aa4f3d19a571adeaa956728f7e842d847c4ee (diff) | |
parent | c189cb5cc29e92e55f8e94b5531d2626eff71d63 (diff) | |
download | tor-c35c43d7d9df793c890deb14800e24327fbca452.tar.gz tor-c35c43d7d9df793c890deb14800e24327fbca452.zip |
Merge branch 'ticket17238_029_02-resquash'
Conflicts:
src/or/rendclient.c
src/or/rendcommon.c
src/or/routerparse.c
src/test/test_dir.c
src/trunnel/ed25519_cert.h
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r-- | src/or/hs_common.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h new file mode 100644 index 0000000000..2502f35ad4 --- /dev/null +++ b/src/or/hs_common.h @@ -0,0 +1,39 @@ +/* Copyright (c) 2016, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file hs_common.h + * \brief Header file containing common data for the whole HS subsytem. + **/ + +#ifndef TOR_HS_COMMON_H +#define TOR_HS_COMMON_H + +#include "or.h" + +/* Protocol version 2. Use this instead of hardcoding "2" in the code base, + * this adds a clearer semantic to the value when used. */ +#define HS_VERSION_TWO 2 +/* Version 3 of the protocol (prop224). */ +#define HS_VERSION_THREE 3 + +void rend_data_free(rend_data_t *data); +rend_data_t *rend_data_dup(const rend_data_t *data); +rend_data_t *rend_data_client_create(const char *onion_address, + const char *desc_id, + const char *cookie, + rend_auth_type_t auth_type); +rend_data_t *rend_data_service_create(const char *onion_address, + const char *pk_digest, + const uint8_t *cookie, + rend_auth_type_t auth_type); +const char *rend_data_get_address(const rend_data_t *rend_data); +const char *rend_data_get_desc_id(const rend_data_t *rend_data, + uint8_t replica, size_t *len_out); +const uint8_t *rend_data_get_pk_digest(const rend_data_t *rend_data, + size_t *len_out); + +int hs_v3_protocol_is_enabled(void); + +#endif /* TOR_HS_COMMON_H */ + |