Tor
0.4.7.0-alpha-dev
|
Header file containing control port event related code. More...
#include "feature/hs/hs_ident.h"
Go to the source code of this file.
Functions | |
void | hs_control_desc_event_requested (const ed25519_public_key_t *onion_pk, const char *base64_blinded_pk, const routerstatus_t *hsdir_rs) |
void | hs_control_desc_event_failed (const hs_ident_dir_conn_t *ident, const char *hsdir_id_digest, const char *reason) |
void | hs_control_desc_event_received (const hs_ident_dir_conn_t *ident, const char *hsdir_id_digest) |
void | hs_control_desc_event_created (const char *onion_address, const ed25519_public_key_t *blinded_pk) |
void | hs_control_desc_event_upload (const char *onion_address, const char *hsdir_id_digest, const ed25519_public_key_t *blinded_pk, const uint8_t *hsdir_index) |
void | hs_control_desc_event_uploaded (const hs_ident_dir_conn_t *ident, const char *hsdir_id_digest) |
void | hs_control_desc_event_content (const hs_ident_dir_conn_t *ident, const char *hsdir_id_digest, const char *body) |
int | hs_control_hspost_command (const char *body, const char *onion_address, const smartlist_t *hsdirs_rs) |
void | hs_control_hsfetch_command (const ed25519_public_key_t *onion_identity_pk, const smartlist_t *hsdirs) |
Header file containing control port event related code.
Definition in file hs_control.h.
void hs_control_desc_event_content | ( | const hs_ident_dir_conn_t * | ident, |
const char * | hsdir_id_digest, | ||
const char * | body | ||
) |
Send on the control port the "HS_DESC_CONTENT [...]" event.
Using the directory connection identifier, the HSDir identity digest and the body of the descriptor (as it was received from the directory). None can be NULL.
Definition at line 178 of file hs_control.c.
void hs_control_desc_event_created | ( | const char * | onion_address, |
const ed25519_public_key_t * | blinded_pk | ||
) |
Send on the control port the "HS_DESC CREATED [...]" event.
Using the onion address of the descriptor's service and the blinded public key of the descriptor as a descriptor ID. None can be NULL.
Definition at line 111 of file hs_control.c.
void hs_control_desc_event_failed | ( | const hs_ident_dir_conn_t * | ident, |
const char * | hsdir_id_digest, | ||
const char * | reason | ||
) |
Send on the control port the "HS_DESC FAILED [...]" event.
Using a directory connection identifier, the HSDir identity digest and a reason for the failure. None can be NULL.
Definition at line 65 of file hs_control.c.
void hs_control_desc_event_received | ( | const hs_ident_dir_conn_t * | ident, |
const char * | hsdir_id_digest | ||
) |
Send on the control port the "HS_DESC RECEIVED [...]" event.
Using a directory connection identifier and the HSDir identity digest. None can be NULL.
Definition at line 89 of file hs_control.c.
void hs_control_desc_event_requested | ( | const ed25519_public_key_t * | onion_pk, |
const char * | base64_blinded_pk, | ||
const routerstatus_t * | hsdir_rs | ||
) |
Send on the control port the "HS_DESC REQUESTED [...]" event.
The onion_pk is the onion service public key, base64_blinded_pk is the base64 encoded blinded key for the service and hsdir_rs is the routerstatus object of the HSDir that this request is for.
Definition at line 29 of file hs_control.c.
void hs_control_desc_event_upload | ( | const char * | onion_address, |
const char * | hsdir_id_digest, | ||
const ed25519_public_key_t * | blinded_pk, | ||
const uint8_t * | hsdir_index | ||
) |
Send on the control port the "HS_DESC UPLOAD [...]" event.
Using the onion address of the descriptor's service, the HSDir identity digest, the blinded public key of the descriptor as a descriptor ID and the HSDir index for this particular request. None can be NULL.
Definition at line 133 of file hs_control.c.
void hs_control_desc_event_uploaded | ( | const hs_ident_dir_conn_t * | ident, |
const char * | hsdir_id_digest | ||
) |
Send on the control port the "HS_DESC UPLOADED [...]" event.
Using the directory connection identifier and the HSDir identity digest. None can be NULL.
Definition at line 159 of file hs_control.c.
void hs_control_hsfetch_command | ( | const ed25519_public_key_t * | onion_identity_pk, |
const smartlist_t * | hsdirs | ||
) |
With a given onion_identity_pk, fetch its descriptor, optionally using the list of directory servers given in hsdirs, or a random server if it is NULL. This function calls hs_client_launch_v3_desc_fetch().
Definition at line 256 of file hs_control.c.
int hs_control_hspost_command | ( | const char * | body, |
const char * | onion_address, | ||
const smartlist_t * | hsdirs_rs | ||
) |
Handle the "HSPOST [...]" command. The body is an encoded descriptor for the given onion_address. The descriptor will be uploaded to each directory in hsdirs_rs. If NULL, the responsible directories for the current time period will be selected.
Return -1 on if the descriptor plaintext section is not decodable. Else, 0 on success.
Definition at line 204 of file hs_control.c.
Referenced by handle_control_hspost().