* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.211 2003-05-11 06:01:16 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.212 2003-05-15 16:58:03 hannes Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
const u_char *);
extern void gre_print(const u_char *, u_int);
-extern void icmp_print(const u_char *, u_int, const u_char *);
+extern void icmp_print(const u_char *, u_int, const u_char *, int);
extern void igmp_print(const u_char *, u_int);
extern void igrp_print(const u_char *, u_int, const u_char *);
extern void ip_print(const u_char *, u_int);
#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.72 2003-05-15 16:58:04 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
};
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);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.123 2003-05-15 15:25:18 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.124 2003-05-15 16:58:04 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
break;
case IPPROTO_ICMP:
- icmp_print(cp, len, (const u_char *)ip);
+ /* pass on the MF bit plus the offset to detect fragments */
+ icmp_print(cp, len, (const u_char *)ip, (off & 0x3fff));
break;
#ifndef IPPROTO_IGRP