2 * Copyright (C) 2017 Julien Desfossez <jdesfossez@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_ROTATE_INTERNAL_ABI_H
9 #define LTTNG_ROTATE_INTERNAL_ABI_H
11 #include <common/macros.hpp>
13 #include <lttng/constant.h>
14 #include <lttng/rotation.h>
21 * Object returned by the rotate session API.
22 * This is opaque to the public library.
24 struct lttng_rotation_handle {
25 char session_name[LTTNG_NAME_MAX];
27 * ID of the rotate command.
28 * This matches the session->rotate_count, so the handle is valid until
29 * the next rotate command. After that, the rotation_get_state command
30 * returns the "expired" state.
34 * Where the rotated (readable) trace has been stored when the
35 * rotation is completed.
37 struct lttng_trace_archive_location *archive_location;
40 struct lttng_rotation_schedule {
41 enum lttng_rotation_schedule_type type;
44 struct lttng_rotation_schedule_size_threshold {
45 struct lttng_rotation_schedule parent;
52 struct lttng_rotation_schedule_periodic {
53 struct lttng_rotation_schedule parent;
60 struct lttng_rotation_schedules {
62 * Only one rotation schedule per type is supported for now.
63 * Schedules are owned by this object.
66 struct lttng_rotation_schedule *schedules[2];
70 * Internal objects between lttng-ctl and the session daemon, the values
71 * are then copied to the user's lttng_rotation_handle object.
74 /* For the LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION command. */
75 struct lttng_rotate_session_return {
79 /* For the LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO command. */
80 struct lttng_rotation_get_info_return {
81 /* Represents values defined in enum lttng_rotation_state. */
84 * Represents values defined in enum lttng_trace_archive_location_type.
89 char absolute_path[LTTNG_PATH_MAX];
92 char host[LTTNG_HOST_NAME_MAX];
94 * Represents values defined in
95 * enum lttng_trace_archive_location_relay_protocol_type.
101 } LTTNG_PACKED ports;
102 char relative_path[LTTNG_PATH_MAX];
103 } LTTNG_PACKED relay;
107 /* For the LTTNG_SESSION_LIST_SCHEDULES command. */
108 struct lttng_session_list_schedules_return {
112 } LTTNG_PACKED periodic;
119 #endif /* LTTNG_ROTATE_INTERNAL_ABI_H */