Commit Graph

120 Commits

Author SHA1 Message Date
hannes
3472526186 from Gerrit Renker <gerrit@erg.abdn.ac.uk>:
remove duplicate code for v6 checksum calculation
unify the output for broken checksums
2006-11-02 08:56:16 +00:00
hannes
165d8db403 bugfix from Aaron Campbel <aaron@arbor.net>:
The expression (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA) will always evaluate to 1.
2006-10-06 06:25:06 +00:00
guy
8664efb791 From Don Ebright: some compilers, such as the AIX compiler, reject a
comma at the end of the last member of an enum (the C language spec
doesn't say it's valid to have one there).
2006-05-12 01:45:19 +00:00
guy
90c94a8265 From Ben Byer <bushing@sourceforge.net>: add a "-K" flag to suppress the
checking of TCP checksums.

Sort the argument processing code alphabetically.
2006-05-05 23:13:00 +00:00
guy
c245819b11 From Wesley Griffin <wgriffin@users.sourceforge.net>: update the list of
DNS RR typecodes.
2006-04-07 08:47:34 +00:00
hannes
d047be29f9 from Sebastien Raveau <sebastien.raveau@epita.fr>
add support for the the post-rotate -z flag (to be used in
  conjunction with -C or -G) which can be used to specify a command tcpdump
  should execute on each savefile after it's been rotated
  for example to compress a capture file.
2006-03-23 17:33:01 +00:00
hannes
6b3e20d291 courtesy rick cheng (rcheng AT juniper dot net):
improve code readability:
  - LDP_TLV_ADDRESS_LIST printer
  - BFD_DISCRIMINATOR printer
2006-02-03 08:32:39 +00:00
hannes
614d9bbd7f add Andrea Bittau to blamelist for co-authorship on print-dccp.c v1.3 2005-11-04 00:57:28 +00:00
hannes
92218d769e from Will Drewry <will AT alum.bu.edu>
auto-rotate files after some times given with the G flag;
2005-10-20 07:43:51 +00:00
guy
02c692dc72 From Markus Schoepflin: don't use "struct in6_addr" if INET6 isn't
defined, because, in that case, "struct in6_addr" probably isn't
defined, either.

Check for too-large bit lengths in TLVs.
2005-10-16 08:17:51 +00:00
guy
385cd8601b From David Smith: let the path for the crypto headers and libraries be
set explicitly by setting Xprefix as an environment variable, for use
when cross-compiling.
2005-09-21 16:47:59 +00:00
guy
ffb65cf04f Also give Yoshifumi Nishida credit for the DCCP printer. 2005-09-20 07:01:16 +00:00
guy
1c902dcdf3 From Ian McDonald and Arnaldo Carvalho de Melo: DCCP support. 2005-09-20 06:01:20 +00:00
guy
167c740563 From Michael Shields <shields@msrl.com> via Roman Francoise: spelling
fixes.
2005-09-05 09:29:00 +00:00
hannes
a5370b71fe from Andy Heffernan <ahh@juniper.net>:
add PGM upport as per rfc3208
2005-05-20 21:02:29 +00:00
guy
b54ff914a1 From Manu Pathak: add support for LMP Service Discovery extensions
(defined in the UNI 1.0 spec).
2005-05-19 06:39:59 +00:00
guy
9f529d7c77 From Noritoshi Demizu <demizu@users.sourceforge.net>: don't print "sack"
twice.
2005-04-18 00:22:39 +00:00
hannes
c8623960f0 from Rick Jones <rick.jones2@hp.com>:
suppress the IP printers "bad-len" error message in case
  TSO (TCP segment offload) is enabled
2005-01-21 08:02:06 +00:00
hannes
43e8ce0038 add Nicolas Ferrero <toorop@babylo.net> 2005-01-12 11:31:06 +00:00
hannes
8ecf32cbe2 from Hannes Viertel <hviertel@juniper.net>: fix ipv6 #ifdefs 2004-11-11 12:02:30 +00:00
hannes
f3fce4b301 add David Young to the maintainers list 2004-09-24 22:42:42 +00:00
guy
62e97d4394 From Sebastien Vincent <svincent@idems.fr>: fix the handling of "-x" and
"-X" so that "-x" prints only hex, not hex and ASCII.
2004-09-04 00:08:03 +00:00
guy
0b18136512 From Andrew Church <andrew@users.sourceforge.net>: when testing for
"pcap_version", "pcap_debug", and "yydebug", don't add our own functions
referring to those variables - GCC 3.4.1 optimizes the test code out
before the link is done, as it's in a function that's not called.
2004-08-27 07:17:03 +00:00
guy
6c02156d08 From Eddie Kohler <xexd@sourceforge.net>: In "ip_finddst()":
quit as soon as we see IPOPT_EOL;

	*don't* quit as soon as we see IPOPT_NOP, just advance to the
	next option, if any;

	implement "quit" as "return the destination address from the IP
	header rather than as "return 0".

Also, return the IP header destination address if we see a
source-routing option with a too-short length.
2004-06-25 01:20:08 +00:00
guy
010fcafbc5 From Shinsuke Suzuki <suz@kame.net>: a patch to sync ICMPv6-Type number
with the current IANA assignment (Apr 13 2004).  It consists of the
following four parts:

	- added inverse-neighbor-discovery (RFC3122)
	- shift MTRACE-related type numbers, since it collides
	  with inverse-neighbor-discovery.
	- added MLDv2 (draft-vida-mld-v2-08.txt)
	- shifted Mobile-IPv6 numbers from interim value to the
	  official one. (draft-ietf-mobile-ipv6-24.txt)
2004-06-16 00:06:28 +00:00
guy
5f952fca9a From Raphael Raimbault <raphael.raimbault@netasq.com>: "-tttt" requires
the time zone offset, so get it with "gmt2local()" if "tflag" is -3.
2004-06-15 00:00:04 +00:00
guy
0c6a6e2ada From Steinar Haug <sthaug@nethelp.no>: put declarations inside a
function before all executable statements.

Clean up white space.
2004-05-26 19:57:57 +00:00
guy
c33a30afde From Francis Dupont: ESP decryption should not be performed on the
authentication trailer.
2004-04-10 08:41:22 +00:00
guy
47f4b1423b From Chris Cogdon <chris@cogdon.org>:
Fix a segfault with the -C option when the number of files grows
	to 1000.  Limit has been increased to 1,000,000, and the code
	will check for exceeding this.

	Also, add a -W option which will limit the number of files
	created before 'wrapping around' and writing to the first file
	again, creating a 'loop tape'.  Very useful if you want to have
	this running permanently to capture traffic up to a irregular
	event.

	Change the way that output files with -C are numbered.  -C alone
	goes <none>, 1, 2, 3....  -C with -W will number 0, 1, 2 ...  or
	00, 01, 02 ...  etc, depending on the value of -W.  I.e., it
	sorts properly.  (Old behaviour was to go <none>, 2, 3...)

Close the current capture file before trying to allocate the buffer for
the new file's name, so that if that allocation fails we've at least
written out all of the previous file.

Make some variables for command-line arguments, and some functions not
used outside tcpdump.c, static.
2004-01-26 02:05:17 +00:00
hannes
e0d20f2c08 bugfix from Jonathan Heusser <jonny@drugphish.ch>
The first critical piece of code is found in print-isakmp.c:332. The
  function rawprint() does not check its arguments thus it's easy for
  an attacker to pass a big 'len' or a bogus 'loc' leading to a
  segmentation fault in the for loop.

  The second bug is located in print-radius.c:471. The for loop of
  print_attr_string() is written in an unsafe manner. 'length'
  and 'data' should be checked.
2004-01-07 08:00:51 +00:00
guy
def0866994 From Albert Chin <china@thewrittenword.com>:
propagate CPPFLAGS to Makefile.in;

	move the CPPFLAGS and V_INCLS change to the end of the configure
	run so users don't see "-I$(srcdir)/missing" in their config.log
	output.
2003-12-15 02:12:40 +00:00
guy
58e719c622 Update the date stamp on the tcpdump man page, and add Gerald to the
list of contributors, for his man page update.
2003-11-23 23:42:16 +00:00
guy
ea8077fb78 From Brian Ginsbach: add the Cray NV1 CPU to the list of CPUs that don't
support unaligned accesses.
2003-11-16 10:13:34 +00:00
mcr
78d1d17368 removed people who shouldn't be bugged since they aren't
actively committing code now.
2003-11-13 03:14:55 +00:00
guy
2b8d32af12 Put in the entry for Scott Rose:
The test for DNS message dnssec bit flags in the query and
	response are backwards.  The CD bit has meaning in a query, and
	the AD bit has meaning in a response.
2003-11-04 01:43:20 +00:00
hannes
9c2395aa1d bug report [plus partial patch] from Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es
-parse TE-TLVs until the ls_length field is zero
  -print router-ID TLV
2003-10-20 16:11:45 +00:00
guy
dc3034d63d From Krzysztof Halasa <khc@pm.waw.pl>:
1. Unused things (mbuf, rtentry) have been removed.

2. I've dropped FR_CR_BIT etc. definitions as they have only meaning in
   specific location in Q.922 address. FR_EA_BIT is still there as it's
   used by all Q.922 bytes.

3. a new parse_q922_addr() parses the whole Q.922 address structure
   and produces DLCI, Q.922 byte count and flags in ASCII. While I can't
   test 3- and 4-byte Q.922 addresses (using only default 2-byte ones),
   they are supported.

4. I've trimmed comments regarding HDLC flags and CRC/FCS bytes in FR
   packet. They are wire-only things and as such are never seen by
   libpcap/tcpdump.

5. Changed NLPID_LMI into NLPID_CISCO_LMI and NLPID_Q933 into NLPID_LMI
   (the latter is used by both ANSI (T1.617 annex D) and CCITT (Q.933
   annex A) LMI).

6. fr_hdrlen() now correctly returns FR header length (4 - 6 bytes,
   7 bytes with 4-byte Q.922 and incorrectly used pad byte).

7. I've changed output text formatting: "xxx-value-yyy-value" into
   "xxx value, yyy value", to be consistent with Ethernet.
   Not sure if it's correct.

8. added IPv6 support

9. q933_print() now reads lmi_print()

10. CCITT (Q.933 annex A) LMI is now supported, and both CCITT and ANSI
    fields are now correctly displayed

10. lmi_print() no longer prints constant fields (such as always zeroed
    Q.922 C/R bit or LMI Call Reference byte) unless they are set
    incorrectly.

11. I've added ANSI_ and CCITT_ prefixes to appropriate #defines.

12. a new parse_dlci_el() should handle all (10, 16 and 23-bit)
    DLCIs correctly (corresponding to 2, 3 and 4-byte Q.922 addresses,
    respectively).
2003-10-16 09:50:36 +00:00
guy
073489bc82 From Bruce M. Simpson <bms@spc.org>: RFC 3561 AODV support. 2003-08-06 06:49:38 +00:00
guy
14e71ce55a From Mark Ellzey Thomas <mark@ackers.net>: check the length of a data
chunk before printing it.
2003-08-06 05:02:12 +00:00
guy
d7f08878cb From Jesper Peterson <jesper@endace.com>: catch SIGPIPE and clean up, so
that if tcpdump is being piped to some other program, and that program
exits before tcpdump does, tcpdump will cleanly exit, so that libpcap
can cleanly close devices (such as Endace's DAG cards).
2003-07-30 05:51:40 +00:00
hannes
b2406c50ca from Greg Stark <gsstark[AT]mit.edu>:
honor the payload length in PPPoE frames to match actual
BRAS and client behaviour
2003-06-13 05:55:21 +00:00
guy
13137dd548 Based on a patch from Michele "mydecay" Marchetto <smarchetto1@tin.it>:
check the header length to make sure it's at least the minimum length,
so we don't, for example, go into an infinite loop if the header length
is 0.

Get rid of some blank lines at the end of the file.
2003-06-03 23:23:50 +00:00
guy
f3fa4cfd2d From Paul Mundt <lethal@linux-sh.org>: add SuperH to the list of CPUs
where we wire in the idea that it can't handle unaligned accesses.  (I
don't know why the test program doesn't work - but perhaps the test
program is the wrong answer anyway, as it doesn't work when
cross-compiling.)
2003-03-28 08:36:34 +00:00
guy
bb9f862575 From Hank Leininger <tcpdump-workers@progressive-comp.com>: fix a typo. 2003-03-22 06:30:39 +00:00
guy
c2f8796261 From Rob Braun <bbraun@synack.net>: print mode and TFTP options in read
and write request packets.
2003-02-19 08:01:36 +00:00
guy
49e3507eb3 From Gisle Vanem <giva@bgnett.no>:
open the file containing a filter expression in binary mode, so
	that we get all the characters that "fstat()" claims are there,
	rather than having CRs stripped out (causing us to report an
	error because the "read()" call gives us less data than
	"fstat()" claims was in the file);

	close the file descriptor once we're finished reading the file;

	strip out everything on a line starting with "#", so that "#"
	can be used for to-end-of-line comments in the file.

Update his address in the CREDITS file.
2003-02-08 19:31:59 +00:00
guy
ad06a893cf From Peter Fales <peter@fales-lorenz.net>: add support for
DLT_ARCNET_LINUX.

Also handle IPX-over-ARCNET.
2003-01-23 09:05:37 +00:00
guy
8b4a9e519e From David Binderman <d.binderman@virgin.net>, in a Red Hat Bugzilla
entry for tcpdump: initialize "optlen" so as to eliminate a compiler
warning.
2003-01-10 08:11:00 +00:00
guy
b8e2c3bead From Andrew Brown <atatat@atatdot.net>: add a "-U" flag, which causes
the output stream for "-w" to be flushed after each packet is dumped.

Add checks for "pcap_dump_flush()", and only enable the "-U" flag if
it's present.  Clean up the handling of the "getopt()" argument and the
usage message to get rid of the pile of #ifdefs.

Add documentation for the "-L" and "-y" flags.

Tweak the description of "-r" to properly format "-w" in the text.
2002-12-22 00:15:26 +00:00
guy
6076158547 NetBSD support for multiple data link types on an interface, from David
Young <dyoung@ojctech.com>, with some minor changes by Jason R. Thorpe
<thorpej@netbsd.org>, and further changes by me to:

	use "-y" rather than "-D" to set the link type ("-D" was already
	taken);

	use libpcap APIs to map between data link type names and values;

	supply stub versions of missing-but-needed libpcap APIs.

Update Jason Thorpe's e-mail address (Zembu is going away, if it hasn't
done so already).
2002-12-19 09:27:54 +00:00