Commit Graph

71 Commits (6142d389db44b781e36399fe7c477c4879c0924b)

Author SHA1 Message Date
Slávek Banko f3f392caec
Merge tag 'LibVNCServer-0.9.12'
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 years ago
Tobias Junghans 597473be04 LibVNCClient: free buffers in rfbClientCleanup()
Buffers allocated by encoding handlers have to be freed as well.
6 years ago
Michele Calgaro 8c081c8888
Removed _BSD_SOURCE, _SVID_SOURCE, _GNU_SOURCE, _XOPEN_SOURCE.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
DRC d7b14624cb Include Tight decoding optimizations from TurboVNC
- As with the encoder, the decoder now uses the TurboJPEG wrapper, which
  allows it to decode JPEG images directly into the framebuffer.  This
  eliminates a buffer copy (CopyRectangle()) as well as the expensive
  RGB pixel conversion in DecompressJpegRectBPP().  The TurboJPEG
  wrapper performs RGB pixel conversion more optimally, and only when
  necessary (it uses the libjpeg-turbo colorspace extensions when
  available, in order to avoid RGB conversion.)
- The other Tight subencoding types are also now decoded directly into
  the framebuffer, which eliminates buffer copies.
- The Tight decoder now supports the rfbTightNoZlib extension, which
  allows the server to bypass zlib compression when Compression Level 0
  is selected.  The encoder already supports this extension.  Passing
  the data stream through zlib when Compression Level 0 is selected
  needlessly wastes CPU time, since all zlib is doing is copying the
  data internally into its own structures.
7 years ago
Slávek Banko 68cb29a12f Merge tag 'LibVNCServer-0.9.11' of https://github.com/LibVNC/libvncserver
Conflicts:
	CMakeLists.txt
	libvncserver/main.c
7 years ago
simon cb4e15c1ae Added SASL authentication support
Added SASL support to OpenSSL
8 years ago
dborth 652f5a4b1c
Set trueColour flag to 1 instead of 255
It turns out some server implementations (namely VMware ESXi 6.5) expect
1 as the only non-zero value for the SetPixelFormat message whereas the protocol
states every non-zero value is valid
(https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#setpixelformat).

Anyway, setting this to 1 shouldn't hurt.

Fixes #141
8 years ago
Christian Beier ec6d0f7259
Fix a compiler warning 8 years ago
Christian Beier e03b5750f8
Merge branch 'circle' of https://github.com/ldmnyblzs/libvncserver into ldmnyblzs-circle
Conflicts:
	libvncclient/rfbproto.c
8 years ago
Balazs Ludmany a01a18df1d Add function pointers for every type of rectangle 9 years ago
gbdj 1da7872784 libvncclient/tls_gnutls.c: Add hooks to WriteToTLS() for optional protection by mutex. Fix upstream issue #100
Squashed commit of the pull request #101 :
commit 1c7e01e81862bc46508e675e83c74cc6d63224b0
commit 1e749b094d6696380d3f0540a00138d7e3427874
9 years ago
Christian Beier 7c7e8e765c Re-add the useful bits of 9aa9ac59b4. 10 years ago
Christian Beier 612de004c4 Revert "LibVNCClient: Add H.264 encoding for framebuffer updates"
This reverts commit d891478ec9.

Conflicts:
	configure.ac
	libvncclient/h264.c
10 years ago
Timothy Pearson 1d8b3c0548 Add hooks to client library to ontain network and authentication status 10 years ago
Daniel Cohen Gindi fbf48c65f3 `strings.h` and `resolv.h` are not available on MSVC, and some POSIX functions are renamed or deprecated
For all of those missing/deprecated POSIX functions, we just add a macro mapping to the _underscored version of MSVC.
11 years ago
Daniel Cohen Gindi 366dda9951 Use WIN32 for Windows-specific #ifdef guards
To support Microsoft Visual C++, we must not guard Windows-specific code
in MinGW-specific #ifdef guards.

Happily, even 64-bit MSVC defines the WIN32 constant, therefore we can use
that instead.

[JES: fixed commit message, reordered commit, split out unrelated changes]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 3059282751 Include Winsock2 header before windows.h include
That's because there are duplicate #defines, and when Winsock2 is defined
before windows.h then windows.h detects that and prevent redefinition.

See
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a90b143-1fb8-43e9-a54c-956127e0c579/windowsh-and-winsock2h?forum=windowssdk

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Johannes Schindelin 27b0c0deb7 Fix indentation
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
newsoft 85a778c0e4 Check for MallocFrameBuffer() return value
If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to
NULL. Subsequent writes into that buffer could lead to memory
corruption, or even arbitrary code execution.
11 years ago
newsoft 045a044e8a Fix integer overflow in MallocFrameBuffer()
Promote integers to uint64_t to avoid integer overflow issue during
frame buffer allocation for very large screen sizes
11 years ago
Robbert Klarenbeek f2a93afb46 Address #12 ClientData does not get freed
rfbClientSetClientData() allocates a new rfbClientData, but never gets
cleaned up, which causes memory leaks.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
David Verbeiren d891478ec9 LibVNCClient: Add H.264 encoding for framebuffer updates
This patch implements support in LibVNCClient for framebuffer updates
encoded as H.264 frames. Hardware accelerated decoding is performed
using VA API.

This is experimental support to let the community explore the possibilities
offered by the potential bandwidth and latency reductions that H.264 encoding
allows. This may be particularly useful for use cases such as online gaming,
hosted desktops, hosted set top boxes...

This patch only provides the client side support and is meant to be used
with corresponding server-side support, as provided by an upcoming patch for
qemu ui/vnc module (to view the display of a virtual machine executing under
QEMU).

With this H.264-based encoding, if multiple framebuffer update messages
are generated for a single server framebuffer modification, the H.264
frame data is sent only with the first update message. Subsequent update
framebuffer messages will contain only the coordinates and size of the
additional updated regions.

Instructions/Requirements:
* The patch should be applied on top of the previous patch I submitted with
minor enhancements to the gtkvncviewer application:
http://sourceforge.net/mailarchive/message.php?msg_id=30323804
* Currently only works with libva 1.0: use branch "v1.0-branch" for libva and
intel-driver. Those can be built as follows:
   cd libva
   git checkout v1.0-branch
   ./autogen.sh
   make
   sudo make install
   cd ..
   git clone git://anongit.freedesktop.org/vaapi/intel-driver
   cd intel-driver
   git checkout v1.0-branch
   ./autogen.sh
   make
   sudo make install

Signed-off-by: David Verbeiren <david.verbeiren@intel.com>
12 years ago
Christian Beier 77286f0831 LibVNCClient: Remove all those WITH_CLIENT_TLS #ifdefs and move GnuTLS specific functionality into tls_gnutls.c. 13 years ago
Christian Beier 75bfb1f5d3 IPv6 support for LibVNCServer, part three: make reverse connections IPv6-capable.
Besided making libvncserver reverseVNC IPv6-aware, this introduces some changes
on the client side as well to make clients listen on IPv6 sockets, too. Like
the server side, this also uses a separate-socket approach.
13 years ago
Luca Stauble fe2e2e4b59 Add an optional parameter to specify the ip address for reverse connections
For security reasons, it can be important to limit which IP addresses a
LibVNCClient-based client should listen for reverse connections. This
commit adds that option.

To preserve binary backwards-compatibility, the field was added to the end
of the rfbclient struct, and the function ListenAtTcpPort retains its
signature (but calls the new ListenAtTcpPortAndAddress).

[jes: shortened the commit subject, added a longer explanation in the
commit body and adjusted style]

Signed-off-by: Luca Stauble <gnekoz@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
13 years ago
Christian Beier 0797e42a4a IP QoS support in libvncclient.
This enables setting the DSCP/Traffic Class field of IP/IPv6 packets
sent by a client. For example starting a client with -qosdscp 184
marks all outgoing traffic for expedited forwarding.

Implementation for Win32 is still a TODO, though. See
http://betelco.blogspot.com/2009/03/dscp-marking-under-windows-at.html
for an overview of the Win32 QoS API mess...
15 years ago
Wouter Van Meir f76c81941a Call MallocFrameBuffer before SetFormatAndEncodings
The hook is still called after InitialiseRFBConnection() so we can choose
the color settings depending on the vnc server (or settings) in that hook.

This way one can use the "VNC server default format" pixelformat if the
client supports it, or perform a workaround (Intel AMT KVM "classic vnc"
server only works using 8bit colors in RFB3.8)

Signed-off-by: Wouter Van Meir <wouter.vanmeir@pandora.be>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Johannes Schindelin 19aa466a96 Fix compilation without TLS
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier 6b2b3b8213 libvncclient/vncviewer.c: don't set serverPort in rfbInitClient().
The serverPort member is already set in rfbGetClient(), if we
set it again in rfbInitClient(), this breaks playing of vncrec
files (this relies on serverPort set to -1).

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Johannes Schindelin d640c94d70 LibVNCClient: make sure that the port is initialized correctly.
While at it, adjust coding style.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee a2ad61755f Add UltraVNC Repeater support in libvncclient
[jes: adjusted coding style, made sure port is initialized correctly]

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee b019572e73 Add support for viewers to select security types on demand
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier 9ed410668c Fix checks for socket values, 0 is a legal value.
To make this work, we also have to initialize sockets
to a default value of -1.

Also close a client listen socket if it's open.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier d4c43c1b73 libvncclient: include winsock2.h in vncviewer.c.
fixes warning about closesocket being implicitly declared.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Johannes Schindelin f49a292783 Merge branch 'VeNCrypt' 16 years ago
Christian Beier 0a4f1bada4 libvncclient: add a non-forking listen function.
Forking the whole process from deep within a library call does
not really work at all with apps that use multiple threads, i.e. every
reasonably modern GUI app. So, provide a non-forking listen function so
that the caller can decide if to fork, start a thread, etc.

This implementation adds a timeout parameter to be able to call the
listen function multiple times so that it's possible to do sth. else
in between, e.g. abort listening.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Alexander Dorokhine 62ae6bb7be libvncclient: Add FinishedFrameBufferUpdate callback
When working on a program which searches the display for some image, one
does not want to search again without getting an FB update.  Add a
callback to make this possible.
16 years ago
Vic Lee 58a8df6ff2 Add anonymous TLS support in libvncclient
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
Johannes Schindelin ef33182694 Fix two issues in rfbGetClient()
There was an unnecessary assignment, and an assignment of a string that
was to be free()ed later, so it has to be strdup()ed.

Both issues spotted by Roman Held.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Stefan Becker 0e7499fb39 Add close() to rfbClientCleanup()
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
runge 0f162f1f0b argv > 0 doesn't make sense for a pointer; assuming argv != NULL. 18 years ago
dscho 14b290384a LibVNCClient: some users do not want to get whole-screen updates; introduce client->updateRect for that 18 years ago
runge 1f8da9bde3 libvncclient: add GotCursorShape() and GotCopyRect(); x11vnc dep on libvncclient 18 years ago
steven_carr 5865f0c4b7 Client side support for PalmVNC/UltraVNC 'Server Side Scaling' 19 years ago
steven_carr afa9fae024 Ultra Encoding added. Tested against UltraVNC V1.01 19 years ago
steven_carr 18cd366896 Eliminate incompatible pointer assignment warning (gcc 4.0.1) 19 years ago
dscho 1602b345f3 add KeyboardLedState extension 19 years ago
dscho 199ec23a05 libvncclient: take -compress <level> and -quality <level> command line arguments 19 years ago
runge def3012663 fix client non-jpeg/libz builds 19 years ago
dscho 1b81e342cb assorted fixes for MinGW32 19 years ago