+int stream_init_packet(struct relay_stream *stream, size_t packet_size,
+ bool *file_rotated);
+int stream_write(struct relay_stream *stream,
+ const struct lttng_buffer_view *packet, size_t padding_len);
+/* Called after the reception of a complete data packet. */
+int stream_update_index(struct relay_stream *stream, uint64_t net_seq_num,
+ bool rotate_index, bool *flushed, uint64_t total_size);
+int stream_complete_packet(struct relay_stream *stream,
+ size_t packet_total_size, uint64_t sequence_number,
+ bool index_flushed);
+/* Index info is in host endianness. */
+int stream_add_index(struct relay_stream *stream,
+ const struct lttcomm_relayd_index *index_info);
+int stream_reset_file(struct relay_stream *stream);
+