• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 syzkaller project authors. All rights reserved.
2# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
3
4include <zircon/syscalls.h>
5
6resource zx_chan[zx_handle]
7
8zx_channel_create(options const[0], out0 ptr[out, zx_chan], out1 ptr[out, zx_chan])
9zx_channel_call(handle zx_chan, options const[0], deadline zx_time, args ptr[in, zx_channel_call_args], actual_bytes ptr[out, int32], actual_handles ptr[out, int32], read_status ptr[out, int32])
10zx_channel_read(handle zx_chan, options flags[chan_read_options], bytes ptr[out, array[int8]], handles ptr[out, zx_handle], num_bytes len[bytes], num_handles len[handles], actual_bytes ptr[out, int32], actual_handles ptr[out, int32])
11zx_channel_write(handle zx_chan, options const[0], bytes ptr[in, array[int8]], num_bytes len[bytes], handles ptr[in, array[zx_handle]], num_handles len[handles])
12
13zx_channel_read_etc(handle zx_chan, options int32, bytes ptr[out, array[int8]], handles ptr[out, zx_handle], num_bytes len[bytes], num_handles len[handles], actual_bytes ptr[out, int32], actual_handles ptr[out, int32])
14
15zx_channel_call_args {
16	wr_bytes	ptr[in, array[int8]]
17	wr_handles	ptr[in, array[zx_handle]]
18	rd_bytes	ptr[out, array[int8]]
19	rd_handles	ptr[out, array[zx_handle]]
20	wr_num_bytes	len[wr_bytes, int32]
21	wr_num_handles	len[wr_handles, int32]
22	rd_num_bytes	len[rd_bytes, int32]
23	rd_num_handles	len[rd_handles, int32]
24}
25
26chan_read_options = ZX_CHANNEL_READ_MAY_DISCARD
27