Clean-up: sessiond: cmd_enable_channel_internal
[lttng-tools.git] / include / lttng / channel-internal.h
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/macros.h>
12 #include <lttng/channel.h>
13 #include <lttng/lttng-error.h>
14
15 struct lttng_dynamic_buffer;
16 struct lttng_buffer_view;
17
18 struct lttng_channel_extended {
19 uint64_t discarded_events;
20 uint64_t lost_packets;
21 uint64_t monitor_timer_interval;
22 int64_t blocking_timeout;
23 } LTTNG_PACKED;
24
25 struct lttng_channel_comm {
26 /* Includes terminator `\0`. */
27 uint32_t name_len;
28 uint8_t enabled;
29
30 /* attr */
31 int8_t overwrite;
32 uint64_t subbuf_size;
33 uint64_t num_subbuf;
34 uint32_t switch_timer_interval;
35 uint32_t read_timer_interval;
36 uint8_t output;
37 uint64_t tracefile_size;
38 uint64_t tracefile_count;
39 uint32_t live_timer_interval;
40
41 /* Extended struct */
42 uint64_t discarded_events;
43 uint64_t lost_packets;
44 uint64_t monitor_timer_interval;
45 int64_t blocking_timeout;
46 } LTTNG_PACKED;
47
48 struct lttng_channel *lttng_channel_create_internal(void);
49
50 struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src);
51
52 ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view,
53 struct lttng_channel **event);
54
55 int lttng_channel_serialize(struct lttng_channel *channel,
56 struct lttng_dynamic_buffer *buf);
57
58 void lttng_channel_set_default_extended_attr(struct lttng_domain *domain,
59 struct lttng_channel_extended *extended_attr);
60
61 enum lttng_error_code lttng_channels_create_and_flatten_from_buffer(
62 const struct lttng_buffer_view *view,
63 unsigned int count,
64 struct lttng_channel **channels);
65
66 #endif /* LTTNG_CHANNEL_INTERNAL_H */
This page took 0.030323 seconds and 4 git commands to generate.