hs_control.h (2176B)
1 /* Copyright (c) 2017-2021, The Tor Project, Inc. */ 2 /* See LICENSE for licensing information */ 3 4 /** 5 * \file hs_control.h 6 * \brief Header file containing control port event related code. 7 **/ 8 9 #ifndef TOR_HS_CONTROL_H 10 #define TOR_HS_CONTROL_H 11 12 #include "feature/hs/hs_ident.h" 13 14 /* Event "HS_DESC REQUESTED [...]" */ 15 void hs_control_desc_event_requested(const ed25519_public_key_t *onion_pk, 16 const char *base64_blinded_pk, 17 const routerstatus_t *hsdir_rs); 18 19 /* Event "HS_DESC FAILED [...]" */ 20 void hs_control_desc_event_failed(const hs_ident_dir_conn_t *ident, 21 const char *hsdir_id_digest, 22 const char *reason); 23 24 /* Event "HS_DESC RECEIVED [...]" */ 25 void hs_control_desc_event_received(const hs_ident_dir_conn_t *ident, 26 const char *hsdir_id_digest); 27 28 /* Event "HS_DESC CREATED [...]" */ 29 void hs_control_desc_event_created(const char *onion_address, 30 const ed25519_public_key_t *blinded_pk); 31 32 /* Event "HS_DESC UPLOAD [...]" */ 33 void hs_control_desc_event_upload(const char *onion_address, 34 const char *hsdir_id_digest, 35 const ed25519_public_key_t *blinded_pk, 36 const uint8_t *hsdir_index); 37 38 /* Event "HS_DESC UPLOADED [...]" */ 39 void hs_control_desc_event_uploaded(const hs_ident_dir_conn_t *ident, 40 const char *hsdir_id_digest); 41 42 /* Event "HS_DESC_CONTENT [...]" */ 43 void hs_control_desc_event_content(const hs_ident_dir_conn_t *ident, 44 const char *hsdir_id_digest, 45 const char *body); 46 47 /* Command "HSPOST [...]" */ 48 int hs_control_hspost_command(const char *body, const char *onion_address, 49 const smartlist_t *hsdirs_rs); 50 51 /* Command "HSFETCH [...]" */ 52 void hs_control_hsfetch_command(const ed25519_public_key_t *onion_identity_pk, 53 const smartlist_t *hsdirs); 54 55 #endif /* !defined(TOR_HS_CONTROL_H) */