mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-27 05:10:43 +00:00
0781895e0f
Introduce common infrastructure for describing and parsing attribute instead of custom per-attribute code scattered across several locations. Change align attribute syntax from the weird align_N to align[N]. This also allows to use literal constants as N. Introduce notion of builtin constants. Currently we have only PTR_SIZE, which is needed to replace align_ptr with align[PTR_SIZE].
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
# Copyright 2018 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
# See https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/languages/fidl/reference/wire-format/README.md
|
|
|
|
include <zircon/fidl.h>
|
|
|
|
type fidl_call_args[REQ_MESSAGE, REQ_HANDLES, RESP_MESSAGE, RESP_HANDLES] {
|
|
wr_bytes ptr[in, REQ_MESSAGE]
|
|
wr_handles ptr[in, REQ_HANDLES]
|
|
rd_bytes ptr[out, RESP_MESSAGE]
|
|
rd_handles ptr[out, RESP_HANDLES]
|
|
wr_num_bytes bytesize[wr_bytes, int32]
|
|
wr_num_handles bytesize4[wr_handles, int32]
|
|
rd_num_bytes bytesize[rd_bytes, int32]
|
|
rd_num_handles bytesize4[rd_handles, int32]
|
|
}
|
|
|
|
type fidl_union_member[TAG, TYPE] {
|
|
tag const[TAG, int32]
|
|
data TYPE
|
|
}
|
|
|
|
type fidl_message_header[METHOD_ORDINAL] {
|
|
txid const[0, int32]
|
|
reserved const[0, int32]
|
|
flags const[0, int32]
|
|
# TODO: this should be int32, but the consts passed here don't fit into 32 bits.
|
|
ordinal const[METHOD_ORDINAL, int64]
|
|
}
|
|
|
|
fidl_string {
|
|
size int64
|
|
data flags[fidl_alloc_presence, int64]
|
|
}
|
|
|
|
fidl_vector {
|
|
size int64
|
|
data flags[fidl_alloc_presence, int64]
|
|
}
|
|
|
|
type fidl_aligned[T] {
|
|
var T
|
|
} [align[8]]
|
|
|
|
type parallel_array[A, B] {
|
|
a array[A]
|
|
b array[B]
|
|
} [packed]
|
|
|
|
fidl_alloc_presence = FIDL_ALLOC_ABSENT, FIDL_ALLOC_PRESENT, FIDL_ALLOC_PRESENT, FIDL_ALLOC_PRESENT, FIDL_ALLOC_PRESENT, FIDL_ALLOC_PRESENT
|
|
fidl_handle_presence = FIDL_HANDLE_ABSENT, FIDL_HANDLE_PRESENT, FIDL_HANDLE_PRESENT, FIDL_HANDLE_PRESENT, FIDL_HANDLE_PRESENT, FIDL_HANDLE_PRESENT
|