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_socket[zx_handle] 7 8zx_socket_create(options flags[socket_create_options], out0 ptr[out, zx_socket], out1 ptr[out, zx_socket]) 9zx_socket_read(handle zx_socket, options flags[socket_read_options], buffer ptr[out, array[int8]], size len[buffer], actual ptr[out, intptr]) 10zx_socket_write(handle zx_socket, options flags[socket_write_options], buffer ptr[in, array[int8]], size len[buffer], actual ptr[out, intptr]) 11zx_socket_share(handle zx_socket, socket_to_share zx_socket) 12zx_socket_accept(handle zx_socket, out_socket ptr[out, zx_socket]) 13 14socket_create_options = ZX_SOCKET_STREAM, ZX_SOCKET_DATAGRAM, ZX_SOCKET_HAS_CONTROL 15socket_read_options = ZX_SOCKET_CONTROL 16socket_write_options = ZX_SOCKET_CONTROL, ZX_SOCKET_SHUTDOWN_READ, ZX_SOCKET_SHUTDOWN_WRITE 17