]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tftp.c
add tracefiles for infinite loop testing
[tcpdump] / print-tftp.c
index d09a5ba6ffd2c09a5d8fcd4c37a557fb60edf494..e9ab4a7c11fc30dba1a81286d25050eced462545 100644 (file)
@@ -22,8 +22,8 @@
  */
 
 #ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.33 2002-12-11 07:14:09 guy Exp $ (LBL)";
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.35.2.2 2003-11-16 08:51:50 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -109,6 +109,18 @@ tftp_print(register const u_char *bp, u_int length)
                fputs(" \"", stdout);
                i = fn_print(p, snapend);
                putchar('"');
+
+               /* Print the mode and any options */
+               while ((p = (const u_char *)strchr((const char *)p, '\0')) != NULL) {
+                       if (length <= (u_int)(p - (const u_char *)&tp->th_block))
+                               break;
+                       p++;
+                       if (*p != '\0') {
+                               putchar(' ');
+                               fn_print(p, snapend);
+                       }
+               }
+               
                if (i)
                        goto trunc;
                break;