diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-12-16 17:01:25 -0600 |
---|---|---|
committer | Taylor Yu <catalyst@torproject.org> | 2018-12-20 18:46:17 -0600 |
commit | a0b4fa1f167f9b013ee1a8326e325ec3f97e4700 (patch) | |
tree | 23af519fc5dcd46d597776dea0ec9556aa9e3eab /src/core/or/circuitlist.h | |
parent | 271b50f54abac7af44e3e54589ff965d3cdac816 (diff) | |
download | tor-a0b4fa1f167f9b013ee1a8326e325ec3f97e4700.tar.gz tor-a0b4fa1f167f9b013ee1a8326e325ec3f97e4700.zip |
Add origin circuit event pubsub system
Add a publish-subscribe subsystem to publish messages about changes to
origin circuits.
Functions in circuitbuild.c and circuitlist.c publish messages to this
subsystem.
Move circuit event constants out of control.h so that subscribers
don't have to include all of control.h to take actions based on
messages they receive.
Part of ticket 27167.
Diffstat (limited to 'src/core/or/circuitlist.h')
-rw-r--r-- | src/core/or/circuitlist.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/or/circuitlist.h b/src/core/or/circuitlist.h index cb89d1820d..37d37a089d 100644 --- a/src/core/or/circuitlist.h +++ b/src/core/or/circuitlist.h @@ -14,6 +14,7 @@ #include "lib/testsupport/testsupport.h" #include "feature/hs/hs_ident.h" +#include "core/or/ocirc_event.h" /** Circuit state: I'm the origin, still haven't done all my handshakes. */ #define CIRCUIT_STATE_BUILDING 0 @@ -184,6 +185,8 @@ void channel_mark_circid_unusable(channel_t *chan, circid_t id); void channel_mark_circid_usable(channel_t *chan, circid_t id); time_t circuit_id_when_marked_unusable_on_channel(circid_t circ_id, channel_t *chan); +int circuit_event_status(origin_circuit_t *circ, circuit_status_event_t tp, + int reason_code); void circuit_set_state(circuit_t *circ, uint8_t state); void circuit_close_all_marked(void); int32_t circuit_initial_package_window(void); |