From f815ae37f4671c581fdc1c6f99a8490a6dfbb4f6 Mon Sep 17 00:00:00 2001 From: fenner Date: Mon, 23 Jul 2001 23:15:13 +0000 Subject: Virgin import of tcpdump.org tcpdump v3.6.3 --- contrib/tcpdump/CREDITS | 1 + contrib/tcpdump/README | 8 ++++---- contrib/tcpdump/VERSION | 2 +- contrib/tcpdump/print-domain.c | 3 ++- contrib/tcpdump/print-rx.c | 28 ++++++++++++++++++---------- contrib/tcpdump/print-smb.c | 2 +- contrib/tcpdump/tcpdump.1 | 9 ++++++++- 7 files changed, 35 insertions(+), 18 deletions(-) (limited to 'contrib/tcpdump') diff --git a/contrib/tcpdump/CREDITS b/contrib/tcpdump/CREDITS index 3538157..e53d689 100644 --- a/contrib/tcpdump/CREDITS +++ b/contrib/tcpdump/CREDITS @@ -26,6 +26,7 @@ Additional people who have contributed patches: JINMEI Tatuya Jefferson Ogata Jeffrey Hutzelman + Jim Hutchins Juergen Schoenwaelder Ken Hornstein Kevin Steves diff --git a/contrib/tcpdump/README b/contrib/tcpdump/README index 03fe3cf..6d52e1f 100644 --- a/contrib/tcpdump/README +++ b/contrib/tcpdump/README @@ -1,6 +1,6 @@ -@(#) $Header: /tcpdump/master/tcpdump/README,v 1.58 2000/12/08 06:59:11 mcr Exp $ (LBL) +@(#) $Header: /tcpdump/master/tcpdump/README,v 1.58.2.1 2001/04/11 05:27:42 guy Exp $ (LBL) -TCPDUMP 3.6 +TCPDUMP 3.6.2 Now maintained by "The Tcpdump Group" See www.tcpdump.org @@ -11,8 +11,8 @@ Anonymous CVS is available via: (password "anoncvs") cvs -d cvs.tcpdump.org:/tcpdump/master checkout tcpdump -Version 3.6 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_6": - cvs -d cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_6 tcpdump +Version 3.6.2 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_6rel2": + cvs -d cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_6rel2 tcpdump Please send patches against the master copy to patches@tcpdump.org. diff --git a/contrib/tcpdump/VERSION b/contrib/tcpdump/VERSION index d70c8f8..4a788a0 100644 --- a/contrib/tcpdump/VERSION +++ b/contrib/tcpdump/VERSION @@ -1 +1 @@ -3.6 +3.6.3 diff --git a/contrib/tcpdump/print-domain.c b/contrib/tcpdump/print-domain.c index 77da8df..77140c4 100644 --- a/contrib/tcpdump/print-domain.c +++ b/contrib/tcpdump/print-domain.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.64 2001/01/02 23:24:51 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.64.2.1 2001/02/21 09:01:20 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -555,6 +555,7 @@ ns_print(register const u_char *bp, u_int length) register const u_char *cp = NULL; np = (const HEADER *)bp; + TCHECK(*np); /* get the byte-order right */ qdcount = ntohs(np->qdcount); ancount = ntohs(np->ancount); diff --git a/contrib/tcpdump/print-rx.c b/contrib/tcpdump/print-rx.c index aa36124..af3cf1b 100644 --- a/contrib/tcpdump/print-rx.c +++ b/contrib/tcpdump/print-rx.c @@ -13,7 +13,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.20 2001/01/10 08:12:01 fenner Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.20.2.1 2001/07/09 01:40:59 fenner Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -635,14 +635,16 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport, printf(" fid %d/%d/%d", (int) n1, (int) n2, (int) n3); \ } -#define STROUT(MAX) { int i; \ +#define STROUT(MAX) { unsigned int i; \ TCHECK2(bp[0], sizeof(int32_t)); \ - i = (int) EXTRACT_32BITS(bp); \ + i = EXTRACT_32BITS(bp); \ + if (i > MAX) \ + goto trunc; \ bp += sizeof(int32_t); \ - TCHECK2(bp[0], i); \ - strncpy(s, (char *) bp, min(MAX, i)); \ - s[i] = '\0'; \ - printf(" \"%s\"", s); \ + printf(" \""); \ + if (fn_printn(bp, i, snapend)) \ + goto trunc; \ + printf("\""); \ bp += ((i + sizeof(int32_t) - 1) / sizeof(int32_t)) * sizeof(int32_t); \ } @@ -727,7 +729,9 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport, bp += sizeof(int32_t); \ } \ s[MAX] = '\0'; \ - printf(" \"%s\"", s); \ + printf(" \""); \ + fn_print(s, NULL); \ + printf("\""); \ } static void @@ -1087,7 +1091,9 @@ acl_print(u_char *s, int maxsize, u_char *end) if (sscanf((char *) s, "%s %d\n%n", user, &acl, &n) != 2) goto finish; s += n; - printf(" +{%s ", user); + printf(" +{"); + fn_print(user, NULL); + printf(" "); ACLOUT(acl); printf("}"); if (s > end) @@ -1098,7 +1104,9 @@ acl_print(u_char *s, int maxsize, u_char *end) if (sscanf((char *) s, "%s %d\n%n", user, &acl, &n) != 2) goto finish; s += n; - printf(" -{%s ", user); + printf(" -{"); + fn_print(user, NULL); + printf(" "); ACLOUT(acl); printf("}"); if (s > end) diff --git a/contrib/tcpdump/print-smb.c b/contrib/tcpdump/print-smb.c index 85783f9..e5a3da5 100644 --- a/contrib/tcpdump/print-smb.c +++ b/contrib/tcpdump/print-smb.c @@ -893,7 +893,7 @@ void nbt_udp137_print(const uchar *data, int length) p += 2; } } else { - print_data(p, min(rdlen, length - ((const uchar *)p - data))); + print_data(p,rdlen); p += rdlen; } } diff --git a/contrib/tcpdump/tcpdump.1 b/contrib/tcpdump/tcpdump.1 index e639407..41f823a 100644 --- a/contrib/tcpdump/tcpdump.1 +++ b/contrib/tcpdump/tcpdump.1 @@ -1,4 +1,4 @@ -.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.92.2.2 2001/01/18 04:38:31 guy Exp $ (LBL) +.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.92.2.3 2001/03/04 00:19:48 guy Exp $ (LBL) .\" .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997 .\" The Regents of the University of California. All rights reserved. @@ -248,6 +248,13 @@ Print absolute, rather than relative, TCP sequence numbers. .B \-tt Print an unformatted timestamp on each dump line. .TP +.B \-ttt +Print a delta (in micro-seconds) between current and previous line +on each dump line. +.TP +.B \-tttt +Print a timestamp in default format proceeded by date on each dump line. +.TP .B \-v (Slightly more) verbose output. For example, the time to live, identification, total length and options in an IP packet are printed. -- cgit v1.1