2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 #ifndef LTTNG_SESSIOND_CONFIG_H
19 #define LTTNG_SESSIOND_CONFIG_H
21 #include <common/macros.h>
24 struct config_string
{
29 struct config_int_range
{
33 /* Config string takes ownership of value. */
35 void config_string_set(struct config_string
*string
, char *value
);
37 struct sessiond_config
{
40 /* Agent TCP port range for registration. Used by the agent thread. */
41 struct config_int_range agent_tcp_port
;
42 /* Socket timeout for receiving and sending (in seconds). */
43 int app_socket_timeout
;
51 struct config_string tracing_group_name
;
53 struct config_string kmod_probes_list
;
54 struct config_string kmod_extra_probes_list
;
56 struct config_string rundir
;
58 /* Global application Unix socket path */
59 struct config_string apps_unix_sock_path
;
60 /* Global client Unix socket path */
61 struct config_string client_unix_sock_path
;
62 /* Global wait shm path for UST */
63 struct config_string wait_shm_path
;
64 /* Global health check unix path */
65 struct config_string health_unix_sock_path
;
67 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
70 struct config_string lttng_ust_clock_plugin
;
71 struct config_string pid_file_path
;
72 struct config_string lock_file_path
;
73 struct config_string load_session_path
;
74 struct config_string agent_port_file_path
;
76 struct config_string consumerd32_path
;
77 struct config_string consumerd32_bin_path
;
78 struct config_string consumerd32_lib_dir
;
79 struct config_string consumerd32_err_unix_sock_path
;
80 struct config_string consumerd32_cmd_unix_sock_path
;
82 struct config_string consumerd64_path
;
83 struct config_string consumerd64_bin_path
;
84 struct config_string consumerd64_lib_dir
;
85 struct config_string consumerd64_err_unix_sock_path
;
86 struct config_string consumerd64_cmd_unix_sock_path
;
88 struct config_string kconsumerd_path
;
89 struct config_string kconsumerd_err_unix_sock_path
;
90 struct config_string kconsumerd_cmd_unix_sock_path
;
93 /* Initialize the sessiond_config values to build-defaults. */
95 int sessiond_config_init(struct sessiond_config
*config
);
97 /* Override sessiond_config values with values specified by the environment. */
99 int sessiond_config_apply_env_config(struct sessiond_config
*config
);
102 void sessiond_config_fini(struct sessiond_config
*config
);
105 int sessiond_config_resolve_paths(struct sessiond_config
*config
);
108 void sessiond_config_log(struct sessiond_config
*config
);
110 #endif /* LTTNG_SESSIOND_CONFIG_H */