-/* $OpenBSD: interface.h,v 1.61 2010/04/06 16:01:57 jsg Exp $ */
+/* $OpenBSD: interface.h,v 1.62 2014/01/11 04:35:52 lteo Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Id: interface.h,v 1.61 2010/04/06 16:01:57 jsg Exp $ (LBL)
+ * @(#) $Id: interface.h,v 1.62 2014/01/11 04:35:52 lteo Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
extern void ppp_ether_if_print(u_char *, const struct pcap_pkthdr *,
const u_char *);
extern void gre_print(const u_char *, u_int);
-extern void icmp_print(const u_char *, const u_char *);
+extern void icmp_print(const u_char *, u_int, const u_char *);
extern void ieee802_11_if_print(u_char *, const struct pcap_pkthdr *,
const u_char *);
extern void ieee802_11_radio_if_print(u_char *, const struct pcap_pkthdr *,
-/* $OpenBSD: print-icmp.c,v 1.20 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-icmp.c,v 1.21 2014/01/11 04:35:52 lteo Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996
};
void
-icmp_print(const u_char *bp, const u_char *bp2)
+icmp_print(const u_char *bp, u_int length, const u_char *bp2)
{
const struct icmp *dp;
const struct ip *ip;
-/* $OpenBSD: print-ip.c,v 1.36 2010/01/12 06:10:33 naddy Exp $ */
+/* $OpenBSD: print-ip.c,v 1.37 2014/01/11 04:35:52 lteo Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
break;
case IPPROTO_ICMP:
- icmp_print(cp, (const u_char *)ip);
+ icmp_print(cp, len, (const u_char *)ip);
break;
#ifndef IPPROTO_IGRP
-/* $OpenBSD: print-ipsec.c,v 1.17 2012/05/03 10:17:23 mikeb Exp $ */
+/* $OpenBSD: print-ipsec.c,v 1.18 2014/01/11 04:35:52 lteo Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
ip_print(data, len);
break;
case IPPROTO_ICMP:
- icmp_print(data, bp2);
+ icmp_print(data, len, bp2);
break;
case IPPROTO_ICMPV6:
icmp6_print(data, len, bp2);
break;
case IPPROTO_ICMP: /* From here and down; Transport mode */
- icmp_print(bp + pl_len, (const u_char *) ip);
+ icmp_print(bp + pl_len, len - pl_len,
+ (const u_char *) ip);
break;
case IPPROTO_ICMPV6: