Constant VSOCK_MAGIC

Source
pub const VSOCK_MAGIC: &[u8; 7] = b"vsock:0";
Expand description

Magic sent in the sync packet of the USB protocol.

The 0 indicates protocol version 0, and we expect the reply sync packet to have the exact same contents. As we version the protocol this may increment.

To document the semantics, let’s say this header were “vsock:3”. The device could reply with a lower number, say “vsock:1”. This is the device requesting a downgrade, and if we accept we send the final sync with “vsock:1”. Otherwise we hang up.