• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

krfb

  • sources
  • kde-4.14
  • kdenetwork
  • krfb
  • libvncserver
  • rfb
rfbproto.h
Go to the documentation of this file.
1 #ifndef RFBPROTO_H
2 #define RFBPROTO_H
3 
15 /*
16  * Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin
17  * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved.
18  * Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
19  * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
20  *
21  * This is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License as published by
23  * the Free Software Foundation; either version 2 of the License, or
24  * (at your option) any later version.
25  *
26  * This software is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with this software; if not, write to the Free Software
33  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
34  * USA.
35  */
36 
37 /*
38  * rfbproto.h - header file for the RFB protocol version 3.3
39  *
40  * Uses types CARD<n> for an n-bit unsigned integer, INT<n> for an n-bit signed
41  * integer (for n = 8, 16 and 32).
42  *
43  * All multiple byte integers are in big endian (network) order (most
44  * significant byte first). Unless noted otherwise there is no special
45  * alignment of protocol structures.
46  *
47  *
48  * Once the initial handshaking is done, all messages start with a type byte,
49  * (usually) followed by message-specific data. The order of definitions in
50  * this file is as follows:
51  *
52  * (1) Structures used in several types of message.
53  * (2) Structures used in the initial handshaking.
54  * (3) Message types.
55  * (4) Encoding types.
56  * (5) For each message type, the form of the data following the type byte.
57  * Sometimes this is defined by a single structure but the more complex
58  * messages have to be explained by comments.
59  */
60 
61 
62 #if defined(WIN32) && !defined(__MINGW32__)
63 #define LIBVNCSERVER_WORDS_BIGENDIAN
64 #define rfbBool int
65 #include <sys/timeb.h>
66 #include <winsock.h>
67 #undef SOCKET
68 #define SOCKET int
69 #else
70 #include <libvncserver-config.h>
71 #include <stdint.h>
72 #endif
73 
74 #ifdef LIBVNCSERVER_HAVE_LIBZ
75 #include <zlib.h>
76 #ifdef __CHECKER__
77 #undef Z_NULL
78 #define Z_NULL NULL
79 #endif
80 #endif
81 
82 /* some autotool versions do not properly prefix
83  WORDS_BIGENDIAN, so do that manually */
84 #ifdef WORDS_BIGENDIAN
85 #define LIBVNCSERVER_WORDS_BIGENDIAN
86 #endif
87 
88 /* MS compilers don't have strncasecmp */
89 #ifdef _MSC_VER
90 #define strncasecmp _strnicmp
91 #endif
92 
93 #if !defined(WIN32) || defined(__MINGW32__)
94 #define max(a,b) (((a)>(b))?(a):(b))
95 #ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
96 #include <sys/time.h>
97 #endif
98 #ifdef LIBVNCSERVER_HAVE_NETINET_IN_H
99 #include <netinet/in.h>
100 #endif
101 #define SOCKET int
102 typedef int8_t rfbBool;
103 #undef FALSE
104 #define FALSE 0
105 #undef TRUE
106 #define TRUE -1
107 #endif
108 
109 typedef uint32_t rfbKeySym;
110 typedef uint32_t rfbPixel;
111 
112 #ifdef LIBVNCSERVER_NEED_INADDR_T
113 typedef uint32_t in_addr_t;
114 #endif
115 
116 #ifndef INADDR_NONE
117 #define INADDR_NONE ((in_addr_t) 0xffffffff)
118 #endif
119 
120 #define MAX_ENCODINGS 21
121 
122 /*****************************************************************************
123  *
124  * Structures used in several messages
125  *
126  *****************************************************************************/
127 
128 /*-----------------------------------------------------------------------------
129  * Structure used to specify a rectangle. This structure is a multiple of 4
130  * bytes so that it can be interspersed with 32-bit pixel data without
131  * affecting alignment.
132  */
133 
134 typedef struct {
135  uint16_t x;
136  uint16_t y;
137  uint16_t w;
138  uint16_t h;
139 } rfbRectangle;
140 
141 #define sz_rfbRectangle 8
142 
143 
144 /*-----------------------------------------------------------------------------
145  * Structure used to specify pixel format.
146  */
147 
148 typedef struct {
149 
150  uint8_t bitsPerPixel; /* 8,16,32 only */
151 
152  uint8_t depth; /* 8 to 32 */
153 
154  uint8_t bigEndian; /* True if multi-byte pixels are interpreted
155  as big endian, or if single-bit-per-pixel
156  has most significant bit of the byte
157  corresponding to first (leftmost) pixel. Of
158  course this is meaningless for 8 bits/pix */
159 
160  uint8_t trueColour; /* If false then we need a "colour map" to
161  convert pixels to RGB. If true, xxxMax and
162  xxxShift specify bits used for red, green
163  and blue */
164 
165  /* the following fields are only meaningful if trueColour is true */
166 
167  uint16_t redMax; /* maximum red value (= 2^n - 1 where n is the
168  number of bits used for red). Note this
169  value is always in big endian order. */
170 
171  uint16_t greenMax; /* similar for green */
172 
173  uint16_t blueMax; /* and blue */
174 
175  uint8_t redShift; /* number of shifts needed to get the red
176  value in a pixel to the least significant
177  bit. To find the red value from a given
178  pixel, do the following:
179  1) Swap pixel value according to bigEndian
180  (e.g. if bigEndian is false and host byte
181  order is big endian, then swap).
182  2) Shift right by redShift.
183  3) AND with redMax (in host byte order).
184  4) You now have the red value between 0 and
185  redMax. */
186 
187  uint8_t greenShift; /* similar for green */
188 
189  uint8_t blueShift; /* and blue */
190 
191  uint8_t pad1;
192  uint16_t pad2;
193 
194 } rfbPixelFormat;
195 
196 #define sz_rfbPixelFormat 16
197 
198 /* UltraVNC: Color settings values */
199 #define rfbPFFullColors 0
200 #define rfbPF256Colors 1
201 #define rfbPF64Colors 2
202 #define rfbPF8Colors 3
203 #define rfbPF8GreyColors 4
204 #define rfbPF4GreyColors 5
205 #define rfbPF2GreyColors 6
206 
207 
208 /*****************************************************************************
209  *
210  * Initial handshaking messages
211  *
212  *****************************************************************************/
213 
214 /*-----------------------------------------------------------------------------
215  * Protocol Version
216  *
217  * The server always sends 12 bytes to start which identifies the latest RFB
218  * protocol version number which it supports. These bytes are interpreted
219  * as a string of 12 ASCII characters in the format "RFB xxx.yyy\n" where
220  * xxx and yyy are the major and minor version numbers (for version 3.3
221  * this is "RFB 003.003\n").
222  *
223  * The client then replies with a similar 12-byte message giving the version
224  * number of the protocol which should actually be used (which may be different
225  * to that quoted by the server).
226  *
227  * It is intended that both clients and servers may provide some level of
228  * backwards compatibility by this mechanism. Servers in particular should
229  * attempt to provide backwards compatibility, and even forwards compatibility
230  * to some extent. For example if a client demands version 3.1 of the
231  * protocol, a 3.0 server can probably assume that by ignoring requests for
232  * encoding types it doesn't understand, everything will still work OK. This
233  * will probably not be the case for changes in the major version number.
234  *
235  * The format string below can be used in sprintf or sscanf to generate or
236  * decode the version string respectively.
237  */
238 
239 #define rfbProtocolVersionFormat "RFB %03d.%03d\n"
240 #define rfbProtocolMajorVersion 3
241 #define rfbProtocolMinorVersion 8
242 /* UltraVNC Viewer examines rfbProtocolMinorVersion number (4, and 6)
243  * to identify if the server supports File Transfer
244  */
245 
246 typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */
247 
248 #define sz_rfbProtocolVersionMsg 12
249 
250 /*
251  * Negotiation of the security type (protocol version 3.7)
252  *
253  * Once the protocol version has been decided, the server either sends a list
254  * of supported security types, or informs the client about an error (when the
255  * number of security types is 0). Security type rfbSecTypeTight is used to
256  * enable TightVNC-specific protocol extensions. The value rfbSecTypeVncAuth
257  * stands for classic VNC authentication.
258  *
259  * The client selects a particular security type from the list provided by the
260  * server.
261  */
262 
263 #define rfbSecTypeInvalid 0
264 #define rfbSecTypeNone 1
265 #define rfbSecTypeVncAuth 2
266 
267 
268 /*-----------------------------------------------------------------------------
269  * Authentication
270  *
271  * Once the protocol version has been decided, the server then sends a 32-bit
272  * word indicating whether any authentication is needed on the connection.
273  * The value of this word determines the authentication scheme in use. For
274  * version 3.0 of the protocol this may have one of the following values:
275  */
276 
277 #define rfbConnFailed 0
278 #define rfbNoAuth 1
279 #define rfbVncAuth 2
280 
281 #define rfbRA2 5
282 #define rfbRA2ne 6
283 #define rfbSSPI 7
284 #define rfbSSPIne 8
285 #define rfbTight 16
286 #define rfbUltra 17
287 #define rfbTLS 18
288 #define rfbVeNCrypt 19
289 #define rfbARD 30
290 #define rfbMSLogon 0xfffffffa
291 
292 #define rfbVeNCryptPlain 256
293 #define rfbVeNCryptTLSNone 257
294 #define rfbVeNCryptTLSVNC 258
295 #define rfbVeNCryptTLSPlain 259
296 #define rfbVeNCryptX509None 260
297 #define rfbVeNCryptX509VNC 261
298 #define rfbVeNCryptX509Plain 262
299 #define rfbVeNCryptX509SASL 263
300 #define rfbVeNCryptTLSSASL 264
301 
302 /*
303  * rfbConnFailed: For some reason the connection failed (e.g. the server
304  * cannot support the desired protocol version). This is
305  * followed by a string describing the reason (where a
306  * string is specified as a 32-bit length followed by that
307  * many ASCII characters).
308  *
309  * rfbNoAuth: No authentication is needed.
310  *
311  * rfbVncAuth: The VNC authentication scheme is to be used. A 16-byte
312  * challenge follows, which the client encrypts as
313  * appropriate using the password and sends the resulting
314  * 16-byte response. If the response is correct, the
315  * server sends the 32-bit word rfbVncAuthOK. If a simple
316  * failure happens, the server sends rfbVncAuthFailed and
317  * closes the connection. If the server decides that too
318  * many failures have occurred, it sends rfbVncAuthTooMany
319  * and closes the connection. In the latter case, the
320  * server should not allow an immediate reconnection by
321  * the client.
322  */
323 
324 #define rfbVncAuthOK 0
325 #define rfbVncAuthFailed 1
326 #define rfbVncAuthTooMany 2
327 
328 
329 /*-----------------------------------------------------------------------------
330  * Client Initialisation Message
331  *
332  * Once the client and server are sure that they're happy to talk to one
333  * another, the client sends an initialisation message. At present this
334  * message only consists of a boolean indicating whether the server should try
335  * to share the desktop by leaving other clients connected, or give exclusive
336  * access to this client by disconnecting all other clients.
337  */
338 
339 typedef struct {
340  uint8_t shared;
341 } rfbClientInitMsg;
342 
343 #define sz_rfbClientInitMsg 1
344 
345 
346 /*-----------------------------------------------------------------------------
347  * Server Initialisation Message
348  *
349  * After the client initialisation message, the server sends one of its own.
350  * This tells the client the width and height of the server's framebuffer,
351  * its pixel format and the name associated with the desktop.
352  */
353 
354 typedef struct {
355  uint16_t framebufferWidth;
356  uint16_t framebufferHeight;
357  rfbPixelFormat format; /* the server's preferred pixel format */
358  uint32_t nameLength;
359  /* followed by char name[nameLength] */
360 } rfbServerInitMsg;
361 
362 #define sz_rfbServerInitMsg (8 + sz_rfbPixelFormat)
363 
364 
365 /*
366  * Following the server initialisation message it's up to the client to send
367  * whichever protocol messages it wants. Typically it will send a
368  * SetPixelFormat message and a SetEncodings message, followed by a
369  * FramebufferUpdateRequest. From then on the server will send
370  * FramebufferUpdate messages in response to the client's
371  * FramebufferUpdateRequest messages. The client should send
372  * FramebufferUpdateRequest messages with incremental set to true when it has
373  * finished processing one FramebufferUpdate and is ready to process another.
374  * With a fast client, the rate at which FramebufferUpdateRequests are sent
375  * should be regulated to avoid hogging the network.
376  */
377 
378 
379 
380 /*****************************************************************************
381  *
382  * Message types
383  *
384  *****************************************************************************/
385 
386 /* server -> client */
387 
388 #define rfbFramebufferUpdate 0
389 #define rfbSetColourMapEntries 1
390 #define rfbBell 2
391 #define rfbServerCutText 3
392 /* Modif sf@2002 */
393 #define rfbResizeFrameBuffer 4
394 #define rfbPalmVNCReSizeFrameBuffer 0xF
395 
396 /* client -> server */
397 
398 #define rfbSetPixelFormat 0
399 #define rfbFixColourMapEntries 1 /* not currently supported */
400 #define rfbSetEncodings 2
401 #define rfbFramebufferUpdateRequest 3
402 #define rfbKeyEvent 4
403 #define rfbPointerEvent 5
404 #define rfbClientCutText 6
405 /* Modif sf@2002 - actually bidirectionnal */
406 #define rfbFileTransfer 7
407 /* Modif sf@2002 */
408 #define rfbSetScale 8
409 /* Modif rdv@2002 */
410 #define rfbSetServerInput 9
411 /* Modif rdv@2002 */
412 #define rfbSetSW 10
413 /* Modif sf@2002 - TextChat - Bidirectionnal */
414 #define rfbTextChat 11
415 /* Modif cs@2005 */
416 /* PalmVNC 1.4 & 2.0 SetScale Factor message */
417 #define rfbPalmVNCSetScaleFactor 0xF
418 /* Xvp message - bidirectional */
419 #define rfbXvp 250
420 
421 
422 
423 
424 /*****************************************************************************
425  *
426  * Encoding types
427  *
428  *****************************************************************************/
429 
430 #define rfbEncodingRaw 0
431 #define rfbEncodingCopyRect 1
432 #define rfbEncodingRRE 2
433 #define rfbEncodingCoRRE 4
434 #define rfbEncodingHextile 5
435 #define rfbEncodingZlib 6
436 #define rfbEncodingTight 7
437 #define rfbEncodingZlibHex 8
438 #define rfbEncodingUltra 9
439 #define rfbEncodingZRLE 16
440 #define rfbEncodingZYWRLE 17
441 
442 /* Cache & XOR-Zlib - rdv@2002 */
443 #define rfbEncodingCache 0xFFFF0000
444 #define rfbEncodingCacheEnable 0xFFFF0001
445 #define rfbEncodingXOR_Zlib 0xFFFF0002
446 #define rfbEncodingXORMonoColor_Zlib 0xFFFF0003
447 #define rfbEncodingXORMultiColor_Zlib 0xFFFF0004
448 #define rfbEncodingSolidColor 0xFFFF0005
449 #define rfbEncodingXOREnable 0xFFFF0006
450 #define rfbEncodingCacheZip 0xFFFF0007
451 #define rfbEncodingSolMonoZip 0xFFFF0008
452 #define rfbEncodingUltraZip 0xFFFF0009
453 
454 /* Xvp pseudo-encoding */
455 #define rfbEncodingXvp 0xFFFFFECB
456 
457 /*
458  * Special encoding numbers:
459  * 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels;
460  * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data;
461  * 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions;
462  * 0xFFFFFF30 .. 0xFFFFFFDF -- not allocated yet;
463  * 0xFFFFFFE0 .. 0xFFFFFFEF -- quality level for JPEG compressor;
464  * 0xFFFFFFF0 .. 0xFFFFFFFF -- cross-encoding compression levels.
465  */
466 
467 #define rfbEncodingCompressLevel0 0xFFFFFF00
468 #define rfbEncodingCompressLevel1 0xFFFFFF01
469 #define rfbEncodingCompressLevel2 0xFFFFFF02
470 #define rfbEncodingCompressLevel3 0xFFFFFF03
471 #define rfbEncodingCompressLevel4 0xFFFFFF04
472 #define rfbEncodingCompressLevel5 0xFFFFFF05
473 #define rfbEncodingCompressLevel6 0xFFFFFF06
474 #define rfbEncodingCompressLevel7 0xFFFFFF07
475 #define rfbEncodingCompressLevel8 0xFFFFFF08
476 #define rfbEncodingCompressLevel9 0xFFFFFF09
477 
478 #define rfbEncodingXCursor 0xFFFFFF10
479 #define rfbEncodingRichCursor 0xFFFFFF11
480 #define rfbEncodingPointerPos 0xFFFFFF18
481 
482 #define rfbEncodingLastRect 0xFFFFFF20
483 #define rfbEncodingNewFBSize 0xFFFFFF21
484 
485 #define rfbEncodingQualityLevel0 0xFFFFFFE0
486 #define rfbEncodingQualityLevel1 0xFFFFFFE1
487 #define rfbEncodingQualityLevel2 0xFFFFFFE2
488 #define rfbEncodingQualityLevel3 0xFFFFFFE3
489 #define rfbEncodingQualityLevel4 0xFFFFFFE4
490 #define rfbEncodingQualityLevel5 0xFFFFFFE5
491 #define rfbEncodingQualityLevel6 0xFFFFFFE6
492 #define rfbEncodingQualityLevel7 0xFFFFFFE7
493 #define rfbEncodingQualityLevel8 0xFFFFFFE8
494 #define rfbEncodingQualityLevel9 0xFFFFFFE9
495 
496 
497 /* LibVNCServer additions. We claim 0xFFFE0000 - 0xFFFE00FF */
498 #define rfbEncodingKeyboardLedState 0xFFFE0000
499 #define rfbEncodingSupportedMessages 0xFFFE0001
500 #define rfbEncodingSupportedEncodings 0xFFFE0002
501 #define rfbEncodingServerIdentity 0xFFFE0003
502 
503 
504 /*****************************************************************************
505  *
506  * Server -> client message definitions
507  *
508  *****************************************************************************/
509 
510 
511 /*-----------------------------------------------------------------------------
512  * FramebufferUpdate - a block of rectangles to be copied to the framebuffer.
513  *
514  * This message consists of a header giving the number of rectangles of pixel
515  * data followed by the rectangles themselves. The header is padded so that
516  * together with the type byte it is an exact multiple of 4 bytes (to help
517  * with alignment of 32-bit pixels):
518  */
519 
520 typedef struct {
521  uint8_t type; /* always rfbFramebufferUpdate */
522  uint8_t pad;
523  uint16_t nRects;
524  /* followed by nRects rectangles */
525 } rfbFramebufferUpdateMsg;
526 
527 #define sz_rfbFramebufferUpdateMsg 4
528 
529 /*
530  * Each rectangle of pixel data consists of a header describing the position
531  * and size of the rectangle and a type word describing the encoding of the
532  * pixel data, followed finally by the pixel data. Note that if the client has
533  * not sent a SetEncodings message then it will only receive raw pixel data.
534  * Also note again that this structure is a multiple of 4 bytes.
535  */
536 
537 typedef struct {
538  rfbRectangle r;
539  uint32_t encoding; /* one of the encoding types rfbEncoding... */
540 } rfbFramebufferUpdateRectHeader;
541 
542 #define sz_rfbFramebufferUpdateRectHeader (sz_rfbRectangle + 4)
543 
544 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
545  * Supported Messages Encoding. This encoding does not contain any pixel data.
546  * Instead, it contains 2 sets of bitflags. These bitflags indicate what messages
547  * are supported by the server.
548  * rect->w contains byte count
549  */
550 
551 typedef struct {
552  uint8_t client2server[32]; /* maximum of 256 message types (256/8)=32 */
553  uint8_t server2client[32]; /* maximum of 256 message types (256/8)=32 */
554 } rfbSupportedMessages;
555 
556 #define sz_rfbSupportedMessages 64
557 
558 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
559  * Supported Encodings Encoding. This encoding does not contain any pixel data.
560  * Instead, it contains a list of (uint32_t) Encodings supported by this server.
561  * rect->w contains byte count
562  * rect->h contains encoding count
563  */
564 
565 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
566  * Server Identity Encoding. This encoding does not contain any pixel data.
567  * Instead, it contains a text string containing information about the server.
568  * ie: "x11vnc: 0.8.1 lastmod: 2006-04-25 (libvncserver 0.9pre)\0"
569  * rect->w contains byte count
570  */
571 
572 
573 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
574  * Raw Encoding. Pixels are sent in top-to-bottom scanline order,
575  * left-to-right within a scanline with no padding in between.
576  */
577 
578 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
579  * KeyboardLedState Encoding. The X coordinate contains the Locked Modifiers
580  * so that a remote troubleshooter can identify that the users 'Caps Lock'
581  * is set... (It helps a *lot* when the users are untrained)
582  */
583 #define rfbKeyboardMaskShift 1
584 #define rfbKeyboardMaskCapsLock 2
585 #define rfbKeyboardMaskControl 4
586 #define rfbKeyboardMaskAlt 8
587 #define rfbKeyboardMaskMeta 16
588 #define rfbKeyboardMaskSuper 32
589 #define rfbKeyboardMaskHyper 64
590 #define rfbKeyboardMaskNumLock 128
591 #define rfbKeyboardMaskScrollLock 256
592 #define rfbKeyboardMaskAltGraph 512
593 
594 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
595  * CopyRect Encoding. The pixels are specified simply by the x and y position
596  * of the source rectangle.
597  */
598 
599 typedef struct {
600  uint16_t srcX;
601  uint16_t srcY;
602 } rfbCopyRect;
603 
604 #define sz_rfbCopyRect 4
605 
606 
607 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
608  * RRE - Rise-and-Run-length Encoding. We have an rfbRREHeader structure
609  * giving the number of subrectangles following. Finally the data follows in
610  * the form [<bgpixel><subrect><subrect>...] where each <subrect> is
611  * [<pixel><rfbRectangle>].
612  */
613 
614 typedef struct {
615  uint32_t nSubrects;
616 } rfbRREHeader;
617 
618 #define sz_rfbRREHeader 4
619 
620 
621 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
622  * CoRRE - Compact RRE Encoding. We have an rfbRREHeader structure giving
623  * the number of subrectangles following. Finally the data follows in the form
624  * [<bgpixel><subrect><subrect>...] where each <subrect> is
625  * [<pixel><rfbCoRRERectangle>]. This means that
626  * the whole rectangle must be at most 255x255 pixels.
627  */
628 
629 typedef struct {
630  uint8_t x;
631  uint8_t y;
632  uint8_t w;
633  uint8_t h;
634 } rfbCoRRERectangle;
635 
636 #define sz_rfbCoRRERectangle 4
637 
638 
639 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
640  * Hextile Encoding. The rectangle is divided up into "tiles" of 16x16 pixels,
641  * starting at the top left going in left-to-right, top-to-bottom order. If
642  * the width of the rectangle is not an exact multiple of 16 then the width of
643  * the last tile in each row will be correspondingly smaller. Similarly if the
644  * height is not an exact multiple of 16 then the height of each tile in the
645  * final row will also be smaller. Each tile begins with a "subencoding" type
646  * byte, which is a mask made up of a number of bits. If the Raw bit is set
647  * then the other bits are irrelevant; w*h pixel values follow (where w and h
648  * are the width and height of the tile). Otherwise the tile is encoded in a
649  * similar way to RRE, except that the position and size of each subrectangle
650  * can be specified in just two bytes. The other bits in the mask are as
651  * follows:
652  *
653  * BackgroundSpecified - if set, a pixel value follows which specifies
654  * the background colour for this tile. The first non-raw tile in a
655  * rectangle must have this bit set. If this bit isn't set then the
656  * background is the same as the last tile.
657  *
658  * ForegroundSpecified - if set, a pixel value follows which specifies
659  * the foreground colour to be used for all subrectangles in this tile.
660  * If this bit is set then the SubrectsColoured bit must be zero.
661  *
662  * AnySubrects - if set, a single byte follows giving the number of
663  * subrectangles following. If not set, there are no subrectangles (i.e.
664  * the whole tile is just solid background colour).
665  *
666  * SubrectsColoured - if set then each subrectangle is preceded by a pixel
667  * value giving the colour of that subrectangle. If not set, all
668  * subrectangles are the same colour, the foreground colour; if the
669  * ForegroundSpecified bit wasn't set then the foreground is the same as
670  * the last tile.
671  *
672  * The position and size of each subrectangle is specified in two bytes. The
673  * Pack macros below can be used to generate the two bytes from x, y, w, h,
674  * and the Extract macros can be used to extract the x, y, w, h values from
675  * the two bytes.
676  */
677 
678 #define rfbHextileRaw (1 << 0)
679 #define rfbHextileBackgroundSpecified (1 << 1)
680 #define rfbHextileForegroundSpecified (1 << 2)
681 #define rfbHextileAnySubrects (1 << 3)
682 #define rfbHextileSubrectsColoured (1 << 4)
683 
684 #define rfbHextilePackXY(x,y) (((x) << 4) | (y))
685 #define rfbHextilePackWH(w,h) ((((w)-1) << 4) | ((h)-1))
686 #define rfbHextileExtractX(byte) ((byte) >> 4)
687 #define rfbHextileExtractY(byte) ((byte) & 0xf)
688 #define rfbHextileExtractW(byte) (((byte) >> 4) + 1)
689 #define rfbHextileExtractH(byte) (((byte) & 0xf) + 1)
690 
691 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
692  * zlib - zlib compressed Encoding. We have an rfbZlibHeader structure
693  * giving the number of bytes following. Finally the data follows is
694  * zlib compressed version of the raw pixel data as negotiated.
695  * (NOTE: also used by Ultra Encoding)
696  */
697 
698 typedef struct {
699  uint32_t nBytes;
700 } rfbZlibHeader;
701 
702 #define sz_rfbZlibHeader 4
703 
704 #ifdef LIBVNCSERVER_HAVE_LIBZ
705 
706 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
707  * Tight Encoding.
708  *
709  *-- The first byte of each Tight-encoded rectangle is a "compression control
710  * byte". Its format is as follows (bit 0 is the least significant one):
711  *
712  * bit 0: if 1, then compression stream 0 should be reset;
713  * bit 1: if 1, then compression stream 1 should be reset;
714  * bit 2: if 1, then compression stream 2 should be reset;
715  * bit 3: if 1, then compression stream 3 should be reset;
716  * bits 7-4: if 1000 (0x08), then the compression type is "fill",
717  * if 1001 (0x09), then the compression type is "jpeg",
718  * if 0xxx, then the compression type is "basic",
719  * values greater than 1001 are not valid.
720  *
721  * If the compression type is "basic", then bits 6..4 of the
722  * compression control byte (those xxx in 0xxx) specify the following:
723  *
724  * bits 5-4: decimal representation is the index of a particular zlib
725  * stream which should be used for decompressing the data;
726  * bit 6: if 1, then a "filter id" byte is following this byte.
727  *
728  *-- The data that follows after the compression control byte described
729  * above depends on the compression type ("fill", "jpeg" or "basic").
730  *
731  *-- If the compression type is "fill", then the only pixel value follows, in
732  * client pixel format (see NOTE 1). This value applies to all pixels of the
733  * rectangle.
734  *
735  *-- If the compression type is "jpeg", the following data stream looks like
736  * this:
737  *
738  * 1..3 bytes: data size (N) in compact representation;
739  * N bytes: JPEG image.
740  *
741  * Data size is compactly represented in one, two or three bytes, according
742  * to the following scheme:
743  *
744  * 0xxxxxxx (for values 0..127)
745  * 1xxxxxxx 0yyyyyyy (for values 128..16383)
746  * 1xxxxxxx 1yyyyyyy zzzzzzzz (for values 16384..4194303)
747  *
748  * Here each character denotes one bit, xxxxxxx are the least significant 7
749  * bits of the value (bits 0-6), yyyyyyy are bits 7-13, and zzzzzzzz are the
750  * most significant 8 bits (bits 14-21). For example, decimal value 10000
751  * should be represented as two bytes: binary 10010000 01001110, or
752  * hexadecimal 90 4E.
753  *
754  *-- If the compression type is "basic" and bit 6 of the compression control
755  * byte was set to 1, then the next (second) byte specifies "filter id" which
756  * tells the decoder what filter type was used by the encoder to pre-process
757  * pixel data before the compression. The "filter id" byte can be one of the
758  * following:
759  *
760  * 0: no filter ("copy" filter);
761  * 1: "palette" filter;
762  * 2: "gradient" filter.
763  *
764  *-- If bit 6 of the compression control byte is set to 0 (no "filter id"
765  * byte), or if the filter id is 0, then raw pixel values in the client
766  * format (see NOTE 1) will be compressed. See below details on the
767  * compression.
768  *
769  *-- The "gradient" filter pre-processes pixel data with a simple algorithm
770  * which converts each color component to a difference between a "predicted"
771  * intensity and the actual intensity. Such a technique does not affect
772  * uncompressed data size, but helps to compress photo-like images better.
773  * Pseudo-code for converting intensities to differences is the following:
774  *
775  * P[i,j] := V[i-1,j] + V[i,j-1] - V[i-1,j-1];
776  * if (P[i,j] < 0) then P[i,j] := 0;
777  * if (P[i,j] > MAX) then P[i,j] := MAX;
778  * D[i,j] := V[i,j] - P[i,j];
779  *
780  * Here V[i,j] is the intensity of a color component for a pixel at
781  * coordinates (i,j). MAX is the maximum value of intensity for a color
782  * component.
783  *
784  *-- The "palette" filter converts true-color pixel data to indexed colors
785  * and a palette which can consist of 2..256 colors. If the number of colors
786  * is 2, then each pixel is encoded in 1 bit, otherwise 8 bits is used to
787  * encode one pixel. 1-bit encoding is performed such way that the most
788  * significant bits correspond to the leftmost pixels, and each raw of pixels
789  * is aligned to the byte boundary. When "palette" filter is used, the
790  * palette is sent before the pixel data. The palette begins with an unsigned
791  * byte which value is the number of colors in the palette minus 1 (i.e. 1
792  * means 2 colors, 255 means 256 colors in the palette). Then follows the
793  * palette itself which consist of pixel values in client pixel format (see
794  * NOTE 1).
795  *
796  *-- The pixel data is compressed using the zlib library. But if the data
797  * size after applying the filter but before the compression is less then 12,
798  * then the data is sent as is, uncompressed. Four separate zlib streams
799  * (0..3) can be used and the decoder should read the actual stream id from
800  * the compression control byte (see NOTE 2).
801  *
802  * If the compression is not used, then the pixel data is sent as is,
803  * otherwise the data stream looks like this:
804  *
805  * 1..3 bytes: data size (N) in compact representation;
806  * N bytes: zlib-compressed data.
807  *
808  * Data size is compactly represented in one, two or three bytes, just like
809  * in the "jpeg" compression method (see above).
810  *
811  *-- NOTE 1. If the color depth is 24, and all three color components are
812  * 8-bit wide, then one pixel in Tight encoding is always represented by
813  * three bytes, where the first byte is red component, the second byte is
814  * green component, and the third byte is blue component of the pixel color
815  * value. This applies to colors in palettes as well.
816  *
817  *-- NOTE 2. The decoder must reset compression streams' states before
818  * decoding the rectangle, if some of bits 0,1,2,3 in the compression control
819  * byte are set to 1. Note that the decoder must reset zlib streams even if
820  * the compression type is "fill" or "jpeg".
821  *
822  *-- NOTE 3. The "gradient" filter and "jpeg" compression may be used only
823  * when bits-per-pixel value is either 16 or 32, not 8.
824  *
825  *-- NOTE 4. The width of any Tight-encoded rectangle cannot exceed 2048
826  * pixels. If a rectangle is wider, it must be split into several rectangles
827  * and each one should be encoded separately.
828  *
829  */
830 
831 #define rfbTightExplicitFilter 0x04
832 #define rfbTightFill 0x08
833 #define rfbTightJpeg 0x09
834 #define rfbTightMaxSubencoding 0x09
835 
836 /* Filters to improve compression efficiency */
837 #define rfbTightFilterCopy 0x00
838 #define rfbTightFilterPalette 0x01
839 #define rfbTightFilterGradient 0x02
840 
841 #endif
842 
843 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
844  * XCursor encoding. This is a special encoding used to transmit X-style
845  * cursor shapes from server to clients. Note that for this encoding,
846  * coordinates in rfbFramebufferUpdateRectHeader structure hold hotspot
847  * position (r.x, r.y) and cursor size (r.w, r.h). If (w * h != 0), two RGB
848  * samples are sent after header in the rfbXCursorColors structure. They
849  * denote foreground and background colors of the cursor. If a client
850  * supports only black-and-white cursors, it should ignore these colors and
851  * assume that foreground is black and background is white. Next, two bitmaps
852  * (1 bits per pixel) follow: first one with actual data (value 0 denotes
853  * background color, value 1 denotes foreground color), second one with
854  * transparency data (bits with zero value mean that these pixels are
855  * transparent). Both bitmaps represent cursor data in a byte stream, from
856  * left to right, from top to bottom, and each row is byte-aligned. Most
857  * significant bits correspond to leftmost pixels. The number of bytes in
858  * each row can be calculated as ((w + 7) / 8). If (w * h == 0), cursor
859  * should be hidden (or default local cursor should be set by the client).
860  */
861 
862 typedef struct {
863  uint8_t foreRed;
864  uint8_t foreGreen;
865  uint8_t foreBlue;
866  uint8_t backRed;
867  uint8_t backGreen;
868  uint8_t backBlue;
869 } rfbXCursorColors;
870 
871 #define sz_rfbXCursorColors 6
872 
873 
874 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
875  * RichCursor encoding. This is a special encoding used to transmit cursor
876  * shapes from server to clients. It is similar to the XCursor encoding but
877  * uses client pixel format instead of two RGB colors to represent cursor
878  * image. For this encoding, coordinates in rfbFramebufferUpdateRectHeader
879  * structure hold hotspot position (r.x, r.y) and cursor size (r.w, r.h).
880  * After header, two pixmaps follow: first one with cursor image in current
881  * client pixel format (like in raw encoding), second with transparency data
882  * (1 bit per pixel, exactly the same format as used for transparency bitmap
883  * in the XCursor encoding). If (w * h == 0), cursor should be hidden (or
884  * default local cursor should be set by the client).
885  */
886 
887 
888 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
889  * ZRLE - encoding combining Zlib compression, tiling, palettisation and
890  * run-length encoding.
891  */
892 
893 typedef struct {
894  uint32_t length;
895 } rfbZRLEHeader;
896 
897 #define sz_rfbZRLEHeader 4
898 
899 #define rfbZRLETileWidth 64
900 #define rfbZRLETileHeight 64
901 
902 
903 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
904  * ZLIBHEX - zlib compressed Hextile Encoding. Essentially, this is the
905  * hextile encoding with zlib compression on the tiles that can not be
906  * efficiently encoded with one of the other hextile subencodings. The
907  * new zlib subencoding uses two bytes to specify the length of the
908  * compressed tile and then the compressed data follows. As with the
909  * raw sub-encoding, the zlib subencoding invalidates the other
910  * values, if they are also set.
911  */
912 
913 #define rfbHextileZlibRaw (1 << 5)
914 #define rfbHextileZlibHex (1 << 6)
915 #define rfbHextileZlibMono (1 << 7)
916 
917 
918 /*-----------------------------------------------------------------------------
919  * SetColourMapEntries - these messages are only sent if the pixel
920  * format uses a "colour map" (i.e. trueColour false) and the client has not
921  * fixed the entire colour map using FixColourMapEntries. In addition they
922  * will only start being sent after the client has sent its first
923  * FramebufferUpdateRequest. So if the client always tells the server to use
924  * trueColour then it never needs to process this type of message.
925  */
926 
927 typedef struct {
928  uint8_t type; /* always rfbSetColourMapEntries */
929  uint8_t pad;
930  uint16_t firstColour;
931  uint16_t nColours;
932 
933  /* Followed by nColours * 3 * uint16_t
934  r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */
935 
936 } rfbSetColourMapEntriesMsg;
937 
938 #define sz_rfbSetColourMapEntriesMsg 6
939 
940 
941 
942 /*-----------------------------------------------------------------------------
943  * Bell - ring a bell on the client if it has one.
944  */
945 
946 typedef struct {
947  uint8_t type; /* always rfbBell */
948 } rfbBellMsg;
949 
950 #define sz_rfbBellMsg 1
951 
952 
953 
954 /*-----------------------------------------------------------------------------
955  * ServerCutText - the server has new text in its cut buffer.
956  */
957 
958 typedef struct {
959  uint8_t type; /* always rfbServerCutText */
960  uint8_t pad1;
961  uint16_t pad2;
962  uint32_t length;
963  /* followed by char text[length] */
964 } rfbServerCutTextMsg;
965 
966 #define sz_rfbServerCutTextMsg 8
967 
968 
969 /*-----------------------------------------------------------------------------
970  * // Modif sf@2002
971  * FileTransferMsg - The client sends FileTransfer message.
972  * Bidirectional message - Files can be sent from client to server & vice versa
973  */
974 
975 typedef struct _rfbFileTransferMsg {
976  uint8_t type; /* always rfbFileTransfer */
977  uint8_t contentType; /* See defines below */
978  uint8_t contentParam;/* Other possible content classification (Dir or File name, etc..) */
979  uint8_t pad; /* It appears that UltraVNC *forgot* to Swap16IfLE(contentParam) */
980  uint32_t size; /* FileSize or packet index or error or other */
981 /* uint32_t sizeH; Additional 32Bits params to handle big values. Only for V2 (we want backward compatibility between all V1 versions) */
982  uint32_t length;
983  /* followed by data char text[length] */
984 } rfbFileTransferMsg;
985 
986 #define sz_rfbFileTransferMsg 12
987 
988 #define rfbFileTransferVersion 2 /* v1 is the old FT version ( <= 1.0.0 RC18 versions) */
989 
990 /* FileTransfer Content types and Params defines */
991 #define rfbDirContentRequest 1 /* Client asks for the content of a given Server directory */
992 #define rfbDirPacket 2 /* Full directory name or full file name. */
993  /* Null content means end of Directory */
994 #define rfbFileTransferRequest 3 /* Client asks the server for the transfer of a given file */
995 #define rfbFileHeader 4 /* First packet of a file transfer, containing file's features */
996 #define rfbFilePacket 5 /* One chunk of the file */
997 #define rfbEndOfFile 6 /* End of file transfer (the file has been received or error) */
998 #define rfbAbortFileTransfer 7 /* The file transfer must be aborted, whatever the state */
999 #define rfbFileTransferOffer 8 /* The client offers to send a file to the server */
1000 #define rfbFileAcceptHeader 9 /* The server accepts or rejects the file */
1001 #define rfbCommand 10 /* The Client sends a simple command (File Delete, Dir create etc...) */
1002 #define rfbCommandReturn 11 /* The Client receives the server's answer about a simple command */
1003 #define rfbFileChecksums 12 /* The zipped checksums of the destination file (Delta Transfer) */
1004 #define rfbFileTransferAccess 14 /* Request FileTransfer authorization */
1005 
1006  /* rfbDirContentRequest client Request - content params */
1007 #define rfbRDirContent 1 /* Request a Server Directory contents */
1008 #define rfbRDrivesList 2 /* Request the server's drives list */
1009 #define rfbRDirRecursiveList 3 /* Request a server directory content recursive sorted list */
1010 #define rfbRDirRecursiveSize 4 /* Request a server directory content recursive size */
1011 
1012  /* rfbDirPacket & rfbCommandReturn server Answer - content params */
1013 #define rfbADirectory 1 /* Reception of a directory name */
1014 #define rfbAFile 2 /* Reception of a file name */
1015 #define rfbADrivesList 3 /* Reception of a list of drives */
1016 #define rfbADirCreate 4 /* Response to a create dir command */
1017 #define rfbADirDelete 5 /* Response to a delete dir command */
1018 #define rfbAFileCreate 6 /* Response to a create file command */
1019 #define rfbAFileDelete 7 /* Response to a delete file command */
1020 #define rfbAFileRename 8 /* Response to a rename file command */
1021 #define rfbADirRename 9 /* Response to a rename dir command */
1022 #define rfbADirRecursiveListItem 10
1023 #define rfbADirRecursiveSize 11
1024 
1025  /* rfbCommand Command - content params */
1026 #define rfbCDirCreate 1 /* Request the server to create the given directory */
1027 #define rfbCDirDelete 2 /* Request the server to delete the given directory */
1028 #define rfbCFileCreate 3 /* Request the server to create the given file */
1029 #define rfbCFileDelete 4 /* Request the server to delete the given file */
1030 #define rfbCFileRename 5 /* Request the server to rename the given file */
1031 #define rfbCDirRename 6 /* Request the server to rename the given directory */
1032 
1033  /* Errors - content params or "size" field */
1034 #define rfbRErrorUnknownCmd 1 /* Unknown FileTransfer command. */
1035 #define rfbRErrorCmd 0xFFFFFFFF/* Error when a command fails on remote side (ret in "size" field) */
1036 
1037 #define sz_rfbBlockSize 8192 /* Size of a File Transfer packet (before compression) */
1038 #define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transfered directory are zipped in a file with this prefix. Must end with "-" */
1039 #define sz_rfbZipDirectoryPrefix 9
1040 #define rfbDirPrefix "[ "
1041 #define rfbDirSuffix " ]"
1042 
1043 
1044 
1045 /*-----------------------------------------------------------------------------
1046  * Modif sf@2002
1047  * TextChatMsg - Utilized to order the TextChat mode on server or client
1048  * Bidirectional message
1049  */
1050 
1051 typedef struct _rfbTextChatMsg {
1052  uint8_t type; /* always rfbTextChat */
1053  uint8_t pad1; /* Could be used later as an additionnal param */
1054  uint16_t pad2; /* Could be used later as text offset, for instance */
1055  uint32_t length; /* Specific values for Open, close, finished (-1, -2, -3) */
1056  /* followed by char text[length] */
1057 } rfbTextChatMsg;
1058 
1059 #define sz_rfbTextChatMsg 8
1060 
1061 #define rfbTextMaxSize 4096
1062 #define rfbTextChatOpen 0xFFFFFFFF
1063 #define rfbTextChatClose 0xFFFFFFFE
1064 #define rfbTextChatFinished 0xFFFFFFFD
1065 
1066 
1067 /*-----------------------------------------------------------------------------
1068  * Xvp Message
1069  * Bidirectional message
1070  * A server which supports the xvp extension declares this by sending a message
1071  * with an Xvp_INIT xvp-message-code when it receives a request from the client
1072  * to use the xvp Pseudo-encoding. The server must specify in this message the
1073  * highest xvp-extension-version it supports: the client may assume that the
1074  * server supports all versions from 1 up to this value. The client is then
1075  * free to use any supported version. Currently, only version 1 is defined.
1076  *
1077  * A server which subsequently receives an xvp Client Message requesting an
1078  * operation which it is unable to perform, informs the client of this by
1079  * sending a message with an Xvp_FAIL xvp-message-code, and the same
1080  * xvp-extension-version as included in the client's operation request.
1081  *
1082  * A client supporting the xvp extension sends this to request that the server
1083  * initiate a clean shutdown, clean reboot or abrupt reset of the system whose
1084  * framebuffer the client is displaying.
1085  */
1086 
1087 
1088 typedef struct {
1089  uint8_t type; /* always rfbXvp */
1090  uint8_t pad;
1091  uint8_t version; /* xvp extension version */
1092  uint8_t code; /* xvp message code */
1093 } rfbXvpMsg;
1094 
1095 #define sz_rfbXvpMsg (4)
1096 
1097 /* server message codes */
1098 #define rfbXvp_Fail 0
1099 #define rfbXvp_Init 1
1100 /* client message codes */
1101 #define rfbXvp_Shutdown 2
1102 #define rfbXvp_Reboot 3
1103 #define rfbXvp_Reset 4
1104 
1105 
1106 /*-----------------------------------------------------------------------------
1107  * Modif sf@2002
1108  * ResizeFrameBuffer - The Client must change the size of its framebuffer
1109  */
1110 
1111 typedef struct _rfbResizeFrameBufferMsg {
1112  uint8_t type; /* always rfbResizeFrameBuffer */
1113  uint8_t pad1;
1114  uint16_t framebufferWidth; /* FrameBuffer width */
1115  uint16_t framebufferHeigth; /* FrameBuffer height */
1116 } rfbResizeFrameBufferMsg;
1117 
1118 #define sz_rfbResizeFrameBufferMsg 6
1119 
1120 
1121 /*-----------------------------------------------------------------------------
1122  * Copyright (C) 2001 Harakan Software
1123  * PalmVNC 1.4 & 2.? ResizeFrameBuffer message
1124  * ReSizeFrameBuffer - tell the RFB client to alter its framebuffer, either
1125  * due to a resize of the server desktop or a client-requested scaling factor.
1126  * The pixel format remains unchanged.
1127  */
1128 
1129 typedef struct {
1130  uint8_t type; /* always rfbReSizeFrameBuffer */
1131  uint8_t pad1;
1132  uint16_t desktop_w; /* Desktop width */
1133  uint16_t desktop_h; /* Desktop height */
1134  uint16_t buffer_w; /* FrameBuffer width */
1135  uint16_t buffer_h; /* Framebuffer height */
1136  uint16_t pad2;
1137 
1138 } rfbPalmVNCReSizeFrameBufferMsg;
1139 
1140 #define sz_rfbPalmVNCReSizeFrameBufferMsg (12)
1141 
1142 
1143 
1144 
1145 /*-----------------------------------------------------------------------------
1146  * Union of all server->client messages.
1147  */
1148 
1149 typedef union {
1150  uint8_t type;
1151  rfbFramebufferUpdateMsg fu;
1152  rfbSetColourMapEntriesMsg scme;
1153  rfbBellMsg b;
1154  rfbServerCutTextMsg sct;
1155  rfbResizeFrameBufferMsg rsfb;
1156  rfbPalmVNCReSizeFrameBufferMsg prsfb;
1157  rfbFileTransferMsg ft;
1158  rfbTextChatMsg tc;
1159  rfbXvpMsg xvp;
1160 } rfbServerToClientMsg;
1161 
1162 
1163 
1164 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1165  * RDV Cache Encoding.
1166  * special is not used at this point, can be used to reset cache or other specials
1167  * just put it to make sure we don't have to change the encoding again.
1168  */
1169 
1170 typedef struct {
1171  uint16_t special;
1172 } rfbCacheRect;
1173 
1174 #define sz_rfbCacheRect 2
1175 
1176 
1177 
1178 
1179 /*****************************************************************************
1180  *
1181  * Message definitions (client -> server)
1182  *
1183  *****************************************************************************/
1184 
1185 
1186 /*-----------------------------------------------------------------------------
1187  * SetPixelFormat - tell the RFB server the format in which the client wants
1188  * pixels sent.
1189  */
1190 
1191 typedef struct {
1192  uint8_t type; /* always rfbSetPixelFormat */
1193  uint8_t pad1;
1194  uint16_t pad2;
1195  rfbPixelFormat format;
1196 } rfbSetPixelFormatMsg;
1197 
1198 #define sz_rfbSetPixelFormatMsg (sz_rfbPixelFormat + 4)
1199 
1200 
1201 /*-----------------------------------------------------------------------------
1202  * FixColourMapEntries - when the pixel format uses a "colour map", fix
1203  * read-only colour map entries.
1204  *
1205  * ***************** NOT CURRENTLY SUPPORTED *****************
1206  */
1207 
1208 typedef struct {
1209  uint8_t type; /* always rfbFixColourMapEntries */
1210  uint8_t pad;
1211  uint16_t firstColour;
1212  uint16_t nColours;
1213 
1214  /* Followed by nColours * 3 * uint16_t
1215  r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */
1216 
1217 } rfbFixColourMapEntriesMsg;
1218 
1219 #define sz_rfbFixColourMapEntriesMsg 6
1220 
1221 
1222 /*-----------------------------------------------------------------------------
1223  * SetEncodings - tell the RFB server which encoding types we accept. Put them
1224  * in order of preference, if we have any. We may always receive raw
1225  * encoding, even if we don't specify it here.
1226  */
1227 
1228 typedef struct {
1229  uint8_t type; /* always rfbSetEncodings */
1230  uint8_t pad;
1231  uint16_t nEncodings;
1232  /* followed by nEncodings * uint32_t encoding types */
1233 } rfbSetEncodingsMsg;
1234 
1235 #define sz_rfbSetEncodingsMsg 4
1236 
1237 
1238 /*-----------------------------------------------------------------------------
1239  * FramebufferUpdateRequest - request for a framebuffer update. If incremental
1240  * is true then the client just wants the changes since the last update. If
1241  * false then it wants the whole of the specified rectangle.
1242  */
1243 
1244 typedef struct {
1245  uint8_t type; /* always rfbFramebufferUpdateRequest */
1246  uint8_t incremental;
1247  uint16_t x;
1248  uint16_t y;
1249  uint16_t w;
1250  uint16_t h;
1251 } rfbFramebufferUpdateRequestMsg;
1252 
1253 #define sz_rfbFramebufferUpdateRequestMsg 10
1254 
1255 
1256 /*-----------------------------------------------------------------------------
1257  * KeyEvent - key press or release
1258  *
1259  * Keys are specified using the "keysym" values defined by the X Window System.
1260  * For most ordinary keys, the keysym is the same as the corresponding ASCII
1261  * value. Other common keys are:
1262  *
1263  * BackSpace 0xff08
1264  * Tab 0xff09
1265  * Return or Enter 0xff0d
1266  * Escape 0xff1b
1267  * Insert 0xff63
1268  * Delete 0xffff
1269  * Home 0xff50
1270  * End 0xff57
1271  * Page Up 0xff55
1272  * Page Down 0xff56
1273  * Left 0xff51
1274  * Up 0xff52
1275  * Right 0xff53
1276  * Down 0xff54
1277  * F1 0xffbe
1278  * F2 0xffbf
1279  * ... ...
1280  * F12 0xffc9
1281  * Shift 0xffe1
1282  * Control 0xffe3
1283  * Meta 0xffe7
1284  * Alt 0xffe9
1285  */
1286 
1287 typedef struct {
1288  uint8_t type; /* always rfbKeyEvent */
1289  uint8_t down; /* true if down (press), false if up */
1290  uint16_t pad;
1291  uint32_t key; /* key is specified as an X keysym */
1292 } rfbKeyEventMsg;
1293 
1294 #define sz_rfbKeyEventMsg 8
1295 
1296 
1297 /*-----------------------------------------------------------------------------
1298  * PointerEvent - mouse/pen move and/or button press.
1299  */
1300 
1301 typedef struct {
1302  uint8_t type; /* always rfbPointerEvent */
1303  uint8_t buttonMask; /* bits 0-7 are buttons 1-8, 0=up, 1=down */
1304  uint16_t x;
1305  uint16_t y;
1306 } rfbPointerEventMsg;
1307 
1308 #define rfbButton1Mask 1
1309 #define rfbButton2Mask 2
1310 #define rfbButton3Mask 4
1311 #define rfbButton4Mask 8
1312 #define rfbButton5Mask 16
1313 /* RealVNC 335 method */
1314 #define rfbWheelUpMask rfbButton4Mask
1315 #define rfbWheelDownMask rfbButton5Mask
1316 
1317 #define sz_rfbPointerEventMsg 6
1318 
1319 
1320 
1321 /*-----------------------------------------------------------------------------
1322  * ClientCutText - the client has new text in its cut buffer.
1323  */
1324 
1325 typedef struct {
1326  uint8_t type; /* always rfbClientCutText */
1327  uint8_t pad1;
1328  uint16_t pad2;
1329  uint32_t length;
1330  /* followed by char text[length] */
1331 } rfbClientCutTextMsg;
1332 
1333 #define sz_rfbClientCutTextMsg 8
1334 
1335 
1336 
1337 /*-----------------------------------------------------------------------------
1338  * sf@2002 - Set Server Scale
1339  * SetServerScale - Server must change the scale of the client buffer.
1340  */
1341 
1342 typedef struct _rfbSetScaleMsg {
1343  uint8_t type; /* always rfbSetScale */
1344  uint8_t scale; /* Scale value 1<sv<n */
1345  uint16_t pad;
1346 } rfbSetScaleMsg;
1347 
1348 #define sz_rfbSetScaleMsg 4
1349 
1350 
1351 /*-----------------------------------------------------------------------------
1352  * Copyright (C) 2001 Harakan Software
1353  * PalmVNC 1.4 & 2.? SetScale Factor message
1354  * SetScaleFactor - tell the RFB server to alter the scale factor for the
1355  * client buffer.
1356  */
1357 typedef struct {
1358  uint8_t type; /* always rfbPalmVNCSetScaleFactor */
1359 
1360  uint8_t scale; /* Scale factor (positive non-zero integer) */
1361  uint16_t pad2;
1362 } rfbPalmVNCSetScaleFactorMsg;
1363 
1364 #define sz_rfbPalmVNCSetScaleFactorMsg (4)
1365 
1366 
1367 /*-----------------------------------------------------------------------------
1368  * rdv@2002 - Set input status
1369  * SetServerInput - Server input is dis/enabled
1370  */
1371 
1372 typedef struct _rfbSetServerInputMsg {
1373  uint8_t type; /* always rfbSetScale */
1374  uint8_t status; /* Scale value 1<sv<n */
1375  uint16_t pad;
1376 } rfbSetServerInputMsg;
1377 
1378 #define sz_rfbSetServerInputMsg 4
1379 
1380 /*-----------------------------------------------------------------------------
1381  * rdv@2002 - Set SW
1382  * SetSW - Server SW/full desktop
1383  */
1384 
1385 typedef struct _rfbSetSWMsg {
1386  uint8_t type; /* always rfbSetSW */
1387  uint8_t status;
1388  uint16_t x;
1389  uint16_t y;
1390 } rfbSetSWMsg;
1391 
1392 #define sz_rfbSetSWMsg 6
1393 
1394 
1395 
1396 /*-----------------------------------------------------------------------------
1397  * Union of all client->server messages.
1398  */
1399 
1400 typedef union {
1401  uint8_t type;
1402  rfbSetPixelFormatMsg spf;
1403  rfbFixColourMapEntriesMsg fcme;
1404  rfbSetEncodingsMsg se;
1405  rfbFramebufferUpdateRequestMsg fur;
1406  rfbKeyEventMsg ke;
1407  rfbPointerEventMsg pe;
1408  rfbClientCutTextMsg cct;
1409  rfbSetScaleMsg ssc;
1410  rfbPalmVNCSetScaleFactorMsg pssf;
1411  rfbSetServerInputMsg sim;
1412  rfbFileTransferMsg ft;
1413  rfbSetSWMsg sw;
1414  rfbTextChatMsg tc;
1415  rfbXvpMsg xvp;
1416 } rfbClientToServerMsg;
1417 
1418 /*
1419  * vncauth.h - describes the functions provided by the vncauth library.
1420  */
1421 
1422 #define MAXPWLEN 8
1423 #define CHALLENGESIZE 16
1424 
1425 extern int rfbEncryptAndStorePasswd(char *passwd, char *fname);
1426 extern char *rfbDecryptPasswdFromFile(char *fname);
1427 extern void rfbRandomBytes(unsigned char *bytes);
1428 extern void rfbEncryptBytes(unsigned char *bytes, char *passwd);
1429 
1430 
1431 #endif
rfbPalmVNCSetScaleFactorMsg::pad2
uint16_t pad2
Definition: rfbproto.h:1361
rfbCoRRERectangle::x
uint8_t x
Definition: rfbproto.h:630
rfbCopyRect::srcY
uint16_t srcY
Definition: rfbproto.h:601
rfbFramebufferUpdateRequestMsg::w
uint16_t w
Definition: rfbproto.h:1249
rfbPixelFormat::pad2
uint16_t pad2
Definition: rfbproto.h:192
rfbServerToClientMsg::b
rfbBellMsg b
Definition: rfbproto.h:1153
rfbResizeFrameBufferMsg
struct _rfbResizeFrameBufferMsg rfbResizeFrameBufferMsg
rfbCoRRERectangle
Definition: rfbproto.h:629
rfbSetColourMapEntriesMsg::type
uint8_t type
Definition: rfbproto.h:928
_rfbSetScaleMsg::type
uint8_t type
Definition: rfbproto.h:1343
rfbPalmVNCReSizeFrameBufferMsg::type
uint8_t type
Definition: rfbproto.h:1130
rfbPalmVNCReSizeFrameBufferMsg::desktop_h
uint16_t desktop_h
Definition: rfbproto.h:1133
rfbXvpMsg::pad
uint8_t pad
Definition: rfbproto.h:1090
rfbClientToServerMsg::spf
rfbSetPixelFormatMsg spf
Definition: rfbproto.h:1402
rfbCacheRect::special
uint16_t special
Definition: rfbproto.h:1171
rfbRectangle::y
uint16_t y
Definition: rfbproto.h:136
rfbSetPixelFormatMsg
Definition: rfbproto.h:1191
_rfbSetScaleMsg::scale
uint8_t scale
Definition: rfbproto.h:1344
_rfbTextChatMsg::pad2
uint16_t pad2
Definition: rfbproto.h:1054
rfbZRLEHeader
Definition: rfbproto.h:893
_rfbSetScaleMsg
Definition: rfbproto.h:1342
rfbPointerEventMsg::y
uint16_t y
Definition: rfbproto.h:1305
rfbFixColourMapEntriesMsg::type
uint8_t type
Definition: rfbproto.h:1209
rfbCacheRect
Definition: rfbproto.h:1170
rfbBool
int8_t rfbBool
Definition: rfbproto.h:102
rfbXvpMsg::code
uint8_t code
Definition: rfbproto.h:1092
rfbXCursorColors::backGreen
uint8_t backGreen
Definition: rfbproto.h:867
rfbPixelFormat::pad1
uint8_t pad1
Definition: rfbproto.h:191
_rfbSetScaleMsg::pad
uint16_t pad
Definition: rfbproto.h:1345
_rfbSetServerInputMsg::status
uint8_t status
Definition: rfbproto.h:1374
rfbServerToClientMsg::xvp
rfbXvpMsg xvp
Definition: rfbproto.h:1159
rfbFramebufferUpdateRectHeader::encoding
uint32_t encoding
Definition: rfbproto.h:539
_rfbResizeFrameBufferMsg
Definition: rfbproto.h:1111
_rfbSetSWMsg
Definition: rfbproto.h:1385
rfbServerCutTextMsg::pad1
uint8_t pad1
Definition: rfbproto.h:960
_rfbFileTransferMsg::pad
uint8_t pad
Definition: rfbproto.h:979
rfbClientInitMsg::shared
uint8_t shared
Definition: rfbproto.h:340
_rfbFileTransferMsg
Definition: rfbproto.h:975
rfbSetEncodingsMsg
Definition: rfbproto.h:1228
rfbPixelFormat
Definition: rfbproto.h:148
rfbPalmVNCReSizeFrameBufferMsg
Definition: rfbproto.h:1129
rfbSetColourMapEntriesMsg
Definition: rfbproto.h:927
rfbClientToServerMsg::se
rfbSetEncodingsMsg se
Definition: rfbproto.h:1404
rfbTextChatMsg
struct _rfbTextChatMsg rfbTextChatMsg
rfbKeySym
uint32_t rfbKeySym
Definition: rfbproto.h:109
rfbPalmVNCReSizeFrameBufferMsg::desktop_w
uint16_t desktop_w
Definition: rfbproto.h:1132
_rfbFileTransferMsg::length
uint32_t length
Definition: rfbproto.h:982
rfbPixel
uint32_t rfbPixel
Definition: rfbproto.h:110
rfbSetColourMapEntriesMsg::firstColour
uint16_t firstColour
Definition: rfbproto.h:930
rfbSetColourMapEntriesMsg::pad
uint8_t pad
Definition: rfbproto.h:929
rfbZlibHeader::nBytes
uint32_t nBytes
Definition: rfbproto.h:699
rfbPointerEventMsg::x
uint16_t x
Definition: rfbproto.h:1304
rfbServerCutTextMsg::length
uint32_t length
Definition: rfbproto.h:962
rfbClientToServerMsg::fcme
rfbFixColourMapEntriesMsg fcme
Definition: rfbproto.h:1403
_rfbTextChatMsg::length
uint32_t length
Definition: rfbproto.h:1055
rfbXCursorColors
Definition: rfbproto.h:862
rfbClientToServerMsg::cct
rfbClientCutTextMsg cct
Definition: rfbproto.h:1408
rfbFramebufferUpdateRequestMsg::h
uint16_t h
Definition: rfbproto.h:1250
rfbClientToServerMsg::pe
rfbPointerEventMsg pe
Definition: rfbproto.h:1407
rfbDecryptPasswdFromFile
char * rfbDecryptPasswdFromFile(char *fname)
rfbSetColourMapEntriesMsg::nColours
uint16_t nColours
Definition: rfbproto.h:931
rfbServerToClientMsg::sct
rfbServerCutTextMsg sct
Definition: rfbproto.h:1154
rfbPixelFormat::blueMax
uint16_t blueMax
Definition: rfbproto.h:173
rfbServerToClientMsg::tc
rfbTextChatMsg tc
Definition: rfbproto.h:1158
rfbFixColourMapEntriesMsg::pad
uint8_t pad
Definition: rfbproto.h:1210
rfbServerToClientMsg
Definition: rfbproto.h:1149
rfbFixColourMapEntriesMsg::nColours
uint16_t nColours
Definition: rfbproto.h:1212
rfbPalmVNCReSizeFrameBufferMsg::buffer_h
uint16_t buffer_h
Definition: rfbproto.h:1135
_rfbSetSWMsg::y
uint16_t y
Definition: rfbproto.h:1389
rfbServerToClientMsg::rsfb
rfbResizeFrameBufferMsg rsfb
Definition: rfbproto.h:1155
rfbClientToServerMsg::type
uint8_t type
Definition: rfbproto.h:1401
rfbServerInitMsg::nameLength
uint32_t nameLength
Definition: rfbproto.h:358
rfbPixelFormat::redMax
uint16_t redMax
Definition: rfbproto.h:167
rfbServerInitMsg::format
rfbPixelFormat format
Definition: rfbproto.h:357
rfbSetPixelFormatMsg::pad1
uint8_t pad1
Definition: rfbproto.h:1193
rfbPointerEventMsg::type
uint8_t type
Definition: rfbproto.h:1302
rfbPixelFormat::greenMax
uint16_t greenMax
Definition: rfbproto.h:171
rfbPalmVNCReSizeFrameBufferMsg::pad1
uint8_t pad1
Definition: rfbproto.h:1131
rfbPalmVNCSetScaleFactorMsg
Definition: rfbproto.h:1357
rfbFramebufferUpdateRectHeader
Definition: rfbproto.h:537
rfbXCursorColors::foreRed
uint8_t foreRed
Definition: rfbproto.h:863
rfbPixelFormat::trueColour
uint8_t trueColour
Definition: rfbproto.h:160
rfbSetServerInputMsg
struct _rfbSetServerInputMsg rfbSetServerInputMsg
rfbBellMsg::type
uint8_t type
Definition: rfbproto.h:947
rfbSetPixelFormatMsg::pad2
uint16_t pad2
Definition: rfbproto.h:1194
rfbXvpMsg::version
uint8_t version
Definition: rfbproto.h:1091
rfbCoRRERectangle::w
uint8_t w
Definition: rfbproto.h:632
rfbServerCutTextMsg
Definition: rfbproto.h:958
rfbZlibHeader
Definition: rfbproto.h:698
rfbKeyEventMsg::down
uint8_t down
Definition: rfbproto.h:1289
_rfbSetSWMsg::type
uint8_t type
Definition: rfbproto.h:1386
rfbEncryptAndStorePasswd
int rfbEncryptAndStorePasswd(char *passwd, char *fname)
rfbFramebufferUpdateMsg::nRects
uint16_t nRects
Definition: rfbproto.h:523
rfbFramebufferUpdateRequestMsg::y
uint16_t y
Definition: rfbproto.h:1248
rfbServerToClientMsg::prsfb
rfbPalmVNCReSizeFrameBufferMsg prsfb
Definition: rfbproto.h:1156
rfbKeyEventMsg::type
uint8_t type
Definition: rfbproto.h:1288
rfbKeyEventMsg::key
uint32_t key
Definition: rfbproto.h:1291
rfbClientCutTextMsg::length
uint32_t length
Definition: rfbproto.h:1329
rfbClientToServerMsg::sim
rfbSetServerInputMsg sim
Definition: rfbproto.h:1411
rfbSetEncodingsMsg::type
uint8_t type
Definition: rfbproto.h:1229
_rfbTextChatMsg::type
uint8_t type
Definition: rfbproto.h:1052
rfbClientToServerMsg::tc
rfbTextChatMsg tc
Definition: rfbproto.h:1414
rfbClientToServerMsg::fur
rfbFramebufferUpdateRequestMsg fur
Definition: rfbproto.h:1405
rfbFramebufferUpdateRequestMsg::incremental
uint8_t incremental
Definition: rfbproto.h:1246
rfbSetScaleMsg
struct _rfbSetScaleMsg rfbSetScaleMsg
_rfbFileTransferMsg::size
uint32_t size
Definition: rfbproto.h:980
rfbClientToServerMsg
Definition: rfbproto.h:1400
rfbFixColourMapEntriesMsg
Definition: rfbproto.h:1208
rfbRREHeader
Definition: rfbproto.h:614
rfbProtocolVersionMsg
char rfbProtocolVersionMsg[13]
Definition: rfbproto.h:246
rfbClientToServerMsg::ssc
rfbSetScaleMsg ssc
Definition: rfbproto.h:1409
rfbServerToClientMsg::ft
rfbFileTransferMsg ft
Definition: rfbproto.h:1157
rfbPixelFormat::bigEndian
uint8_t bigEndian
Definition: rfbproto.h:154
_rfbTextChatMsg
Definition: rfbproto.h:1051
rfbXvpMsg::type
uint8_t type
Definition: rfbproto.h:1089
rfbFramebufferUpdateRequestMsg
Definition: rfbproto.h:1244
rfbSetEncodingsMsg::pad
uint8_t pad
Definition: rfbproto.h:1230
rfbServerInitMsg
Definition: rfbproto.h:354
rfbZRLEHeader::length
uint32_t length
Definition: rfbproto.h:894
_rfbFileTransferMsg::type
uint8_t type
Definition: rfbproto.h:976
rfbPalmVNCSetScaleFactorMsg::scale
uint8_t scale
Definition: rfbproto.h:1360
rfbClientToServerMsg::ke
rfbKeyEventMsg ke
Definition: rfbproto.h:1406
_rfbFileTransferMsg::contentParam
uint8_t contentParam
Definition: rfbproto.h:978
rfbXCursorColors::backBlue
uint8_t backBlue
Definition: rfbproto.h:868
rfbClientCutTextMsg::pad1
uint8_t pad1
Definition: rfbproto.h:1327
rfbServerInitMsg::framebufferWidth
uint16_t framebufferWidth
Definition: rfbproto.h:355
rfbRectangle::w
uint16_t w
Definition: rfbproto.h:137
rfbCopyRect
Definition: rfbproto.h:599
rfbXCursorColors::backRed
uint8_t backRed
Definition: rfbproto.h:866
rfbFramebufferUpdateRequestMsg::type
uint8_t type
Definition: rfbproto.h:1245
rfbPointerEventMsg
Definition: rfbproto.h:1301
_rfbTextChatMsg::pad1
uint8_t pad1
Definition: rfbproto.h:1053
rfbServerCutTextMsg::pad2
uint16_t pad2
Definition: rfbproto.h:961
rfbSetPixelFormatMsg::format
rfbPixelFormat format
Definition: rfbproto.h:1195
rfbCopyRect::srcX
uint16_t srcX
Definition: rfbproto.h:600
rfbPixelFormat::bitsPerPixel
uint8_t bitsPerPixel
Definition: rfbproto.h:150
rfbFileTransferMsg
struct _rfbFileTransferMsg rfbFileTransferMsg
rfbSetSWMsg
struct _rfbSetSWMsg rfbSetSWMsg
rfbRectangle
Definition: rfbproto.h:134
rfbPixelFormat::blueShift
uint8_t blueShift
Definition: rfbproto.h:189
rfbClientToServerMsg::xvp
rfbXvpMsg xvp
Definition: rfbproto.h:1415
_rfbSetSWMsg::x
uint16_t x
Definition: rfbproto.h:1388
rfbClientCutTextMsg::pad2
uint16_t pad2
Definition: rfbproto.h:1328
rfbFramebufferUpdateRequestMsg::x
uint16_t x
Definition: rfbproto.h:1247
rfbPointerEventMsg::buttonMask
uint8_t buttonMask
Definition: rfbproto.h:1303
rfbClientInitMsg
Definition: rfbproto.h:339
rfbCoRRERectangle::h
uint8_t h
Definition: rfbproto.h:633
rfbSetPixelFormatMsg::type
uint8_t type
Definition: rfbproto.h:1192
_rfbSetServerInputMsg::type
uint8_t type
Definition: rfbproto.h:1373
rfbPalmVNCSetScaleFactorMsg::type
uint8_t type
Definition: rfbproto.h:1358
rfbPalmVNCReSizeFrameBufferMsg::pad2
uint16_t pad2
Definition: rfbproto.h:1136
rfbKeyEventMsg::pad
uint16_t pad
Definition: rfbproto.h:1290
rfbFramebufferUpdateMsg
Definition: rfbproto.h:520
rfbServerToClientMsg::fu
rfbFramebufferUpdateMsg fu
Definition: rfbproto.h:1151
rfbPixelFormat::depth
uint8_t depth
Definition: rfbproto.h:152
rfbServerToClientMsg::scme
rfbSetColourMapEntriesMsg scme
Definition: rfbproto.h:1152
rfbServerToClientMsg::type
uint8_t type
Definition: rfbproto.h:1150
rfbPixelFormat::redShift
uint8_t redShift
Definition: rfbproto.h:175
rfbFramebufferUpdateMsg::type
uint8_t type
Definition: rfbproto.h:521
rfbFixColourMapEntriesMsg::firstColour
uint16_t firstColour
Definition: rfbproto.h:1211
rfbRectangle::h
uint16_t h
Definition: rfbproto.h:138
rfbSetEncodingsMsg::nEncodings
uint16_t nEncodings
Definition: rfbproto.h:1231
rfbPixelFormat::greenShift
uint8_t greenShift
Definition: rfbproto.h:187
rfbFramebufferUpdateMsg::pad
uint8_t pad
Definition: rfbproto.h:522
_rfbSetServerInputMsg::pad
uint16_t pad
Definition: rfbproto.h:1375
rfbServerInitMsg::framebufferHeight
uint16_t framebufferHeight
Definition: rfbproto.h:356
rfbXCursorColors::foreGreen
uint8_t foreGreen
Definition: rfbproto.h:864
rfbRandomBytes
void rfbRandomBytes(unsigned char *bytes)
_rfbSetSWMsg::status
uint8_t status
Definition: rfbproto.h:1387
_rfbResizeFrameBufferMsg::type
uint8_t type
Definition: rfbproto.h:1112
rfbRREHeader::nSubrects
uint32_t nSubrects
Definition: rfbproto.h:615
rfbRectangle::x
uint16_t x
Definition: rfbproto.h:135
_rfbFileTransferMsg::contentType
uint8_t contentType
Definition: rfbproto.h:977
rfbBellMsg
Definition: rfbproto.h:946
rfbCoRRERectangle::y
uint8_t y
Definition: rfbproto.h:631
rfbSupportedMessages
Definition: rfbproto.h:551
rfbClientToServerMsg::pssf
rfbPalmVNCSetScaleFactorMsg pssf
Definition: rfbproto.h:1410
rfbEncryptBytes
void rfbEncryptBytes(unsigned char *bytes, char *passwd)
rfbClientCutTextMsg::type
uint8_t type
Definition: rfbproto.h:1326
rfbClientToServerMsg::sw
rfbSetSWMsg sw
Definition: rfbproto.h:1413
rfbClientToServerMsg::ft
rfbFileTransferMsg ft
Definition: rfbproto.h:1412
rfbXvpMsg
Definition: rfbproto.h:1088
_rfbResizeFrameBufferMsg::pad1
uint8_t pad1
Definition: rfbproto.h:1113
_rfbSetServerInputMsg
Definition: rfbproto.h:1372
rfbXCursorColors::foreBlue
uint8_t foreBlue
Definition: rfbproto.h:865
rfbFramebufferUpdateRectHeader::r
rfbRectangle r
Definition: rfbproto.h:538
rfbPalmVNCReSizeFrameBufferMsg::buffer_w
uint16_t buffer_w
Definition: rfbproto.h:1134
_rfbResizeFrameBufferMsg::framebufferWidth
uint16_t framebufferWidth
Definition: rfbproto.h:1114
rfbClientCutTextMsg
Definition: rfbproto.h:1325
rfbServerCutTextMsg::type
uint8_t type
Definition: rfbproto.h:959
_rfbResizeFrameBufferMsg::framebufferHeigth
uint16_t framebufferHeigth
Definition: rfbproto.h:1115
rfbKeyEventMsg
Definition: rfbproto.h:1287
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

krfb

Skip menu "krfb"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal