+lst::type::cuptr lsu::registry_session::_create_packet_header() const
+{
+ lst::structure_type::fields packet_header_fields;
+
+ /* uint32_t magic */
+ packet_header_fields.emplace_back(lttng::make_unique<lst::field>("magic",
+ lttng::make_unique<lst::integer_type>(abi.uint32_t_alignment,
+ abi.byte_order, 32, lst::integer_type::signedness::UNSIGNED,
+ lst::integer_type::base::HEXADECIMAL,
+ std::initializer_list<lst::integer_type::role>({lst::integer_type::role::PACKET_MAGIC_NUMBER}))));
+
+ /* uuid */
+ packet_header_fields.emplace_back(lttng::make_unique<lst::field>("uuid",
+ lttng::make_unique<lst::static_length_blob_type>(0, 16,
+ std::initializer_list<lst::static_length_blob_type::role>({lst::static_length_blob_type::role::METADATA_STREAM_UUID}))));
+
+ /* uint32_t stream_id */
+ packet_header_fields.emplace_back(lttng::make_unique<lst::field>("stream_id",
+ lttng::make_unique<lst::integer_type>(abi.uint32_t_alignment,
+ abi.byte_order, 32, lst::integer_type::signedness::UNSIGNED,
+ lst::integer_type::base::DECIMAL,
+ std::initializer_list<lst::integer_type::role>({lst::integer_type::role::DATA_STREAM_CLASS_ID}))));
+
+ /* uint64_t stream_instance_id */
+ packet_header_fields.emplace_back(lttng::make_unique<lst::field>("stream_instance_id",
+ lttng::make_unique<lst::integer_type>(abi.uint64_t_alignment,
+ abi.byte_order, 64, lst::integer_type::signedness::UNSIGNED,
+ lst::integer_type::base::DECIMAL,
+ std::initializer_list<lst::integer_type::role>({lst::integer_type::role::DATA_STREAM_ID}))));
+
+ return lttng::make_unique<lst::structure_type>(0, std::move(packet_header_fields));
+}
+
+const lst::type *lsu::registry_session::get_packet_header() const noexcept
+{
+ return _packet_header.get();
+}
+