Support per UID buffers
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.h
CommitLineData
2f77fc4b
DG
1/*
2 * Copyright (C) 2012 - David Goulet <dgoulet@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This program 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 General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18#ifndef CMD_H
19#define CMD_H
20
21#include "context.h"
2f77fc4b
DG
22#include "session.h"
23
24/*
25 * Init the command subsystem. Must be called before using any of the functions
26 * above. This is called in the main() of the session daemon.
27 */
28void cmd_init(void);
29
30/* Session commands */
31int cmd_create_session_uri(char *name, struct lttng_uri *uris,
32 size_t nb_uri, lttng_sock_cred *creds);
33int cmd_destroy_session(struct ltt_session *session, int wpipe);
34
35/* Channel commands */
36int cmd_disable_channel(struct ltt_session *session, int domain,
37 char *channel_name);
7972aab2
DG
38
39int cmd_enable_channel(struct ltt_session *session,
40 struct lttng_domain *domain, struct lttng_channel *attr, int wpipe);
2f77fc4b
DG
41
42/* Event commands */
43int cmd_disable_event(struct ltt_session *session, int domain,
44 char *channel_name, char *event_name);
45int cmd_disable_event_all(struct ltt_session *session, int domain,
46 char *channel_name);
47int cmd_add_context(struct ltt_session *session, int domain,
601d5acf 48 char *channel_name, struct lttng_event_context *ctx, int kwpipe);
2f77fc4b 49int cmd_set_filter(struct ltt_session *session, int domain,
178191b3 50 char *channel_name, struct lttng_event *event,
2f77fc4b 51 struct lttng_filter_bytecode *bytecode);
7972aab2 52int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
025faf73
DG
53 char *channel_name, struct lttng_event *event,
54 struct lttng_filter_bytecode *filter, int wpipe);
7972aab2
DG
55int cmd_enable_event_all(struct ltt_session *session,
56 struct lttng_domain *domain, char *channel_name, int event_type,
025faf73 57 struct lttng_filter_bytecode *filter, int wpipe);
2f77fc4b
DG
58
59/* Trace session action commands */
60int cmd_start_trace(struct ltt_session *session);
61int cmd_stop_trace(struct ltt_session *session);
62
63/* Consumer commands */
64int cmd_register_consumer(struct ltt_session *session, int domain,
65 const char *sock_path, struct consumer_data *cdata);
2f77fc4b
DG
66int cmd_set_consumer_uri(int domain, struct ltt_session *session,
67 size_t nb_uri, struct lttng_uri *uris);
ffe60014 68int cmd_setup_relayd(struct ltt_session *session);
2f77fc4b
DG
69
70/* Listing commands */
71ssize_t cmd_list_domains(struct ltt_session *session,
72 struct lttng_domain **domains);
73ssize_t cmd_list_events(int domain, struct ltt_session *session,
74 char *channel_name, struct lttng_event **events);
75ssize_t cmd_list_channels(int domain, struct ltt_session *session,
76 struct lttng_channel **channels);
77ssize_t cmd_list_domains(struct ltt_session *session,
78 struct lttng_domain **domains);
79void cmd_list_lttng_sessions(struct lttng_session *sessions, uid_t uid,
80 gid_t gid);
81ssize_t cmd_list_tracepoint_fields(int domain,
82 struct lttng_event_field **fields);
83ssize_t cmd_list_tracepoints(int domain, struct lttng_event **events);
84
85int cmd_calibrate(int domain, struct lttng_calibrate *calibrate);
6d805429 86int cmd_data_pending(struct ltt_session *session);
2f77fc4b
DG
87
88#endif /* CMD_H */
This page took 0.030286 seconds and 5 git commands to generate.