]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tftp.c
add support for optional AFI, SAFI and MAXPREFL values that
[tcpdump] / print-tftp.c
index d09a5ba6ffd2c09a5d8fcd4c37a557fb60edf494..9d1c064e577c2e3aeb3def0c9dd845dbb8bc2c9e 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.35 2003-05-02 08:45:21 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;