• Martin Hurton's avatar
    Extend ZTP/1.0 protocol · 1bca4f6f
    Martin Hurton authored
    The new protocol adds support for protocol version and  exchanges the
    socket type, so that the library can reject a connection when the
    sockets do not match.
    
    The protocol was designed so that it's possible to detect and fully
    support ZTP/1.0 peers.
    
    When a new connection is set up, peers exchange greeting messages. The
    greeting message encodes both the protocol verion and the socket type.
    The format of the greeting message is as follows:
    
        greeting    = tag1, adaptation, tag2, version, length, socket_type
        tag1        = BYTE / 0xff
        adaptation  = 8 BYTES
        tag2        = BYTE / 0x7f
        version     = BYTE / 1
        length      = BYTE / 1
        socket_type = BYTE
    
    The protocol does not define the value of adaptation field.
    
    When interoperability with ZTP/1.0 peers is required, the adaptaion
    encodes, in network byte order, the length of identity message increased
    by 1. When adaptaion consists of eight zeros, the current
    implementatatio of 0MQ 2.x closes the connection.
    
    This patch supports both ZTP/1.0 and new protocol.
    1bca4f6f
Name
Last commit
Last update
builds Loading commit data...
doc Loading commit data...
foreign/openpgm Loading commit data...
include Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
configure.in Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...