]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Pavlin Radoslavov <[email protected]>: print the PIM "LAN Prune
authorguy <guy>
Sat, 19 Oct 2002 02:43:04 +0000 (02:43 +0000)
committerguy <guy>
Sat, 19 Oct 2002 02:43:04 +0000 (02:43 +0000)
Delay" option.

CREDITS
print-pim.c

diff --git a/CREDITS b/CREDITS
index 6e0be140503b3a0bc49368a1f2fc4273dd6a10a0..1c5524908290001809e83ae98e897f02121b55e6 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -78,6 +78,7 @@ Additional people who have contributed patches:
        Pascal Hennequin                <[email protected]>
        Pasvorn Boonmark                <[email protected]>
        Paul S. Traina                  <[email protected]>
+       Pavlin Radoslavov               <[email protected]>
        Pekka Savola                    <[email protected]>     
        Peter Jeremy                    <[email protected]>
        Phil Wood                       <[email protected]>
index dc714a2c747569b97dadbdf4002c9fe3415aba15..5fc57fc11b2fbf1a82fb542fdc3fb96b995943c8 100644 (file)
@@ -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)",