X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Frotate-internal.h;h=966f9f969fe5c8bcbf895d02ad7374a65aa80987;hb=3647288fe42b25340f905046f3bd9aef21e12aaa;hp=265148376fa744e493edcd0bd1a57c235957a089;hpb=d68c9a04537b683991a7355b812b0af954008cf1;p=lttng-tools.git diff --git a/include/lttng/rotate-internal.h b/include/lttng/rotate-internal.h index 265148376..966f9f969 100644 --- a/include/lttng/rotate-internal.h +++ b/include/lttng/rotate-internal.h @@ -26,18 +26,6 @@ #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. @@ -55,10 +43,36 @@ struct lttng_rotation_handle { * Where the rotated (readable) trace has been stored when the * rotation is completed. */ + struct lttng_trace_archive_location *archive_location; +}; + +struct lttng_rotation_schedule { + enum lttng_rotation_schedule_type type; +}; + +struct lttng_rotation_schedule_size_threshold { + struct lttng_rotation_schedule parent; struct { - bool is_set; - char path[LTTNG_PATH_MAX]; - } archive_location; + bool set; + uint64_t bytes; + } size; +}; + +struct lttng_rotation_schedule_periodic { + struct lttng_rotation_schedule parent; + struct { + bool set; + uint64_t us; + } period; +}; + +struct lttng_rotation_schedules { + /* + * Only one rotation schedule per type is supported for now. + * Schedules are owned by this object. + */ + unsigned int count; + struct lttng_rotation_schedule *schedules[2]; }; /* @@ -75,7 +89,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. */ @@ -83,4 +116,16 @@ struct lttng_session_get_current_output_return { char path[LTTNG_PATH_MAX]; } LTTNG_PACKED; +/* For the LTTNG_SESSION_LIST_SCHEDULES command. */ +struct lttng_session_list_schedules_return { + struct { + uint8_t set; + uint64_t value; + } periodic; + struct { + uint8_t set; + uint64_t value; + } size; +} LTTNG_PACKED; + #endif /* LTTNG_ROTATE_INTERNAL_ABI_H */