1 5.1.1 ProtocolVersion: 12, 12 bytes
3 - Sent by server, max supported
4 12 ascii - "RFB 003.008\n"
5 - Response by client, version to use
6 12 ascii - "RFB 003.003\n"
8 5.1.2 Authentication: >=4, [16, 4] bytes
11 CARD32 - authentication-scheme
17 2 - VNC authentication
18 16 CARD8 - challenge (random bytes)
20 - Response by client (if VNC authentication)
21 16 CARD8 - client encrypts the challenge with DES, using user
22 password as key, sends resulting 16 byte response
24 - Response by server (if VNC authentication)
29 5.1.3 ClientInitialisation: 1 byte
31 CARD8 - shared-flag, 0 exclusive, non-zero shared
33 5.1.4 ServerInitialisation: >=24 bytes
35 CARD16 - framebuffer-width
36 CARD16 - framebuffer-height
37 16 byte PIXEL_FORMAT - server-pixel-format
38 CARD8 - bits-per-pixel
40 CARD8 - big-endian-flag, non-zero is big endian
41 CARD8 - true-color-flag, non-zero then next 6 apply
51 CARD8[length] - name-string
55 Client to Server Messages:
57 5.2.1 SetPixelFormat: 20 bytes
58 CARD8: 0 - message-type
61 5.2.2 FixColourMapEntries: >=6 bytes
62 CARD8: 1 - message-type
65 5.2.3 SetEncodings: >=8 bytes
66 CARD8: 2 - message-type
68 CARD16 - numer-of-encodings
70 CARD32 - encoding-type in preference order
77 5.2.4 FramebufferUpdateRequest (10 bytes)
78 CARD8: 3 - message-type
79 CARD8 - incremental (0 for full-update, non-zero for incremental)
86 5.2.5 KeyEvent: 8 bytes
87 CARD8: 4 - message-type
90 CARD32 - key (X-Windows keysym values)
92 5.2.6 PointerEvent: 6 bytes
93 CARD8: 5 - message-type
98 5.2.7 ClientCutText: >=9 bytes
99 CARD8: 6 - message-type
103 Server to Client Messages:
105 5.3.1 FramebufferUpdate
106 CARD8: 0 - message-type
108 CARD16 - number-of-rectangles
114 CARD16 - encoding-type:
122 - width x height pixel values
125 CARD16 - src-x-position
126 CARD16 - src-y-position
129 CARD32 - N number-of-subrectangles
130 Nxd bytes - background-pixel-value (d bits-per-pixel)
134 5.3.2 SetColourMapEntries (no support)
135 CARD8: 1 - message-type
139 CARD8: 2 - message-type
142 CARD8: 3 - message-type