extend_info_st.h (1885B)
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 extend_info_st.h 9 * @brief Extend-info structure. 10 **/ 11 12 #ifndef EXTEND_INFO_ST_H 13 #define EXTEND_INFO_ST_H 14 15 #include "lib/crypt_ops/crypto_curve25519.h" 16 #include "lib/crypt_ops/crypto_ed25519.h" 17 18 /** Largest number of addresses we handle in an extend_info. 19 * 20 * More are permitted in an EXTEND cell, but we won't handle them. */ 21 #define EXTEND_INFO_MAX_ADDRS 2 22 23 /** Information on router used when extending a circuit. We don't need a 24 * full routerinfo_t to extend: we only need addr:port:keyid to build an OR 25 * connection, and onion_key to create the onionskin. Note that for one-hop 26 * general-purpose tunnels, the onion_key is NULL. */ 27 struct extend_info_t { 28 char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for 29 * display. */ 30 /** Hash of this router's RSA identity key. */ 31 char identity_digest[DIGEST_LEN]; 32 /** Ed25519 identity for this router, if any. */ 33 ed25519_public_key_t ed_identity; 34 /** IP/Port values for this hop's ORPort(s). Any unused values are set 35 * to a null address. */ 36 tor_addr_port_t orports[EXTEND_INFO_MAX_ADDRS]; 37 /** Ntor onion key for this hop. */ 38 curve25519_public_key_t curve25519_onion_key; 39 /** True if this hop supports ntor v3. */ 40 bool supports_ntor_v3; 41 /** True if this hop is to be used as an _exit_, 42 * and it also supports supports NtorV3 _and_ negotiation 43 * of congestion control parameters */ 44 bool exit_supports_congestion_control; 45 /** 46 * True if this hop supports CGO relay message enryption, 47 * and we intend to use it. 48 */ 49 bool enable_cgo; 50 }; 51 52 #endif /* !defined(EXTEND_INFO_ST_H) */