Tor 0.4.9.1-alpha-dev
bridges.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 bridges.h
9 * \brief Header file for circuitbuild.c.
10 **/
11
12#ifndef TOR_BRIDGES_H
13#define TOR_BRIDGES_H
14
15struct bridge_line_t;
17
18/* Opaque handle to a configured bridge */
19typedef struct bridge_info_t bridge_info_t;
20
21void mark_bridge_list(void);
22void sweep_bridge_list(void);
23const smartlist_t *bridge_list_get(void);
24const uint8_t *bridge_get_rsa_id_digest(const bridge_info_t *bridge);
26const char *bridget_get_transport_name(const bridge_info_t *bridge);
29 const tor_addr_t *addr,
30 uint16_t port,
31 const char *digest);
33 const tor_addr_t *addr,
34 uint16_t port,
35 const char *digest);
36
38 const char *digest);
41int node_is_a_configured_bridge(const node_t *node);
42void learned_router_identity(const tor_addr_t *addr, uint16_t port,
43 const char *digest,
44 const struct ed25519_public_key_t *ed_id);
45
46void bridge_add_from_config(struct bridge_line_t *bridge_line);
47void retry_bridge_descriptor_fetch_directly(const char *digest);
48void fetch_bridge_descriptors(const or_options_t *options, time_t now);
50 int from_cache, int desc_is_new);
52 uint16_t port);
53
54int any_bridges_dont_support_microdescriptors(void);
55
57 uint16_t port);
58struct transport_t;
60 const struct transport_t **transport);
61
62MOCK_DECL(int, transport_is_needed, (const char *transport_name));
63int validate_pluggable_transports_config(void);
64
67 (const char *digest));
68
69void bridges_free_all(void);
71
72#ifdef TOR_BRIDGES_PRIVATE
73STATIC void clear_bridge_list(void);
74STATIC bridge_info_t *find_bridge_by_digest(const char *digest);
76 const char *digest,
77 const smartlist_t *orports);
79 uint16_t port,
80 const char *digest,
81 const char *transport_name);
82#endif /* defined(TOR_BRIDGES_PRIVATE) */
83
84#endif /* !defined(TOR_BRIDGES_H) */
STATIC void bridge_resolve_conflicts(const tor_addr_t *addr, uint16_t port, const char *digest, const char *transport_name)
Definition: bridges.c:497
void learned_router_identity(const tor_addr_t *addr, uint16_t port, const char *digest, const ed25519_public_key_t *ed_id)
Definition: bridges.c:440
STATIC bridge_info_t * get_configured_bridge_by_orports_digest(const char *digest, const smartlist_t *orports)
Definition: bridges.c:229
STATIC void clear_bridge_list(void)
Definition: bridges.c:109
STATIC bridge_info_t * find_bridge_by_digest(const char *digest)
Definition: bridges.c:618
int get_transport_by_bridge_addrport(const tor_addr_t *addr, uint16_t port, const transport_t **transport)
Definition: bridges.c:657
download_status_t * get_bridge_dl_status_by_id(const char *digest)
Definition: bridges.c:1067
void mark_bridge_list(void)
Definition: bridges.c:84
int routerinfo_is_a_configured_bridge(const routerinfo_t *ri)
Definition: bridges.c:359
int addr_is_a_configured_bridge(const tor_addr_t *addr, uint16_t port, const char *digest)
Definition: bridges.c:308
void sweep_bridge_list(void)
Definition: bridges.c:95
const uint8_t * bridge_get_rsa_id_digest(const bridge_info_t *bridge)
Definition: bridges.c:182
int transport_is_needed(const char *transport_name)
Definition: bridges.c:547
smartlist_t * list_bridge_identities(void)
Definition: bridges.c:1047
int extend_info_is_a_configured_bridge(const extend_info_t *ei)
Definition: bridges.c:326
int node_is_a_configured_bridge(const node_t *node)
Definition: bridges.c:391
const tor_addr_port_t * bridge_get_addr_port(const bridge_info_t *bridge)
Definition: bridges.c:196
void fetch_bridge_descriptors(const or_options_t *options, time_t now)
Definition: bridges.c:774
const char * find_transport_name_by_bridge_addrport(const tor_addr_t *addr, uint16_t port)
Definition: bridges.c:634
const smartlist_t * bridge_list_get(void)
Definition: bridges.c:135
void bridges_free_all(void)
Definition: bridges.c:1085
bool conflux_can_exclude_used_bridges(void)
Definition: bridges.c:147
void learned_bridge_descriptor(routerinfo_t *ri, int from_cache, int desc_is_new)
Definition: bridges.c:993
bridge_info_t * get_configured_bridge_by_exact_addr_port_digest(const tor_addr_t *addr, uint16_t port, const char *digest)
Definition: bridges.c:283
const char * bridget_get_transport_name(const bridge_info_t *bridge)
Definition: bridges.c:207
const smartlist_t * get_socks_args_by_bridge_addrport(const tor_addr_t *addr, uint16_t port)
Definition: bridges.c:687
void retry_bridge_descriptor_fetch_directly(const char *digest)
Definition: bridges.c:761
bridge_info_t * get_configured_bridge_by_addr_port_digest(const tor_addr_t *addr, uint16_t port, const char *digest)
Definition: bridges.c:257
bool bridge_has_invalid_transport(const bridge_info_t *bridge)
Definition: bridges.c:218
void bridge_add_from_config(struct bridge_line_t *bridge_line)
Definition: bridges.c:564
uint16_t port
Definition: bridges.c:49
tor_addr_t addr
Definition: bridges.c:47
Definition: node_st.h:34
uint16_t port
Definition: transports.h:26
tor_addr_t addr
Definition: transports.h:24
#define STATIC
Definition: testsupport.h:32
#define MOCK_DECL(rv, funcname, arglist)
Definition: testsupport.h:127