2 * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef LTTNG_DOMAIN_H
19 #define LTTNG_DOMAIN_H
25 #include <lttng/constant.h>
28 * Domain types: the different possible tracers.
30 enum lttng_domain_type
{
31 LTTNG_DOMAIN_KERNEL
= 1, /* Linux Kernel tracer. */
32 LTTNG_DOMAIN_UST
= 2, /* Global Userspace tracer. */
33 LTTNG_DOMAIN_JUL
= 3, /* Java Util Logging. */
36 /* Buffer type for a specific domain. */
37 enum lttng_buffer_type
{
38 LTTNG_BUFFER_PER_PID
, /* Only supported by UST being the default. */
39 LTTNG_BUFFER_PER_UID
, /* Only supported by UST. */
40 LTTNG_BUFFER_GLOBAL
, /* Only supported by the Kernel. */
44 * The structures should be initialized to zero before use.
46 #define LTTNG_DOMAIN_PADDING1 12
47 #define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
49 enum lttng_domain_type type
;
50 enum lttng_buffer_type buf_type
;
51 char padding
[LTTNG_DOMAIN_PADDING1
];
55 char exec_name
[NAME_MAX
];
56 char padding
[LTTNG_DOMAIN_PADDING2
];
61 * List the registered domain(s) of a session.
63 * Session name CAN NOT be NULL.
65 * Return the size (number of entries) of the "lttng_domain" array. Caller
66 * must free domains. On error, a negative LTTng error code is returned.
68 extern int lttng_list_domains(const char *session_name
,
69 struct lttng_domain
**domains
);
75 #endif /* LTTNG_DOMAIN_H */