2 * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_CHANNEL_INTERNAL_H
9 #define LTTNG_CHANNEL_INTERNAL_H
11 #include <common/error.hpp>
12 #include <common/macros.hpp>
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;
21 struct lttng_channel_comm {
22 /* Includes terminator `\0`. */
30 uint32_t switch_timer_interval;
31 uint32_t read_timer_interval;
33 uint64_t tracefile_size;
34 uint64_t tracefile_count;
35 uint32_t live_timer_interval;
38 uint64_t discarded_events;
39 uint64_t lost_packets;
40 uint64_t monitor_timer_interval;
41 int64_t blocking_timeout;
44 struct lttng_channel *lttng_channel_create_internal();
46 struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src);
48 ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view,
49 struct lttng_channel **event);
51 int lttng_channel_serialize(struct lttng_channel *channel, struct lttng_dynamic_buffer *buf);
53 void lttng_channel_set_default_extended_attr(struct lttng_domain *domain,
54 struct lttng_channel_extended *extended_attr);
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);
59 #endif /* LTTNG_CHANNEL_INTERNAL_H */