#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.26 2000-09-29 04:58:36 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.27 2001-06-15 22:17:31 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
egp = (struct egp_packet *)bp;
ip = (struct ip *)bp2;
- (void)printf("%s > %s: egp: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
+ (void)printf("egp: ");
if (egp->egp_version != EGP_VERSION) {
printf("[version %d]", egp->egp_version);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.12 2001-03-13 01:03:17 fenner Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.13 2001-06-15 22:17:31 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
TCHECK(gre->proto);
flags = EXTRACT_16BITS(&gre->flags);
proto = EXTRACT_16BITS(&gre->proto);
+ (void)printf("gre ");
if (flags) {
/* Decode the flags */
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.58 2001-01-28 09:53:18 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.59 2001-06-15 22:17:32 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
ip = (struct ip *)bp2;
str = buf;
-#if 0
- (void)printf("%s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
-
TCHECK(dp->icmp_code);
switch (dp->icmp_type) {
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.54 2001-06-01 23:01:04 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.55 2001-06-15 22:17:32 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
char buf[256];
int icmp6len, prot;
-#if 0
-#define TCHECK(var) if ((u_char *)&(var) > ep - sizeof(var)) goto trunc
-#endif
-
dp = (struct icmp6_hdr *)bp;
ip = (struct ip6_hdr *)bp2;
oip = (struct ip6_hdr *)(dp + 1);
else /* XXX: jumbo payload case... */
icmp6len = snapend - bp;
-#if 0
- (void)printf("%s > %s: ",
- ip6addr_string(&ip->ip6_src),
- ip6addr_string(&ip->ip6_dst));
-#endif
-
TCHECK(dp->icmp6_code);
switch (dp->icmp6_type) {
case ICMP6_DST_UNREACH:
return;
trunc:
fputs("[|icmp6]", stdout);
-#if 0
-#undef TCHECK
-#endif
}
static struct udphdr *
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.15 2000-09-29 04:58:40 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.16 2001-06-15 22:17:32 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
hdr = (struct igrphdr *)bp;
ip = (struct ip *)bp2;
cp = (u_char *)(hdr + 1);
- (void)printf("%s > %s: igrp: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
+ (void)printf("igrp:");
/* Header */
TCHECK(*hdr);
igrp_entry_print((struct igrprte *)cp, 0, 1);
--next;
} else {
- (void)printf("[extra bytes %d]", length);
+ (void)printf(" [extra bytes %d]", length);
break;
}
cp += IGRP_RTE_SIZE;
if (nint == 0 && nsys == 0 && next == 0)
return;
trunc:
- fputs("[|igrp]", stdout);
+ fputs(" [|igrp]", stdout);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.97 2001-05-29 15:35:20 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.98 2001-06-15 22:17:33 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
break;
case IPPROTO_ND:
-#if 0
- (void)printf("%s > %s:", ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
(void)printf(" nd %d", len);
break;
case 4:
/* DVMRP multicast tunnel (ip-in-ip encapsulation) */
-#if 0
- if (vflag)
- (void)printf("%s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
ip_print(cp, len);
if (! vflag) {
printf(" (ipip-proto-4)");
#endif
case IP6PROTO_ENCAP:
/* ip6-in-ip encapsulation */
-#if 0
- if (vflag)
- (void)printf("%s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
ip6_print(cp, len);
- if (! vflag) {
- printf(" (encap)");
- return;
- }
break;
#endif /*INET6*/
#define IPPROTO_GRE 47
#endif
case IPPROTO_GRE:
- if (vflag)
- (void)printf("gre %s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
/* do it */
gre_print(cp, len);
- if (! vflag) {
- printf(" (gre encap)");
- return;
- }
break;
#ifndef IPPROTO_MOBILE
#define IPPROTO_MOBILE 55
#endif
case IPPROTO_MOBILE:
- if (vflag)
- (void)printf("mobile %s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
mobile_print(cp, len);
- if (! vflag) {
- printf(" (mobile encap)");
- return;
- }
break;
#ifndef IPPROTO_PIM
#define IPPROTO_VRRP 112
#endif
case IPPROTO_VRRP:
- if (vflag)
- (void)printf("vrrp %s > %s: ",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
vrrp_print(cp, len, ip->ip_ttl);
break;
default:
-#if 0
- (void)printf("%s > %s:", ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
(void)printf(" ip-proto-%d %d", nh, len);
break;
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.5 2000-09-29 04:58:43 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.6 2001-06-15 22:17:33 fenner Exp $";
#endif
#include <sys/param.h>
fputs("[|mobile]", stdout);
return;
}
+ fputs("mobile: ", stdout);
proto = EXTRACT_16BITS(&mob->proto);
crc = EXTRACT_16BITS(&mob->hcheck);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.29 2000-09-29 04:58:45 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.30 2001-06-15 22:17:34 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
op = (struct ospfhdr *)bp;
ip = (struct ip *)bp2;
- /* Print the source and destination address */
-#if 0
- (void) printf("%s > %s:",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-#endif
/* XXX Before we do anything else, strip off the MD5 trailer */
TCHECK(op->ospf_authtype);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.27 2001-05-11 02:12:32 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
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
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.17 2000-12-13 07:57:05 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.18 2001-06-15 22:17:34 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
/* 'ep' points to the end of available data. */
ep = snapend;
-#if 0
- printf("%s > %s: ",
- ip6addr_string(&ip->ip6_src),
- ip6addr_string(&ip->ip6_dst));
-#endif
-
TCHECK(dp->ip6r_segleft);
printf("srcrt (len=%d", dp->ip6r_len); /*)*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.93 2001-03-17 04:41:51 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.94 2001-06-15 22:17:34 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
return;
}
}
-#if 0
- (void)printf("%s.%s > %s.%s:",
- ipaddr_string(&ip->ip_src), udpport_string(sport),
- ipaddr_string(&ip->ip_dst), udpport_string(dport));
-#else
#ifdef INET6
if (ip6) {
if (ip6->ip6_nxt == IPPROTO_UDP) {
udpport_string(sport), udpport_string(dport));
}
}
-#endif
if (IP_V(ip) == 4 && vflag && !fragmented) {
int sum = up->uh_sum;