1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
4 #ifndef _GUEST_CHANNEL_H
5 #define _GUEST_CHANNEL_H
11 #include <channel_commands.h>
14 * Connect to the Virtio-Serial VM end-point located in path. It is
15 * thread safe for unique lcore_ids. This function must be only called once from
19 * The path to the serial device on the filesystem
25 * - Negative on error.
27 int guest_channel_host_connect(const char *path, unsigned int lcore_id);
30 * Disconnect from an already connected Virtio-Serial Endpoint.
37 void guest_channel_host_disconnect(unsigned int lcore_id);
40 * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
43 * Pointer to a populated struct guest_agent_pkt
50 * - Negative on channel not connected.
51 * - errno on write to channel error.
53 int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
56 * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
59 * Pointer to a populated struct channel_packet
66 * - Negative on error.
68 int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
69 unsigned int lcore_id);