X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Frotate-internal.h;h=265148376fa744e493edcd0bd1a57c235957a089;hp=908422e190b1c0a79d00220d3eef6459a4e1afe2;hb=d68c9a04537b683991a7355b812b0af954008cf1;hpb=d88744a44aa5f2ca90ab87946692b9eed3120641 diff --git a/include/lttng/rotate-internal.h b/include/lttng/rotate-internal.h index 908422e19..265148376 100644 --- a/include/lttng/rotate-internal.h +++ b/include/lttng/rotate-internal.h @@ -20,20 +20,67 @@ #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 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 { + bool is_set; + char path[LTTNG_PATH_MAX]; + } archive_location; +}; + /* * Internal objects between lttng-ctl and the session daemon, the values - * are then copied to the user's lttng_rotate_session_handle object. + * are then copied to the user's lttng_rotation_handle object. */ + /* For the LTTNG_ROTATE_SESSION command. */ struct lttng_rotate_session_return { - uint64_t rotate_id; - /* Represents values defined in enum lttng_rotation_status. */ + 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; + char path[LTTNG_PATH_MAX]; +} LTTNG_PACKED; + +/* For the LTTNG_SESSION_GET_CURRENT_OUTPUT command. */ +struct lttng_session_get_current_output_return { + char path[LTTNG_PATH_MAX]; } LTTNG_PACKED; #endif /* LTTNG_ROTATE_INTERNAL_ABI_H */