relayd: implement file and session rotation on top of trace chunks
[lttng-tools.git] / src / common / sessiond-comm / relayd.h
index 47f1d5cd738327290e91b27a91ee8b765522cde3..b22cdf4c51881b5b06289e2decdfaa1f15e887dd 100644 (file)
@@ -228,15 +228,26 @@ struct lttcomm_relayd_reset_metadata {
        uint64_t version;
 } LTTNG_PACKED;
 
-struct lttcomm_relayd_rotate_stream {
+struct lttcomm_relayd_stream_rotation_position {
        uint64_t stream_id;
-       /* Ignored for metadata streams. */
+       /*
+        * Sequence number of the first packet belonging to the new
+        * "destination" trace chunk to which the stream is rotating.
+        *
+        * Ignored for metadata streams.
+        */
        uint64_t rotate_at_seq_num;
-       uint64_t new_chunk_id;
-       /* Includes trailing NULL. */
-       uint32_t pathname_length;
-       /* Must be the last member of this structure. */
-       char new_pathname[];
+} LTTNG_PACKED;
+
+struct lttcomm_relayd_rotate_streams {
+       uint32_t stream_count;
+       /*
+        * Streams can be rotated outside of a chunk but not be parented to
+        * a new chunk.
+        */
+       LTTNG_OPTIONAL_COMM(uint64_t) new_chunk_id;
+       /* `stream_count` positions follow. */
+       struct lttcomm_relayd_stream_rotation_position rotation_positions[];
 } LTTNG_PACKED;
 
 struct lttcomm_relayd_create_trace_chunk {
@@ -256,4 +267,13 @@ struct lttcomm_relayd_close_trace_chunk {
        LTTNG_OPTIONAL_COMM(uint32_t) LTTNG_PACKED close_command;
 } LTTNG_PACKED;
 
+struct lttcomm_relayd_trace_chunk_exists {
+       uint64_t chunk_id;
+} LTTNG_PACKED;
+
+struct lttcomm_relayd_trace_chunk_exists_reply {
+       struct lttcomm_relayd_generic_reply generic;
+       uint8_t trace_chunk_exists;
+} LTTNG_PACKED;
+
 #endif /* _RELAYD_COMM */
This page took 0.023886 seconds and 4 git commands to generate.