Add prototype of the handshake protocol

Signed-off-by: Kirill Enykeev <enykeev@gmail.com>