mirror of https://gitee.com/openkylin/libvirt.git
Extend graphics event to include UNIX socket
Not all VNC/SPICE servers use a TCP socket for their connections. It is possible to configure a UNIX socket server. The graphics event must thus include a UNIX socket address type. * include/libvirt/libvirt.h.in: Add UNIX socket address type for graphics event * src/qemu/qemu_monitor_json.c: Add 'unix' string to address type enum
This commit is contained in:
parent
9d96f1ce90
commit
6aa27da287
|
@ -2894,6 +2894,7 @@ typedef enum {
|
|||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address */
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address */
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX, /* UNIX socket path */
|
||||
} virDomainEventGraphicsAddressType;
|
||||
|
||||
|
||||
|
@ -2905,8 +2906,8 @@ typedef enum {
|
|||
*/
|
||||
struct _virDomainEventGraphicsAddress {
|
||||
int family; /* Address family, virDomainEventGraphicsAddressType */
|
||||
const char *node; /* Address of node (eg IP address) */
|
||||
const char *service; /* Service name/number (eg TCP port) */
|
||||
const char *node; /* Address of node (eg IP address, or UNIX path) */
|
||||
const char *service; /* Service name/number (eg TCP port, or NULL) */
|
||||
};
|
||||
typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
|
||||
typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
|
||||
|
|
|
@ -619,8 +619,8 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
|
|||
|
||||
|
||||
VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily)
|
||||
VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 + 1,
|
||||
"ipv4", "ipv6");
|
||||
VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX + 1,
|
||||
"ipv4", "ipv6", "unix");
|
||||
|
||||
static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, int phase)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue