Tor 0.4.9.0-alpha-dev
dir_server_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_server_st.h
9 * @brief Trusted/fallback directory server structure.
10 **/
11
12#ifndef DIR_SERVER_ST_H
13#define DIR_SERVER_ST_H
14
15#include "lib/cc/torint.h"
16#include "core/or/or.h"
18
19struct smartlist_t;
20
21/** Represents information about a single trusted or fallback directory
22 * server. */
24 char *description;
25 char *nickname;
26 char *address; /**< Hostname. */
27 /* XX/teor - why do we duplicate the address and port fields here and in
28 * fake_status? Surely we could just use fake_status (#17867). */
29 tor_addr_t ipv4_addr;
30 uint16_t ipv4_dirport; /**< Directory port. */
31 uint16_t ipv4_orport; /**< OR port: Used for tunneling connections. */
32 tor_addr_t ipv6_addr; /**< IPv6 address if present; AF_UNSPEC if not */
33 uint16_t ipv6_orport; /**< OR port corresponding to ipv6_addr. */
34 double weight; /** Weight used when selecting this node at random */
35 char digest[DIGEST_LEN]; /**< Digest of identity key. */
36 char v3_identity_digest[DIGEST_LEN]; /**< Digest of v3 (authority only,
37 * high-security) identity key. */
38
39 unsigned int is_running:1; /**< True iff we think this server is running. */
40 unsigned int is_authority:1; /**< True iff this is a directory authority
41 * of some kind. */
42
43 /** True iff this server has accepted the most recent server descriptor
44 * we tried to upload to it. */
46
47 /** What kind of authority is this? (Bitfield.) */
49
50 time_t addr_current_at; /**< When was the document that we derived the
51 * address information from published? */
52
53 /** Authority only. Can be null. If present, a list of auth_dirport_t
54 * representing HTTP dirports for this authority. */
56
57 routerstatus_t fake_status; /**< Used when we need to pass this trusted
58 * dir_server_t to
59 * directory_request_set_routerstatus.
60 * as a routerstatus_t. Not updated by the
61 * router-status management code!
62 **/
63};
64
65#endif /* !defined(DIR_SERVER_ST_H) */
#define DIGEST_LEN
Definition: digest_sizes.h:20
Master header file for Tor-specific functionality.
dirinfo_type_t
Definition: or.h:787
Routerstatus (consensus entry) structure.
uint16_t ipv6_orport
Definition: dir_server_st.h:33
unsigned int is_running
Definition: dir_server_st.h:39
tor_addr_t ipv6_addr
Definition: dir_server_st.h:32
routerstatus_t fake_status
Definition: dir_server_st.h:57
struct smartlist_t * auth_dirports
Definition: dir_server_st.h:55
time_t addr_current_at
Definition: dir_server_st.h:50
char * address
Definition: dir_server_st.h:26
uint16_t ipv4_dirport
Definition: dir_server_st.h:30
char digest[DIGEST_LEN]
Definition: dir_server_st.h:35
unsigned int is_authority
Definition: dir_server_st.h:40
dirinfo_type_t type
Definition: dir_server_st.h:48
unsigned int has_accepted_serverdesc
Definition: dir_server_st.h:45
uint16_t ipv4_orport
Definition: dir_server_st.h:31
char v3_identity_digest[DIGEST_LEN]
Definition: dir_server_st.h:36
Integer definitions used throughout Tor.