diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-04-23 20:06:34 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2018-05-09 21:23:06 +0000 |
commit | e07e95edd35f1608ecba94b281818d27f63812e3 (patch) | |
tree | 8e571ebd65e845771fcfe72c4a8176a80e78e863 /src/or/or.h | |
parent | 7b09282dc723381e68fef79c3474a56315a0edfa (diff) | |
download | tor-e07e95edd35f1608ecba94b281818d27f63812e3.tar.gz tor-e07e95edd35f1608ecba94b281818d27f63812e3.zip |
Bug 25903: Perform accounting for new CIRC_BW fields.
Two new values in each direction. DELIVERED counts valid end-to-end circuit
data that is accepted by our end and OVERHEAD counts the slack unused data in
each of the relay command cells for those accepted cells.
Control port changes are in the next commit.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index e27f25197b..fc72badb4d 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3250,16 +3250,36 @@ typedef struct origin_circuit_t { * associated with this circuit. */ edge_connection_t *p_streams; - /** Bytes read from any attached stream since last call to + /** Bytes read on this circuit since last call to * control_event_circ_bandwidth_used(). Only used if we're configured * to emit CIRC_BW events. */ uint32_t n_read_circ_bw; - /** Bytes written to any attached stream since last call to + /** Bytes written to on this circuit since last call to * control_event_circ_bandwidth_used(). Only used if we're configured * to emit CIRC_BW events. */ uint32_t n_written_circ_bw; + /** Total known-valid relay cell bytes since last call to + * control_event_circ_bandwidth_used(). Only used if we're configured + * to emit CIRC_BW events. */ + uint32_t n_delivered_read_circ_bw; + + /** Total written relay cell bytes since last call to + * control_event_circ_bandwidth_used(). Only used if we're configured + * to emit CIRC_BW events. */ + uint32_t n_delivered_written_circ_bw; + + /** Total overhead data in all known-valid relay data cells since last + * call to control_event_circ_bandwidth_used(). Only used if we're + * configured to emit CIRC_BW events. */ + uint32_t n_overhead_read_circ_bw; + + /** Total written overhead data in all relay data cells since last call to + * control_event_circ_bandwidth_used(). Only used if we're configured + * to emit CIRC_BW events. */ + uint32_t n_overhead_written_circ_bw; + /** Build state for this circuit. It includes the intended path * length, the chosen exit router, rendezvous information, etc. */ |