<div dir="ltr">Hi developers,<div><br></div><div>I have added event_header_compact in metadata and I have to add it in C language so the binary stream have this header. I followed the CTF documentation <a href="https://diamon.org/ctf/#spec6.1">https://diamon.org/ctf/#spec6.1</a></div><div><br></div><div>struct event_header_compact {<br>   enum : uint5_t { compact = 0 ... 30, extended = 31 } id;<br>      variant <id> {<br>          struct {<br>                      uint27_clock_monotonic_t timestamp;<br>           } compact;<br>            struct {<br>                      uint32_t id;<br>                  uint64_clock_monotonic_t timestamp;<br>           } extended;<br>   } v;<br>} align(8);</div><div><br></div><div>Since C does not have variant data-type. I am facing problem in adding it C language. What should be the approach for the same? Do you have any examples where it's been already done?</div><div><br></div><div>Thanks<br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="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></div>