summaryrefslogtreecommitdiff
path: root/print-pgm.c
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2013-03-14 21:59:38 +0400
committerMichael Richardson <mcr@sandelman.ca>2013-04-14 18:20:26 -0400
commit0e2f72760d99a2e6bec56368d1c9bd83d8e3e460 (patch)
tree0b625ce20e54524fcdb7bea7053dfb5f48c07eea /print-pgm.c
parentb10f46c2d6e3755598340ba77895e6631953ccc0 (diff)
downloadtcpdump-0e2f72760d99a2e6bec56368d1c9bd83d8e3e460.tar.gz
improve ZeroMQ support (ZMTP/1.0 inside PGM/EPGM)
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.
Diffstat (limited to 'print-pgm.c')
-rw-r--r--print-pgm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/print-pgm.c b/print-pgm.c
index ac560ec9..72c80d9a 100644
--- a/print-pgm.c
+++ b/print-pgm.c
@@ -834,6 +834,9 @@ pgm_print(register const u_char *bp, register u_int length,
}
(void)printf(" [%u]", length);
+ if (packettype == PT_PGM_ZMTP1 &&
+ (pgm->pgm_type == PGM_ODATA || pgm->pgm_type == PGM_RDATA))
+ zmtp1_print_datagram(bp, EXTRACT_16BITS(&pgm->pgm_length));
return;