Skip to content

Trace object

Philippe Proulx edited this page Mar 18, 2016 · 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 Type object or string (alias name) Type of packet header (must be a [[structure type object Structure type object]]) Optional
[[$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.

Each field of the packet header structure type (packet-header-type property) corresponds to one parameter of the generated packet opening function (prefixed with tph_), except for the following special fields, which are automatically written 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