tcpdump mailing list archives
[patch] Enable decoding of PGM encapsulated in UDP packets
From: Christoph Lameter <cl () linux com>
Date: Tue, 5 Jul 2011 12:11:34 -0500 (CDT)
Some commercial middleware uses PGM for their communication but instead of sending patckets using the UDP protocol it embeds PGM in UDP packets. This patch allows tcpdump to decode that information if the option -T pgm is specified. This patch was posted more than a year ago to the Linux netdev mailing list. See http://www.gossamer-threads.com/lists/linux/kernel/1207426?do=post_view_threaded#1207426 Signed-off-by: Christoph Lameter <cl () linux com> Index: tcpdump/interface.h =================================================================== --- tcpdump.orig/interface.h 2011-07-05 11:21:58.708809363 -0500 +++ tcpdump/interface.h 2011-07-05 12:01:21.165803777 -0500 @@ -70,6 +70,7 @@ #define PT_CNFP 7 /* Cisco NetFlow protocol */ #define PT_TFTP 8 /* trivial file transfer protocol */ #define PT_AODV 9 /* Ad-hoc On-demand Distance Vector Protocol */ +#define PT_PGM 10 /* The PGM protocol */ #ifndef min #define min(a,b) ((a)>(b)?(b):(a)) Index: tcpdump/print-udp.c =================================================================== --- tcpdump.orig/print-udp.c 2011-07-05 11:21:58.768808873 -0500 +++ tcpdump/print-udp.c 2011-07-05 12:01:21.165803777 -0500 @@ -460,6 +460,11 @@ tftp_print(cp, length); break; + case PT_PGM: + udpipaddr_print(ip, sport, dport); + pgm_print(cp, length, (const u_char *)ip); + break; + case PT_AODV: udpipaddr_print(ip, sport, dport); aodv_print((const u_char *)(up + 1), length, Index: tcpdump/tcpdump.c =================================================================== --- tcpdump.orig/tcpdump.c 2011-07-05 11:21:58.780808705 -0500 +++ tcpdump/tcpdump.c 2011-07-05 12:01:21.173803458 -0500 @@ -927,6 +927,8 @@ packettype = PT_TFTP; else if (strcasecmp(optarg, "aodv") == 0) packettype = PT_AODV; + else if (strcasecmp(optarg, "pgm") == 0) + packettype = PT_PGM; else error("unknown packet type `%s'", optarg); break; - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- [patch] Enable decoding of PGM encapsulated in UDP packets Christoph Lameter (Jul 05)
- <Possible follow-ups>
- [patch] Enable decoding of PGM encapsulated in UDP packets Christoph Lameter (Jul 06)