]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Update PIM Hello options with IANA-registered values.
authorfenner <fenner>
Fri, 27 Apr 2001 02:18:27 +0000 (02:18 +0000)
committerfenner <fenner>
Fri, 27 Apr 2001 02:18:27 +0000 (02:18 +0000)
print-pim.c

index 78f525a6210cf060df7a73d0d88a6a183bb1a7af..ca0049478480d482db76144d6360281cb6537e59 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.24 2001-01-28 08:27:28 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.25 2001-04-27 02:18:27 fenner Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -577,20 +577,13 @@ pimv2_print(register const u_char *bp, register u_int len)
                                (void)printf(")");
                                break;
 
-                       /* XXX
-                        * draft-ietf-idmr-pimv2-dr-priority-00.txt
-                        * says that DR-Priority is option 19.
-                        * draft-ietf-pim-v2-sm-00.txt says it's 18.
-                        */
-                       case 18:        /* DR-Priority */
-                               (void)printf(" (DR-Priority: %d)", EXTRACT_32BITS(&bp[4]));
-                               break;
-
-                       case 19:        /* Bidir-Capable */
-                               if (olen == 4)
-                                       (void)printf(" (OLD-DR-Priority: %d)", EXTRACT_32BITS(&bp[4]));
-                               else
-                                       (void)printf(" (bidir-capable)");
+                       case 19:        /* DR-Priority */
+                               (void)printf(" (DR-Priority: ");
+                               if (olen != 4) {
+                                       (void)printf("!olen=%d!)", olen);
+                               } else {
+                                       (void)printf("%d)", EXTRACT_32BITS(&bp[4]));
+                               }
                                break;
 
                        case 20:
@@ -605,6 +598,10 @@ pimv2_print(register const u_char *bp, register u_int len)
                                (void)printf(")");
                                break;
 
+                       case 22:        /* Bidir-Capable */
+                               (void)printf(" (bidir-capable)");
+                               break;
+
                        default:
                                if (vflag)
                                        (void)printf(" [Hello option %d]", otype);