/qemu/contrib/ivshmem-server/ |
H A D | ivshmem-server.c | 32 ivshmem_server_send_one_msg(int sock_fd, int64_t peer_id, int fd) in ivshmem_server_send_one_msg() argument 63 ret = sendmsg(sock_fd, &msg, 0); in ivshmem_server_send_one_msg() 80 close(peer->sock_fd); in ivshmem_server_free_peer() 85 ivshmem_server_send_one_msg(other_peer->sock_fd, peer->id, -1); in ivshmem_server_free_peer() 102 ret = ivshmem_server_send_one_msg(peer->sock_fd, IVSHMEM_PROTOCOL_VERSION, in ivshmem_server_send_initial_info() 111 ret = ivshmem_server_send_one_msg(peer->sock_fd, peer->id, -1); in ivshmem_server_send_initial_info() 119 ret = ivshmem_server_send_one_msg(peer->sock_fd, -1, server->shm_fd); in ivshmem_server_send_initial_info() 141 newfd = qemu_accept(server->sock_fd, in ivshmem_server_handle_new_conn() 154 peer->sock_fd = newfd; in ivshmem_server_handle_new_conn() 191 ivshmem_server_send_one_msg(other_peer->sock_fd, peer->id, in ivshmem_server_handle_new_conn() [all …]
|
H A D | ivshmem-server.h | 50 int sock_fd; /**< connected unix sock */ member 64 int sock_fd; /**< unix sock file descriptor */ member
|
/qemu/tests/qtest/ |
H A D | stm32l4x5_usart-test.c | 88 static void usart_receive_string(QTestState *qts, int sock_fd, const char *in, in usart_receive_string() argument 93 g_assert_true(send(sock_fd, in, in_len, 0) == in_len); in usart_receive_string() 214 int sock_fd; in test_receive_char() local 216 QTestState *qts = qtest_init_with_serial("-M b-l475e-iot01a", &sock_fd); in test_receive_char() 221 g_assert_true(send(sock_fd, "a", 1, 0) == 1); in test_receive_char() 230 g_assert_true(send(sock_fd, "b", 1, 0) == 1); in test_receive_char() 236 close(sock_fd); in test_receive_char() 243 int sock_fd; in test_send_char() local 246 QTestState *qts = qtest_init_with_serial("-M b-l475e-iot01a", &sock_fd); in test_send_char() 252 g_assert_true(recv(sock_fd, s, 1, 0) == 1); in test_send_char() [all …]
|
H A D | microbit-test.c | 49 static void uart_rw_to_rxd(QTestState *qts, int sock_fd, const char *in, in uart_rw_to_rxd() argument 54 g_assert_true(send(sock_fd, in, in_len, 0) == in_len); in uart_rw_to_rxd() 76 int sock_fd; in test_nrf51_uart() local 78 QTestState *qts = qtest_init_with_serial("-M microbit", &sock_fd); in test_nrf51_uart() 80 g_assert_true(send(sock_fd, "c", 1, 0) == 1); in test_nrf51_uart() 95 uart_rw_to_rxd(qts, sock_fd, "hello", s); in test_nrf51_uart() 100 g_assert_true(recv(sock_fd, s, 10, 0) == 1); in test_nrf51_uart() 107 g_assert_true(recv(sock_fd, s, 10, 0) == 5); in test_nrf51_uart() 110 close(sock_fd); in test_nrf51_uart()
|
H A D | libqtest.h | 110 QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd);
|
H A D | libqtest.c | 621 QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd) in qtest_init_with_serial() argument 638 *sock_fd = socket_accept(sock_fd_init); in qtest_init_with_serial() 644 g_assert_true(*sock_fd >= 0); in qtest_init_with_serial()
|
/qemu/contrib/ivshmem-client/ |
H A D | ivshmem-client.c | 46 ret = recvmsg(client->sock_fd, &msg, 0); in ivshmem_client_read_one_msg() 172 client->sock_fd = -1; in ivshmem_client_init() 188 client->sock_fd = socket(AF_UNIX, SOCK_STREAM, 0); in ivshmem_client_connect() 189 if (client->sock_fd < 0) { in ivshmem_client_connect() 203 if (connect(client->sock_fd, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { in ivshmem_client_connect() 240 close(client->sock_fd); in ivshmem_client_connect() 241 client->sock_fd = -1; in ivshmem_client_connect() 260 close(client->sock_fd); in ivshmem_client_close() 261 client->sock_fd = -1; in ivshmem_client_close() 277 FD_SET(client->sock_fd, fds); in ivshmem_client_get_fds() [all …]
|
H A D | ivshmem-client.h | 71 int sock_fd; /**< unix sock filedesc */ member
|
H A D | main.c | 227 fprintf(stdout, "listen on server socket %d\n", client.sock_fd); in main()
|
/qemu/python/qemu/machine/ |
H A D | console_socket.py | 36 sock_fd: Optional[int] = None, 39 if address is None and sock_fd is None: 41 if address is not None and sock_fd is not None: 51 assert sock_fd is not None 52 socket.socket.__init__(self, fileno=sock_fd)
|
H A D | machine.py | 919 sock_fd=os.dup(self._cons_sock_pair[1].fileno()),
|
/qemu/contrib/vhost-user-gpu/ |
H A D | vhost-user-gpu.c | 113 if (g->sock_fd >= 0) { in vg_sock_fd_close() 114 close(g->sock_fd); in vg_sock_fd_close() 115 g->sock_fd = -1; in vg_sock_fd_close() 139 g->wait_in = g_unix_fd_add(g->sock_fd, G_IO_IN | G_IO_HUP, in vg_wait_ok() 184 if (vg_sock_fd_write(vg->sock_fd, msg, in vg_send_msg() 196 if (vg_sock_fd_read(g->sock_fd, &req, sizeof(req)) < 0 || in vg_recv_msg() 197 vg_sock_fd_read(g->sock_fd, &flags, sizeof(flags)) < 0 || in vg_recv_msg() 198 vg_sock_fd_read(g->sock_fd, &size, sizeof(size)) < 0) { in vg_recv_msg() 206 if (size && vg_sock_fd_read(g->sock_fd, payload, size) != size) { in vg_recv_msg() 301 vg->wait_in = g_unix_fd_add(vg->sock_fd, G_IO_IN | G_IO_HUP, in vg_get_display_info() [all …]
|
H A D | vugpu.h | 135 int sock_fd; member
|
/qemu/net/ |
H A D | af-xdp.c | 287 static int af_xdp_umem_create(AFXDPState *s, int sock_fd, Error **errp) in af_xdp_umem_create() argument 308 if (sock_fd < 0) { in af_xdp_umem_create() 312 ret = xsk_umem__create_with_fd(&s->umem, sock_fd, s->buffer, size, in af_xdp_umem_create()
|
/qemu/system/ |
H A D | vl.c | 3255 const char *writeout, *sock_fd, *socket, *path, *security_model, in qemu_init() local 3308 sock_fd = qemu_opt_get(opts, "sock_fd"); in qemu_init() 3309 if (sock_fd) { in qemu_init() 3310 qemu_opt_set(fsdev, "sock_fd", sock_fd, &error_abort); in qemu_init()
|