X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Flttng%2Frotate-internal.h;h=0296efed1128c992ec855189c00a63f0b6027c04;hb=HEAD;hp=74c85b0b648c5093eda2336552b52979e8d012d0;hpb=dd73d57bb95fae31161ca0781108d166082a06f5;p=lttng-tools.git diff --git a/include/lttng/rotate-internal.h b/include/lttng/rotate-internal.h deleted file mode 100644 index 74c85b0b6..000000000 --- a/include/lttng/rotate-internal.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2017 - Julien Desfossez - * - * 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. - * - * 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_ROTATE_INTERNAL_ABI_H -#define LTTNG_ROTATE_INTERNAL_ABI_H - -#include -#include -#include - -#include -#include -#include - -/* - * Object used as input parameter to the rotate session API for immediate - * rotations. - * This is opaque to the public library. - */ -struct lttng_rotation_immediate_attr { - /* Session name to rotate. */ - char session_name[LTTNG_NAME_MAX]; - /* For the rotate pending request. */ - uint64_t rotate_id; -}; - -/* - * Object used as input parameter to the lttng_rotate_schedule API for - * automatic rotations. - * This is opaque to the public library. - */ -struct lttng_rotation_schedule_attr { - /* Session name to rotate. */ - char session_name[LTTNG_NAME_MAX]; - /* > 0 if a timer is set. */ - uint64_t timer_us; - /* > 0 if the session should rotate when it has written that many bytes. */ - uint64_t size; -} LTTNG_PACKED; - -/* - * Object returned by the rotate session API. - * This is opaque to the public library. - */ -struct lttng_rotation_handle { - char session_name[LTTNG_NAME_MAX]; - /* - * ID of the rotate command. - * This matches the session->rotate_count, so the handle is valid until - * the next rotate command. After that, the rotation_get_state command - * returns the "expired" state. - */ - uint64_t rotation_id; - /* - * Where the rotated (readable) trace has been stored when the - * rotation is completed. - */ - struct lttng_trace_archive_location *archive_location; -}; - -/* - * Internal objects between lttng-ctl and the session daemon, the values - * are then copied to the user's lttng_rotation_handle object. - */ - -/* For the LTTNG_ROTATE_SESSION command. */ -struct lttng_rotate_session_return { - uint64_t rotation_id; -} LTTNG_PACKED; - -/* For the LTTNG_ROTATION_GET_INFO command. */ -struct lttng_rotation_get_info_return { - /* Represents values defined in enum lttng_rotation_state. */ - int32_t status; - /* Represents values defined in enum lttng_rotation_state. */ - uint8_t location_type; - union { - struct { - char absolute_path[LTTNG_PATH_MAX]; - } LTTNG_PACKED local; - struct { - char host[LTTNG_HOST_NAME_MAX]; - /* - * Represents values defined in - * enum lttng_trace_archive_location_relay_protocol_type. - */ - uint8_t protocol; - struct { - uint16_t control; - uint16_t data; - } LTTNG_PACKED ports; - char relative_path[LTTNG_PATH_MAX]; - } LTTNG_PACKED relay; - } location; -} LTTNG_PACKED; - -/* For the LTTNG_SESSION_GET_CURRENT_OUTPUT command. */ -struct lttng_session_get_current_output_return { - char path[LTTNG_PATH_MAX]; -} LTTNG_PACKED; - -/* For the LTTNG_ROTATION_SCHEDULE_GET_TIMER_PERIOD command. */ -struct lttng_rotation_schedule_get_timer_period { - uint64_t rotate_timer; -} LTTNG_PACKED; - -/* For the LTTNG_ROTATION_SCHEDULE_GET_SIZE command. */ -struct lttng_rotation_schedule_get_size { - uint64_t rotate_size; -} LTTNG_PACKED; - -#endif /* LTTNG_ROTATE_INTERNAL_ABI_H */