cached_dir_st.h 980 B

12345678910111213141516171819202122232425
  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-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef CACHED_DIR_ST_H
  7. #define CACHED_DIR_ST_H
  8. /** A cached_dir_t represents a cacheable directory object, along with its
  9. * compressed form. */
  10. struct cached_dir_t {
  11. char *dir; /**< Contents of this object, NUL-terminated. */
  12. char *dir_compressed; /**< Compressed contents of this object. */
  13. size_t dir_len; /**< Length of <b>dir</b> (not counting its NUL). */
  14. size_t dir_compressed_len; /**< Length of <b>dir_compressed</b>. */
  15. time_t published; /**< When was this object published. */
  16. common_digests_t digests; /**< Digests of this object (networkstatus only) */
  17. /** Sha3 digest (also ns only) */
  18. uint8_t digest_sha3_as_signed[DIGEST256_LEN];
  19. int refcnt; /**< Reference count for this cached_dir_t. */
  20. };
  21. #endif