From: Visarion Alexandru <viorel.visarion@xxxxxxxxx> Learn to set the address that vnc is listening on. --- libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 9 +++++++++ libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 3 +++ libvirt-gconfig/libvirt-gconfig.sym | 1 + 3 files changed, 13 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c index fc26bb9..dfec2d8 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c @@ -120,6 +120,15 @@ void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graph NULL); } +void gvir_config_domain_graphics_vnc_set_host(GVirConfigDomainGraphicsVnc *graphics, + const char *address) +{ + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics)); + + gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(graphics), "listen", NULL); + gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics), "listen", address, NULL); +} + void gvir_config_domain_graphics_vnc_set_password(GVirConfigDomainGraphicsVnc *graphics, const char *password) { diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h index fe78621..10f8661 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h @@ -73,6 +73,9 @@ int gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphi void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics, int port); +void gvir_config_domain_graphics_vnc_set_host(GVirConfigDomainGraphicsVnc *graphics, + const char *address); + void gvir_config_domain_graphics_vnc_set_password(GVirConfigDomainGraphicsVnc *graphics, const char *password); diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index 4ef4bf7..3153a83 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -764,6 +764,7 @@ global: gvir_config_domain_video_get_model; gvir_config_domain_video_set_accel3d; + gvir_config_domain_graphics_vnc_set_host; } LIBVIRT_GCONFIG_0.2.2; # .... define new API here using predicted next version number .... -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list