rfb_notes 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. 5.1.1 ProtocolVersion: 12, 12 bytes
  2. - Sent by server, max supported
  3. 12 ascii - "RFB 003.008\n"
  4. - Response by client, version to use
  5. 12 ascii - "RFB 003.003\n"
  6. 5.1.2 Authentication: >=4, [16, 4] bytes
  7. - Sent by server
  8. CARD32 - authentication-scheme
  9. 0 - connection failed
  10. CARD32 - length
  11. length - reason
  12. 1 - no authentication
  13. 2 - VNC authentication
  14. 16 CARD8 - challenge (random bytes)
  15. - Response by client (if VNC authentication)
  16. 16 CARD8 - client encrypts the challenge with DES, using user
  17. password as key, sends resulting 16 byte response
  18. - Response by server (if VNC authentication)
  19. CARD32 - 0 - OK
  20. 1 - failed
  21. 2 - too-many
  22. 5.1.3 ClientInitialisation: 1 byte
  23. - Sent by client
  24. CARD8 - shared-flag, 0 exclusive, non-zero shared
  25. 5.1.4 ServerInitialisation: >=24 bytes
  26. - Sent by server
  27. CARD16 - framebuffer-width
  28. CARD16 - framebuffer-height
  29. 16 byte PIXEL_FORMAT - server-pixel-format
  30. CARD8 - bits-per-pixel
  31. CARD8 - depth
  32. CARD8 - big-endian-flag, non-zero is big endian
  33. CARD8 - true-color-flag, non-zero then next 6 apply
  34. CARD16 - red-max
  35. CARD16 - green-max
  36. CARD16 - blue-max
  37. CARD8 - red-shift
  38. CARD8 - green-shift
  39. CARD8 - blue-shift
  40. 3 bytes - padding
  41. CARD32 - name-length
  42. CARD8[length] - name-string
  43. Client to Server Messages:
  44. 5.2.1 SetPixelFormat: 20 bytes
  45. CARD8: 0 - message-type
  46. ...
  47. 5.2.2 FixColourMapEntries: >=6 bytes
  48. CARD8: 1 - message-type
  49. ...
  50. 5.2.3 SetEncodings: >=8 bytes
  51. CARD8: 2 - message-type
  52. CARD8 - padding
  53. CARD16 - numer-of-encodings
  54. CARD32 - encoding-type in preference order
  55. 0 - raw
  56. 1 - copy-rectangle
  57. 2 - RRE
  58. 4 - CoRRE
  59. 5 - hextile
  60. 5.2.4 FramebufferUpdateRequest (10 bytes)
  61. CARD8: 3 - message-type
  62. CARD8 - incremental (0 for full-update, non-zero for incremental)
  63. CARD16 - x-position
  64. CARD16 - y-position
  65. CARD16 - width
  66. CARD16 - height
  67. 5.2.5 KeyEvent: 8 bytes
  68. CARD8: 4 - message-type
  69. CARD8 - down-flag
  70. 2 bytes - padding
  71. CARD32 - key (X-Windows keysym values)
  72. 5.2.6 PointerEvent: 6 bytes
  73. CARD8: 5 - message-type
  74. CARD8 - button-mask
  75. CARD16 - x-position
  76. CARD16 - y-position
  77. 5.2.7 ClientCutText: >=9 bytes
  78. CARD8: 6 - message-type
  79. ...
  80. Server to Client Messages:
  81. 5.3.1 FramebufferUpdate
  82. CARD8: 0 - message-type
  83. 1 byte - padding
  84. CARD16 - number-of-rectangles
  85. CARD16 - x-position
  86. CARD16 - y-position
  87. CARD16 - width
  88. CARD16 - height
  89. CARD16 - encoding-type:
  90. 0 - raw
  91. 1 - copy rectangle
  92. 2 - RRE
  93. 4 - CoRRE
  94. 5 - hextile
  95. raw:
  96. - width x height pixel values
  97. copy rectangle:
  98. CARD16 - src-x-position
  99. CARD16 - src-y-position
  100. RRE:
  101. CARD32 - N number-of-subrectangles
  102. Nxd bytes - background-pixel-value (d bits-per-pixel)
  103. ...
  104. 5.3.2 SetColourMapEntries (no support)
  105. CARD8: 1 - message-type
  106. ...
  107. 5.3.3 Bell
  108. CARD8: 2 - message-type
  109. 5.3.4 ServerCutText
  110. CARD8: 3 - message-type