]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Rob Braun <[email protected]>: print mode and TFTP options in read
authorguy <guy>
Wed, 19 Feb 2003 08:01:36 +0000 (08:01 +0000)
committerguy <guy>
Wed, 19 Feb 2003 08:01:36 +0000 (08:01 +0000)
and write request packets.

CREDITS
print-tftp.c

diff --git a/CREDITS b/CREDITS
index a6df2dde01a9fab1bc9633d43ab374983b2ef8d7..8b57e18d65e549b641c0b5d19b076a6977ca39fc 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -92,6 +92,7 @@ Additional people who have contributed patches:
        Rafal Maszkowski                <[email protected]>
        Rick Jones                      <[email protected]>
        Rick Watson                     <[email protected]>
+       Rob Braun                       <[email protected]>
        Roderick Schertler              <[email protected]>
        Sami Farin                      <[email protected]>
        Sebastian Krahmer               <[email protected]>
index d09a5ba6ffd2c09a5d8fcd4c37a557fb60edf494..45ec8e95bb56e071b89f1fc68dfc00b9909ea1ba 100644 (file)
@@ -23,7 +23,7 @@
 
 #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)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.34 2003-02-19 08:01:36 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 = strchr(p, '\0')) != NULL) {
+                       if (length <= ((unsigned)p - (unsigned)&tp->th_block))
+                               break;
+                       p++;
+                       if (*p != '\0') {
+                               putchar(' ');
+                               fn_print(p, snapend);
+                       }
+               }
+               
                if (i)
                        goto trunc;
                break;