Commit Graph

101 Commits

Author SHA1 Message Date
guy
8bc6441e1d We now *do* auto-detect Unicode strings, so we no longer check the
USE_UNICODE environment variable.
2004-12-28 22:31:25 +00:00
guy
27fbceed07 Add an example of how to check for TCP packets with a payload, at least
for IPv4.
2004-11-26 00:17:26 +00:00
guy
0a01aca260 Note that comparisons in filter expressions are unsigned, not signed;
the uppermost bit is part of the value, not a sign, and 0x80000000 and
0xffffffff are > 0.
2004-11-08 07:45:05 +00:00
guy
fed6c4f3d5 Show "constant" strings in boldface.
"ethernet" -> "Ethernet".
2004-09-24 01:14:20 +00:00
guy
0fc2ba2720 Reformat the SYNOPSIS section so that nroff doesn't split lines between
an option and its "]".

Fix a typo.
2004-06-12 08:51:23 +00:00
fenner
c0191afced Update pf handling for new DLT_PFLOG (117) as other systems are
starting to adopt it.
Don't bother being backwards compatible to old value (17).
2004-03-28 20:33:27 +00:00
guy
8234cdad9b From Bruce M. Simpson: add a "-M" flag to specify a shared secret for
TCP-MD5 (RFC 2385) digest verification if we have libcrypto.
2004-03-23 07:15:36 +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
ad71414016 from Pekka Savola <pekkas@netcore.fi>:
add a compile time option --with-user=USERNAME that
 drops privileges by default to USERNAME
2004-01-22 09:51:30 +00:00
hannes
b6c8d27c47 from Pekka Savola <pekkas@netcore.fi>:
add infrastructure for dropping root privileges
2004-01-22 09:35:50 +00:00
guy
219cf47b23 Put the when-printing and when-saving-to-a-file descriptions of "-v"
into separate paragraphs.
2004-01-15 19:55:56 +00:00
guy
d88193ac89 From Gisle Vanem:
When saving to a file with "-w", have the "-v" flag make tcpdump
	report, every 10 seconds, the number of packets captured.

	Include <smi.h> if we're building with libsmi, to declare
	"smiInit()" and "smiLoadModule()".
2004-01-15 19:53:48 +00:00
guy
aa890a0ca1 Note that Mac OS X, as one of the BSDs, has SIGINFO; note that
Digital/Tru64 UNIX has it as well (although the tty(7) man page doesn't
mention VSTATUS - stty(1) mentions "status", however, and signal(4)
mentions SIGINFO, and some Tru64->HP-UX transition pages mention SIGINFO
as a feature available in Tru64 but not HP-UX).

Note that on some systems (e.g., Mac OS X), you might have to set your
"status" character as it defaults, on those systems, to "not set".

Get rid of the reference to "traffic(1C)" (it's not referred to in the
man page, and about the only connection it has with tcpdump is that they
both watch network traffic; traffic(1C) is a SunOS 4.x-ism, not present
on other platforms), and add a reference to pfconfig(8) for
Digital/Tru64 (it *is* referred to, in the section of what privileges
you need in order to capture traffic).
2004-01-07 22:50: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
hannes
8f7b7346cd From Gerald Combs <gerald@ethereal.com>:
The change adds left- and right-shift (<< and >>) to the list of
binary operators on the tcpdump man page.  E.g. "tcp[12] >> 4 > 5" will
test for TCP options.  The operators are listed in the '93 Usenix paper,
and appear to have been supported in libpcap since the 0.0 release.
2003-11-23 21:01:50 +00:00
guy
cfe504d07c Fix capitalization of ULTRIX and AppleTalk, as per NetBSD.
Update the date stamp.
2003-11-19 01:59:19 +00:00
guy
b1749baac2 Give it a proper RCS ID. 2003-11-16 09:41:29 +00:00
guy
d1bb11814a Undo the previous checkin - it got rid of two recent changes. 2003-11-16 09:39:21 +00:00
guy
bbc1cfa669 Have the configure script arrange that the Makefile define _U_
appropriately, and that GNUmakefile and the MSVC++ project file define
it apppriately, as we do with libpcap, rather than defining it in
"interface.h".

Undo the rcsid-shuffling and addition of extra #includes, as we no
longer need to arrange that "interface.h" be included before using _U_
in an RCS ID or copyright.
2003-11-16 09:36:07 +00:00
guy
563344d117 Add to the packet counts a count of packets that tcpdump has seen and
processed - people often get confused by the "received by filter" count,
as they might not realize that, in some systems, it counts packets that
were handed to the filter mechanism regardless of whether they pass or,
if they pass, they have yet been read by the application and, on some
other systems, it counts packets that passed the filter but still counts
them in the kernel before they're read by the application.

They're probably mostly interested in the count of packets processed by
tcpdump; the "received by filter" count is probably of interest only if
you want to know how effective your filter is (and even then it's of
interest only if it counts packets handed to the filter rather than
packets that passed the filter).

Give more details on why the "received by filter" count doesn't
necessarily mean what you think it means.
2003-09-16 21:02:51 +00:00
guy
073489bc82 From Bruce M. Simpson <bms@spc.org>: RFC 3561 AODV support. 2003-08-06 06:49:38 +00:00
fenner
d75ee07998 Remove the -a flag. It's nonsensical to apply the local netmask to all
addresses, and has been for a lot of years.
2003-07-31 22:36:43 +00:00
guy
e7b6ee317c Note the existence, in at least some Linux kernels, of capability bits
that could, in theory, let non-root users capture packets, if there were
userland support for giving particular accounts capability bits and
having them set on their login processes when they log in.

Note that Mac OS X is like the other BSDs, in that all you need in order
to capture is read access on the BPF devices.  Note also that on BSDs
with a devfs (which includes Mac OS X), giving a user that access isn't
as easy as running "chown" or "chmod" once.
2003-07-01 21:19:51 +00:00
guy
15cf64c8de Document the "W" and "E" TCP flags for ECN. 2003-07-01 08:14:40 +00:00
guy
98512db448 From Motonori Shindo: allow "-T" to take "tftp" as an argument to force
decoding as TFTP.
2003-05-11 06:01:16 +00:00
itojun
add2bcc72c s/Appletalk/AppleTalk/. NetBSD PR misc/20748 2003-03-31 05:13:35 +00:00
guy
00a4564ef9 Document libpcap support for OpenBSD DLT_PFLOG. 2003-03-11 06:37:26 +00:00
mcr
25efea00b0 changed format of -E argument so that multiple SAs could be described 2003-02-26 18:58:04 +00:00
guy
2de609b4e1 Note that Linux cooked captures support "inbound" and "outbound". 2003-02-14 07:51:12 +00:00
guy
ae5cb8697e As per bug 678506, get rid of the duplicate "tcp-push" in the list of
TCP flags supported in the filter language.
2003-02-04 06:00:36 +00:00
guy
37214e1cda Fix the synopsis to mention -L. 2003-01-16 07:59:45 +00:00
guy
f0ed2cf81f Fix the synopsis - don't mention "-y" twice. 2003-01-16 07:58:26 +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
2a13a72f09 Properly document "-X" - it turns on "-x" for you.
Have "-xx" and "-XX" cause the link-level header to be dumped; don't
make "-e" affect that at all, as the fact that "-x" doesn't dump the
link-level header was documented, with no mention of "-e", at least as
far back as tcpdump 3.4, and scripts might depend on that working even
with "-e".
2002-12-19 05:44:47 +00:00
guy
f5274335d5 Get rid of an extra bogus ".TP". 2002-12-19 05:35:57 +00:00
guy
cfabfb053b Add a new routine "default_print_packet()", which takes a pointer to the
beginning of the raw packet data, the captured length of the raw packet
data, and the length of the link-layer header, and:

	if "-e" was specified, prints all the raw packet data;

	if "-e" was not specified, prints all the raw packet data past
	the link-layer header, if there is any.

Use that routine in all the "xxx_if_print()" routines if "-x" was
specified.

Make "arcnet_encap_print()" static - it's not used outside
"print-arcnet.c".

Add missing info printing code to "atm_if_print()".

Print the packet data in "lane_if_print()", not in "lane_print()", as
"lane_print()" can be called from other "xxx_if_print()" routines, and
those routines will also print the packet data if "-x" was specified -
no need to print it twice.
2002-12-18 09:41:13 +00:00
hannes
9ba918dd2d add BPF_ for misc. IS-IS PDU Types 2002-12-05 23:59:42 +00:00
guy
42c36f0035 Explain how the "-f" flag and the "ip broadcast" expression work, and
that they *don't* work if tcpdump can't get the netmask (and, for "-f",
the address) for the interface on which capture is being done.
2002-09-06 21:42:30 +00:00
guy
d52ff926f5 Make "lane" behave like "vlan", i.e. have it tweak the interpretation
of packet headers so that, in all expressions after it, the tests assume
LANE encapsulation of packets.  (We also assume the emulated LAN is an
Ethernet LAN, rather than a Token Ring LAN.)

Allow ATM tests to be combined with non-ATM tests in expressions, so
that you can do, for example, "lane and icmp".
2002-08-11 18:40:12 +00:00
guy
8e2928b38d Update the modification date.
We no longer treat all packet types as SNAP packets on non-Ethernet
LANs.
2002-08-08 08:48:11 +00:00
guy
01639b9562 Add support for operations that test 802.11 SA or DA fields, and for
"wlan" as an alias for "link".

Clean up the description of the special cases for protocol matching at
the link layer.

Add in some more information about 802.11.
2002-08-08 08:41:56 +00:00
guy
cabea2ee71 Add a missing ".TP". 2002-08-06 04:32:32 +00:00
guy
ed62fdb8f5 Tweak the description of the "-D" flag, add an indication of when "-D"
is useful, and tweak the order of flags in the synopsis.
2002-08-06 04:30:55 +00:00
guy
81cb0eb8b1 Document the "-D" flag and the fact that the numbers printed by that
flag can be used as arguments to the "-i" flag.

Spell ASCII in all caps.
2002-08-05 08:27:07 +00:00
guy
464c44fbd1 Add SunATM support, based on code from Yen Yen Lim at North Dakota State
University.
2002-07-11 09:17:21 +00:00
fenner
3accac7c06 Document that -x prints padding too. 2002-06-24 21:06:23 +00:00
guy
28d617842f Fix a typo. 2002-06-16 21:51:31 +00:00
guy
bcd25f631a Explain, in full painful detail, what you need to do in order to do
*useful* packet capture on Digital/Tru64 UNIX (and add "Tru64 UNIX" to
the list of OS names).
2002-05-17 09:57:50 +00:00
guy
be37dfa462 Fix a formatto. 2002-05-07 04:00:09 +00:00
guy
0283ff899a "-A" flag to print packet data in ASCII, from Jørgen Thomsen
<jth@jth.net>.
2002-04-24 06:55:54 +00:00