diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-18 16:05:09 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:42:52 -0500 |
commit | dd6bdab3f6254e7245f8ee76b2c6b4314f0472fa (patch) | |
tree | c8c4c6ebcb908bbc263fec2038eba1ed29aba792 /src/or/or.h | |
parent | 7bf946965bad88116582dfd3d20e5837eeddd758 (diff) | |
download | tor-dd6bdab3f6254e7245f8ee76b2c6b4314f0472fa.tar.gz tor-dd6bdab3f6254e7245f8ee76b2c6b4314f0472fa.zip |
Write the easy parts of the public entryguard interface.
Here we add a little bit of state to origin circuits, and set up
the necessary functions for the circuit code to call in order to
find guards, use guards, and decide when circuits can be used.
There's also an incomplete function for the hard part of the
circuit-maintenance code, where we figure out whether any waiting
guards are ready to become usable.
(This patch finally uses the handle.c code to make safe handles to
entry_guard_t objects, so that we are allowed to free an
entry_guard_t without checking whether any origin_circuit_t is
holding a reference to it.)
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index eb94f63d5e..4bc806619c 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3148,6 +3148,11 @@ typedef struct origin_circuit_t { /** Holds all rendezvous data on either client or service side. */ rend_data_t *rend_data; + /** Holds the data that the entry guard system uses to track the + * status of the guard this circuit is using, and thereby to determine + * whether this circuit can be used. */ + struct circuit_guard_state_t *guard_state; + /** How many more relay_early cells can we send on this circuit, according * to the specification? */ unsigned int remaining_relay_early_cells : 4; |