Commit Graph

2 Commits

Author SHA1 Message Date
Guy Harris
56bcff3da9 We don't define PRIu8 or PRIx8 if the C environment doesn't; don't use it.
The right format to use to print 8-bit quantities isn't
implementation-dependent, so no need to use the PRIu8 and PRIx8 macros.

There's also no need for an empty string after PRIu64.  Separate it with
space from the strings with which it's being concatenated, however; we
do that elsewhere.
2013-03-26 02:01:31 -07:00
Denis Ovsienko
ad7171ca02 ZeroMQ initial support (ZMTP/1.0 framing)
This change adds support for ZMTP/1.0 (ZeroMQ Message Transport Protocol
1.0) framing in TCP packets, as defined in http://rfc.zeromq.org/spec:13
and implemented in zeromq library.

Since there is no assigned port number for ZeroMQ, the user is left
responsible for making only the related TCP packets captured and
enforcing ZMTP/1.0 decoding through the "-T zmtp1" option.

Each ZMTP/1.0 frame of a packet will produce a single additional line of
output. The "-v" flag will add up to 8 lines (128 bytes) worth of
hex+ASCII dump of the frame body, and "-vv" and higher will dump the
full frame body, however long.

Beware that this code handles neither IP fragmentation nor TCP
segmentation and will incorrectly decode segments not starting at a
frame boundary.

The included sample capture stands for a short ZeroMQ session between a
REQ/REP socket pair doing 3 anonymous 2-way exchanges. It was produced
using version 2.1.9 of zeromq library patched to fix its bug #293, so
that all MBZ bits of the flags field are set to 0.
2013-02-11 15:16:35 +04:00