summaryrefslogtreecommitdiff
path: root/tcpdump.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the new pcap_errtostr() routine, rather than pcap_strerror(), to mapguy2008-04-061-8/+8
| | | | | PCAP_ERROR_ statuses to strings, as pcap_strerror() no longer does that. Also, fix up one error message to include the capture device name.
* Get rid of some debugging code.guy2008-04-041-10/+1
|
* Use the new libpcap API's if available; that means we can support "-B"guy2008-04-041-19/+77
| | | | | on all platforms in that case. Also, add a "-I" flag to turn on monitor mode.
* Say "printing not supported", not just "not supported", for DLT_ valuesguy2008-01-291-3/+3
| | | | | | | for which we don't have a print routine; you *can* use tcpdump to capture traffic with those DLT_ values, as long as you use "-w" so that we don't interpret the contents of the packet, we just blindly write the raw packet data to the capture file.
* Support DLT_IEEE802_11_RADIO_AVS.guy2007-12-201-1/+4
| | | | Update a comment (we now parse the radiotap header).
* ..and don't bother trying to get statistics if we're reading from aguy2007-11-211-2/+7
| | | | | capture file rather than capturing (statistics aren't supported by libpcap when reading from a capture file).
* From Max Laier (via Giorgos Keramidas?): clear "infoprint" ifguy2007-11-211-1/+2
| | | | | pcap_stats() fails, so we don't keep attempting to get statistics and failing.
* Added a temporary "not implemented" version of compress_savefile forgianluca2007-10-131-4/+20
| | | | Windows.
* From Paolo Abeni: print some basic Bluetooth information.guy2007-09-241-1/+4
| | | | | Update CREDITS, FILES, and INSTALL appropriately; clean up changes to Makefile.in to keep the file names in order.
* From Max Laier: check whether the system has <net/pfvar.h> and:guy2007-09-121-2/+2
| | | | | | | | | | | if it does, use that for the pf definitions; if it doesn't, don't compile in pf support; as both OpenBSD and FreeBSD have changed the pf definitions and header format without changing the DLT value, so you can't reliably read pflog-format libpcap files on a machine running an OS version other than the one on which the file was generated.
* From Ben Byer <bushing@sourceforge.net>: add a "-K" flag to suppress theguy2006-05-051-9/+13
| | | | | | checking of TCP checksums. Sort the argument processing code alphabetically.
* from Sebastien Raveau <sebastien.raveau@epita.fr>hannes2006-03-231-23/+79
| | | | | | | 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.
* move the crc10 verification to a new file checksum.c (will add other ↵hannes2006-02-091-1/+2
| | | | checksumming routines later to this file), init shred checksumming tables with init_checksum(), assume network byte order for tag correlation ID in the ATM OAM cell printer
* add support for FRF.16 Multilink Frame-Relay (DLT_MFR)hannes2005-12-131-1/+4
|
* - add the -ttttt timestamp option which prints the time differencehannes2005-12-131-2/+3
| | | | | | (in micro-second resolution) between the first and current packet. - cleanup the the ts_print code a bit -> add a ts_format helper
* We don't need gettimeofday() to just get seconds since January 1, 1970,guy2005-12-051-68/+73
| | | | | | | | midnight GMT; just use time(). We also don't need to flush the standard error right before exiting. Clean up white space.
* from Will Drewry <will AT alum.bu.edu>hannes2005-10-251-1/+3
| | | | fix memleak by freeing the rotated files accordingly
* from Will Drewry <will AT alum.bu.edu>hannes2005-10-201-22/+115
| | | | auto-rotate files after some times given with the G flag;
* add support for DLT_JUNIPER{PPP,ETHER,FRELAY,CHDLC} printershannes2005-08-231-1/+13
|
* Add a flag to suppress the "default_print()" call made in variousguy2005-07-071-1/+4
| | | | | | | | link-layer print routines if no other print routine claimed the packet. Test whether that flag is set rather than testing whether neither of -x or -q were specified, and have -x, -q, *and* -X set that flag, so that -X suppresses it just as -x does. That way you don't get those pckets dumped twice if -X was specified.
* Have "ascii_print()" do the "-A" output, and nothing but the "-A"guy2005-07-061-13/+29
| | | | | | | | | | | | | | output. Have "hex_and_ascii_print_with_offset()" and "hex_and_ascii_print()" to the "-X"-style offset, leaving "hex_print_with_offset()" and "hex_print()" doing the "-x"-style output. Don't have any of them check "xflag", "Xflag", or "Aflag" - they print what they're intended to print, and the caller should check the flags in question. Don't have "-A" set "xflag" or "Xflag". This cleans up some problems with "-A" printing hex informatioin - it's not supposed to.
* Use pcap_dump_ftell() rather than casting a pcap_dumper_t * to a FILE *guy2005-06-031-2/+2
| | | | | | | | | | | and using ftell(); that won't necessarily work on Windows (if libpcap was built with a different version of the C runtime library than tcpdump is), and, even on UN*X, would break if a pcap_dumper_t * were ever made something other than a FILE *. Provide a pcap_dump_ftell() implementation that does that cheating cast for use if libpcap doesn't have it (a pcap_dumper_t * is just a FILE * on those older versions of libpcap).
* add basic support for DLT_JUNIPER_{GGSN,ES,MONITOR,SERVICES}, better ↵hannes2005-05-221-1/+13
| | | | boundary checking when parsing the juniper headers
* add support for DLT_JUNIPER_PPPOE_ATM printerhannes2005-05-121-1/+4
| | | | | replace the JUNIPER_ enums with real DLT_JUNIPER types (does this break environments where an old libpcap is present ?)
* add support for DLT_JUNIPER_PPPOE, fix zero-length cookieshannes2005-05-031-1/+4
|
* refactor the juniper_parse header printer, add juniper FRF.16 dissectorhannes2005-04-201-1/+4
|
* add support for Juniper ML-PPP DLT for printing captureshannes2005-01-271-1/+4
| | | | taken on the Link-Service (LS) and Multi-Link (ML) PICs
* add support for printing Multi-Link Frame Relayhannes2005-01-271-1/+4
| | | | captured on Juniper ML-PIC and LS-PIC cards
* There isn't a "default_print_unaligned" routine, so there's no need forguy2004-12-231-3/+11
| | | | | | | | | | an "ndo_default_print_unaligned" member of the "netdissect_options" structure. There is, however, a need for an "ndo_default_print" routine, which takes a "netdissect_options *" as its first argument, to initialize the "ndo_default_print" member of that structure, as "ND_DEFAULTPRINT()" uses it.
* If libpcap is configured with --enable-optimizer-dbg, it expects dflagguy2004-11-071-2/+3
| | | | | | to be a global supplied by the application using it. In tcpdump, "-d" is a specialized flag, and doesn't apply to packet dissection, so it doesn't belong in the netdissect structure - make it a global again.
* add support for dissecting DLT_JUNIPER_ATM1 (137) and DLT_JUNIPER_ATM2 (135)hannes2004-10-191-1/+7
|
* From Sebastien Vincent <svincent@idems.fr>: fix the handling of "-x" andguy2004-09-041-5/+23
| | | | "-X" so that "-x" prints only hex, not hex and ASCII.
* add ppp support for DLT_PPP_WITHDIRECTION; print direction (hidden under eflag)hannes2004-08-181-1/+4
|
* Get rid of a stray semicolon.guy2004-07-211-4/+4
| | | | | Define "ndo_error()" and "ndo_warning()" as static, to match their forward declarations.
* Catch invalid "-t" counts.guy2004-06-151-3/+12
| | | | Fix up the usage message.
* Make "tflag" count the number of "-t"s, to make it more obvious whatguy2004-06-151-4/+8
| | | | | | | | tflag values correspond to what output formats (e.g., 4 means "-tttt"). Switch on the tflag value to determine whether to call "gmt2local()" to set "thiszone", just as we switch on it to determine the format for time stamps, to make it more obvious in what cases we call it.
* From Raphael Raimbault <raphael.raimbault@netasq.com>: "-tttt" requiresguy2004-06-151-2/+2
| | | | the time zone offset, so get it with "gmt2local()" if "tflag" is -3.
* On most UN*Xes, "uid_t" and "gid_t" are unsigned, and, on someguy2004-04-071-8/+14
| | | | | | | | | | platforms, they're "unsigned long"; use "%lu" to print "pw_uid" and "pw_gid", and cast them to "unsigned long" for the benefit of platforms where they're not "unsigned long". When chrooting and giving up privileges, if a call fails, use "pcap_strerror()" to report the reason why it failed. Add "tcpdump:" to those error messages.
* Fixed a bug that caused "windump" with no parameters not to display therisso2004-04-061-8/+9
| | | | | | | adapter name correctly on win32. Modified some code so that windump retrieves the winpcap lib version with "pcap_lib_version()" on win32. Upgraded the Wpcap_version string to 3.1.
* print-esp has been "NDO"-ized.mcr2004-04-051-5/+46
| | | | | replace error() and warning() with ndo-ized version. moved snaplen/snapend to ndo structure.
* update changes filemcr2004-03-301-43/+39
|
* Use right prereqs for <netinet/if_ether.h> to avoid "autoconf bug!"fenner2004-03-231-1/+7
| | | | | | | error. Check for pcap_if_t in <pcap.h> if we have pcap_findalldevs; MacOS X 10.3.3 ships a newer libpcap which has pcap_findalldevs but an older pcap.h which doesn't have a pcap_if_t.
* From Bruce M. Simpson: add a "-M" flag to specify a shared secret forguy2004-03-231-4/+13
| | | | TCP-MD5 (RFC 2385) digest verification if we have libcrypto.
* Exclude droproot from Win32, since it's not used and it prevents the ↵risso2004-03-191-1/+5
| | | | compilation of tcpdump.c.
* Add support for Apple's IP-over-IEEE 1394 encapsulation.guy2004-03-171-1/+4
|
* Add support for DLT_ value 99, as used by the Axent Raptorguy2004-03-111-1/+4
| | | | | firewall/Symantec Enterprise Firewall. Thanks, Axent/Symantec, for not asking us for a DLT_ value and not telling us about the link-layer type.
* from Pekka Savola <pekkas@netcore.fi>:hannes2004-02-261-3/+5
| | | | - only droproot() if we are root
* from Pekka Savola <pekkas@netcore.fi>:hannes2004-02-251-8/+28
| | | | | - add compile time option WITH_CHROOT - chroot() when dropping privileges
* from Pekka Savola <pekkas@netcore.fi>:hannes2004-02-241-30/+28
| | | | | -drop root privileges earlier -restore the old -Z behaviour
* "dflag" is exported to libpcap if libpcap is compiled with BDEBUG, so weguy2004-01-311-2/+2
| | | | make it non-static.