#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.29 2001-07-04 21:36:15 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.36 2002-12-11 07:14:06 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
+#include <tcpdump-stdinc.h>
/*
* XXX: We consider a case where IPv6 is not ready yet for portability,
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include "interface.h"
#include "addrtoname.h"
bp += 12;
len -= 12;
for (njp = 0; njp < (njoin + nprune); njp++) {
- char *type;
+ const char *type;
if (njp < njoin)
type = "Join ";
pimv2_addr_print(const u_char *bp, enum pimv2_addrtype at, int silent)
{
int af;
- char *afstr;
+ const char *afstr;
int len, hdrlen;
TCHECK(bp[0]);
(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)",
+ EXTRACT_32BITS(&bp[4]));
+ else
+ goto unknown;
+ break;
+
+
case 19: /* DR-Priority */
+ if (olen == 0) {
+ (void)printf(" (OLD-bidir-capable)");
+ break;
+ }
(void)printf(" (DR-Priority: ");
if (olen != 4) {
(void)printf("!olen=%d!)", olen);
break;
default:
+ unknown:
if (vflag)
(void)printf(" [Hello option %d]", otype);
}