<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<a href="https://diamon.org/ctf/#spec7" rel="noreferrer" target="_blank">https://diamon.org/ctf/#spec7</a> - "Magic number (CTF magic number:<br>
0xC1FC1FC1) specifies that this is a CTF packet. This magic number is<br>
optional ... Stream ID, used as reference to stream description in<br>
metadata. This field is optional if there is only one stream<br>
description"<br>
<br>
These errors are caused by the metadata mismatch from the stream file,<br>
not by babeltrace.  You need to write the metadata to match the trace<br>
data / stream.<br></blockquote><div><br></div><div>The native trace stream in HEX currently looks like this</div><div><br></div>0400 0000 ed65 7e3d 0d00 010a 6231 5443<br>5e00 0000 5e00 0000 5e00 0000 0010 0000<br>0000 0000 0100 0000 0000 0000 0400 0000<br>61a3 813d 0000 0000 0d00 010a 5e00 0000<br>5e00 0000 1100 0000 0100 0000 0000 0000<br><div>0400 0000 3bb2 843d da0e 0300 0d00 010a </div><div><br></div><div>Above one is not CTF stream because it does not have CTF magic number</div><div><br></div><div>So it should look like this in HEX</div><div><br></div><div>c11f fcc1 0000 0000 0000 0000 0000 0000<br>0400 0000 ed65 7e3d 0d00 010a 6231 5443<br>5e00 0000 5e00 0000 5e00 0000 0010 0000<br>0000 0000 0100 0000 0000 0000 0400 0000<br>61a3 813d 0000 0000 0d00 010a 5e00 0000<br>5e00 0000 1100 0000 0100 0000 0000 0000<br><div>0400 0000 3bb2 843d da0e 0300 0d00 010a </div></div><div><br></div><div>All the example on [1] have this thing in common. I modified the stream file and added magic number(0xc11fcc1) in it. Then, I parsed both stream file and metadata. Babeltrace was able to read the stream file.</div></div><br clear="all"><div>[1] <a href="https://diamon.org/ctf/">https://diamon.org/ctf/</a></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="4"><b>Ravindra Kumar Meena</b></font>,<div><span style="color:rgb(102,102,102)">B. Tech. Computer Science and Engineering,<br></span></div><div><span style="color:rgb(102,102,102)"><a href="https://www.iitism.ac.in/" style="color:rgb(17,85,204)" target="_blank">Indian Institute of Technology (Indian School of Mines)</a>, Dhanbad</span></div></div></div></div></div></div>