From c03b15431e3402d331668c089573d61abf2344d9 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 19 Oct 2002 02:43:04 +0000 Subject: [PATCH] From Pavlin Radoslavov : print the PIM "LAN Prune Delay" option. --- CREDITS | 1 + print-pim.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index 6e0be140..1c552490 100644 --- a/CREDITS +++ b/CREDITS @@ -78,6 +78,7 @@ Additional people who have contributed patches: Pascal Hennequin Pasvorn Boonmark Paul S. Traina + Pavlin Radoslavov Pekka Savola Peter Jeremy Phil Wood diff --git a/print-pim.c b/print-pim.c index dc714a2c..5fc57fc1 100644 --- a/print-pim.c +++ b/print-pim.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.33 2002-09-05 00:00:16 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.34 2002-10-19 02:43:05 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -579,6 +579,22 @@ pimv2_print(register const u_char *bp, register u_int len) (void)printf(")"); break; + case 2: /* LAN Prune Delay */ + (void)printf(" (LAN-Prune-Delay: "); + if (olen != 4) { + (void)printf("!olen=%d!)", olen); + } else { + char t_bit; + u_int16_t lan_delay, override_interval; + lan_delay = EXTRACT_16BITS(&bp[4]); + override_interval = EXTRACT_16BITS(&bp[6]); + t_bit = (lan_delay & 0x8000)? 1 : 0; + lan_delay &= ~0x8000; + (void)printf("T-bit=%d lan-delay=%dms override-interval=%dms)", + t_bit, lan_delay, override_interval); + } + break; + case 18: /* Old DR-Priority */ if (olen == 4) (void)printf(" (OLD-DR-Priority: %d)",