X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fcc82f451d3e51fdf636abbf927edb287bada0e0..f7b8cfec15da3c75d501a1a85d515d4e747b65be:/print-pim.c diff --git a/print-pim.c b/print-pim.c index 87a611be..f19607e1 100644 --- a/print-pim.c +++ b/print-pim.c @@ -20,8 +20,8 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.36 2002-12-11 07:14:06 guy Exp $ (LBL)"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.37.2.4 2004-03-24 02:52:37 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -113,6 +113,7 @@ pimv1_join_prune_print(register const u_char *bp, register u_int len) while (ngroups--) { TCHECK2(bp[0], 4); (void)printf("\n\tGroup: %s", ipaddr_string(bp)); + TCHECK2(bp[4], 4); if (EXTRACT_32BITS(&bp[4]) != 0xffffffff) (void)printf("/%s", ipaddr_string(&bp[4])); TCHECK2(bp[8], 4); @@ -154,6 +155,7 @@ pimv1_print(register const u_char *bp, register u_int len) if (bp >= ep) return; + TCHECK(bp[1]); type = bp[1]; switch (type) { @@ -637,6 +639,26 @@ pimv2_print(register const u_char *bp, register u_int len) (void)printf(" (bidir-capable)"); break; + case 24: /* Address List */ + case 65001: /* Address List (old implementations) */ + (void)printf(" (%saddr-list", + otype == 65001 ? "old" : ""); + if (vflag > 1) { + const u_char *ptr = &bp[4]; + while (ptr < &bp[4 + olen]) { + int advance; + + printf(" "); + advance = pimv2_addr_print(ptr, pimv2_unicast, 0); + if (advance < 0) { + printf("..."); + break; + } + ptr += advance; + } + } + (void)printf(")"); + break; default: unknown: if (vflag)