github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/fuchsia/sockets.txt (about)

     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  
     4  include <zircon/syscalls.h>
     5  
     6  resource zx_socket[zx_handle]
     7  
     8  zx_socket_create(options flags[socket_create_options], out0 ptr[out, zx_socket], out1 ptr[out, zx_socket])
     9  zx_socket_read(handle zx_socket, options flags[socket_read_options], buffer ptr[out, array[int8]], size len[buffer], actual ptr[out, intptr])
    10  zx_socket_write(handle zx_socket, options flags[socket_write_options], buffer ptr[in, array[int8]], size len[buffer], actual ptr[out, intptr])
    11  zx_socket_set_disposition(handle zx_socket, disposition flags[socket_disposition_options], disposition_peer flags[socket_disposition_options])
    12  
    13  socket_create_options = ZX_SOCKET_STREAM, ZX_SOCKET_DATAGRAM
    14  socket_read_options = 0, ZX_SOCKET_PEEK
    15  socket_write_options = 0
    16  socket_disposition_options = ZX_SOCKET_DISPOSITION_WRITE_DISABLED, ZX_SOCKET_DISPOSITION_WRITE_ENABLED