Tor 0.4.9.0-alpha-dev
half_edge_st.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 half_edge_st.h
9 * @brief Half-open connection structure.
10 **/
11
12#ifndef HALF_EDGE_ST_H
13#define HALF_EDGE_ST_H
14
15#include "core/or/or.h"
16
17/**
18 * Struct to track a connection that we closed that the other end
19 * still thinks is open. Exists in origin_circuit_t.half_streams until
20 * we get an end cell or a resolved cell for this stream id.
21 */
22typedef struct half_edge_t {
23 /** stream_id for the half-closed connection */
25
26 /** How many sendme's can the other end still send, based on how
27 * much data we had sent at the time of close */
29
30 /** How much more data can the other end still send, based on
31 * our deliver window */
33
34 /**
35 * Monotime timestamp of when the other end should have successfully
36 * shut down the stream and stop sending data, based on the larger
37 * of circuit RTT and CBT. Used if 'used_ccontrol' is true, to expire
38 * the half_edge at this monotime timestamp. */
40
41 /**
42 * Did this edge use congestion control? If so, use
43 * timer instead of pending data approach */
44 unsigned int used_ccontrol : 1;
45
46 /** Is there a connected cell pending? */
47 unsigned int connected_pending : 1;
49
50#endif /* !defined(HALF_EDGE_ST_H) */
Master header file for Tor-specific functionality.
uint16_t streamid_t
Definition: or.h:499
uint64_t end_ack_expected_usec
Definition: half_edge_st.h:39
streamid_t stream_id
Definition: half_edge_st.h:24
unsigned int connected_pending
Definition: half_edge_st.h:47
int sendmes_pending
Definition: half_edge_st.h:28
unsigned int used_ccontrol
Definition: half_edge_st.h:44
int data_pending
Definition: half_edge_st.h:32