mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Move hsdir_index_t into its own header.
This commit is contained in:
parent
3191ba389d
commit
7dbe504f3e
24
src/or/hsdir_index_st.h
Normal file
24
src/or/hsdir_index_st.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* Copyright (c) 2001 Matej Pfajfar.
|
||||
* Copyright (c) 2001-2004, Roger Dingledine.
|
||||
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
||||
* Copyright (c) 2007-2017, The Tor Project, Inc. */
|
||||
/* See LICENSE for licensing information */
|
||||
|
||||
#ifndef HSDIR_INDEX_ST_H
|
||||
#define HSDIR_INDEX_ST_H
|
||||
|
||||
/* Hidden service directory index used in a node_t which is set once we set
|
||||
* the consensus. */
|
||||
struct hsdir_index_t {
|
||||
/* HSDir index to use when fetching a descriptor. */
|
||||
uint8_t fetch[DIGEST256_LEN];
|
||||
|
||||
/* HSDir index used by services to store their first and second
|
||||
* descriptor. The first descriptor is chronologically older than the second
|
||||
* one and uses older TP and SRV values. */
|
||||
uint8_t store_first[DIGEST256_LEN];
|
||||
uint8_t store_second[DIGEST256_LEN];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -252,6 +252,7 @@ ORHEADERS = \
|
||||
src/or/hs_ntor.h \
|
||||
src/or/hs_stats.h \
|
||||
src/or/hs_service.h \
|
||||
src/or/hsdir_index_st.h \
|
||||
src/or/keypin.h \
|
||||
src/or/listener_connection_st.h \
|
||||
src/or/main.h \
|
||||
|
@ -7,6 +7,8 @@
|
||||
#ifndef NODE_ST_H
|
||||
#define NODE_ST_H
|
||||
|
||||
#include "hsdir_index_st.h"
|
||||
|
||||
/** A node_t represents a Tor router.
|
||||
*
|
||||
* Specifically, a node_t is a Tor router as we are using it: a router that
|
||||
|
13
src/or/or.h
13
src/or/or.h
@ -899,18 +899,7 @@ struct hs_ident_edge_conn_t;
|
||||
struct hs_ident_dir_conn_t;
|
||||
struct hs_ident_circuit_t;
|
||||
|
||||
/* Hidden service directory index used in a node_t which is set once we set
|
||||
* the consensus. */
|
||||
typedef struct hsdir_index_t {
|
||||
/* HSDir index to use when fetching a descriptor. */
|
||||
uint8_t fetch[DIGEST256_LEN];
|
||||
|
||||
/* HSDir index used by services to store their first and second
|
||||
* descriptor. The first descriptor is chronologically older than the second
|
||||
* one and uses older TP and SRV values. */
|
||||
uint8_t store_first[DIGEST256_LEN];
|
||||
uint8_t store_second[DIGEST256_LEN];
|
||||
} hsdir_index_t;
|
||||
typedef struct hsdir_index_t hsdir_index_t;
|
||||
|
||||
/** Time interval for tracking replays of DH public keys received in
|
||||
* INTRODUCE2 cells. Used only to avoid launching multiple
|
||||
|
Loading…
Reference in New Issue
Block a user