X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/525194da30b85e3c00453287ff31014c8b9090f9..f01a14ae44e67d54f6bb89f034ed1b39a5c3f565:/print-pim.c diff --git a/print-pim.c b/print-pim.c index ca004947..6c31838a 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.25 2001-04-27 02:18:27 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.28 2001-06-15 22:17:34 fenner Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -96,10 +96,16 @@ pimv1_join_prune_print(register const u_char *bp, register u_int len) } TCHECK2(bp[0], 4); - (void)printf("\n Upstream Nbr: %s", ipaddr_string(bp)); + if (vflag > 1) + (void)printf("\n"); + (void)printf(" Upstream Nbr: %s", ipaddr_string(bp)); TCHECK2(bp[6], 2); - (void)printf("\n Hold time: "); + if (vflag > 1) + (void)printf("\n"); + (void)printf(" Hold time: "); relts_print(EXTRACT_16BITS(&bp[6])); + if (vflag < 2) + return; bp += 8; len -= 8; @@ -410,11 +416,6 @@ static int pimv2_addr_len; enum pimv2_addrtype { pimv2_unicast, pimv2_group, pimv2_source }; -#if 0 -static char *addrtypestr[] = { - "unicast", "group", "source" -}; -#endif /* 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 @@ -591,9 +592,13 @@ pimv2_print(register const u_char *bp, register u_int len) break; case 21: - (void)printf(" (State Refresh Capable"); - if (EXTRACT_32BITS(&bp[4]) != 1) { - (void)printf(" ?0x%x?", EXTRACT_32BITS(&bp[4])); + (void)printf(" (State Refresh Capable; v%d", bp[4]); + if (bp[5] != 0) { + (void)printf(" interval "); + relts_print(bp[5]); + } + if (EXTRACT_16BITS(&bp[6]) != 0) { + (void)printf(" ?0x%04x?", EXTRACT_16BITS(&bp[6])); } (void)printf(")"); break;