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/macros.hpp>
13 struct lttng_channel_extended {
14 uint64_t discarded_events;
15 uint64_t lost_packets;
16 uint64_t monitor_timer_interval;
17 int64_t blocking_timeout;
20 struct lttng_channel_comm {
21 /* Includes terminator `\0`. */
29 uint32_t switch_timer_interval;
30 uint32_t read_timer_interval;
32 uint64_t tracefile_size;
33 uint64_t tracefile_count;
34 uint32_t live_timer_interval;
37 uint64_t discarded_events;
38 uint64_t lost_packets;
39 uint64_t monitor_timer_interval;
40 int64_t blocking_timeout;
43 struct lttng_channel *lttng_channel_create_internal();
45 struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src);
47 ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view,
48 struct lttng_channel **event);
50 int lttng_channel_serialize(struct lttng_channel *channel, struct lttng_dynamic_buffer *buf);
52 void lttng_channel_set_default_extended_attr(struct lttng_domain *domain,
53 struct lttng_channel_extended *extended_attr);
55 enum lttng_error_code lttng_channels_create_and_flatten_from_buffer(
56 const struct lttng_buffer_view *view, unsigned int count, struct lttng_channel **channels);
58 #endif /* LTTNG_CHANNEL_INTERNAL_H */