Tor
0.4.9.3-alpha-dev
Loading...
Searching...
No Matches
feature
dircommon
dir_connection_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-2021, The Tor Project, Inc. */
5
/* See LICENSE for licensing information */
6
7
/**
8
* @file dir_connection_st.h
9
* @brief Client/server directory connection structure.
10
**/
11
12
#ifndef DIR_CONNECTION_ST_H
13
#define DIR_CONNECTION_ST_H
14
15
#include "
core/or/connection_st.h
"
16
17
struct
tor_compress_state_t
;
18
19
/** Subtype of connection_t for an "directory connection" -- that is, an HTTP
20
* connection to retrieve or serve directory material. */
21
struct
dir_connection_t
{
22
connection_t
base_;
23
24
/** Which 'resource' did we ask the directory for? This is typically the part
25
* of the URL string that defines, relative to the directory conn purpose,
26
* what thing we want. For example, in router descriptor downloads by
27
* descriptor digest, it contains "d/", then one or more +-separated
28
* fingerprints.
29
**/
30
char
*
requested_resource
;
31
/** Is this dirconn direct, or via a multi-hop Tor circuit?
32
* Direct connections can use the DirPort, or BEGINDIR over the ORPort. */
33
unsigned
int
dirconn_direct
:1;
34
35
/** If we're fetching descriptors, what router purpose shall we assign
36
* to them? */
37
uint8_t
router_purpose
;
38
39
/** List of spooled_resource_t for objects that we're spooling. We use
40
* it from back to front. */
41
smartlist_t
*
spool
;
42
/** The compression object doing on-the-fly compression for spooled data. */
43
struct
tor_compress_state_t
*
compress_state
;
44
45
/* Hidden service connection identifier for dir connections: Used by HS
46
client-side code to fetch HS descriptors, and by the service-side code to
47
upload descriptors. Also used by the HSDir, setting only the blinded key,
48
in order to locate back the descriptor in the cache once the dir stream is
49
closed. */
50
struct
hs_ident_dir_conn_t
*hs_ident;
51
52
/** If this is a one-hop connection, tracks the state of the directory guard
53
* for this connection (if any). */
54
struct
circuit_guard_state_t *
guard_state
;
55
56
char
identity_digest
[
DIGEST_LEN
];
/**< Hash of the public RSA key for
57
* the directory server's signing key. */
58
59
/** Unique ID for directory requests; this used to be in connection_t, but
60
* that's going away and being used on channels instead. The dirserver still
61
* needs this for the incoming side, so it's moved here. */
62
uint64_t
dirreq_id
;
63
64
#ifdef MEASUREMENTS_21206
65
/** Number of RELAY_DATA cells received. */
66
uint32_t data_cells_received;
67
68
/** Number of RELAY_DATA cells sent. */
69
uint32_t data_cells_sent;
70
#endif
/* defined(MEASUREMENTS_21206) */
71
};
72
73
#endif
/* !defined(DIR_CONNECTION_ST_H) */
connection_st.h
Base connection structure.
DIGEST_LEN
#define DIGEST_LEN
Definition
digest_sizes.h:20
connection_t
Definition
connection_st.h:45
dir_connection_t
Definition
dir_connection_st.h:21
dir_connection_t::dirconn_direct
unsigned int dirconn_direct
Definition
dir_connection_st.h:33
dir_connection_t::dirreq_id
uint64_t dirreq_id
Definition
dir_connection_st.h:62
dir_connection_t::identity_digest
char identity_digest[DIGEST_LEN]
Definition
dir_connection_st.h:56
dir_connection_t::requested_resource
char * requested_resource
Definition
dir_connection_st.h:30
dir_connection_t::spool
smartlist_t * spool
Definition
dir_connection_st.h:41
dir_connection_t::compress_state
struct tor_compress_state_t * compress_state
Definition
dir_connection_st.h:43
dir_connection_t::guard_state
struct circuit_guard_state_t * guard_state
Definition
dir_connection_st.h:54
dir_connection_t::router_purpose
uint8_t router_purpose
Definition
dir_connection_st.h:37
hs_ident_dir_conn_t
Definition
hs_ident.h:87
smartlist_t
Definition
smartlist_core.h:26
tor_compress_state_t
Definition
compress.c:478
Generated by
1.9.8