Clean-up: consumer.hpp: coding style indentation fix
[lttng-tools.git] / include / lttng / channel-internal.hpp
1 /*
2 * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_CHANNEL_INTERNAL_H
9 #define LTTNG_CHANNEL_INTERNAL_H
10
11 #include <common/error.hpp>
12 #include <common/macros.hpp>
13
14 struct lttng_channel_extended {
15 uint64_t discarded_events;
16 uint64_t lost_packets;
17 uint64_t monitor_timer_interval;
18 int64_t blocking_timeout;
19 } LTTNG_PACKED;
20
21 struct lttng_channel_comm {
22 /* Includes terminator `\0`. */
23 uint32_t name_len;
24 uint8_t enabled;
25
26 /* attr */
27 int8_t overwrite;
28 uint64_t subbuf_size;
29 uint64_t num_subbuf;
30 uint32_t switch_timer_interval;
31 uint32_t read_timer_interval;
32 uint8_t output;
33 uint64_t tracefile_size;
34 uint64_t tracefile_count;
35 uint32_t live_timer_interval;
36
37 /* Extended struct */
38 uint64_t discarded_events;
39 uint64_t lost_packets;
40 uint64_t monitor_timer_interval;
41 int64_t blocking_timeout;
42 } LTTNG_PACKED;
43
44 struct lttng_channel *lttng_channel_create_internal();
45
46 struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src);
47
48 ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view,
49 struct lttng_channel **event);
50
51 int lttng_channel_serialize(struct lttng_channel *channel, struct lttng_dynamic_buffer *buf);
52
53 void lttng_channel_set_default_extended_attr(struct lttng_domain *domain,
54 struct lttng_channel_extended *extended_attr);
55
56 enum lttng_error_code lttng_channels_create_and_flatten_from_buffer(
57 const struct lttng_buffer_view *view, unsigned int count, struct lttng_channel **channels);
58
59 #endif /* LTTNG_CHANNEL_INTERNAL_H */
This page took 0.03022 seconds and 4 git commands to generate.