Consumer daemon data available command support
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.h
1 /*
2 * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
3 * Copyright (C) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
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 along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef _LTTNG_KCONSUMER_H
20 #define _LTTNG_KCONSUMER_H
21
22 #include <common/consumer.h>
23
24 /*
25 * Take a snapshot for a specific fd
26 *
27 * Returns 0 on success, < 0 on error
28 */
29 int lttng_kconsumer_take_snapshot(struct lttng_consumer_local_data *ctx,
30 struct lttng_consumer_stream *stream);
31
32 /*
33 * Get the produced position
34 *
35 * Returns 0 on success, < 0 on error
36 */
37 int lttng_kconsumer_get_produced_snapshot(
38 struct lttng_consumer_local_data *ctx,
39 struct lttng_consumer_stream *stream,
40 unsigned long *pos);
41
42 int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
43 int sock, struct pollfd *consumer_sockpoll);
44
45
46 ssize_t lttng_kconsumer_read_subbuffer(struct lttng_consumer_stream *stream,
47 struct lttng_consumer_local_data *ctx);
48 int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream);
49 int lttng_kconsumer_data_available(struct lttng_consumer_stream *stream);
50
51 #endif /* _LTTNG_KCONSUMER_H */
This page took 0.040372 seconds and 4 git commands to generate.