- struct bt_ctf_field *field, const char *field_name,
- struct bt_ctf_field *writer_packet_context,
- struct bt_ctf_field_type *writer_packet_context_type);
+ const bt_field *field, const char *field_name,
+ const bt_field *writer_packet_context,
+ bt_field_type *writer_packet_context_type);
+
+
+/*
+ * Copy the packet_header from the packet passed in parameter and assign it
+ * to the writer_stream.
+ *
+ * Returns 0 on success or -1 on error.
+ */
+BT_HIDDEN
+int ctf_stream_copy_packet_header(FILE *err, const bt_packet *packet,
+ const bt_stream *writer_stream);
+
+/*
+ * Copy the packet_header from the packet passed in parameter and assign it
+ * to the writer_packet.
+ *
+ * Returns 0 on success or -1 on error.
+ */
+BT_HIDDEN
+int ctf_packet_copy_header(FILE *err, const bt_packet *packet,
+ const bt_packet *writer_packet);