summaryrefslogtreecommitdiff
path: root/print-zeromq.c
Commit message (Collapse)AuthorAgeFilesLines
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-4/+8
| | | | The function body should have its opening brace on the next line.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-5/+5
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* justify MIN()/min() further (complements dbfdf97)Denis Ovsienko2014-03-151-4/+4
|
* make use of NETDISSECT_REWORKEDDenis Ovsienko2014-03-151-1/+2
| | | | | Update the already converted decoders to define the macro and to include interface.h instead of netdissect.h. Fix incurred compile errors.
* justify min()/max() macros declarations and usageDenis Ovsienko2014-03-141-2/+2
| | | | | | | | | | | This change moves the macros to tcpdump-stdinc.h to make sure these are available without interface.h. It also dismisses two redundant macros MIN() and SMBMIN(). It is intended to fix the following Solaris compile error: Undefined first referenced symbol in file MIN print-zeromq.o
* NDOize 8 more small decodersDenis Ovsienko2014-03-131-44/+42
| | | | | This change converts ZeroMQ, IPX, MPLS, IPv6 options, PPPoE, RIPng, PFLOG and Sun RPC decoders.
* NDOize print-ascii.c furtherDenis Ovsienko2014-03-131-2/+2
| | | | | Introduce netdissect_options into hex_and_ascii_print_with_offset(), hex_and_ascii_print() and related functions.
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-2/+4
| | | | | | | | For each decoder that has more than one instance of truncation signaling and prints the same string in each instance make sure that the string is declared as "static const char tstr[]" right after the initial includes block. Where necessary, replace fputs(s, stdout) with equivalent printf("%s", s).
* 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.