Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/tcpdump pull up rev 1.15 from trunk (requested...



details:   https://anonhg.NetBSD.org/src/rev/b31e03c9ccf8
branches:  netbsd-1-4
changeset: 469571:b31e03c9ccf8
user:      cgd <cgd%NetBSD.org@localhost>
date:      Mon Oct 11 05:38:57 1999 +0000

description:
pull up rev 1.15 from trunk (requested by sjg):
  Add telnet option printing and hex/ascii dumps to tcpdump.

diffstat:

 usr.sbin/tcpdump/print-tcp.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 60800f1c08c6 -r b31e03c9ccf8 usr.sbin/tcpdump/print-tcp.c
--- a/usr.sbin/tcpdump/print-tcp.c      Mon Oct 11 05:38:53 1999 +0000
+++ b/usr.sbin/tcpdump/print-tcp.c      Mon Oct 11 05:38:57 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print-tcp.c,v 1.10 1998/12/18 20:28:54 sommerfe Exp $  */
+/*     $NetBSD: print-tcp.c,v 1.10.2.1 1999/10/11 05:38:57 cgd Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
 static const char rcsid[] =
     "@(#) Header: print-tcp.c,v 1.55 97/06/15 13:20:28 leres Exp  (LBL)";
 #else
-__RCSID("$NetBSD: print-tcp.c,v 1.10 1998/12/18 20:28:54 sommerfe Exp $");
+__RCSID("$NetBSD: print-tcp.c,v 1.10.2.1 1999/10/11 05:38:57 cgd Exp $");
 #endif
 #endif
 
@@ -436,6 +436,14 @@
                }
                putchar('>');
        }
+#ifndef TELNET_PORT
+# define TELNET_PORT 23
+#endif
+       if (!qflag && vflag && length > 0
+           && (dport == TELNET_PORT || sport == TELNET_PORT)) {
+               hlen = tp->th_off * 4;  /* restore it */
+               telnet_print((u_char *)tp + hlen, length);
+       }
        return;
 bad:
        fputs("[bad opt]", stdout);



Home | Main Index | Thread Index | Old Index