From Rob Braun <bbraun@synack.net>: print mode and TFTP options in read

and write request packets.
This commit is contained in:
guy 2003-02-19 08:01:36 +00:00
parent 2de609b4e1
commit c2f8796261
2 changed files with 14 additions and 1 deletions

View File

@ -92,6 +92,7 @@ Additional people who have contributed patches:
Rafal Maszkowski <rzm@icm.edu.pl>
Rick Jones <raj@cup.hp.com>
Rick Watson <watsonrick@users.sourceforge.net>
Rob Braun <bbraun@synack.net>
Roderick Schertler <roderick@argon.org>
Sami Farin <safari@iki.fi>
Sebastian Krahmer <krahmer@cs.uni-potsdam.de>

View 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;