rotation-api: pass session name explicitly
[lttng-tools.git] / include / lttng / rotate-internal.h
index f5e4dc950b4875ef5e239e2ec497042d34643c59..8d0823b7a8e42f05e5731fbc9dc58c54e344ce8a 100644 (file)
@@ -32,8 +32,6 @@
  * 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;
 };
@@ -44,8 +42,6 @@ struct lttng_rotation_immediate_attr {
  * This is opaque to the public library.
  */
 struct lttng_rotation_schedule_attr {
-       /* Session name to rotate. */
-       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. */
@@ -69,10 +65,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;
 };
 
 /*
@@ -89,7 +82,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. */
This page took 0.023586 seconds and 4 git commands to generate.