summaryrefslogtreecommitdiff
path: root/src/feature/control/control_events.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-25 12:48:52 -0400
committerNick Mathewson <nickm@torproject.org>2019-03-25 12:49:24 -0400
commit4754e9058b7521967dd92092e54483cec456bb2f (patch)
treeaeb765f6880ee356e339cb5c5efe4a408bd833f4 /src/feature/control/control_events.h
parenta49f506e05364eb0fd14d02e3cd482941942928e (diff)
downloadtor-4754e9058b7521967dd92092e54483cec456bb2f.tar.gz
tor-4754e9058b7521967dd92092e54483cec456bb2f.zip
Split getinfo handling into a new control_getinfo.c
Diffstat (limited to 'src/feature/control/control_events.h')
-rw-r--r--src/feature/control/control_events.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/feature/control/control_events.h b/src/feature/control/control_events.h
index 9e79346714..0bdbb9cfd2 100644
--- a/src/feature/control/control_events.h
+++ b/src/feature/control/control_events.h
@@ -327,6 +327,14 @@ void append_cell_stats_by_command(smartlist_t *event_parts,
void format_cell_stats(char **event_string, circuit_t *circ,
cell_stats_t *cell_stats);
+/** Helper structure: maps event values to their names. */
+struct control_event_t {
+ uint16_t event_code;
+ const char *event_name;
+};
+
+extern const struct control_event_t control_event_table[];
+
#ifdef TOR_UNIT_TESTS
MOCK_DECL(STATIC void,
send_control_event_string,(uint16_t event, const char *msg));