X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fchannel-internal.h;h=67a4482c716cb50846821be1d9ea91dfd6b5b225;hb=714363d38245d57d5fbb657f67bc069d6f4d8aff;hp=04b19322f96ea35f1340b6e5d6f74ac569ca3246;hpb=d72eb77f6e7a272889ad0eace21da52ae483800e;p=lttng-tools.git diff --git a/include/lttng/channel-internal.h b/include/lttng/channel-internal.h index 04b19322f..67a4482c7 100644 --- a/include/lttng/channel-internal.h +++ b/include/lttng/channel-internal.h @@ -9,6 +9,11 @@ #define LTTNG_CHANNEL_INTERNAL_H #include +#include +#include + +struct lttng_dynamic_buffer; +struct lttng_buffer_view; struct lttng_channel_extended { uint64_t discarded_events; @@ -17,4 +22,51 @@ struct lttng_channel_extended { int64_t blocking_timeout; } LTTNG_PACKED; +struct lttng_channel_comm { + /* Includes terminator `\0`. */ + uint32_t name_len; + uint8_t enabled; + + /* attr */ + int8_t overwrite; + uint64_t subbuf_size; + uint64_t num_subbuf; + uint32_t switch_timer_interval; + uint32_t read_timer_interval; + uint8_t output; + uint64_t tracefile_size; + uint64_t tracefile_count; + uint32_t live_timer_interval; + + /* Extended struct */ + uint64_t discarded_events; + uint64_t lost_packets; + uint64_t monitor_timer_interval; + int64_t blocking_timeout; +} LTTNG_PACKED; + +LTTNG_HIDDEN +struct lttng_channel *lttng_channel_create_internal(void); + +LTTNG_HIDDEN +struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src); + +LTTNG_HIDDEN +ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view, + struct lttng_channel **event); + +LTTNG_HIDDEN +int lttng_channel_serialize(struct lttng_channel *channel, + struct lttng_dynamic_buffer *buf); + +LTTNG_HIDDEN +void lttng_channel_set_default_extended_attr(struct lttng_domain *domain, + struct lttng_channel_extended *extended_attr); + +LTTNG_HIDDEN +enum lttng_error_code lttng_channels_create_and_flatten_from_buffer( + const struct lttng_buffer_view *view, + unsigned int count, + struct lttng_channel **channels); + #endif /* LTTNG_CHANNEL_INTERNAL_H */