LibVNCServer/LibVNCClient
rfbclient.h
Go to the documentation of this file.
1#ifndef RFBCLIENT_H
2#define RFBCLIENT_H
3
9/*
10 * Copyright (C) 2017 D. R. Commander. All Rights Reserved.
11 * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved.
12 * Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
13 * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
14 *
15 * This is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This software is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this software; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
28 * USA.
29 */
30
35#ifdef WIN32
36#define WIN32_LEAN_AND_MEAN /* Prevent loading any Winsock 1.x headers from windows.h */
37#ifdef _MSC_VER
38#pragma warning(disable:4996)
39#endif
40#endif
41
42#if defined(ANDROID) || defined(LIBVNCSERVER_HAVE_ANDROID)
43#include <arpa/inet.h>
44#include <sys/select.h>
45#endif
46
47#include <stdio.h>
48#include <stdlib.h>
49#include <string.h>
50#if LIBVNCSERVER_HAVE_SYS_TIME_H
51#include <sys/time.h>
52#endif
53#if LIBVNCSERVER_HAVE_UNISTD_H
54#include <unistd.h>
55#endif
56#include <rfb/rfbproto.h>
57#include <rfb/keysym.h>
58#include <rfb/threading.h>
59
60#ifdef LIBVNCSERVER_HAVE_SASL
61#include <sasl/sasl.h>
62#endif /* LIBVNCSERVER_HAVE_SASL */
63
64#define rfbClientSwap16IfLE(s) \
65 (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
66
67#define rfbClientSwap32IfLE(l) \
68 (*(char *)&client->endianTest ? ((((l) >> 24) & 0x000000ff) | \
69 (((l) & 0x00ff0000) >> 8) | \
70 (((l) & 0x0000ff00) << 8) | \
71 (((l) & 0x000000ff) << 24)) : (l))
72
73#define rfbClientSwap64IfLE(l) \
74 (*(char *)&client->endianTest ? ((((l) >> 56 ) & 0x00000000000000ffULL) | \
75 (((l) & 0x00ff000000000000ULL) >> 40) | \
76 (((l) & 0x0000ff0000000000ULL) >> 24) | \
77 (((l) & 0x000000ff00000000ULL) >> 8) | \
78 (((l) & 0x00000000ff000000ULL) << 8) | \
79 (((l) & 0x0000000000ff0000ULL) << 24) | \
80 (((l) & 0x000000000000ff00ULL) << 40) | \
81 (((l) & 0x00000000000000ffULL) << 56)) : (l))
82
83#define FLASH_PORT_OFFSET 5400
84#define LISTEN_PORT_OFFSET 5500
85#define TUNNEL_PORT_OFFSET 5500
86#define SERVER_PORT_OFFSET 5900
87
88#define DEFAULT_CONNECT_TIMEOUT 60
89#define DEFAULT_READ_TIMEOUT 0
90
91#define DEFAULT_SSH_CMD "/usr/bin/ssh"
92#define DEFAULT_TUNNEL_CMD \
93 (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20")
94#define DEFAULT_VIA_CMD \
95 (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
96
97#if(defined __cplusplus)
98extern "C"
99{
100#endif
101
104typedef struct {
105 FILE* file;
106 struct timeval tv;
109} rfbVNCRec;
110
113typedef struct rfbClientData {
114 void* tag;
115 void* data;
118
121typedef struct {
124
125 const char* encodingsString;
126
132
139} AppData;
140
142typedef union _rfbCredential
143{
145 struct
146 {
151 uint8_t x509CrlVerifyMode; /* Only required for OpenSSL - see meanings below */
152 } x509Credential;
154 struct
155 {
156 char *username;
157 char *password;
158 } userCredential;
160
161#define rfbCredentialTypeX509 1
162#define rfbCredentialTypeUser 2
163
164/* When using OpenSSL, CRLs can be included in both the x509CACrlFile and appended
165 to the x509CACertFile as is common with OpenSSL. When rfbX509CrlVerifyAll is
166 specified the CRL list must include CRLs for all certificates in the chain */
167#define rfbX509CrlVerifyNone 0 /* No CRL checking is performed */
168#define rfbX509CrlVerifyClient 1 /* Only the leaf server certificate is checked */
169#define rfbX509CrlVerifyAll 2 /* All certificates in the server chain are checked */
170
171struct _rfbClient;
172
183typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text);
193typedef void (*HandleXvpMsgProc)(struct _rfbClient* client, uint8_t version, uint8_t opcode);
194typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad);
195typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
196typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
197typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
208typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
215typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client);
216typedef char* (*GetPasswordProc)(struct _rfbClient* client);
217typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType);
218typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
219typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
220typedef void (*GotXCutTextUTF8Proc)(struct _rfbClient* client, const char* buffer, int buffer_len);
221typedef void (*BellProc)(struct _rfbClient* client);
229typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
230typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y);
231typedef void (*GotFillRectProc)(struct _rfbClient* client, int x, int y, int w, int h, uint32_t colour);
232typedef void (*GotBitmapProc)(struct _rfbClient* client, const uint8_t* buffer, int x, int y, int w, int h);
233typedef rfbBool (*GotJpegProc)(struct _rfbClient* client, const uint8_t* buffer, int length, int x, int y, int w, int h);
234typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client);
235typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client);
237#ifdef LIBVNCSERVER_HAVE_SASL
238typedef char* (*GetUserProc)(struct _rfbClient* client);
239typedef char* (*GetSASLMechanismProc)(struct _rfbClient* client, char* mechlist);
240#endif /* LIBVNCSERVER_HAVE_SASL */
241
242typedef struct _rfbClient {
243 uint8_t* frameBuffer;
245
247
249
250 const char* programName;
254 int listenPort, flashPort;
255
256 struct {
257 int x, y, w, h;
258 } updateRect;
259
265#define RFB_BUFFER_SIZE (640*480)
266 char buffer[RFB_BUFFER_SIZE];
267
268 /* rfbproto.c */
269
276
277 /* sockets.c */
278#define RFB_BUF_SIZE 8192
279 char buf[RFB_BUF_SIZE];
281 unsigned int buffered;
282
283 /* The zlib encoding requires expansion/decompression/deflation of the
284 compressed data in the "buffer" above into another, result buffer.
285 However, the size of the result buffer can be determined precisely
286 based on the bitsPerPixel, height and width of the rectangle. We
287 allocate this buffer one time to be the full size of the buffer. */
288
289 /* Ultra Encoding uses this buffer too */
290
293
296
297#ifdef LIBVNCSERVER_HAVE_LIBZ
298 z_stream decompStream;
299 rfbBool decompStreamInited;
300#endif
301
302
303#ifdef LIBVNCSERVER_HAVE_LIBZ
304 /*
305 * Variables for the ``tight'' encoding implementation.
306 */
307
309#define ZLIB_BUFFER_SIZE 30000
310 char zlib_buffer[ZLIB_BUFFER_SIZE];
311
312 /* Four independent compression streams for zlib library. */
313 z_stream zlibStream[4];
314 rfbBool zlibStreamActive[4];
315
316 /* Filter stuff. Should be initialized by filter initialization code. */
317 rfbBool cutZeros;
318 int rectWidth, rectColors;
319 char tightPalette[256*4];
320 uint8_t tightPrevRow[2048*3*sizeof(uint16_t)];
321
322#ifdef LIBVNCSERVER_HAVE_LIBJPEG
324 rfbBool jpegError;
325
326 struct jpeg_source_mgr* jpegSrcManager;
327 void* jpegBufferPtr;
328 size_t jpegBufferLen;
329
330#endif
331#endif
332
333
334 /* cursor.c */
336 uint8_t *rcSource, *rcMask;
337
340
342
343 /* Keyboard State support (is 'Caps Lock' set on the remote display???) */
346
348
349 /* hooks */
361
364
374
376 int major, minor;
377
379 uint32_t authScheme, subAuthScheme;
380
383
391
395
397 char *destHost;
399
402
405
406 /* listen.c */
408
410
412 /* IPv6 listen socket, address and port*/
416
417 /* Output Window ID. When set, client application enables libvncclient to perform direct rendering in its window */
418 unsigned long outputWindow;
419
428
441
442#ifdef LIBVNCSERVER_HAVE_SASL
443 sasl_conn_t *saslconn;
444 const char *saslDecoded;
445 unsigned int saslDecodedLength;
446 unsigned int saslDecodedOffset;
447 sasl_secret_t *saslSecret;
448
449 /* Callback to allow the client to choose a preferred mechanism. The string returned will
450 be freed once no longer required. */
451 GetSASLMechanismProc GetSASLMechanism;
452 GetUserProc GetUser;
453
454#endif /* LIBVNCSERVER_HAVE_SASL */
455
456#ifdef LIBVNCSERVER_HAVE_LIBZ
457#ifdef LIBVNCSERVER_HAVE_LIBJPEG
459 void *tjhnd;
460
461#endif
462#endif
463 /* timeout in seconds for select() after connect() */
464 unsigned int connectTimeout;
465
466 /* timeout in seconds when reading from half-open connections in
467 * ReadFromRFBServer() - keep at 0 to disable timeout detection and handling */
468 unsigned int readTimeout;
469
474 MUTEX(tlsRwMutex);
475
481
482#ifdef LIBVNCSERVER_HAVE_LIBZ
483 uint32_t extendedClipboardServerCapabilities;
484#endif
489
490 /* flag to indicate wheter updateRect is managed by lib or user */
492} rfbClient;
493
494/* cursor.c */
501extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
502
503/* listen.c */
504
506extern int listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout);
507
508/* rfbclient.c */
509
511typedef void (*rfbClientLogProc)(const char *format, ...);
513extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
514extern rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort);
515extern void SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size);
557 int x, int y, int w, int h,
558 rfbBool incremental);
559extern rfbBool SendScaleSetting(rfbClient* client,int scaleSetting);
580extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask);
598extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down);
609extern rfbBool SendExtendedKeyEvent(rfbClient* client, uint32_t keysym, uint32_t keycode, rfbBool down);
622extern rfbBool SendClientCutText(rfbClient* client,char *str, int len);
637extern rfbBool SendClientCutTextUTF8(rfbClient* client, char *str, int len);
649
671extern rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code);
672
673extern void PrintPixelFormat(rfbPixelFormat *format);
674
677
688
696extern void rfbClientGetUpdateRect(rfbClient *client, rfbRectangle *rect, rfbBool *isManagedByLib);
697
698/* client data */
699
713void rfbClientSetClientData(rfbClient* client, void* tag, void* data);
723
724/* protocol extensions */
725
726typedef struct _rfbClientProtocolExtension {
729 rfbBool (*handleEncoding)(rfbClient* cl,
732 rfbBool (*handleMessage)(rfbClient* cl,
733 rfbServerToClientMsg* message);
734 struct _rfbClientProtocolExtension* next;
735 uint32_t const* securityTypes;
737 rfbBool (*handleAuthentication)(rfbClient* cl, uint32_t authScheme);
739
741
742/* sockets.c */
743
745
746extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
747extern rfbBool WriteToRFBServer(rfbClient* client, const char *buf, unsigned int n);
748extern int FindFreeTcpPort(void);
749extern rfbSocket ListenAtTcpPort(int port);
750extern rfbSocket ListenAtTcpPortAndAddress(int port, const char *address);
757extern rfbSocket ConnectClientToTcpAddr(unsigned int host, int port);
764extern rfbSocket ConnectClientToTcpAddr6(const char *hostname, int port);
770extern rfbSocket ConnectClientToUnixSock(const char *sockFile);
778extern rfbSocket ConnectClientToTcpAddrWithTimeout(unsigned int host, int port, unsigned int timeout);
786extern rfbSocket ConnectClientToTcpAddr6WithTimeout(const char *hostname, int port, unsigned int timeout);
793extern rfbSocket ConnectClientToUnixSockWithTimeout(const char *sockFile, unsigned int timeout);
797extern rfbBool SetDSCP(rfbSocket sock, int dscp);
798
799extern rfbBool StringToIPAddr(const char *str, unsigned int *addr);
811extern int WaitForMessage(rfbClient* client,unsigned int usecs);
812
813/* vncviewer.c */
838rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel);
870rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv);
879
880#if(defined __cplusplus)
881}
882#endif
883
894#endif
int y
Definition: SDLvncviewer.c:34
int x
Definition: SDLvncviewer.c:34
void(* GotCursorShapeProc)(struct _rfbClient *client, int xhot, int yhot, int width, int height, int bytesPerPixel)
Called when a cursor shape update was received from the server.
Definition: rfbclient.h:229
rfbBool SendClientCutText(rfbClient *client, char *str, int len)
Places a Latin-1-encoded string on the server's clipboard.
rfbSocket ConnectClientToTcpAddr6(const char *hostname, int port)
Tries to connect to an IPv4 or IPv6 host.
rfbBool SetDSCP(rfbSocket sock, int dscp)
void(* GotFillRectProc)(struct _rfbClient *client, int x, int y, int w, int h, uint32_t colour)
Definition: rfbclient.h:231
void(* HandleXvpMsgProc)(struct _rfbClient *client, uint8_t version, uint8_t opcode)
Handles XVP server messages.
Definition: rfbclient.h:193
rfbBool InitialiseRFBConnection(rfbClient *client)
int WaitForMessage(rfbClient *client, unsigned int usecs)
Waits for an RFB message to arrive from the server.
rfbBool HandleCursorShape(rfbClient *client, int xhot, int yhot, int width, int height, uint32_t enc)
Handles XCursor and RichCursor shape updates from the server.
rfbSocket ConnectClientToUnixSockWithTimeout(const char *sockFile, unsigned int timeout)
Tries to connect to a Unix socket using the given timeout value.
void(* FinishedFrameBufferUpdateProc)(struct _rfbClient *client)
Callback indicating that a client has completely processed an rfbFramebufferUpdate message sent by a ...
Definition: rfbclient.h:215
rfbBool WriteToRFBServer(rfbClient *client, const char *buf, unsigned int n)
rfbSocket ConnectClientToTcpAddr(unsigned int host, int port)
Tries to connect to an IPv4 host.
rfbBool TextChatOpen(rfbClient *client)
Opens a text chat window on the server.
void(* SoftCursorLockAreaProc)(struct _rfbClient *client, int x, int y, int w, int h)
Definition: rfbclient.h:196
rfbBool TextChatFinish(rfbClient *client)
rfbSocket ConnectClientToUnixSock(const char *sockFile)
Tries to connect to a Unix socket.
void listenForIncomingConnections(rfbClient *viewer)
rfbBool ConnectToRFBRepeater(rfbClient *client, const char *repeaterHost, int repeaterPort, const char *destHost, int destPort)
rfbBool(* HandleCursorPosProc)(struct _rfbClient *client, int x, int y)
Definition: rfbclient.h:195
rfbBool PermitServerInput(rfbClient *client, int enabled)
void(* rfbClientLogProc)(const char *format,...)
Definition: rfbclient.h:511
void rfbClientGetUpdateRect(rfbClient *client, rfbRectangle *rect, rfbBool *isManagedByLib)
Get the rectangle the client asks for in incremental framebuffer requests.
rfbBool errorMessageOnReadFailure
rfbSocket ListenAtTcpPortAndAddress(int port, const char *address)
char *(* GetPasswordProc)(struct _rfbClient *client)
Definition: rfbclient.h:216
rfbClientLogProc rfbClientLog
rfbClient * rfbGetClient(int bitsPerSample, int samplesPerPixel, int bytesPerPixel)
Allocates and returns a pointer to an rfbClient structure.
int FindFreeTcpPort(void)
void rfbClientCleanup(rfbClient *client)
Cleans up the client structure and releases the memory allocated for it.
void(* GotBitmapProc)(struct _rfbClient *client, const uint8_t *buffer, int x, int y, int w, int h)
Definition: rfbclient.h:232
void(* BellProc)(struct _rfbClient *client)
Definition: rfbclient.h:221
rfbBool SetNonBlocking(rfbSocket sock)
rfbBool SendExtendedKeyEvent(rfbClient *client, uint32_t keysym, uint32_t keycode, rfbBool down)
The same as SendKeyEvent, except a key code will be sent along with the symbol if the server supports...
rfbBool TextChatSend(rfbClient *client, char *text)
Sends a text chat message to the server.
void(* GotCopyRectProc)(struct _rfbClient *client, int src_x, int src_y, int w, int h, int dest_x, int dest_y)
Definition: rfbclient.h:230
rfbBool(* MallocFrameBufferProc)(struct _rfbClient *client)
Definition: rfbclient.h:218
rfbBool SendExtDesktopSize(rfbClient *client, uint16_t width, uint16_t height)
Sends a SetDesktopSize event to the server.
void(* GotFrameBufferUpdateProc)(struct _rfbClient *client, int x, int y, int w, int h)
Callback indicating that a rectangular area of the client's framebuffer was updated.
Definition: rfbclient.h:208
rfbSocket AcceptTcpConnection(rfbSocket listenSock)
rfbSocket ListenAtTcpPort(int port)
rfbBool(* GotJpegProc)(struct _rfbClient *client, const uint8_t *buffer, int length, int x, int y, int w, int h)
Definition: rfbclient.h:233
rfbBool TextChatClose(rfbClient *client)
Closes the text chat window on the server.
void(* HandleKeyboardLedStateProc)(struct _rfbClient *client, int value, int pad)
Definition: rfbclient.h:194
rfbBool SendScaleSetting(rfbClient *client, int scaleSetting)
void rfbClientRegisterExtension(rfbClientProtocolExtension *e)
void(* HandleTextChatProc)(struct _rfbClient *client, int value, char *text)
Handles a text chat message.
Definition: rfbclient.h:183
rfbSocket ConnectClientToTcpAddr6WithTimeout(const char *hostname, int port, unsigned int timeout)
Tries to connect to an IPv4 or IPv6 host using the given timeout value.
rfbBool HandleRFBServerMessage(rfbClient *client)
Handles messages from the RFB server.
rfbBool StringToIPAddr(const char *str, unsigned int *addr)
rfbBool SendPointerEvent(rfbClient *client, int x, int y, int buttonMask)
Sends a pointer event to the server.
void(* GotXCutTextProc)(struct _rfbClient *client, const char *text, int textlen)
Definition: rfbclient.h:219
rfbBool rfbInitClient(rfbClient *client, int *argc, char **argv)
Initializes the client.
rfbBool SendKeyEvent(rfbClient *client, uint32_t key, rfbBool down)
Sends a key event to the server.
rfbSocket ConnectClientToTcpAddrWithTimeout(unsigned int host, int port, unsigned int timeout)
Tries to connect to an IPv4 host using the given timeout value.
void(* SoftCursorUnlockScreenProc)(struct _rfbClient *client)
Definition: rfbclient.h:197
rfbBool SendXvpMsg(rfbClient *client, uint8_t version, uint8_t code)
rfbBool SendClientCutTextUTF8(rfbClient *client, char *str, int len)
Places a UTF-8-encoded string on the server's clipboard if the server supports it.
rfbBool(* LockWriteToTLSProc)(struct _rfbClient *client)
Definition: rfbclient.h:234
rfbBool SendFramebufferUpdateRequest(rfbClient *client, int x, int y, int w, int h, rfbBool incremental)
Sends a framebuffer update request to the server.
rfbCredential *(* GetCredentialProc)(struct _rfbClient *client, int credentialType)
Definition: rfbclient.h:217
void SetClientAuthSchemes(rfbClient *client, const uint32_t *authSchemes, int size)
rfbBool SetBlocking(rfbSocket sock)
rfbBool ReadFromRFBServer(rfbClient *client, char *out, unsigned int n)
rfbBool SupportsServer2Client(rfbClient *client, int messageType)
rfbBool ConnectToRFBServer(rfbClient *client, const char *hostname, int port)
void * rfbClientGetClientData(rfbClient *client, void *tag)
Returns a pointer to the client data associated with the given tag.
void rfbClientSetUpdateRect(rfbClient *client, rfbRectangle *rect)
Set the rectangle the client is interested in.
int listenForIncomingConnectionsNoFork(rfbClient *viewer, int usec_timeout)
rfbClientLogProc rfbClientErr
Definition: rfbclient.h:512
rfbBool(* UnlockWriteToTLSProc)(struct _rfbClient *client)
Definition: rfbclient.h:235
void rfbClientSetClientData(rfbClient *client, void *tag, void *data)
Associates a client data tag with the given pointer.
rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient *client)
rfbBool rfbEnableClientLogging
rfbBool SetFormatAndEncodings(rfbClient *client)
Sends format and encoding parameters to the server.
rfbBool SameMachine(rfbSocket sock)
rfbBool SupportsClient2Server(rfbClient *client, int messageType)
void(* GotXCutTextUTF8Proc)(struct _rfbClient *client, const char *buffer, int buffer_len)
Definition: rfbclient.h:220
void PrintPixelFormat(rfbPixelFormat *format)
#define RFB_BUF_SIZE
Definition: rfbclient.h:278
#define RFB_BUFFER_SIZE
Note that the CoRRE encoding uses this buffer and assumes it is big enough to hold 255 * 255 * 32 bit...
Definition: rfbclient.h:265
int8_t rfbBool
Definition: rfbproto.h:108
#define rfbSocket
Definition: rfbproto.h:104
app data (belongs into rfbClient?)
Definition: rfbclient.h:121
rfbBool enableJPEG
Definition: rfbclient.h:135
rfbBool shareDesktop
Definition: rfbclient.h:122
rfbBool palmVNC
use palmvnc specific SetScale (vs ultravnc)
Definition: rfbclient.h:137
rfbBool useBGR233
Definition: rfbclient.h:127
rfbBool useRemoteCursor
Definition: rfbclient.h:136
rfbBool forceOwnCmap
Definition: rfbclient.h:129
int scaleSetting
0 means no scale set, else 1/scaleSetting
Definition: rfbclient.h:138
int qualityLevel
Definition: rfbclient.h:134
rfbBool forceTrueColour
Definition: rfbclient.h:130
int nColours
Definition: rfbclient.h:128
int compressLevel
Definition: rfbclient.h:133
int requestedDepth
Definition: rfbclient.h:131
const char * encodingsString
Definition: rfbclient.h:125
rfbBool viewOnly
Definition: rfbclient.h:123
client data
Definition: rfbclient.h:113
void * tag
Definition: rfbclient.h:114
struct rfbClientData * next
Definition: rfbclient.h:116
void * data
Definition: rfbclient.h:115
char * desktopName
Definition: rfbclient.h:273
rfbSupportedMessages supportedMessages
Which messages are supported by the server This is a guess for most servers.
Definition: rfbclient.h:373
unsigned int connectTimeout
Definition: rfbclient.h:464
char * ultra_buffer
Definition: rfbclient.h:292
HandleCursorPosProc HandleCursorPos
Definition: rfbclient.h:352
int KeyboardLedStateEnabled
Definition: rfbclient.h:344
const char * programName
Definition: rfbclient.h:250
BellProc Bell
Definition: rfbclient.h:360
int endianTest
Definition: rfbclient.h:246
rfbSocket listenSock
Definition: rfbclient.h:407
int listen6Port
Definition: rfbclient.h:415
GotFrameBufferUpdateProc GotFrameBufferUpdate
Definition: rfbclient.h:355
UnlockWriteToTLSProc UnlockWriteToTLS
Definition: rfbclient.h:427
rfbVNCRec * vncRec
Definition: rfbclient.h:341
SoftCursorUnlockScreenProc SoftCursorUnlockScreen
Definition: rfbclient.h:354
void * tlsSession
The TLS session for Anonymous TLS and VeNCrypt.
Definition: rfbclient.h:382
MUTEX(tlsRwMutex)
Mutex to protect concurrent TLS read/write.
rfbBool isUpdateRectManagedByLib
Definition: rfbclient.h:491
LockWriteToTLSProc LockWriteToTLS
These lock/unlock hooks are not used anymore.
Definition: rfbclient.h:426
rfbClientData * clientData
private data pointer
Definition: rfbclient.h:339
rfbExtDesktopScreen screen
Used for intended dimensions, rfbClient.width and rfbClient.height are used to manage the real frameb...
Definition: rfbclient.h:480
char * raw_buffer
Definition: rfbclient.h:295
char * listenAddress
Definition: rfbclient.h:411
GotXCutTextProc GotXCutText
Definition: rfbclient.h:359
HandleTextChatProc HandleTextChat
Definition: rfbclient.h:350
rfbBool canUseHextile
Definition: rfbclient.h:272
GotXCutTextUTF8Proc GotXCutTextUTF8
Callback fired when "Extended Clipboard" UTF-8 text data is received.
Definition: rfbclient.h:488
char * bufoutptr
Definition: rfbclient.h:280
unsigned long outputWindow
Definition: rfbclient.h:418
rfbBool listenSpecified
Definition: rfbclient.h:253
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate
Definition: rfbclient.h:409
rfbBool canUseCoRRE
Definition: rfbclient.h:271
GotFillRectProc GotFillRect
Hooks for custom rendering.
Definition: rfbclient.h:437
rfbBool requestedResize
Definition: rfbclient.h:476
int ultra_buffer_size
Definition: rfbclient.h:291
unsigned int buffered
Definition: rfbclient.h:281
GotBitmapProc GotBitmap
Definition: rfbclient.h:438
char * listen6Address
Definition: rfbclient.h:414
uint8_t * frameBuffer
Definition: rfbclient.h:243
int raw_buffer_size
Definition: rfbclient.h:294
GetCredentialProc GetCredential
To support security types that requires user input (except VNC password authentication),...
Definition: rfbclient.h:390
HandleXvpMsgProc HandleXvpMsg
hook to handle xvp server messages
Definition: rfbclient.h:404
uint32_t * clientAuthSchemes
The 0-terminated security types supported by the client.
Definition: rfbclient.h:394
uint8_t * rcMask
Definition: rfbclient.h:336
HandleKeyboardLedStateProc HandleKeyboardLedState
Definition: rfbclient.h:351
uint32_t authScheme
The selected security types.
Definition: rfbclient.h:379
rfbSocket sock
Definition: rfbclient.h:270
int canHandleNewFBSize
Definition: rfbclient.h:347
unsigned int readTimeout
Definition: rfbclient.h:468
char * serverHost
Definition: rfbclient.h:251
int flashPort
Definition: rfbclient.h:254
GetPasswordProc GetPassword
the pointer returned by GetPassword will be freed after use!
Definition: rfbclient.h:357
int major
negotiated protocol version
Definition: rfbclient.h:376
int height
Definition: rfbclient.h:244
char * destHost
When the server is a repeater, this specifies the final destination.
Definition: rfbclient.h:397
int QoS_DSCP
the QoS IP DSCP for this client
Definition: rfbclient.h:401
GotCursorShapeProc GotCursorShape
Definition: rfbclient.h:362
GotCopyRectProc GotCopyRect
Definition: rfbclient.h:363
GotJpegProc GotJpeg
Hook for custom JPEG decoding and rendering.
Definition: rfbclient.h:440
rfbServerInitMsg si
Definition: rfbclient.h:275
AppData appData
Definition: rfbclient.h:248
MallocFrameBufferProc MallocFrameBuffer
Definition: rfbclient.h:358
int serverPort
if -1, then use file recorded by vncrec
Definition: rfbclient.h:252
SoftCursorLockAreaProc SoftCursorLockArea
Definition: rfbclient.h:353
int CurrentKeyboardLedState
Definition: rfbclient.h:345
rfbSocket listen6Sock
Definition: rfbclient.h:413
rfbPixelFormat format
Definition: rfbclient.h:274
int destPort
Definition: rfbclient.h:398
uint32_t const * securityTypes
Definition: rfbclient.h:735
struct _rfbClientProtocolExtension * next
Definition: rfbclient.h:734
vncrec
Definition: rfbclient.h:104
FILE * file
Definition: rfbclient.h:105
rfbBool readTimestamp
Definition: rfbclient.h:107
rfbBool doNotSleep
Definition: rfbclient.h:108
For GetCredentialProc callback function to return.
Definition: rfbclient.h:143
char * x509CACrlFile
Definition: rfbclient.h:148
char * password
Definition: rfbclient.h:157
char * x509ClientKeyFile
Definition: rfbclient.h:150
char * username
Definition: rfbclient.h:156
char * x509ClientCertFile
Definition: rfbclient.h:149
uint8_t x509CrlVerifyMode
Definition: rfbclient.h:151
char * x509CACertFile
Definition: rfbclient.h:147
rfbClient * client
Definition: vnc2mpg.c:358
#define height
Definition: vncev.c:19
#define width
Definition: vncev.c:18