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 /* Config string takes ownership of value. */
31 void config_string_set(struct config_string
*string
, char *value
);
33 struct sessiond_config
{
36 /* Agent TCP port for registration. Used by the agent thread. */
38 /* Socket timeout for receiving and sending (in seconds). */
39 int app_socket_timeout
;
47 struct config_string tracing_group_name
;
49 struct config_string kmod_probes_list
;
50 struct config_string kmod_extra_probes_list
;
52 struct config_string rundir
;
54 /* Global application Unix socket path */
55 struct config_string apps_unix_sock_path
;
56 /* Global client Unix socket path */
57 struct config_string client_unix_sock_path
;
58 /* Global wait shm path for UST */
59 struct config_string wait_shm_path
;
60 /* Global health check unix path */
61 struct config_string health_unix_sock_path
;
63 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
66 struct config_string lttng_ust_clock_plugin
;
67 struct config_string pid_file_path
;
68 struct config_string lock_file_path
;
69 struct config_string load_session_path
;
70 struct config_string agent_port_file_path
;
72 struct config_string consumerd32_path
;
73 struct config_string consumerd32_bin_path
;
74 struct config_string consumerd32_lib_dir
;
75 struct config_string consumerd32_err_unix_sock_path
;
76 struct config_string consumerd32_cmd_unix_sock_path
;
78 struct config_string consumerd64_path
;
79 struct config_string consumerd64_bin_path
;
80 struct config_string consumerd64_lib_dir
;
81 struct config_string consumerd64_err_unix_sock_path
;
82 struct config_string consumerd64_cmd_unix_sock_path
;
84 struct config_string kconsumerd_path
;
85 struct config_string kconsumerd_err_unix_sock_path
;
86 struct config_string kconsumerd_cmd_unix_sock_path
;
89 /* Initialize the sessiond_config values to build-defaults. */
91 int sessiond_config_init(struct sessiond_config
*config
);
93 /* Override sessiond_config values with values specified by the environment. */
95 int sessiond_config_apply_env_config(struct sessiond_config
*config
);
98 void sessiond_config_fini(struct sessiond_config
*config
);
101 int sessiond_config_resolve_paths(struct sessiond_config
*config
);
104 void sessiond_config_log(struct sessiond_config
*config
);
106 #endif /* LTTNG_SESSIOND_CONFIG_H */