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>
9 * SPDX-License-Identifier: GPL-2.0-only
15 #include <urcu/wfcqueue.h>
17 #include <common/hashtable/hashtable.h>
18 #include <common/fd-tracker/fd-tracker.h>
20 struct sessiond_trace_chunk_registry
;
23 * Queue used to enqueue relay requests
25 struct relay_conn_queue
{
26 struct cds_wfcq_head head
;
27 struct cds_wfcq_tail tail
;
31 enum relay_group_output_by
{
32 RELAYD_GROUP_OUTPUT_BY_UNKNOWN
,
33 RELAYD_GROUP_OUTPUT_BY_HOST
,
34 RELAYD_GROUP_OUTPUT_BY_SESSION
,
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
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
;
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
;
52 extern int thread_quit_pipe
[2];
54 extern struct fd_tracker
*the_fd_tracker
;
56 void lttng_relay_notify_ready(void);
57 int lttng_relay_stop_threads(void);
59 #endif /* LTTNG_RELAYD_H */