2017-11-10 18:07:57 +01:00
|
|
|
/* Copyright (c) 2017, The Tor Project, Inc. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file hs_control.h
|
|
|
|
* \brief Header file containing control port event related code.
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_HS_CONTROL_H
|
|
|
|
#define TOR_HS_CONTROL_H
|
|
|
|
|
2017-11-10 20:01:33 +01:00
|
|
|
#include "hs_ident.h"
|
|
|
|
|
2017-11-10 18:07:57 +01:00
|
|
|
/* Event "HS_DESC REQUESTED [...]" */
|
|
|
|
void hs_control_desc_event_requested(const ed25519_public_key_t *onion_pk,
|
|
|
|
const char *base64_blinded_pk,
|
|
|
|
const routerstatus_t *hsdir_rs);
|
|
|
|
|
2017-11-10 20:01:33 +01:00
|
|
|
/* Event "HS_DESC FAILED [...]" */
|
|
|
|
void hs_control_desc_event_failed(const hs_ident_dir_conn_t *ident,
|
|
|
|
const char *hsdir_id_digest,
|
|
|
|
const char *reason);
|
|
|
|
|
2017-11-10 20:12:34 +01:00
|
|
|
/* Event "HS_DESC RECEIVED [...]" */
|
|
|
|
void hs_control_desc_event_received(const hs_ident_dir_conn_t *ident,
|
|
|
|
const char *hsdir_id_digest);
|
|
|
|
|
2017-11-10 20:34:41 +01:00
|
|
|
/* Event "HS_DESC CREATED [...]" */
|
|
|
|
void hs_control_desc_event_created(const char *onion_address,
|
|
|
|
const ed25519_public_key_t *blinded_pk);
|
|
|
|
|
2017-11-10 20:48:52 +01:00
|
|
|
/* Event "HS_DESC UPLOAD [...]" */
|
|
|
|
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);
|
|
|
|
|
2017-11-10 21:00:18 +01:00
|
|
|
/* Event "HS_DESC UPLOADED [...]" */
|
|
|
|
void hs_control_desc_event_uploaded(const hs_ident_dir_conn_t *ident,
|
|
|
|
const char *hsdir_id_digest);
|
|
|
|
|
2017-11-14 17:06:35 +01:00
|
|
|
/* Event "HS_DESC_CONTENT [...]" */
|
|
|
|
void hs_control_desc_event_content(const hs_ident_dir_conn_t *ident,
|
|
|
|
const char *hsdir_id_digest,
|
|
|
|
const char *body);
|
|
|
|
|
2017-11-15 20:34:53 +01:00
|
|
|
/* Command "HSPOST [...]" */
|
|
|
|
int hs_control_hspost_command(const char *body, const char *onion_address,
|
|
|
|
const smartlist_t *hsdirs_rs);
|
|
|
|
|
2017-11-10 18:07:57 +01:00
|
|
|
#endif /* !defined(TOR_HS_CONTROL_H) */
|
|
|
|
|