summaryrefslogtreecommitdiffstats
path: root/vnc.c
Commit message (Collapse)AuthorAgeFilesLines
* Add some tight awareness to vnc.c (Alexander Graf)aliguori2009-02-021-2/+21
| | | | | | | | | | | | | | | This patch enables the vnc server to understand fundamental tight extensions. It changes from a "Hextile or not" scheme when sending framebuffer updates to a "preferred encoding", namely the last one set. While this is not perfect, as actually a list of "preferred encodings" should be kept, it's good enough for now. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6496 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix invalid #if in vnc.c when debugging is enabled (Alexander Graf)aliguori2009-02-021-1/+1
| | | | | | | | | | | While running with debugging enabled, I found an #if testing for an undefined value, not defined(value). This patch fixes that. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6495 c046a42c-6fe2-441c-8c8c-71466251a162
* Use VNC protocol defines (Alexander Graf)aliguori2009-02-021-47/+50
| | | | | | | | | | | | | | | Now that we have nice defines for all sorts of constants, let's use them! This patch also takes the "feature variables", currently called has_* into a single feature int. This way adding new features is a lot easier and doesn't clutter the VncState struct. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6494 c046a42c-6fe2-441c-8c8c-71466251a162
* Split VNC defines to vnc.h (Alexander Graf)aliguori2009-02-021-35/+1
| | | | | | | | | | | | | | | The VNC protocol contains quite some constants, some of which are currently hardcoded in the vnc.c code. This is not exactly pretty. Let's move all those constants out to vnc.h, so they are clearly separated. While at it, I also included other defines that will be used later in this patch series. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6493 c046a42c-6fe2-441c-8c8c-71466251a162
* vnc fixes and improvements (Stefano Stabellini)aliguori2009-01-261-6/+16
| | | | | | | | | | | | | | | | | this patch fixes a bug and improves the generic pixel conversion function in vnc.c. The bug is that when a new vnc client connects we need to reset the flag has_WMVi but currently we don't. The generic pixel conversion function is vnc_convert_pixel and currently is not very efficient since uses the division and multiplication operators. To make it more efficient I changed to use bit shift operators instead. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6441 c046a42c-6fe2-441c-8c8c-71466251a162
* exploiting the new interface in vnc.c (Stefano Stabellini)aliguori2009-01-151-206/+103
| | | | | | | | | | | | | | | This patch exploits the new DisplaySurface and PixelFormat structures in vnc, making the code easier to read allowing further improvements. Compared to the last version I fixed a bug that prevented the hextile encoding from working properly. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6337 c046a42c-6fe2-441c-8c8c-71466251a162
* DisplayState interface change (Stefano Stabellini)aliguori2009-01-151-73/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the DisplayState interface adding support for multiple frontends at the same time (sdl and vnc) and implements most of the benefit of the shared_buf patch without the added complexity. Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is also responsible for allocating the data and setting the depth. Vga.c (or another backend) will do any necessary conversion. The idea is to change it so that is vga.c (or another backend) together with console.c that fully manage the DisplayState interface allocating data and setting the depth (either 16 or 32 bit, if the guest uses a different resolution or is in text mode, vga.c (or another backend) is in charge of doing the conversion seamlessly). The other idea is that DisplayState supports *multiple* frontends like sdl and vnc; each of them can register some callbacks to be called when a display event occurs. The interesting changes are: - the new structures and related functions in console.h and console.c in particular the following functions are very helpful to manage a DisplaySurface: qemu_create_displaysurface qemu_resize_displaysurface qemu_create_displaysurface_from qemu_free_displaysurface - console_select and qemu_console_resize in console.c this two functions manage multiple consoles on a single host display - moving code around in hw/vga.c as for the shared_buf patch this is necessary to be able to handle a dynamic DisplaySurface bpp - changes to vga_draw_graphic in hw/vga.c this is the place where the DisplaySurface buffer is shared with the videoram, when possible; Compared to the last version the only changes are: - do not remove support to dpy_copy in cirrus_vga - change the name of the displaysurface handling functions Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6336 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some more warningsblueswir12009-01-141-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6300 c046a42c-6fe2-441c-8c8c-71466251a162
* Properly handle the case of SetPixelEncodings with a length of zero.aliguori2008-12-221-3/+6
| | | | | | | | | | This commit addresses CORE-2008-1210/CVE-2008-2382. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6121 c046a42c-6fe2-441c-8c8c-71466251a162
* vnc: Fix crash on 'info vnc' after 'change vnc none'aurel322008-12-131-1/+1
| | | | | | | | | vnc_state->display is set to NULL after "change vnc none" but vnc_state itself is still valid. (James Ko) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6010 c046a42c-6fe2-441c-8c8c-71466251a162
* Make audio violate POSIX lessmalc2008-12-031-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
* Exclude unix: from vnc call to unix_listen() (Ryan Harper)aliguori2008-12-021-1/+1
| | | | | | | | | | | | | | | | | When using an existing unix socket like: -vnc unix:/tmp/file1Y2nY2 qemu fails to bind a unix socket because the vnc call to unix_listen includes the unix: prefix and stores that in the unix.sun_path. The fix is to not pass in unix: for the filename (same way qemu-char.c does it). Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5856 c046a42c-6fe2-441c-8c8c-71466251a162
* Reset the key modifiers upon client connectmalc2008-12-011-0/+1
| | | | | | | | | | VNC should not maintain modifer state upon reconnects With some window managers/vnc clients it will only see a key down event for a modifier followed by immediate disconnect(think Alt-F4), with a net effect of subsequently connected clients operating as if the modifier was never released. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5851 c046a42c-6fe2-441c-8c8c-71466251a162
* Add basic audio functionality to vnc.cmalc2008-12-011-1/+131
| | | | | | | | | | | This allows among other things to capturing A/V of running guests. Ad-hoc client that does this (via script that invokes ffmpeg) can be found at: http://repo.or.cz/w/qemu/malc.git?a=tree;f=vcap;hb=capture3 Thanks to Anthony Liguori for comments and review. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5850 c046a42c-6fe2-441c-8c8c-71466251a162
* Don't try to select on an invalid VNC socket when init fails.balrog2008-12-011-0/+1
| | | | | | | Otherwise we get a segfault. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5840 c046a42c-6fe2-441c-8c8c-71466251a162
* Introduce accessors for DisplayState (Stefano Stabellini)aliguori2008-11-241-33/+33
| | | | | | | | | | | | | | | | | Introducing some accessors: ds_get_linesize ds_get_bits_per_pixel ds_get_width ds_get_height ds_get_data Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162
* r5531 made x509 certs not loadable (original patch from Henrik Holst).balrog2008-11-121-3/+1
| | | | | | | | | | The patch in r5531 which replaced a bunch of strncpy with pstrcpy causes the x509 credentials from the -vnc parameter to be one character shorter than entered meaning that there is currently no way to enter x509 certificates... git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5707 c046a42c-6fe2-441c-8c8c-71466251a162
* sockets: switch vnc to new code, support vnc port auto-allocation (Gerd Hoffman)aliguori2008-11-111-87/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch switches the vnc code ofer to the new socket helper functions. It adds support IPv6 support and for automatically allocating an unused vnc display port. The latter is handled ising a to= option, specifying the upper limit for the display number to try. Scanning is started at the display number given in the display specification, i.e. this command line: -vnc localhost:7,to=11 will try displays 7 to 11 (inclusive). There are also new "ipv4" and "ipv6" options to make qemu try only the specified internet protocol version. The display actually allocated can be queried using the "info vnc" monitor command. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5696 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace uses of strncpy (a GNU extension) with Qemu pstrcpyblueswir12008-10-251-1/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compiler warning when _VNC_DEBUG isn't defined.ths2008-09-241-1/+1
| | | | | | | Signed-off-by: Thiemo Seufer <ths@networkno.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5312 c046a42c-6fe2-441c-8c8c-71466251a162
* WMVi extension support (Stefano Stabellini)aliguori2008-09-151-64/+91
| | | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5230 c046a42c-6fe2-441c-8c8c-71466251a162
* vnc dynamic resolution (Stefano Stabellini)aliguori2008-09-151-47/+171
| | | | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5229 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix most warnings that would be caused by gcc flag -Wundefblueswir12008-09-061-20/+20
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5173 c046a42c-6fe2-441c-8c8c-71466251a162
* Some little fixes on QEMUaurel322008-09-061-2/+0
| | | | | | | | | - some vectors can be declared as "const" - test on CONFIG_VNC_TLS is done for two times while just one is enough. (Carlo Bramini) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5172 c046a42c-6fe2-441c-8c8c-71466251a162
* VNC: Support for ExtendedKeyEvent client messagealiguori2008-08-231-9/+50
| | | | | | | | | | | | | | | | This patch adds support for the ExtendedKeyEvent client message. This message allows a client to send raw scan codes directly to the server. If the client and server are using the same keymap, then it's unnecessary to use the '-k' option with QEMU when this extension is supported. This is extension is currently only implemented by gtk-vnc based clients (gvncviewer, virt-manager, vinagre, etc.). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5076 c046a42c-6fe2-441c-8c8c-71466251a162
* add DisplayState->idle (Samuel Thibault)aliguori2008-08-211-0/+3
| | | | | | | | | | | | | | | | | Add idle field to DisplayState struct, so drivers can figure the display is idle and take advantage of that. The xen framebuffer driver will use this to communicate the idle state to the guest, so it knows it can stop doing updates to a virtual display which is invisible anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5056 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_realloc(), by Gerd Hoffmann.ths2008-08-061-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
* Don't forget to save VNC FB dimensions after resize (Brad Campbell).balrog2008-06-021-8/+10
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4644 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix VNC update regoin height.balrog2008-05-251-1/+1
| | | | | | | 'h' actually is the coordinate of bottom of the rectangle and not height. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4571 c046a42c-6fe2-441c-8c8c-71466251a162
* Invalidate VNC framebuffer on every resize.balrog2008-05-251-4/+3
| | | | | | | | | | | On a resize, vncviewer keeps the image in the upper-left part of the screen unmodified and fills the right end of the lines with black colour. vnc.c keeps the first n bytes of the framebuffer unmodified instead - meaning that the client's image doesn't match the image in framebuffer and checking for dirty rows gives wrong results. We can either invalidate the whole buffer or implement the same transformation as the client. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4569 c046a42c-6fe2-441c-8c8c-71466251a162
* Prevent SEGV in VNC server for old clients (Anthony Liguori).balrog2008-05-201-0/+5
| | | | | | | | | | | | | | | If the client does not support the DesktopResize pseudo-encoding, then vs->{width,height} may be smaller than ds->{width,height}. dirty_row is sized according to vs->{width,height}, not ds->{width,height}. This patch makes sure to bound the update region to vs->{width,height} to avoid a possible SEGV. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Reported-by: Marcelo Tosatti <mtosatti@redhat.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4502 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix spurious VNC disconnects on Win32 (Hervé Poussineau).balrog2008-04-241-3/+13
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4251 c046a42c-6fe2-441c-8c8c-71466251a162
* Let the USB tablet reach the far bottom and right pixelsaurel322008-03-101-2/+2
| | | | | | | (Samuel Thibault) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4036 c046a42c-6fe2-441c-8c8c-71466251a162
* Add an ncurses UI.balrog2008-02-101-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3976 c046a42c-6fe2-441c-8c8c-71466251a162
* Add VNC reverse connections, by Eddie Kohler.balrog2008-02-031-14/+40
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3951 c046a42c-6fe2-441c-8c8c-71466251a162
* Add a missing vga_hw_update() when accepting a connection (Anders Melchiorsen).balrog2008-01-141-0/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3919 c046a42c-6fe2-441c-8c8c-71466251a162
* Reduce redundant timer ticks in VNC, by Anders Melchiorsen.balrog2008-01-131-14/+8
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3904 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix wrong signedness, by Andre Przywara.ths2007-12-161-19/+20
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix fragments due to incomplete dirty tracking in CGA mode (Anthony Liguori).balrog2007-12-111-0/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3809 c046a42c-6fe2-441c-8c8c-71466251a162
* Add statics and missing #includes for prototypes.pbrook2007-11-181-6/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* Handle 3.7 VNC clients authentication correctly (Dan Kenigsberg).balrog2007-10-311-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3498 c046a42c-6fe2-441c-8c8c-71466251a162
* Miscellaneous VNC related fixes from Xen forwarded by Matthew Kent.balrog2007-10-301-2/+33
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3489 c046a42c-6fe2-441c-8c8c-71466251a162
* Support UltraVNC clients, by Eduardo Felipe.ths2007-09-301-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3288 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths2007-09-171-1/+1
| | | | | | the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-19/+19
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix infinite loop in VNC support, by Marc Bevand.ths2007-09-131-2/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3169 c046a42c-6fe2-441c-8c8c-71466251a162
* Custom location for x509 cert paths, by Daniel P. Berrange.ths2007-08-251-16/+115
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3139 c046a42c-6fe2-441c-8c8c-71466251a162
* x509 client certificate verification, by Daniel P. Berrange.ths2007-08-251-3/+103
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3138 c046a42c-6fe2-441c-8c8c-71466251a162
* x509 certificate for server, by Daniel P. Berrange.ths2007-08-251-20/+107
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3137 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud