提交 6aa27da2 编写于 作者: D Daniel P. Berrange

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
上级 9d96f1ce
...@@ -2894,6 +2894,7 @@ typedef enum { ...@@ -2894,6 +2894,7 @@ typedef enum {
typedef enum { typedef enum {
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address */ VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address */
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address */ VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address */
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX, /* UNIX socket path */
} virDomainEventGraphicsAddressType; } virDomainEventGraphicsAddressType;
...@@ -2905,8 +2906,8 @@ typedef enum { ...@@ -2905,8 +2906,8 @@ typedef enum {
*/ */
struct _virDomainEventGraphicsAddress { struct _virDomainEventGraphicsAddress {
int family; /* Address family, virDomainEventGraphicsAddressType */ int family; /* Address family, virDomainEventGraphicsAddressType */
const char *node; /* Address of node (eg IP address) */ const char *node; /* Address of node (eg IP address, or UNIX path) */
const char *service; /* Service name/number (eg TCP port) */ const char *service; /* Service name/number (eg TCP port, or NULL) */
}; };
typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress; typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr; typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
......
...@@ -619,8 +619,8 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat ...@@ -619,8 +619,8 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily) VIR_ENUM_DECL(qemuMonitorGraphicsAddressFamily)
VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 + 1, VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX + 1,
"ipv4", "ipv6"); "ipv4", "ipv6", "unix");
static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, int phase) static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, int phase)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册