[zeromq-dev] Sniffing connections

Herry Sitepu hisitepu at gmail.com
Fri Apr 12 13:02:31 CEST 2013


I have sniffed some of the traffic using the examples in the guide using
ngrep. The captured traffic are commented along with the bytes captured by
ngrep. Here are the captured files:
1. PROTOCOL-REQREP
This capture explain the REQ-REP dialog between hwclient and hwserver
2. PROTOCOL-REQREP-IDENTITY
This capture explain the REQ-REP dialog between hwclient and hwserver, the
hwclient socket has been configured to use ZMQ_IDENTITY using zmq_setsockopt
3. PROTOCOL-EXREQREP
This capture explain the dialog between rrbroker, rrclient, and rrworker.
rrbroker uses DEALER socket to talk to rrworker (REP) and rrbroker uses
ROUTER socket to talk to rrclient (REQ).

I'm not too sure about the correctness of the comments in the capture
files, but as far that I can do, I used formal grammar as specified in
RFC15. Any correction will be very appreciated.

Regards,
Herry Sitepu


On Fri, Apr 12, 2013 at 4:15 PM, Pieter Hintjens <ph at imatix.com> wrote:

> On Fri, Apr 12, 2013 at 6:21 AM, asif saeed <asif.lse2 at gmail.com> wrote:
>
>
>> I don't understand. TCP is already implemented in 0MQ, why is this
>> protocol needed in the first place? Could you please give me a tutorial,
>> etc?
>>
>
> Good question. I'll add some explanation in the RFC. Here is the story:
>
> TCP carries a stream of bytes with no structure and no meaning. At the
> least we need to encode messages, with size and body. This was the original
> 0MQ TCP protocol: just frames with no other meaning. Then we added a flags
> byte so we could do multipart frames. Then we sent the identity as the
> first frame. Now we found it was impossible for older versions of the
> library to talk to newer ones, so we added a version number. We wanted to
> allow peers to check socket types, so we added the socket type to the
> greeting. Then we wanted to add security so we added a security handshake...
>
> So it goes. Without a formal protocol, you can certainly send and receive
> messages but you cannot promise much more.
>
> -Pieter
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130412/bbaafffe/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PROTOCOL-EXTREQREP
Type: application/octet-stream
Size: 8030 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130412/bbaafffe/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PROTOCOL-REQREP
Type: application/octet-stream
Size: 3896 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130412/bbaafffe/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PROTOCOL-REQREP-IDENTITY
Type: application/octet-stream
Size: 4579 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130412/bbaafffe/attachment-0002.obj>


More information about the zeromq-dev mailing list