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 | ||
13d03b1e | 11 | #include <common/error.hpp> |
c9e313bc | 12 | #include <common/macros.hpp> |
aa52c986 | 13 | |
8d7f6956 JG |
14 | struct lttng_channel_extended { |
15 | uint64_t discarded_events; | |
16 | uint64_t lost_packets; | |
e9404c27 | 17 | uint64_t monitor_timer_interval; |
491d1539 | 18 | int64_t blocking_timeout; |
8d7f6956 JG |
19 | } LTTNG_PACKED; |
20 | ||
999af9c1 JR |
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 | ||
cd9adb8b | 44 | struct lttng_channel *lttng_channel_create_internal(); |
999af9c1 JR |
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, | |
28f23191 | 49 | struct lttng_channel **event); |
999af9c1 | 50 | |
28f23191 | 51 | int lttng_channel_serialize(struct lttng_channel *channel, struct lttng_dynamic_buffer *buf); |
999af9c1 JR |
52 | |
53 | void lttng_channel_set_default_extended_attr(struct lttng_domain *domain, | |
28f23191 | 54 | struct lttng_channel_extended *extended_attr); |
999af9c1 JR |
55 | |
56 | enum lttng_error_code lttng_channels_create_and_flatten_from_buffer( | |
28f23191 | 57 | const struct lttng_buffer_view *view, unsigned int count, struct lttng_channel **channels); |
999af9c1 | 58 | |
8d7f6956 | 59 | #endif /* LTTNG_CHANNEL_INTERNAL_H */ |