-/* $OpenBSD: interface.h,v 1.71 2018/02/06 03:07:51 dlg Exp $ */
+/* $OpenBSD: interface.h,v 1.72 2018/02/10 10:00:32 dlg 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.71 2018/02/06 03:07:51 dlg Exp $ (LBL)
+ * @(#) $Id: interface.h,v 1.72 2018/02/10 10:00:32 dlg Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
extern void radius_print(const u_char *, u_int);
extern void lwres_print(const u_char *, u_int);
extern void ether_print(const u_char *, u_int);
-extern void etherip_print(const u_char *, u_int, u_int, const u_char *);
+extern void etherip_print(const u_char *, u_int, u_int);
extern void ipcomp_print(const u_char *, u_int, const u_char *);
extern void mpls_print(const u_char *, u_int);
extern void lldp_print(const u_char *, u_int);
-/* $OpenBSD: print-etherip.c,v 1.9 2017/03/08 10:05:30 jca Exp $ */
+/* $OpenBSD: print-etherip.c,v 1.10 2018/02/10 10:00:32 dlg Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
extern u_short extracted_ethertype;
void
-etherip_print(const u_char *bp, u_int caplen, u_int len, const u_char *bp2)
+etherip_print(const u_char *bp, u_int caplen, u_int len)
{
- const struct ip *ip = (const struct ip *)bp2;
struct ether_header *eh;
const u_char *pbuf = bp;
u_int plen = caplen, hlen;
u_int16_t etype;
+ printf("etherip ");
+
if (plen < sizeof(struct etherip_header)) {
printf("[|etherip]");
return;
}
- printf("etherip %s > %s ver ", ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
-
switch (*pbuf >> 4) {
case 2:
hlen = 1;
-/* $OpenBSD: print-ip.c,v 1.48 2018/02/06 03:07:51 dlg Exp $ */
+/* $OpenBSD: print-ip.c,v 1.49 2018/02/10 10:00:32 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
#define IPPROTO_ETHERIP 97
#endif
case IPPROTO_ETHERIP:
- etherip_print(cp, snapend - cp, len,
- (const u_char *)ip);
+ (void)printf("%s > %s: ",
+ ipaddr_string(&ip->ip_src),
+ ipaddr_string(&ip->ip_dst));
+ etherip_print(cp, snapend - cp, len);
break;
#ifndef IPPROTO_IPCOMP
-/* $OpenBSD: print-ip6.c,v 1.25 2018/02/06 03:07:51 dlg Exp $ */
+/* $OpenBSD: print-ip6.c,v 1.26 2018/02/10 10:00:32 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994
(void)printf("no next header");
goto end;
+#ifndef IPPROTO_ETHERIP
+#define IPPROTO_ETHERIP 97
+#endif
+ case IPPROTO_ETHERIP:
+ etherip_print(cp, snapend - cp, len);
+ goto end;
+
#ifndef IPPROTO_CARP
#define IPPROTO_CARP 112
#endif