diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-11-23 22:50:55 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-17 16:39:28 -0500 |
commit | e3ceaebba25127a1d4a3da16e9128ab52491c080 (patch) | |
tree | 4031572e1fe7ff60b4845641a4a3cdc385cbcaed /src/feature/control/control.h | |
parent | bfb94dd2ca8e04fb1fe8aba9ad48effbb8b70662 (diff) | |
download | tor-e3ceaebba25127a1d4a3da16e9128ab52491c080.tar.gz tor-e3ceaebba25127a1d4a3da16e9128ab52491c080.zip |
Add support for logging messages from pluggable transports.
This patch adds support for the "LOG" protocol message from a pluggable
transport. This allows pluggable transport developers to relay log
messages from their binary to Tor, which will both emit them as log
messages from the Tor process itself, but also pass them on via the
control port.
See: https://bugs.torproject.org/28180
See: https://bugs.torproject.org/28181
See: https://bugs.torproject.org/28182
Diffstat (limited to 'src/feature/control/control.h')
-rw-r--r-- | src/feature/control/control.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/control/control.h b/src/feature/control/control.h index cd5402d455..eb2b5676ea 100644 --- a/src/feature/control/control.h +++ b/src/feature/control/control.h @@ -205,6 +205,8 @@ void control_event_clients_seen(const char *controller_str); void control_event_transport_launched(const char *mode, const char *transport_name, tor_addr_t *addr, uint16_t port); +void control_event_transport_log(const char *transport_name, + const char *message); const char *rend_auth_type_to_string(rend_auth_type_t auth_type); MOCK_DECL(const char *, node_describe_longname_by_id,(const char *id_digest)); void control_event_hs_descriptor_requested(const char *onion_address, @@ -293,7 +295,8 @@ void control_free_all(void); #define EVENT_HS_DESC 0x0021 #define EVENT_HS_DESC_CONTENT 0x0022 #define EVENT_NETWORK_LIVENESS 0x0023 -#define EVENT_MAX_ 0x0023 +#define EVENT_TRANSPORT_LOG 0x0024 +#define EVENT_MAX_ 0x0024 /* sizeof(control_connection_t.event_mask) in bits, currently a uint64_t */ #define EVENT_CAPACITY_ 0x0040 |