What is CTF? - efficios/barectf GitHub Wiki
See the CTF in a nutshell section of CTF's website to understand the basics of this trace format.
The most important thing to understand about CTF, for barectf use cases, is the layout of a binary stream packet:
- Packet header (defined at the trace level)
- Packet context (defined at the stream level)
- Sequence of events (defined at the stream level):
- Event header (defined at the stream level)
- Stream event context (defined at the stream level)
- Event context (defined at the event level)
- Event payload (defined at the event level)
The following diagram, stolen without remorse from CTF's website, shows said packet layout:

Any of those six dynamic scopes, if defined at all, has an associated CTF type. barectf requires them to be structure types.