]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Motonori Shindo: allow "-T" to take "tftp" as an argument to force
authorguy <guy>
Sun, 11 May 2003 06:01:16 +0000 (06:01 +0000)
committerguy <guy>
Sun, 11 May 2003 06:01:16 +0000 (06:01 +0000)
decoding as TFTP.

interface.h
print-udp.c
tcpdump.1
tcpdump.c

index 535cbe7a366b5e4b161e700b22021a36058f33ae..a9c9d2ea5d5aa87b778ca4935f58757b68c10ab7 100644 (file)
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.210 2003-05-08 15:05:42 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.211 2003-05-11 06:01:16 guy Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -94,6 +94,7 @@ extern int packettype;                /* as specified by -T */
 #define PT_RTCP                5       /* Real-Time Applications control protocol */
 #define PT_SNMP                6       /* Simple Network Management Protocol */
 #define PT_CNFP                7       /* Cisco NetFlow protocol */
+#define PT_TFTP                8       /* trivial file transfer protocol */
 
 #ifndef min
 #define min(a,b) ((a)>(b)?(b):(a))
index 7f6cc847ebee2105fdea3542623938ccd435db66..166eca3a304b1b61ccd4b2eb19e76084e82bf570 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.116 2003-05-08 15:05:42 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.117 2003-05-11 06:01:17 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -530,6 +530,11 @@ udp_print(register const u_char *bp, u_int length,
                        udpipaddr_print(ip, sport, dport);
                        cnfp_print(cp, (const u_char *)ip);
                        break;
+
+               case PT_TFTP:
+                       udpipaddr_print(ip, sport, dport);
+                       tftp_print(cp, length);
+                       break;
                }
                return;
        }
index d2e299e6411a4698c7ec65494d3f57488ac824e2..e5a0eddf9cdf1be18f442751de9743db150b8b5e 100644 (file)
--- a/tcpdump.1
+++ b/tcpdump.1
@@ -421,6 +421,7 @@ Currently known types are
 \fBrtp\fR (Real-Time Applications protocol),
 \fBrtcp\fR (Real-Time Applications control protocol),
 \fBsnmp\fR (Simple Network Management Protocol),
+\fBtftp\fR (Trivial File Transfer Protocol),
 \fBvat\fR (Visual Audio Tool),
 and
 \fBwb\fR (distributed White Board).
index acf449adedf16c6218d975ffbb4e04095624754d..1a6f27519d494f976cf6542edf1f971107e68f3e 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.205 2003-05-02 08:46:28 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.206 2003-05-11 06:01:17 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -542,6 +542,8 @@ main(int argc, char **argv)
                                packettype = PT_SNMP;
                        else if (strcasecmp(optarg, "cnfp") == 0)
                                packettype = PT_CNFP;
+                       else if (strcasecmp(optarg, "tftp") == 0)
+                               packettype = PT_TFTP;
                        else
                                error("unknown packet type `%s'", optarg);
                        break;