2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef LTTNG_SESSIOND_CONFIG_H
9 #define LTTNG_SESSIOND_CONFIG_H
11 #include <common/macros.h>
14 struct config_string
{
19 struct config_int_range
{
23 /* Config string takes ownership of value. */
25 void config_string_set(struct config_string
*string
, char *value
);
27 struct sessiond_config
{
30 /* Agent TCP port range for registration. Used by the agent thread. */
31 struct config_int_range agent_tcp_port
;
32 /* Socket timeout for receiving and sending (in seconds). */
33 int app_socket_timeout
;
41 struct config_string tracing_group_name
;
43 struct config_string kmod_probes_list
;
44 struct config_string kmod_extra_probes_list
;
46 struct config_string rundir
;
48 /* Global application Unix socket path */
49 struct config_string apps_unix_sock_path
;
50 /* Global client Unix socket path */
51 struct config_string client_unix_sock_path
;
52 /* Global wait shm path for UST */
53 struct config_string wait_shm_path
;
54 /* Global health check unix path */
55 struct config_string health_unix_sock_path
;
57 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
60 struct config_string lttng_ust_clock_plugin
;
61 struct config_string pid_file_path
;
62 struct config_string lock_file_path
;
63 struct config_string load_session_path
;
64 struct config_string agent_port_file_path
;
66 struct config_string consumerd32_path
;
67 struct config_string consumerd32_bin_path
;
68 struct config_string consumerd32_lib_dir
;
69 struct config_string consumerd32_err_unix_sock_path
;
70 struct config_string consumerd32_cmd_unix_sock_path
;
72 struct config_string consumerd64_path
;
73 struct config_string consumerd64_bin_path
;
74 struct config_string consumerd64_lib_dir
;
75 struct config_string consumerd64_err_unix_sock_path
;
76 struct config_string consumerd64_cmd_unix_sock_path
;
78 struct config_string kconsumerd_path
;
79 struct config_string kconsumerd_err_unix_sock_path
;
80 struct config_string kconsumerd_cmd_unix_sock_path
;
83 /* Initialize the sessiond_config values to build-defaults. */
85 int sessiond_config_init(struct sessiond_config
*config
);
87 /* Override sessiond_config values with values specified by the environment. */
89 int sessiond_config_apply_env_config(struct sessiond_config
*config
);
92 void sessiond_config_fini(struct sessiond_config
*config
);
95 int sessiond_config_resolve_paths(struct sessiond_config
*config
);
98 void sessiond_config_log(struct sessiond_config
*config
);
100 #endif /* LTTNG_SESSIOND_CONFIG_H */