summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/interface.h
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-02-06 03:07:51 +0000
committerdlg <dlg@openbsd.org>2018-02-06 03:07:51 +0000
commitc834ed88303ceeffea5e7d9fbae6c9901064aff9 (patch)
tree84a240da865c5aa3383f6990b20cf4edfc9ecb71 /usr.sbin/tcpdump/interface.h
parentrecognise DLT_PPP_SERIAL. (diff)
downloadwireguard-openbsd-c834ed88303ceeffea5e7d9fbae6c9901064aff9.tar.xz
wireguard-openbsd-c834ed88303ceeffea5e7d9fbae6c9901064aff9.zip
rework ppp, pptp, and gre parsing.
this started cos i was looking at pptp, which came out like this: 23:52:00.197893 call 24 seq 7: gre-ppp-payload (gre encap) 23:52:00.198930 call 1 seq 7 ack 7: gre-ppp-payload (gre encap) now it looks like this: 23:52:00.197893 20.0.0.2 > 20.0.0.1: pptp callid 24 seq 7: 17.1.1.122 > 40.0.0.2: icmp: echo request 23:52:00.198930 20.0.0.1 > 20.0.0.2: pptp callid 1 seq 7 ack 7: 40.0.0.2 > 17.1.1.122: icmp: echo reply the big improvement in ppp parsing is it stops parsing based on what the ppp headers say, rather than what bytes have been captured. this also adds parsing of EAP packets. DLT_PPP_SERIAL is now recognised and printed. gre now prints the outer addresses always, not just when it's encapsulated by ipv6 or -v is passed to tcpdump. ok sthen@
Diffstat (limited to 'usr.sbin/tcpdump/interface.h')
-rw-r--r--usr.sbin/tcpdump/interface.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/interface.h b/usr.sbin/tcpdump/interface.h
index 5037695640d..d5a718a847d 100644
--- a/usr.sbin/tcpdump/interface.h
+++ b/usr.sbin/tcpdump/interface.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.h,v 1.70 2018/02/03 13:39:48 mpi Exp $ */
+/* $OpenBSD: interface.h,v 1.71 2018/02/06 03:07:51 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -20,7 +20,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Id: interface.h,v 1.70 2018/02/03 13:39:48 mpi Exp $ (LBL)
+ * @(#) $Id: interface.h,v 1.71 2018/02/06 03:07:51 dlg Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -244,7 +244,10 @@ extern void ospf_print(const u_char *, u_int, const u_char *);
extern void mobile_print(const u_char *, u_int);
extern void pim_print(const u_char *, u_int);
extern void ppp_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
-extern void ppp_hdlc_print(const u_char *, int);
+extern void ppp_hdlc_if_print(u_char *, const struct pcap_pkthdr *,
+ const u_char *);
+extern void ppp_print(const u_char *, u_int);
+extern void ppp_hdlc_print(const u_char *, u_int);
extern void raw_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
extern void rip_print(const u_char *, u_int);
extern void sl_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);