summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/tcpdump.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-07-06 06:43:19 +0000
committerdlg <dlg@openbsd.org>2018-07-06 06:43:19 +0000
commitccc4aa3fcdcb7eb52835d852f31c5df8d4650d4c (patch)
treef62afbcd4dc4b25ba40a04dbb33a84aec0bfdb42 /usr.sbin/tcpdump/tcpdump.c
parentAdd "mpls" as a type to use with -T (diff)
downloadwireguard-openbsd-ccc4aa3fcdcb7eb52835d852f31c5df8d4650d4c.tar.xz
wireguard-openbsd-ccc4aa3fcdcb7eb52835d852f31c5df8d4650d4c.zip
add "tftp" as a type to use with -T
This forces UDP packets to be parsed as tftp messages, which is useful to see the DATA and ACK packets. They're usually on high ports which don't get matched by udp_print, which by default only handled tftp packets on port 69.
Diffstat (limited to 'usr.sbin/tcpdump/tcpdump.c')
-rw-r--r--usr.sbin/tcpdump/tcpdump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c
index 880e3809398..ed0112f9b70 100644
--- a/usr.sbin/tcpdump/tcpdump.c
+++ b/usr.sbin/tcpdump/tcpdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdump.c,v 1.85 2018/07/06 06:35:46 dlg Exp $ */
+/* $OpenBSD: tcpdump.c,v 1.86 2018/07/06 06:43:19 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -351,6 +351,8 @@ main(int argc, char **argv)
packettype = PT_GRE;
else if (strcasecmp(optarg, "mpls") == 0)
packettype = PT_MPLS;
+ else if (strcasecmp(optarg, "tftp") == 0)
+ packettype = PT_TFTP;
else if (strcasecmp(optarg, "sack") == 0)
/*
* kept for compatibility; DEFAULT_SNAPLEN