mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Move extend_info_t into its own header.
This commit is contained in:
parent
fde868ffe3
commit
3191ba389d
@ -27,6 +27,7 @@
|
|||||||
#include "routerset.h"
|
#include "routerset.h"
|
||||||
#include "transports.h"
|
#include "transports.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "routerinfo_st.h"
|
#include "routerinfo_st.h"
|
||||||
#include "routerstatus_st.h"
|
#include "routerstatus_st.h"
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
#include "cell_st.h"
|
#include "cell_st.h"
|
||||||
#include "cell_queue_st.h"
|
#include "cell_queue_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_connection_st.h"
|
#include "or_connection_st.h"
|
||||||
#include "or_handshake_certs_st.h"
|
#include "or_handshake_certs_st.h"
|
||||||
#include "or_handshake_state_st.h"
|
#include "or_handshake_state_st.h"
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "cell_st.h"
|
#include "cell_st.h"
|
||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
|
||||||
static void pathbias_count_successful_close(origin_circuit_t *circ);
|
static void pathbias_count_successful_close(origin_circuit_t *circ);
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
#include "cell_st.h"
|
#include "cell_st.h"
|
||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
@ -96,6 +96,7 @@
|
|||||||
#include "crypt_path_reference_st.h"
|
#include "crypt_path_reference_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "edge_connection_st.h"
|
#include "edge_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "socks_request_st.h"
|
#include "socks_request_st.h"
|
||||||
|
@ -101,6 +101,7 @@
|
|||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
28
src/or/extend_info_st.h
Normal file
28
src/or/extend_info_st.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/* 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 EXTEND_INFO_ST_H
|
||||||
|
#define EXTEND_INFO_ST_H
|
||||||
|
|
||||||
|
/** Information on router used when extending a circuit. We don't need a
|
||||||
|
* full routerinfo_t to extend: we only need addr:port:keyid to build an OR
|
||||||
|
* connection, and onion_key to create the onionskin. Note that for onehop
|
||||||
|
* general-purpose tunnels, the onion_key is NULL. */
|
||||||
|
struct extend_info_t {
|
||||||
|
char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for
|
||||||
|
* display. */
|
||||||
|
/** Hash of this router's RSA identity key. */
|
||||||
|
char identity_digest[DIGEST_LEN];
|
||||||
|
/** Ed25519 identity for this router, if any. */
|
||||||
|
ed25519_public_key_t ed_identity;
|
||||||
|
uint16_t port; /**< OR port. */
|
||||||
|
tor_addr_t addr; /**< IP address. */
|
||||||
|
crypto_pk_t *onion_key; /**< Current onionskin key. */
|
||||||
|
curve25519_public_key_t curve25519_onion_key;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -38,6 +38,7 @@
|
|||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
|
||||||
/* Return a human-readable string for the client fetch status code. */
|
/* Return a human-readable string for the client fetch status code. */
|
||||||
|
@ -67,6 +67,8 @@
|
|||||||
#include "hs_config.h"
|
#include "hs_config.h"
|
||||||
#include "torcert.h" /* tor_cert_encode_ed22519() */
|
#include "torcert.h" /* tor_cert_encode_ed22519() */
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
|
|
||||||
/* Constant string value used for the descriptor format. */
|
/* Constant string value used for the descriptor format. */
|
||||||
#define str_hs_desc "hs-descriptor"
|
#define str_hs_desc "hs-descriptor"
|
||||||
#define str_desc_cert "descriptor-signing-key-cert"
|
#define str_desc_cert "descriptor-signing-key-cert"
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "edge_connection_st.h"
|
#include "edge_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "networkstatus_st.h"
|
#include "networkstatus_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
@ -230,6 +230,7 @@ ORHEADERS = \
|
|||||||
src/or/entry_connection_st.h \
|
src/or/entry_connection_st.h \
|
||||||
src/or/entry_port_cfg_st.h \
|
src/or/entry_port_cfg_st.h \
|
||||||
src/or/ext_orport.h \
|
src/or/ext_orport.h \
|
||||||
|
src/or/extend_info_st.h \
|
||||||
src/or/extrainfo_st.h \
|
src/or/extrainfo_st.h \
|
||||||
src/or/fallback_dirs.inc \
|
src/or/fallback_dirs.inc \
|
||||||
src/or/fp_pair.h \
|
src/or/fp_pair.h \
|
||||||
|
@ -78,6 +78,7 @@
|
|||||||
#include "router.h"
|
#include "router.h"
|
||||||
|
|
||||||
#include "cell_st.h"
|
#include "cell_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
|
|
||||||
// trunnel
|
// trunnel
|
||||||
|
19
src/or/or.h
19
src/or/or.h
@ -1502,24 +1502,7 @@ typedef enum store_type_t {
|
|||||||
|
|
||||||
typedef struct desc_store_t desc_store_t;
|
typedef struct desc_store_t desc_store_t;
|
||||||
typedef struct routerlist_t routerlist_t;
|
typedef struct routerlist_t routerlist_t;
|
||||||
|
typedef struct extend_info_t extend_info_t;
|
||||||
/** Information on router used when extending a circuit. We don't need a
|
|
||||||
* full routerinfo_t to extend: we only need addr:port:keyid to build an OR
|
|
||||||
* connection, and onion_key to create the onionskin. Note that for onehop
|
|
||||||
* general-purpose tunnels, the onion_key is NULL. */
|
|
||||||
typedef struct extend_info_t {
|
|
||||||
char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for
|
|
||||||
* display. */
|
|
||||||
/** Hash of this router's RSA identity key. */
|
|
||||||
char identity_digest[DIGEST_LEN];
|
|
||||||
/** Ed25519 identity for this router, if any. */
|
|
||||||
ed25519_public_key_t ed_identity;
|
|
||||||
uint16_t port; /**< OR port. */
|
|
||||||
tor_addr_t addr; /**< IP address. */
|
|
||||||
crypto_pk_t *onion_key; /**< Current onionskin key. */
|
|
||||||
curve25519_public_key_t curve25519_onion_key;
|
|
||||||
} extend_info_t;
|
|
||||||
|
|
||||||
typedef struct authority_cert_t authority_cert_t;
|
typedef struct authority_cert_t authority_cert_t;
|
||||||
|
|
||||||
/** Bitfield enum type listing types of information that directory authorities
|
/** Bitfield enum type listing types of information that directory authorities
|
||||||
|
@ -88,6 +88,7 @@
|
|||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "destroy_cell_queue_st.h"
|
#include "destroy_cell_queue_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "routerinfo_st.h"
|
#include "routerinfo_st.h"
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "routerparse.h"
|
#include "routerparse.h"
|
||||||
#include "rendcommon.h"
|
#include "rendcommon.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "rend_intro_point_st.h"
|
#include "rend_intro_point_st.h"
|
||||||
#include "rend_service_descriptor_st.h"
|
#include "rend_service_descriptor_st.h"
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "rend_intro_point_st.h"
|
#include "rend_intro_point_st.h"
|
||||||
#include "rend_service_descriptor_st.h"
|
#include "rend_service_descriptor_st.h"
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "networkstatus_st.h"
|
#include "networkstatus_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "rend_encoded_v2_service_descriptor_st.h"
|
#include "rend_encoded_v2_service_descriptor_st.h"
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
#include "crypt_path_reference_st.h"
|
#include "crypt_path_reference_st.h"
|
||||||
#include "edge_connection_st.h"
|
#include "edge_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "networkstatus_st.h"
|
#include "networkstatus_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "rend_authorized_client_st.h"
|
#include "rend_authorized_client_st.h"
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "dir_server_st.h"
|
#include "dir_server_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "extrainfo_st.h"
|
#include "extrainfo_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
@ -83,6 +83,7 @@
|
|||||||
|
|
||||||
#include "authority_cert_st.h"
|
#include "authority_cert_st.h"
|
||||||
#include "document_signature_st.h"
|
#include "document_signature_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "extrainfo_st.h"
|
#include "extrainfo_st.h"
|
||||||
#include "microdesc_st.h"
|
#include "microdesc_st.h"
|
||||||
#include "networkstatus_st.h"
|
#include "networkstatus_st.h"
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "routerparse.h"
|
#include "routerparse.h"
|
||||||
#include "routerset.h"
|
#include "routerset.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "routerinfo_st.h"
|
#include "routerinfo_st.h"
|
||||||
#include "routerstatus_st.h"
|
#include "routerstatus_st.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "rendcommon.h"
|
#include "rendcommon.h"
|
||||||
#include "rend_test_helpers.h"
|
#include "rend_test_helpers.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "rend_intro_point_st.h"
|
#include "rend_intro_point_st.h"
|
||||||
#include "rend_service_descriptor_st.h"
|
#include "rend_service_descriptor_st.h"
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ double fabs(double x);
|
|||||||
#include "statefile.h"
|
#include "statefile.h"
|
||||||
#include "crypto_curve25519.h"
|
#include "crypto_curve25519.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "or_circuit_st.h"
|
#include "or_circuit_st.h"
|
||||||
#include "rend_encoded_v2_service_descriptor_st.h"
|
#include "rend_encoded_v2_service_descriptor_st.h"
|
||||||
#include "rend_intro_point_st.h"
|
#include "rend_intro_point_st.h"
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "circuitbuild.h"
|
#include "circuitbuild.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
|
|
||||||
/* Dummy nodes smartlist for testing */
|
/* Dummy nodes smartlist for testing */
|
||||||
static smartlist_t dummy_nodes;
|
static smartlist_t dummy_nodes;
|
||||||
/* Dummy exit extend_info for testing */
|
/* Dummy exit extend_info for testing */
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "cpath_build_state_st.h"
|
#include "cpath_build_state_st.h"
|
||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
|
|
||||||
void test_circuitstats_timeout(void *arg);
|
void test_circuitstats_timeout(void *arg);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "crypt_path_st.h"
|
#include "crypt_path_st.h"
|
||||||
#include "dir_connection_st.h"
|
#include "dir_connection_st.h"
|
||||||
#include "entry_connection_st.h"
|
#include "entry_connection_st.h"
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "networkstatus_st.h"
|
#include "networkstatus_st.h"
|
||||||
#include "origin_circuit_st.h"
|
#include "origin_circuit_st.h"
|
||||||
#include "socks_request_st.h"
|
#include "socks_request_st.h"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "hs_common.h"
|
#include "hs_common.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "rend_encoded_v2_service_descriptor_st.h"
|
#include "rend_encoded_v2_service_descriptor_st.h"
|
||||||
#include "rend_intro_point_st.h"
|
#include "rend_intro_point_st.h"
|
||||||
#include "rend_service_descriptor_st.h"
|
#include "rend_service_descriptor_st.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "policies.h"
|
#include "policies.h"
|
||||||
#include "nodelist.h"
|
#include "nodelist.h"
|
||||||
|
|
||||||
|
#include "extend_info_st.h"
|
||||||
#include "node_st.h"
|
#include "node_st.h"
|
||||||
#include "routerinfo_st.h"
|
#include "routerinfo_st.h"
|
||||||
#include "routerstatus_st.h"
|
#include "routerstatus_st.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user