Commit Graph

181 Commits (532789f4944449583bb3ab7545f3629b42a617ea)

Author SHA1 Message Date
Christian Beier 2a97ab8679 Fix some compiler warnings that hinted some no too unimportant errors. 13 years ago
Christian Beier 231763cb0e LibVNCClient: #undef these types in case it's WIN32.
The various other headers include windows.h and the winsock headers
which give an error when SOCKET and socklen_t are already defined.
13 years ago
Christian Beier 4a5eee94e8 Fix libvncclient make dist. 13 years ago
Monkey 2524573678 Added support for UltraVNC Single Click as originally proposed by Noobius (Boobius) on 6/1/11.
Original thread: http://sourceforge.net/tracker/?func=detail&aid=3310255&group_id=32584&atid=405860
13 years ago
Christian Beier e2beac6d93 LibVNCClient: Fix build with no SSL/TLS library available. 13 years ago
Christian Beier f606179c9c LibVNCClient: properly free the openssl session stuff on shutdown. 13 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 5e9da5a2f8 Add the OpenSSL libvncclient TLS version to the build system. 13 years ago
Christian Beier 2d50fc84f7 IPv6 support for LibVNCServer, part four: add copyright notices to files with non-trivial changes. 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 27b4372c94 When GetCredential() callback is not set, don't use authentications requiring it.
The auth methods that employ Getcredential() will only be used if the client's
GetCredential callback is actually set.
13 years ago
Vic Lee d8fca9d013 Replace deprecated GnuTLS functions gnutls_*_set_priority with gnutls_priority_set_direct.
The functions gnutls_*_set_priority we used were marked deprecated since
latest GnuTLS version 2.12. However the replacement function
gnutls_priority_set_direct is available since 2.2, which is even lower
than our version requirement 2.4 in configure. The patch just replace
the deprecate function to fix the compile warning.

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier 62b7acf480 Fix regression in Ultra encoding introduced by commit fe1ca16e9b.
My bad. There we see what the encodings test is good for ;-)
14 years ago
Christian Beier e92951d19d Remove useless comparisons that always evaluate to false.
There can not be more than 255 security types and MSLogon is
RFB 3.6 only.
14 years ago
Christian Beier fe1ca16e9b Fix (most) MinGW32 compiler warnings. 14 years ago
Christian Beier 980dfa60fe Fix libvncclient TLS for Windows builds.
GnuTLS seems to expect proper errno values internally. So set them in our
custom push/pull functions. Parts of the patch stolen from libcurl, thanks!

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 8909e9fe44 Let libvncclient build with gcrypt for MinGW32 builds.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Vic Lee e323d73f91 Use WaitForMessage instead of sleep in socket reading to fix performance issue.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier cf72a0f7c3 Call WSAGetLastError() everywhere errno is read after a Winsock call.
Winsock does NOT update errno for us, we have fetch the last error
manually using WSAGetLastError().
14 years ago
Christian Beier f5b96e57bf Update minilzo library used for Ultra encoding to ver 2.04.
According to the minilzo README, this brings a significant
speedup on 64-bit architechtures.

Changes compared to old version 1.08 can be found here:
http://www.oberhumer.com/opensource/lzo/lzonews.php

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 558a58e039 Remove unneeded files concerning CVS.
We have a git repo nowadays and I guess we won't go back to CVS.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Vic Lee 030ccf673d Add ARD (Apple Remote Desktop) security type support
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier ffe30366d6 Put files used by both libs into a 'common' dir.
No functional changes. All files used by _both_ libvncserver and
libvncclient are put into a 'common' directory and references
from other files as well as Autotools and CMake build systems are
updated.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier e5523350a8 libvnc[server|client]: implement xvp VNC extension.
This implements the xvp VNC extension, which is described in the
community version of the RFB protocol:
http://tigervnc.sourceforge.net/cgi-bin/rfbproto
It is also mentioned in the official RFB protocol.
15 years ago
Christian Beier 128d06aaaa Only define strncasecmp to _strnicmp when using MS compiler.
Redefining strncasecmp to _strnicmp makes libvncclient hang forever in
SetFormatAndEncodings() on Windows when built with MinGW64.

Reported by Tobias Doerffel <tobias.doerffel@gmail.com>, thanks!
15 years ago
Christian Beier fbb93c9efe Fix build failure wrt IP QoS support in libvncclient.
This is a small addendum to 0797e42a4a.
Seems that having IPv6 support in the OS does not necessarily mean that
IPV6_TCLASS is available. One such case seems to be Mac OS X 10.5.
15 years ago
Vic Lee 6803bfe9d5 Avoid 100% CPU usage when calling ReadFromRFBServer and no available bytes to read
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 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
Christian Beier c0373e9cd4 Non-blocking sockets for Windows.
Expands the SetNonBlocking() function in libvncclient/sockets.c to also
work under Windows and also changes it to honour maybe already present
socket flags.

A similar function was introduced for libvncserver as well and
all the #ifdef'ed fnctl calls replaced with calls to that one.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Christian Beier ad25446978 Fix MinGW32 compilation with libjpeg.
MinGW32 (or more exactly, a rpcndr.h file included by
winsock2.h) typedefs a 'boolean' type that jmorecfg.h
included by jpeglib.h also tries to typedef.
So, tell the jpeg headers.

Closes: 3007302
15 years ago
Christian Beier 79f0f1374c Fix MinGW32 checking for IPv6.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee 68e7696a27 libvncclient: add ipv6 support
[jes: pulled the "host" declarations into the conditionally compiled
blocks where that variable is used. Also fixed non-IPv6 connections.]

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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
runge a29e42e515 libvncclient: rfbResizeFrameBuffer should also set updateRect. 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
Vic Lee 743803facc Fix version checking (>=3.8) for rfbVncAuthOK confirmation when no password required
It seems that vino does not send AuthOK  when there is no password with
anonymous TLS, and it seems that vino is the only <3.8 VNC server that
handles anonymous TLS at all, so let's not wait for the packet that will
never come.

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier 49cdfb4c1f libvncclient: better return value for non-forking listen.
The return value now better reflects what has happened:
1 on success (incoming connection on listen socket, we
accepted it successfully), -1 on error, 0 on timeout.

Also change the select calls to not check _all_ possible
file descriptors.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
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
Vic Lee a4cc897222 Fix various compilation warnings
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Johannes Schindelin f49a292783 Merge branch 'VeNCrypt' 16 years ago
Vic Lee 29990f0090 Add MSLogon security type
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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
Christian Beier 4877329812 libvncclient: make listenAtTCPPort() work under windows.
Actually, initSockets() has to be called everywhere we possibly
use sockets the first time.

Also fix return value of initSockets().

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
Alexander Dorokhine b02849ab80 Fix hostname resolution problems under Windows
On Windows, the WSA system needs to be initialized to be able to look up
host names.

This patch also changes *addr = 0 to use the constant INADDR_LOOPBACK
instead, which seems to be required on Windows.
16 years ago
runge 169ef3a042 Some broken build environments treat fprintf(fh, buf) as a fatal error... 16 years ago
Vic Lee 95ae56c831 Add VeNCrypt support in libvncclient
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
Christian Beier a92f7f46a6 mingw32 crosscompile fixes.
SOCKET is redefined in winsock2.h so #undef it where winsock2.h
is included. The changes in rfbproto.c circumvent crosscompiler
errors like 'S_IFMT' undeclared ...', the Makefile.am changes
avoid building linux specific stuff for a win32 host target.
Also added configure option to specify sdl-config.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Vic Lee 58a8df6ff2 Add anonymous TLS support in libvncclient
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
Christian Beier c652b55f74 Fix IsUnixSocket()
This is a pure functionality fix: according to its manpage, stat()
returns 0 on success. Checking for a return value of zero fixes
incorrect results of IsUnixSocket().

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Vic Lee 2f9836d81a Fix bug for logging unsupported security types
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
Vic Lee 4e1aba74e6 Fix bug for VNC Server version 4
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
Ben Klopfenstein d7c0b34b62 libvncclient: Unix sockets support by Ben Klopfenstein
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho 3d2eab575e clean up build flags
The flag handling (both compiler options and include paths) are a mess at
the moment.  There is no point in forcing "-O2 -g" when these are already
the defaults, and if someone changes the defaults, chances are good they
don't want you clobbering their choices.

The -Wall flag should be handled in configure and thrown into CFLAGS once
rather than every Makefile.am.  Plus, this way we can control which
compilers the flag actually gets used with.

Finally, the INCLUDES variable is for -I paths, not AM_CFLAGS.  Nor should
it contain -I. as this is already in the default includes setup.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho 26b79b89db ZYWRLE patch for libvncclient (thanks Noriaki Yamazaki)
Highlite:
 * use qualityLevel/zlib_buffer. No new variable is needed.
 * Change coding style to recursive fashion.
 * Change meaning of qualityLevel== 9 for easy calc zywrle_level:
     old:zywrle_level== 1
     new:disable ZYWRLE(same as ZRLE)
   so, we should not use this value for compatible reason.
 * Color mode handling isn't complete.
   I provided and checked 16 bit colors(RGB555,RGB565) and
   some color mode of 32 bit colors for little endian mode.
   we must make and check 24 bit colors and big endian mode.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho eb2eeed97e LibVNCClient: if the GotRect hook is set, override default op. 18 years ago
runge 0f162f1f0b argv > 0 doesn't make sense for a pointer; assuming argv != NULL. 18 years ago
dscho ca805667e6 Build shared libraries per default
Thanks to Guillaume Rousse, we now use libtool to build shared libraries.
18 years ago
dscho 14b290384a LibVNCClient: some users do not want to get whole-screen updates; introduce client->updateRect for that 18 years ago
dscho 35d481a783 sometimes zrle sends too many bytes; play safe 18 years ago
runge 1f8da9bde3 libvncclient: add GotCursorShape() and GotCopyRect(); x11vnc dep on libvncclient 18 years ago
dscho 6cfd9afee9 make cut text handling using a hook 19 years ago
steven_carr a60ee2ee9f RFB 3.8 clients are well informed 19 years ago
steven_carr ccdbe8f325 The great UltraVNC Compatibility Commit 19 years ago
runge 347c4a9847 fix some build issues WRT ultravnc code. 19 years ago
steven_carr 0d734ad896 Server Capability Encodings
rfbEncodingSupportedEncodings - What encodings are supported?
rfbEncodingSupportedMessages  - What message types are supported?
rfbEncodingServerIdentity     - What is the servers version string?
ie: "x11vnc: 0.8.1 lastmod: 2006-04-25 (LibVNCServer 0.9pre)"
19 years ago
steven_carr 2eded94f7b UltraVNC with scaling, will send rectangles with a zero W or H
We need to process the rectangle (especially if it a type that contains
subrectangles or any kind of compression).   UltraVNC should be fixed to
prevent these useless rectangles from being sent.
19 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 e57c4dcd71 CopyRectangle() BPP!=8 bug fixed 19 years ago
steven_carr 18cd366896 Eliminate incompatible pointer assignment warning (gcc 4.0.1) 19 years ago
steven_carr 422491c98a signed vs unsigned warnings eliminated (gcc 4.0.1) 19 years ago
dscho 7602f0e750 libvncclient: support changing of framebuffer size; make SDLvncviewer use it 19 years ago
runge 3c80351a1c Make VPATH building work with -I $(top_srcdir) for rfb/rfb.h 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
dscho 3a8d4bdbe6 work around write() returning ENOENT on Solaris 2.7 19 years ago
dscho 9e78be39cc one more memory leak 19 years ago
dscho 61204490ce plug memory leaks 19 years ago
runge 8eb18f6cd8 fix deadlock from rfbReleaseExtensionIterator(), fix no libz/libjpeg builds, disable tightvnc-filetransfer if no libpthread, add --without-pthread option, rm // comments, set NAME_MAX if not defined, x11vnc: throttle load if fb update requests not taking place. 20 years ago
dscho 194a76df11 add an extension mechanism for LibVNCClient, modify the client data handling
so that more than one data structure can be attached, and add an example
to speak the client part of the back channel.
20 years ago
dscho 5c1fdb47d3 fix warning 20 years ago
dscho 808b6a0b23 do it right: it is not DEFINES, but AM_CFLAGS 20 years ago
dscho 0a909fde7a This monster commit contains support for TightVNC's file transfer protocol.
Thank you very much, Rohit!
20 years ago
dscho 462ffd3f3e fix annoying zrle decoding bug 20 years ago
dscho 8f4b4e267d do distribute and depend on zrle.c 20 years ago
dscho b225ee993a implement ZRLE decoding 20 years ago
dscho 1b830d0446 init a structure *before* using it... 20 years ago
dscho 53387007ba remove wrong comment 20 years ago
dscho 669b4c8685 make zlib and tight handling thread safe (static -> rfbClient) 20 years ago