docs: Add supported versions and fix-backport policy
[lttng-tools.git] / src / bin / lttng-sessiond / sessiond-config.hpp
CommitLineData
e6142f2e 1/*
ab5be9fa 2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
e6142f2e 3 *
ab5be9fa 4 * SPDX-License-Identifier: GPL-2.0-only
e6142f2e 5 *
e6142f2e
JG
6 */
7
8#ifndef LTTNG_SESSIOND_CONFIG_H
9#define LTTNG_SESSIOND_CONFIG_H
10
c9e313bc 11#include <common/macros.hpp>
28f23191 12
e6142f2e
JG
13#include <stdbool.h>
14
15struct config_string {
16 char *value;
17 bool should_free;
18};
19
2288467f
JG
20struct config_int_range {
21 int begin, end;
22};
23
e6142f2e 24/* Config string takes ownership of value. */
e6142f2e
JG
25void config_string_set(struct config_string *string, char *value);
26
27struct sessiond_config {
28 int verbose;
29 int verbose_consumer;
2288467f
JG
30 /* Agent TCP port range for registration. Used by the agent thread. */
31 struct config_int_range agent_tcp_port;
90aa04a1 32
761ffce2
FD
33 int event_notifier_buffer_size_kernel;
34 int event_notifier_buffer_size_userspace;
e6142f2e
JG
35 /* Socket timeout for receiving and sending (in seconds). */
36 int app_socket_timeout;
37
38 bool quiet;
39 bool no_kernel;
40 bool background;
41 bool daemonize;
42 bool sig_parent;
43
44 struct config_string tracing_group_name;
45
46 struct config_string kmod_probes_list;
47 struct config_string kmod_extra_probes_list;
48
49 struct config_string rundir;
50
51 /* Global application Unix socket path */
52 struct config_string apps_unix_sock_path;
53 /* Global client Unix socket path */
54 struct config_string client_unix_sock_path;
55 /* Global wait shm path for UST */
56 struct config_string wait_shm_path;
57 /* Global health check unix path */
58 struct config_string health_unix_sock_path;
59 /*
60 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
61 * consumer daemons.
62 */
63 struct config_string lttng_ust_clock_plugin;
64 struct config_string pid_file_path;
65 struct config_string lock_file_path;
66 struct config_string load_session_path;
67 struct config_string agent_port_file_path;
68
69 struct config_string consumerd32_path;
70 struct config_string consumerd32_bin_path;
71 struct config_string consumerd32_lib_dir;
72 struct config_string consumerd32_err_unix_sock_path;
73 struct config_string consumerd32_cmd_unix_sock_path;
74
75 struct config_string consumerd64_path;
76 struct config_string consumerd64_bin_path;
77 struct config_string consumerd64_lib_dir;
78 struct config_string consumerd64_err_unix_sock_path;
79 struct config_string consumerd64_cmd_unix_sock_path;
80
81 struct config_string kconsumerd_path;
82 struct config_string kconsumerd_err_unix_sock_path;
83 struct config_string kconsumerd_cmd_unix_sock_path;
84};
85
86/* Initialize the sessiond_config values to build-defaults. */
e6142f2e
JG
87int sessiond_config_init(struct sessiond_config *config);
88
89/* Override sessiond_config values with values specified by the environment. */
e6142f2e
JG
90int sessiond_config_apply_env_config(struct sessiond_config *config);
91
e6142f2e
JG
92void sessiond_config_fini(struct sessiond_config *config);
93
e6142f2e
JG
94int sessiond_config_resolve_paths(struct sessiond_config *config);
95
e6142f2e
JG
96void sessiond_config_log(struct sessiond_config *config);
97
98#endif /* LTTNG_SESSIOND_CONFIG_H */
This page took 0.069448 seconds and 4 git commands to generate.