Tor  0.4.5.0-alpha-dev
cached_dir_st.h
Go to the documentation of this file.
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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file cached_dir_st.h
9  * @brief Cached large directory object structure.
10  **/
11 
12 #ifndef CACHED_DIR_ST_H
13 #define CACHED_DIR_ST_H
14 
15 /** A cached_dir_t represents a cacheable directory object, along with its
16  * compressed form. */
17 struct cached_dir_t {
18  char *dir; /**< Contents of this object, NUL-terminated. */
19  char *dir_compressed; /**< Compressed contents of this object. */
20  size_t dir_len; /**< Length of <b>dir</b> (not counting its NUL). */
21  size_t dir_compressed_len; /**< Length of <b>dir_compressed</b>. */
22  time_t published; /**< When was this object published. */
23  common_digests_t digests; /**< Digests of this object (networkstatus only) */
24  /** Sha3 digest (also ns only) */
26  int refcnt; /**< Reference count for this cached_dir_t. */
27 };
28 
29 #endif /* !defined(CACHED_DIR_ST_H) */
cached_dir_t::digests
common_digests_t digests
Definition: cached_dir_st.h:23
common_digests_t
Definition: crypto_digest.h:87
cached_dir_t::dir_compressed
char * dir_compressed
Definition: cached_dir_st.h:19
DIGEST256_LEN
#define DIGEST256_LEN
Definition: digest_sizes.h:23
cached_dir_t
Definition: cached_dir_st.h:17
cached_dir_t::dir_compressed_len
size_t dir_compressed_len
Definition: cached_dir_st.h:21
cached_dir_t::dir_len
size_t dir_len
Definition: cached_dir_st.h:20
cached_dir_t::refcnt
int refcnt
Definition: cached_dir_st.h:26
cached_dir_t::digest_sha3_as_signed
uint8_t digest_sha3_as_signed[DIGEST256_LEN]
Definition: cached_dir_st.h:25
cached_dir_t::dir
char * dir
Definition: cached_dir_st.h:18
cached_dir_t::published
time_t published
Definition: cached_dir_st.h:22