X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fchannel-internal.h;h=c3e1230635558fad9df00c711b7f6d7c5b957616;hb=4878de5c7deb512bbdac4fdfc498907efa06fb7c;hp=030b470153c23a8ce7bb67af155590c6b630de71;hpb=aa52c9865e22402a2e310b5b770ae0352b6a0be0;p=lttng-tools.git diff --git a/include/lttng/channel-internal.h b/include/lttng/channel-internal.h index 030b47015..c3e123063 100644 --- a/include/lttng/channel-internal.h +++ b/include/lttng/channel-internal.h @@ -1,24 +1,19 @@ /* - * Copyright (C) 2015 - Jérémie Galarneau + * Copyright (C) 2015 Jérémie Galarneau * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_CHANNEL_INTERNAL_H #define LTTNG_CHANNEL_INTERNAL_H #include +#include +#include + +struct lttng_dynamic_buffer; +struct lttng_buffer_view; struct lttng_channel_extended { uint64_t discarded_events; @@ -27,4 +22,45 @@ 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; + +struct lttng_channel *lttng_channel_create_internal(void); + +struct lttng_channel *lttng_channel_copy(const struct lttng_channel *src); + +ssize_t lttng_channel_create_from_buffer(const struct lttng_buffer_view *view, + struct lttng_channel **event); + +int lttng_channel_serialize(struct lttng_channel *channel, + struct lttng_dynamic_buffer *buf); + +void lttng_channel_set_default_extended_attr(struct lttng_domain *domain, + struct lttng_channel_extended *extended_attr); + +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 */