mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
From Rob Braun <bbraun@synack.net>: print mode and TFTP options in read
and write request packets.
This commit is contained in:
parent
2de609b4e1
commit
c2f8796261
1
CREDITS
1
CREDITS
@ -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>
|
||||
|
14
print-tftp.c
14
print-tftp.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user