Fix: lttng-snapshot: use after free of max size argument
[lttng-tools.git] / src / bin / lttng-relayd / lttng-relayd.h
1 #ifndef LTTNG_RELAYD_H
2 #define LTTNG_RELAYD_H
3
4 /*
5 * Copyright (C) 2012 Julien Desfossez <jdesfossez@efficios.com>
6 * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
7 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0-only
10 *
11 */
12
13 #include <limits.h>
14 #include <urcu.h>
15 #include <urcu/wfcqueue.h>
16
17 #include <common/hashtable/hashtable.h>
18 #include <common/fd-tracker/fd-tracker.h>
19
20 struct sessiond_trace_chunk_registry;
21
22 /*
23 * Queue used to enqueue relay requests
24 */
25 struct relay_conn_queue {
26 struct cds_wfcq_head head;
27 struct cds_wfcq_tail tail;
28 int32_t futex;
29 };
30
31 enum relay_group_output_by {
32 RELAYD_GROUP_OUTPUT_BY_UNKNOWN,
33 RELAYD_GROUP_OUTPUT_BY_HOST,
34 RELAYD_GROUP_OUTPUT_BY_SESSION,
35 };
36
37 /*
38 * Contains stream indexed by ID. This is important since many commands lookup
39 * streams only by ID thus also keeping them in this hash table makes the
40 * search O(1).
41 */
42 extern struct lttng_ht *sessions_ht;
43 extern struct lttng_ht *relay_streams_ht;
44 extern struct lttng_ht *viewer_streams_ht;
45 extern struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry;
46
47 extern char *opt_output_path;
48 extern const char *tracing_group_name;
49 extern const char * const config_section_name;
50 extern enum relay_group_output_by opt_group_output_by;
51
52 extern int thread_quit_pipe[2];
53
54 extern struct fd_tracker *the_fd_tracker;
55
56 void lttng_relay_notify_ready(void);
57 int lttng_relay_stop_threads(void);
58
59 #endif /* LTTNG_RELAYD_H */
This page took 0.040299 seconds and 4 git commands to generate.