#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.20 2000-09-29 04:58:36 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.21 2001-05-10 05:30:20 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#define DVMRP_PROBE 1 /* for finding neighbors */
#define DVMRP_REPORT 2 /* for reporting some or all routes */
#define DVMRP_ASK_NEIGHBORS 3 /* sent by mapper, asking for a list */
- /*
- * of this router's neighbors
- */
+ /* of this router's neighbors */
#define DVMRP_NEIGHBORS 4 /* response to such a request */
#define DVMRP_ASK_NEIGHBORS2 5 /* as above, want new format reply */
#define DVMRP_NEIGHBORS2 6
return;
type = bp[1];
- bp += 8;
- /*
- * Skip IGMP header
- */
+ /* Skip IGMP header */
+ bp += 8;
len -= 8;
switch (type) {
case DVMRP_REPORT:
printf(" Report");
- if (vflag)
+ if (vflag > 1)
print_report(bp, ep, len);
break;
genid = (bp[0] << 24) | (bp[1] << 16) | (bp[2] << 8) | bp[3];
bp += 4;
len -= 4;
- printf("\n\tgenid %u", genid);
+ if (vflag > 1)
+ printf("\n\t");
+ else
+ printf(" ");
+ printf("genid %u", genid);
+ if (vflag < 2)
+ return;
while ((len > 0) && (bp < ep)) {
TCHECK2(bp[0], 4);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.48 2001-05-09 02:43:40 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.49 2001-05-10 05:30:21 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
break;
case ICMP6_PACKET_TOO_BIG:
TCHECK(dp->icmp6_mtu);
- printf("icmp6: too big %u\n", (u_int32_t)ntohl(dp->icmp6_mtu));
+ printf("icmp6: too big %u", (u_int32_t)ntohl(dp->icmp6_mtu));
break;
case ICMP6_TIME_EXCEEDED:
TCHECK(oip->ip6_dst);
TCHECK(oip->ip6_dst);
switch (dp->icmp6_code) {
case ICMP6_PARAMPROB_HEADER:
- printf("icmp6: parameter problem errorneous - octet %u\n",
+ printf("icmp6: parameter problem errorneous - octet %u",
(u_int32_t)ntohl(dp->icmp6_pptr));
break;
case ICMP6_PARAMPROB_NEXTHEADER:
- printf("icmp6: parameter problem next header - octet %u\n",
+ printf("icmp6: parameter problem next header - octet %u",
(u_int32_t)ntohl(dp->icmp6_pptr));
break;
case ICMP6_PARAMPROB_OPTION:
- printf("icmp6: parameter problem option - octet %u\n",
+ printf("icmp6: parameter problem option - octet %u",
(u_int32_t)ntohl(dp->icmp6_pptr));
break;
default:
TCHECK(match->rpm_prefix);
- if (vflag)
+ if (vflag > 1)
printf("\n\t");
else
printf(" ");
TCHECK(use->rpu_prefix);
- if (vflag)
+ if (vflag > 1)
printf("\n\t");
else
printf(" ");
#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.26 2001-05-10 05:30:21 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
}
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;
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.48 2001-01-28 08:14:55 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.49 2001-05-10 05:30:22 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
case RIPCMD_TRACEON:
printf(" RIPv%d-traceon %d: \"", rp->rip_vers, length);
(void)fn_print((const u_char *)(rp + 1), snapend);
- fputs("\"\n", stdout);
+ fputs("\"", stdout);
break;
case RIPCMD_TRACEOFF:
printf(" RIPv%d-traceoff %d", rp->rip_vers, length);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.7 2000-10-07 05:46:21 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.8 2001-05-10 05:30:22 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
printf(" ripng-req %d:", j);
trunc = ((i / sizeof(*ni)) * sizeof(*ni) != i);
for (ni = rp->rip6_nets; (i -= sizeof(*ni)) >= 0; ++ni) {
- if (vflag)
+ if (vflag > 1)
printf("\n\t");
else
printf(" ");
printf(" ripng-resp %d:", j);
trunc = ((i / sizeof(*ni)) * sizeof(*ni) != i);
for (ni = rp->rip6_nets; (i -= sizeof(*ni)) >= 0; ++ni) {
- if (vflag)
+ if (vflag > 1)
printf("\n\t");
else
printf(" ");