Skip to content
csudanthi edited this page Sep 12, 2013 · 4 revisions

Outline of Design

  • Connect to VNC server on port Y
  • Handshake with server
    • Section 6.1 of rfbproto.pdf describes the handshaking. It’s just two packets one for protocol version and one for security type.
    • We can simplify things by using only supporting one protocol version with no security.
  • Listen on port X (VNC client will connect)
  • Wait for connection on port X
  • Handshake with client
  • Pass VNC client packets from port X to VNC server on port Y
  • Inspect packets as they are passed checking for special keystrokes
  • Capture packets based on special keystrokes
  • Close connection

Packet Types

The packet types stored in the final capture file are below. All except the RFB packet are new. You can figure out the exact format from replayInput in the patch.

  • RFB packet - RFB is short for remote frame buffer. VNC implements the RFB protocol. Pointer and keyboard data is stored in RFB packets.
  • Time wait packet - This packet tells the simulator to wait for a specified number of microseconds. Detail: Followed by Time Sync Packet, which will recalculate the file and simulation time offset when after a Time Wait Packet.
  • Time sync packet - Sync the timestamp of the simulator to this packet's value.
  • Frame wait packet - Wait for the next frame in the frame input directory
  • Directed delay packet - Wait for a simulator specified amount of time
  • Checkpoint packet - Tell simulator to take a checkpoint
  • Exit packet - Tell simulator to exit
Clone this wiki locally