Commit Graph

100 Commits (79f0f1374cabb3d252e9eda0d13fc21857991b2e)

Author SHA1 Message Date
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>
16 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>
16 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