Move all default values to defaults.h
[lttng-tools.git] / src / bin / lttng-sessiond / lttng-sessiond.h
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; only version 2
7 * of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef _LTT_SESSIOND_H
20 #define _LTT_SESSIOND_H
21
22 #define _LGPL_SOURCE
23 #include <urcu.h>
24 #include <urcu/wfqueue.h>
25
26 #include <common/sessiond-comm/sessiond-comm.h>
27
28 #include "session.h"
29 #include "ust-app.h"
30
31 struct module_param {
32 const char *name;
33 int required;
34 };
35
36 /* LTTng kernel tracer modules list */
37 const struct module_param kernel_modules_list[] = {
38 { "lttng-ftrace", 0 },
39 { "lttng-kprobes", 0 },
40 { "lttng-kretprobes", 0 },
41 { "lib-ring-buffer", 1 },
42 { "ltt-relay", 1 },
43 { "ltt-ring-buffer-client-discard", 1 },
44 { "ltt-ring-buffer-client-overwrite", 1 },
45 { "ltt-ring-buffer-metadata-client", 1 },
46 { "ltt-ring-buffer-client-mmap-discard", 1 },
47 { "ltt-ring-buffer-client-mmap-overwrite", 1 },
48 { "ltt-ring-buffer-metadata-mmap-client", 1 },
49 { "lttng-probe-lttng", 1 },
50 { "lttng-types", 0 },
51 { "lttng-probe-block", 0 },
52 { "lttng-probe-irq", 0 },
53 { "lttng-probe-kvm", 0 },
54 { "lttng-probe-sched", 0 },
55 };
56
57 extern const char default_home_dir[],
58 default_tracing_group[],
59 default_ust_sock_dir[],
60 default_global_apps_pipe[];
61
62 /*
63 * This contains extra data needed for processing a command received by the
64 * session daemon from the lttng client.
65 */
66 struct command_ctx {
67 int ust_sock;
68 unsigned int lttng_msg_size;
69 struct ucred creds;
70 struct ltt_session *session;
71 struct lttcomm_lttng_msg *llm;
72 struct lttcomm_session_msg *lsm;
73 };
74
75 struct ust_command {
76 int sock;
77 struct ust_register_msg reg_msg;
78 struct cds_wfq_node node;
79 };
80
81 /*
82 * Queue used to enqueue UST registration request (ust_commant) and protected
83 * by a futex with a scheme N wakers / 1 waiters. See futex.c/.h
84 */
85 struct ust_cmd_queue {
86 int32_t futex;
87 struct cds_wfq_queue queue;
88 };
89
90 #endif /* _LTT_SESSIOND_H */
This page took 0.03043 seconds and 4 git commands to generate.