#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.71 2002-12-11 07:14:01 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.73 2003-06-07 11:57:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "ip.h"
#include "udp.h"
+#include "ipproto.h"
/*
* Interface Control Message Protocol Definitions.
};
void
-icmp_print(const u_char *bp, u_int plen, const u_char *bp2)
+icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented)
{
char *cp;
const struct icmp *dp;
break;
}
(void)printf("icmp %d: %s", plen, str);
- if (vflag) {
+ if (vflag && !fragmented) { /* don't attempt checksumming if this is a frag */
u_int16_t sum, icmp_sum;
if (TTEST2(*bp, plen)) {
sum = in_cksum((u_short*)dp, plen, 0);