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
15 #include <lttng/constant.h>
16 #include <lttng/rotation.h>
17 #include <common/macros.h>
20 * Object returned by the rotate session API.
21 * This is opaque to the public library.
23 struct lttng_rotation_handle
{
24 char session_name
[LTTNG_NAME_MAX
];
26 * ID of the rotate command.
27 * This matches the session->rotate_count, so the handle is valid until
28 * the next rotate command. After that, the rotation_get_state command
29 * returns the "expired" state.
33 * Where the rotated (readable) trace has been stored when the
34 * rotation is completed.
36 struct lttng_trace_archive_location
*archive_location
;
39 struct lttng_rotation_schedule
{
40 enum lttng_rotation_schedule_type type
;
43 struct lttng_rotation_schedule_size_threshold
{
44 struct lttng_rotation_schedule parent
;
51 struct lttng_rotation_schedule_periodic
{
52 struct lttng_rotation_schedule parent
;
59 struct lttng_rotation_schedules
{
61 * Only one rotation schedule per type is supported for now.
62 * Schedules are owned by this object.
65 struct lttng_rotation_schedule
*schedules
[2];
69 * Internal objects between lttng-ctl and the session daemon, the values
70 * are then copied to the user's lttng_rotation_handle object.
73 /* For the LTTNG_ROTATE_SESSION command. */
74 struct lttng_rotate_session_return
{
78 /* For the LTTNG_ROTATION_GET_INFO command. */
79 struct lttng_rotation_get_info_return
{
80 /* Represents values defined in enum lttng_rotation_state. */
83 * Represents values defined in enum lttng_trace_archive_location_type.
88 char absolute_path
[LTTNG_PATH_MAX
];
91 char host
[LTTNG_HOST_NAME_MAX
];
93 * Represents values defined in
94 * enum lttng_trace_archive_location_relay_protocol_type.
100 } LTTNG_PACKED ports
;
101 char relative_path
[LTTNG_PATH_MAX
];
102 } LTTNG_PACKED relay
;
106 /* For the LTTNG_SESSION_LIST_SCHEDULES command. */
107 struct lttng_session_list_schedules_return
{
118 #endif /* LTTNG_ROTATE_INTERNAL_ABI_H */