tor  0.4.1.0-alpha-dev
entry_connection_st.h
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-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 #ifndef ENTRY_CONNECTION_ST_H
8 #define ENTRY_CONNECTION_ST_H
9 
10 #include "core/or/edge_connection_st.h"
11 
15  struct edge_connection_t edge_;
16 
18  /* XXX prop220: we need to make chosen_exit_name able to encode Ed IDs too.
19  * That's logically part of the UI parts for prop220 though. */
21 
25  /* === Isolation related, AP only. === */
26  entry_port_cfg_t entry_cfg;
28  unsigned nym_epoch;
29 
32  /* Other fields to isolate on already exist. The ClientAddr is addr. The
33  ClientProtocol is a combination of type and socks_request->
34  socks_version. SocksAuth is socks_request->username/password.
35  DestAddr is in socks_request->address. */
36 
41 
45  struct buf_t *pending_optimistic_data;
46  /* For AP connections only: buffer for data that we previously sent
47  * optimistically which we are currently re-sending as we retry this
48  * connection. */
49  struct buf_t *sending_optimistic_data;
50 
53  struct evdns_server_request *dns_server_request;
54 
55 #define DEBUGGING_17659
56 
57 #ifdef DEBUGGING_17659
58  uint16_t marked_pending_circ_line;
59  const char *marked_pending_circ_file;
60 #endif
61 
62 #define NUM_CIRCUITS_LAUNCHED_THRESHOLD 10
63 
67  unsigned int num_circuits_launched:4;
68 
71  unsigned int want_onehop:1;
74  unsigned int use_begindir:1;
75 
78  unsigned int chosen_exit_optional:1;
83  unsigned int chosen_exit_retries:3;
84 
87  unsigned int is_transparent_ap:1;
88 
93  unsigned int may_use_optimistic_data : 1;
94 };
95 
97 #define ENTRY_TO_EDGE_CONN(c) (&(((c))->edge_))
98 
99 #endif
100 
unsigned int chosen_exit_retries
struct buf_t * pending_optimistic_data
socks_request_t * socks_request
unsigned int num_circuits_launched
unsigned int chosen_exit_optional
struct evdns_server_request * dns_server_request
unsigned int is_transparent_ap
unsigned int may_use_optimistic_data