summaryrefslogtreecommitdiff
path: root/print-zeromq.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix error in my previous commit.Guy Harris2013-05-061-1/+1
|
* Not all platforms on which we compile define PRI[doux]16.Guy Harris2013-05-051-1/+1
| | | | | | | So don't use it; it's not necessary on any of the platforms on which we work. (The *only* ones that are needed are PRI[doux]64, because sometimes you need %ll[doux], sometimes you need %l[doux], and with MSVC you need whatever its run-time library requires.)
* improve ZeroMQ support (ZMTP/1.0 inside PGM/EPGM)Denis Ovsienko2013-04-141-0/+66
| | | | | | | | | | | This change adds new code to decode ZeroMQ datagrams, couples it with the PGM decoder and extends the -T option to make all this work. There are two new test cases based on existing captures of ZMTP/1.0 inside [E]PGM to decode the ZMTP/1.0 part of these. This functionality enables decoding of the traffic zeromq library produces for "pgm://" and "epgm://" protocol schemas.
* We don't define PRIu8 or PRIx8 if the C environment doesn't; don't use it.Guy Harris2013-03-261-5/+5
| | | | | | | | | 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.
* ZeroMQ initial support (ZMTP/1.0 framing)Denis Ovsienko2013-02-111-0/+148
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.