summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/print-icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcpdump/print-icmp.c')
-rw-r--r--contrib/tcpdump/print-icmp.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/contrib/tcpdump/print-icmp.c b/contrib/tcpdump/print-icmp.c
index 88416b6..70139e0 100644
--- a/contrib/tcpdump/print-icmp.c
+++ b/contrib/tcpdump/print-icmp.c
@@ -21,11 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.43 1999/11/22 04:28:21 fenner Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
+ "@(#) $Header: print-icmp.c,v 1.38 96/09/26 23:36:44 leres Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -39,7 +35,7 @@ struct rtentry;
#include <net/if.h>
#include <netinet/in.h>
-#include <netinet/if_ether.h>
+#include <net/ethernet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
@@ -47,6 +43,7 @@ struct rtentry;
#include <netinet/udp.h>
#include <netinet/udp_var.h>
#include <netinet/tcp.h>
+#include <netinet/tcpip.h>
#include <stdio.h>
#include <string.h>
@@ -166,7 +163,7 @@ struct id_rdiscovery {
};
void
-icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
+icmp_print(register const u_char *bp, register const u_char *bp2)
{
register char *cp;
register const struct icmp *dp;
@@ -181,11 +178,9 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
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) {
@@ -353,19 +348,6 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
break;
}
(void)printf("icmp: %s", str);
- if (vflag) {
- if (TTEST2(*bp, plen)) {
- if (in_cksum((u_short*)dp, plen, 0))
- printf(" (wrong icmp csum)");
- }
- }
- if (vflag > 1 && !ICMP_INFOTYPE(dp->icmp_type)) {
- bp += 8;
- (void)printf(" for ");
- ip = (struct ip *)bp;
- snaplen = snapend - bp;
- ip_print(bp, ntohs(ip->ip_len));
- }
return;
trunc:
fputs("[|icmp]", stdout);
OpenPOWER on IntegriCloud