tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

cpath_build_state_st.h (1538B)


      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 cpath_build_state_st.h
      9 * @brief Circuit-build-stse structure
     10 **/
     11 
     12 #ifndef CIRCUIT_BUILD_STATE_ST_ST_H
     13 #define CIRCUIT_BUILD_STATE_ST_ST_H
     14 
     15 /** Information used to build a circuit. */
     16 struct cpath_build_state_t {
     17  /** Intended length of the final circuit. */
     18  int desired_path_len;
     19  /** How to extend to the planned exit node. */
     20  extend_info_t *chosen_exit;
     21  /** Whether every node in the circ must have adequate uptime. */
     22  unsigned int need_uptime : 1;
     23  /** Whether every node in the circ must have adequate capacity. */
     24  unsigned int need_capacity : 1;
     25  /** Whether the last hop was picked with exiting in mind. */
     26  unsigned int is_internal : 1;
     27  /** Is this an IPv6 ORPort self-testing circuit? */
     28  unsigned int is_ipv6_selftest : 1;
     29  /** Did we pick this as a one-hop tunnel (not safe for other streams)?
     30   * These are for encrypted dir conns that exit to this router, not
     31   * for arbitrary exits from the circuit. */
     32  unsigned int onehop_tunnel : 1;
     33  /** Indicating the exit needs to support Conflux. */
     34  unsigned int need_conflux: 1;
     35  /** How many times has building a circuit for this task failed? */
     36  int failure_count;
     37  /** At what time should we give up on this task? */
     38  time_t expiry_time;
     39 };
     40 
     41 #endif /* !defined(CIRCUIT_BUILD_STATE_ST_ST_H) */