2018-06-15 15:41:27 -04:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2020-01-08 18:39:17 -05:00
|
|
|
* Copyright (c) 2007-2020, The Tor Project, Inc. */
|
2018-06-15 15:41:27 -04:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
2019-10-26 12:05:28 -04:00
|
|
|
/**
|
|
|
|
* @file hsdir_index_st.h
|
|
|
|
* @brief HS directory index structure
|
|
|
|
**/
|
|
|
|
|
2018-06-15 15:41:27 -04:00
|
|
|
#ifndef HSDIR_INDEX_ST_H
|
|
|
|
#define HSDIR_INDEX_ST_H
|
|
|
|
|
2019-11-07 08:13:31 -05:00
|
|
|
/** Hidden service directory index used in a node_t which is set once we set
|
2018-06-15 15:41:27 -04:00
|
|
|
* the consensus. */
|
|
|
|
struct hsdir_index_t {
|
2019-11-07 08:13:31 -05:00
|
|
|
/** HSDir index to use when fetching a descriptor. */
|
2018-06-15 15:41:27 -04:00
|
|
|
uint8_t fetch[DIGEST256_LEN];
|
|
|
|
|
2019-11-07 08:13:31 -05:00
|
|
|
/** HSDir index used by services to store their first and second
|
2018-06-15 15:41:27 -04:00
|
|
|
* descriptor. The first descriptor is chronologically older than the second
|
|
|
|
* one and uses older TP and SRV values. */
|
|
|
|
uint8_t store_first[DIGEST256_LEN];
|
2019-11-07 08:13:31 -05:00
|
|
|
/** Newer index, for second descriptor. */
|
2018-06-15 15:41:27 -04:00
|
|
|
uint8_t store_second[DIGEST256_LEN];
|
|
|
|
};
|
|
|
|
|
2019-06-05 09:33:35 -04:00
|
|
|
#endif /* !defined(HSDIR_INDEX_ST_H) */
|