aboutsummaryrefslogtreecommitdiffstats
path: root/sys/fuchsia/stream.txt
blob: a1d9839b0059ac63670d7dff4b4f8b0ea161bd93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright 2020 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://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/stream.fidl

include <zircon/syscalls.h>

resource zx_stream[zx_handle]
resource zx_offset[intptr]

zx_stream_create(options flags[stream_create_options], vmo zx_vmo, seek zx_offset, out_stream ptr[out, zx_stream])

zx_stream_writev(handle zx_stream, options flags[stream_writev_options], vector ptr[in, array[zx_iovec]], num_vector len[vector], actual ptr[out, intptr])

zx_stream_writev_at(handle zx_stream, options flags[stream_writev_options], offset zx_offset, vector ptr[in, array[zx_iovec]], num_vector len[vector], actual ptr[out, intptr])

zx_stream_readv(handle zx_stream, options flags[stream_readv_options], vector ptr[out, array[zx_iovec]], num_vector len[vector], actual ptr[out, intptr])

zx_stream_readv_at(handle zx_stream, options flags[stream_readv_options], offset zx_offset, vector ptr[out, array[zx_iovec]], num_vector len[vector], actual ptr[out, intptr])

zx_stream_seek(handle zx_handle, whence flags[stream_seek_origin], offset int64, out_seek ptr[out, zx_offset])

zx_iovec {
	buffer		ptr[inout, array[int8]]
	capacity	len[buffer, intptr]
}

stream_create_options = ZX_STREAM_MODE_READ, ZX_STREAM_MODE_WRITE, ZX_STREAM_MODE_APPEND
stream_writev_options = 0, ZX_STREAM_APPEND
stream_readv_options = 0
stream_seek_origin = ZX_STREAM_SEEK_ORIGIN_START, ZX_STREAM_SEEK_ORIGIN_CURRENT, ZX_STREAM_SEEK_ORIGIN_END