rend_service_descriptor_st.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef REND_SERVICE_DESCRIPTOR_ST_H
  7. #define REND_SERVICE_DESCRIPTOR_ST_H
  8. #define REND_PROTOCOL_VERSION_BITMASK_WIDTH 16
  9. /** Information used to connect to a hidden service. Used on both the
  10. * service side and the client side. */
  11. struct rend_service_descriptor_t {
  12. crypto_pk_t *pk; /**< This service's public key. */
  13. int version; /**< Version of the descriptor format: 0 or 2. */
  14. time_t timestamp; /**< Time when the descriptor was generated. */
  15. /** Bitmask: which introduce/rendezvous protocols are supported?
  16. * (We allow bits '0', '1', '2' and '3' to be set.) */
  17. unsigned protocols : REND_PROTOCOL_VERSION_BITMASK_WIDTH;
  18. /** List of the service's introduction points. Elements are removed if
  19. * introduction attempts fail. */
  20. smartlist_t *intro_nodes;
  21. /** Has descriptor been uploaded to all hidden service directories? */
  22. int all_uploads_performed;
  23. /** List of hidden service directories to which an upload request for
  24. * this descriptor could be sent. Smartlist exists only when at least one
  25. * of the previous upload requests failed (otherwise it's not important
  26. * to know which uploads succeeded and which not). */
  27. smartlist_t *successful_uploads;
  28. };
  29. #endif