X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Frotate-internal.h;h=e359cd741050d7a860edacdf08a39d95c3df87a5;hb=05f8afa9c72f0c673628dd5aeb6e8abcab6a5bf8;hp=00a348ff793673842145c9d0c02c49cd271e698f;hpb=259c267446a63c501298f39a5d2397314b11f729;p=lttng-tools.git diff --git a/include/lttng/rotate-internal.h b/include/lttng/rotate-internal.h index 00a348ff7..e359cd741 100644 --- a/include/lttng/rotate-internal.h +++ b/include/lttng/rotate-internal.h @@ -48,6 +48,8 @@ struct lttng_rotation_schedule_attr { 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; /* @@ -67,10 +69,7 @@ struct lttng_rotation_handle { * Where the rotated (readable) trace has been stored when the * rotation is completed. */ - struct { - bool is_set; - char path[LTTNG_PATH_MAX]; - } archive_location; + struct lttng_trace_archive_location *archive_location; }; /* @@ -87,7 +86,26 @@ struct lttng_rotate_session_return { struct lttng_rotation_get_info_return { /* Represents values defined in enum lttng_rotation_state. */ int32_t status; - char path[LTTNG_PATH_MAX]; + /* Represents values defined in enum lttng_rotation_state. */ + int8_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. + */ + int8_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. */ @@ -95,4 +113,14 @@ 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 */