Commit | Line | Data |
---|---|---|
8d7f6956 | 1 | /* |
ab5be9fa | 2 | * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
8d7f6956 | 3 | * |
ab5be9fa | 4 | * SPDX-License-Identifier: LGPL-2.1-only |
8d7f6956 | 5 | * |
8d7f6956 JG |
6 | */ |
7 | ||
8 | #ifndef LTTNG_CHANNEL_INTERNAL_H | |
9 | #define LTTNG_CHANNEL_INTERNAL_H | |
10 | ||
c9e313bc | 11 | #include <common/macros.hpp> |
aa52c986 | 12 | |
8d7f6956 JG |
13 | struct lttng_channel_extended { |
14 | uint64_t discarded_events; | |
15 | uint64_t lost_packets; | |
e9404c27 | 16 | uint64_t monitor_timer_interval; |
491d1539 | 17 | int64_t blocking_timeout; |
8d7f6956 JG |
18 | } LTTNG_PACKED; |
19 | ||
999af9c1 JR |
20 | struct lttng_channel_comm { |
21 | /* Includes terminator `\0`. */ | |
22 | uint32_t name_len; | |
23 | uint8_t enabled; | |
24 | ||
25 | /* attr */ | |
26 | int8_t overwrite; | |
27 | uint64_t subbuf_size; | |
28 | uint64_t num_subbuf; | |
29 | uint32_t switch_timer_interval; | |
30 | uint32_t read_timer_interval; | |
31 | uint8_t output; | |
32 | uint64_t tracefile_size; | |
33 | uint64_t tracefile_count; | |
34 | uint32_t live_timer_interval; | |
35 | ||
36 | /* Extended struct */ | |
37 | uint64_t discarded_events; | |
38 | uint64_t lost_packets; | |
39 | uint64_t monitor_timer_interval; | |
40 | int64_t blocking_timeout; | |
41 | } LTTNG_PACKED; | |
42 | ||
cd9adb8b | 43 | struct lttng_channel *lttng_channel_create_internal(); |
999af9c1 JR |
44 | |
45 | struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src); | |
46 | ||
47 | ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view, | |
28f23191 | 48 | struct lttng_channel **event); |
999af9c1 | 49 | |
28f23191 | 50 | int lttng_channel_serialize(struct lttng_channel *channel, struct lttng_dynamic_buffer *buf); |
999af9c1 JR |
51 | |
52 | void lttng_channel_set_default_extended_attr(struct lttng_domain *domain, | |
28f23191 | 53 | struct lttng_channel_extended *extended_attr); |
999af9c1 JR |
54 | |
55 | enum lttng_error_code lttng_channels_create_and_flatten_from_buffer( | |
28f23191 | 56 | const struct lttng_buffer_view *view, unsigned int count, struct lttng_channel **channels); |
999af9c1 | 57 | |
8d7f6956 | 58 | #endif /* LTTNG_CHANNEL_INTERNAL_H */ |