Skip to content

Trace object

Philippe Proulx edited this page Sep 10, 2020 · 5 revisions

Metadata common to the whole CTF trace.

A trace object is used as the trace property of the metadata object.

Properties

Property Type Description Required? Default value
byte-order String Native byte order, amongst:
  • le: little-endian
  • be: big-endian
Required N/A
uuid String (UUID canonical format or auto) UUID (unique identifier of this trace); automatically generated if value is auto Optional No UUID
packet-header-type Structure type object or string (alias name) Type of packet header Optional No packet header
$include (Including external YAML files) String or array of strings Include base properties from external YAML file(s) Optional []

All the properties which have a default value can also be set to null to force this default value. This is especially useful when including external YAML files.

The packet header structure type (packet-header-type property) can only contain the following special fields, which are automatically written by the generated tracer if present:

Note that a standard type alias named ctf-magic (to use for the magic field of the packet header type) is available when including the stdmisc.yaml provided include file. A standard uuid type alias (to use for the uuid field of the packet header type) is also available in stdmisc.yaml.

The trace-basic.yaml provided include file can be included in a trace object to create a basic trace object (little-endian, generated UUID, magic field, UUID field, and 8-bit stream ID field).

As per CTF 1.8, the stream_id field is mandatory if there's more than one defined stream.

Examples

Complete trace object:

byte-order: le
uuid: auto
packet-header-type:
  class: struct
  fields:
    magic: uint32
    uuid:
      class: array
      length: 16
      element-type: uint8
    stream_id: uint16

Trace object based on the trace-basic.yaml provided include file:

$include: trace-basic.yaml
byte-order: be