Move compat to common and create an internal lib
[lttng-tools.git] / src / bin / lttng-sessiond / lttng-sessiond.h
CommitLineData
8c0faa1d
DG
1/*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
fac6795d
DG
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
82a3637f
DG
6 * as published by the Free Software Foundation; only version 2
7 * of the License.
8c0faa1d 8 *
fac6795d
DG
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
050349bb 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fac6795d 12 * GNU General Public License for more details.
8c0faa1d 13 *
fac6795d
DG
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.
fac6795d
DG
17 */
18
19#ifndef _LTT_SESSIOND_H
20#define _LTT_SESSIOND_H
21
099e26bd 22#define _LGPL_SOURCE
f6a9efaa 23#include <urcu.h>
099e26bd
DG
24#include <urcu/wfqueue.h>
25
10a8a223
DG
26#include <common/sessiond-comm/sessiond-comm.h>
27
28#include "session.h"
56fff090 29#include "ust-app.h"
099e26bd 30
050349bb
DG
31#define DEFAULT_HOME_DIR "/tmp"
32#define DEFAULT_UST_SOCK_DIR DEFAULT_HOME_DIR "/ust-app-socks"
33#define DEFAULT_GLOBAL_APPS_PIPE DEFAULT_UST_SOCK_DIR "/global"
34#define DEFAULT_TRACE_OUTPUT DEFAULT_HOME_DIR "/lttng"
ab147185 35
0fdd1e2c
DG
36#define DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH "/lttng-ust-apps-wait"
37#define DEFAULT_HOME_APPS_WAIT_SHM_PATH "/lttng-ust-apps-wait-%u"
38
ab147185
MD
39struct module_param {
40 const char *name;
41 int required;
42};
686204ab 43
b73401da 44/* LTTng kernel tracer modules list */
ab147185 45const struct module_param kernel_modules_list[] = {
ab147185
MD
46 { "lttng-ftrace", 0 },
47 { "lttng-kprobes", 0 },
48 { "lttng-kretprobes", 0 },
ab147185 49 { "lib-ring-buffer", 1 },
d0254c7c 50 { "ltt-relay", 1 },
ab147185
MD
51 { "ltt-ring-buffer-client-discard", 1 },
52 { "ltt-ring-buffer-client-overwrite", 1 },
53 { "ltt-ring-buffer-metadata-client", 1 },
54 { "ltt-ring-buffer-client-mmap-discard", 1 },
55 { "ltt-ring-buffer-client-mmap-overwrite", 1 },
56 { "ltt-ring-buffer-metadata-mmap-client", 1 },
57 { "lttng-probe-lttng", 1 },
58 { "lttng-types", 0 },
59 { "lttng-probe-block", 0 },
60 { "lttng-probe-irq", 0 },
61 { "lttng-probe-kvm", 0 },
62 { "lttng-probe-sched", 0 },
b73401da 63};
20fe2104 64
686204ab
MD
65extern const char default_home_dir[],
66 default_tracing_group[],
67 default_ust_sock_dir[],
68 default_global_apps_pipe[];
fac6795d 69
5461b305
DG
70/*
71 * This contains extra data needed for processing a command received by the
72 * session daemon from the lttng client.
73 */
74struct command_ctx {
75 int ust_sock;
76 unsigned int lttng_msg_size;
be040666 77 struct ucred creds;
5461b305
DG
78 struct ltt_session *session;
79 struct lttcomm_lttng_msg *llm;
80 struct lttcomm_session_msg *lsm;
81};
82
099e26bd
DG
83struct ust_command {
84 int sock;
85 struct ust_register_msg reg_msg;
86 struct cds_wfq_node node;
87};
88
89/*
90 * Queue used to enqueue UST registration request (ust_commant) and protected
91 * by a futex with a scheme N wakers / 1 waiters. See futex.c/.h
92 */
93struct ust_cmd_queue {
94 int32_t futex;
95 struct cds_wfq_queue queue;
96};
97
fac6795d 98#endif /* _LTT_SESSIOND_H */
This page took 0.029432 seconds and 4 git commands to generate.