-
Notifications
You must be signed in to change notification settings - Fork 17
Structure type object
Philippe Proulx edited this page Sep 10, 2020
·
3 revisions
A CTF structure type, i.e. a list of fields, each field having a name and a CTF type.
See also: Type object.
Property | Type | Description | Required? | Default value |
---|---|---|---|---|
class |
String | Set to struct or structure
|
Required | N/A |
min-align |
Integer (positive) | Minimum alignment (bits) (power of two) | Optional | 1 |
fields |
Associative array of field names (string) to Type objects or strings (alias names) | Structure type's fields | 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
also using type inheritance or
when including external YAML files.
The order of the entries in the fields
property is important; it is in
this order that the fields are serialized in binary streams.
A given structure field type's field's type can only refer to the following type objects:
- Integer type object
- Floating point number type object
- Enumeration type object
- String type object
- Array type object (static or dynamic)
class: struct
min-align: 32
fields:
msg_id: uint8
src:
class: string
dst:
class: string
dst_ip_addr:
class: array
length: 4
element-type: uint8
dst_mac_addr:
class: array
length: 6
element-type: uint8
Copyright © 2014-2016 Philippe Proulx (project license)