summaryrefslogtreecommitdiff
path: root/tcpdump.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't run past the snapshot length when doing hex/ASCII dumps.Guy Harris2014-10-231-1/+7
|
* Clean up configure check for libsmi.Guy Harris2014-08-311-4/+4
| | | | | | | | | | | | | | | | | First, check for smi.h. If we don't have it, don't check for anything else. If we do have it, check for libsmi containing smiInit. If we don't have it, don't check for anything else. If we do have it, check, with our test program, whether we can use it. If that succeeds, prepend -lsmi to LIBS, and set USE_LIBSMI. Otherwise, don't do either of those. Check, in source, *only* for USE_LIBSMI. If it's set, use libsmi, otherwise don't - don't even include smi.h, even if we happened to have found it, and don't print the libsmi version string.
* add a short option '#', same as long option '--number' (print a packet number)Francois-Xavier Le Bail2014-07-191-7/+6
|
* Add support for FreeBSD capsicum sandboxing.Loganaden Velvindron2014-07-191-1/+135
|
* Allow builds if libpcap doesn't have pcap_set_tstamp_precision().Guy Harris2014-06-251-14/+46
| | | | | | Check for pcap_set_tstamp_precision() in the configure script and, if it's not there, don't include the code that allows time stamp precisions to be set.
* Merge pull request #377 from msekletar/masterGuy Harris2014-06-251-1/+32
|\ | | | | timestamps: make possible to request high precision timestamps
| * Introduce --time-stamp-precisionMichal Sekletar2014-05-141-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A while ago we introduced new API in libpcap which made possible to request time stamps with higher precision (nanoseconds). This commit aims to move things forward and implement missing bits. It introduces new long option --time-stamp-precision. Note that there is no equivalent short option. When used for a live capture tcpdump will ask the kernel for time stamp with desired precision and tcpdump will print fraction part of the time stamp using respective format. We currently support only microsecond and nanosecond precision. In the future we might support even more granular time stamp precision, but we should be fine to support only microseconds and nanoseconds for now. libpcap doesn't provide anything else at the moment anyway. When used in combination with -r/-w options then we obtain time stamps appropriately scaled up or down from libpcap. Also note that distinct magic number is used for savefiles containing nanosecond time stamps.
* | Make the table of long options const.Guy Harris2014-06-201-1/+1
| |
* | Print priv drop msg here too.Wesley Shields2014-06-151-0/+3
| |
* | Make droproot say something when successful.Wesley Shields2014-06-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | I've seen people run into situations where they were using a command like this: tcpdump -i eth0 -G 500 -w /root/%H%M%S.pcap The first file would be created successfully but the second file would not because their version of tcpdump was dropping privs. It was unclear to them that this was going on and was causing confusion. At least with this message in there it should become more evident that privs are being altered and aid in debugging these kinds of problems.
* | tcpdump.c: error message must use stderrFrancois-Xavier Le Bail2014-05-171-1/+1
|/
* Squelch warnings on OS X.Guy Harris2014-05-071-0/+2
|
* also tell OpenSSL and libsmi versionsGisle Vanem2014-05-071-0/+12
|
* Add --version to the usage message.Guy Harris2014-05-061-2/+2
|
* Add a --version option, to print just version information.Guy Harris2014-05-061-12/+28
| | | | | | | Also, use #defines starting at 128 (outside the ASCII range) for long options having no short-option equivalent, and have -h/--help exit with an exit status of 0 (you just asked for usage information, and you got it - no fault, no error).
* Print an optional packet number in the beginning of lineFrancois-Xavier Le Bail2014-05-061-1/+10
| | | | The new option is '--number'.
* Include <errno.h> on both Windows and UN*X.Guy Harris2014-05-041-1/+0
| | | | | | | We need <errno.h> on UN*X in some files that include tcpdump-stdinc.h, such as missing/inet_pton.c. Remove includes of <errno.h> from files that include tcpdump-stdinc.h.
* Add some long options.Guy Harris2014-05-021-69/+63
| | | | | | | | | Currently, they're all aliases for existing short options, but we're out of letters, so we'll be adding some that won't have short options. This means we can't have entries in the options table corresponding to short options with no long options, as an entry in the long options table with a null option name terminates the table.
* Sort options and put in notes for unusable option letters.Guy Harris2014-05-011-2/+20
| | | | | | Sort the options alphabetically, and put in comments for the options we're *currently* not using, to note that other versions of tcpdump use them and that we should only use them for the same purposes.
* Rename our getopt.h to getopt_long.h.Guy Harris2014-05-011-1/+1
| | | | | That way, if we *do* have getopt_long(), we don't end up including our getopt.h rather than the system's getopt.h.
* Use getopt_long().Guy Harris2014-04-301-2/+70
| | | | | | | | | | | This requires us to check for it in the configure script and to include a version of getopt_long() for the benefit of platforms that don't have it; we pick up the FreeBSD version and tweak it a bit (eliminating some features specific to the BSD version of getopt_long(), as we want to use it only in a fashion portable to Linux/*BSD/Solaris/etc.) We also get rid of the version of getopt() we supply for Windows in favor of the version of getopt_long() we provide.
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-1/+1
| | | | | | | | Have them take a netdissect_options * argument, and get the "no name resolution" flag from it. Move the declaration of dnaddr_string to addrtoname.h, along with the other XXX-to-string routines.
* NDOize some generic codeDenis Ovsienko2014-04-031-1/+1
|
* improve previous NDO conversionsDenis Ovsienko2014-04-031-2/+2
|
* NDOize LLDP, PPP and RSVP decodersDenis Ovsienko2014-04-021-10/+10
|
* NDOize IEEE 802.11 decoderDenis Ovsienko2014-03-311-12/+12
|
* Handle DLT_PKTAP captures from OS X on non-OS X machines.Guy Harris2014-03-301-0/+24
|
* Add support for Apple's DLT_PKTAP.Guy Harris2014-03-301-0/+3
|
* NDOize Juniper DLT decodersDenis Ovsienko2014-03-291-45/+45
|
* NDOize AppleTalk, CDP and Kerberos decodersDenis Ovsienko2014-03-281-3/+3
|
* NDOize 7 more small decodersDenis Ovsienko2014-03-211-7/+7
| | | | | This change converts DVMRP, DLT_ENC, EGP, GeoNet, NetFlow, SLIP and TFTP decoders.
* NDOize ATM, MPTCP, NTP, VTP & Whiteboard decodersDenis Ovsienko2014-03-201-4/+4
|
* NDOize Frame Relay, LMP and RADIUS decodersDenis Ovsienko2014-03-181-9/+9
|
* NDOize DCCP, Linux socket and RPKI-Router decodersDenis Ovsienko2014-03-141-3/+3
|
* NDOize FDDI, MPCP, Token Ring, VQP and Zephyr decodersDenis Ovsienko2014-03-141-2/+2
|
* NDOize 8 more small decodersDenis Ovsienko2014-03-131-6/+6
| | | | | This change converts ZeroMQ, IPX, MPLS, IPv6 options, PPPoE, RIPng, PFLOG and Sun RPC decoders.
* NDOize print-ascii.c furtherDenis Ovsienko2014-03-131-4/+4
| | | | | Introduce netdissect_options into hex_and_ascii_print_with_offset(), hex_and_ascii_print() and related functions.
* NDOize more small decodersDenis Ovsienko2014-03-121-24/+24
| | | | | This change converts decoders for: DLT_RAW, IPv6 routing header, USB, Symantec firewall and cHDLC.
* NDOize ARCNET, BFD and GRE decodersDenis Ovsienko2014-03-111-4/+4
|
* NDOize 5 more decodersDenis Ovsienko2014-03-071-9/+9
| | | | | Update Apple's IP over IEEE1394, Bluetooth, CALM/FAST, IPv6 fragments and LAN emulation decoders. Remove some stray passages while at it.
* NDOize IP mobile, MSDP and NULL decodersDenis Ovsienko2014-03-061-4/+4
|
* issues/286: get rid of Useless "no IPv4 address assigned" warningMichael Richardson2014-03-041-8/+7
|
* NDOize CIP, IPComp and IPFC decodersDenis Ovsienko2014-02-281-9/+9
| | | | Also remove some unneeded includes while at it.
* Use the new libpcap <pcap/nflog.h> for NFLOG definitions and declarations.Guy Harris2014-02-021-1/+1
| | | | | | | | | | Use the header file for information about LINKTYPE_NFLOG files. Don't build the NFLOG printer if we don't have that header file. Fix some checks for pcap/XXX.h header files to look for "tcpdump-stdinc.h" rather than <tcpdump-stdinc.h>, so that we don't fail to find that header.
* refine option parsing a bitGisle Vanem2014-01-151-29/+35
| | | | | My wish is to put minimal code inside the getopt() switch. So I've added a Dflag for option '-D' and a new function show_devices_and_exit().
* fixup status_flags[]Denis Ovsienko2014-01-131-8/+13
| | | | | | Add guards to fix building against older libpcap versions (PCAP_IF_UP and PCAP_IF_RUNNING belong to the latest libpcap only). Add a terminating element to the array. Justify some indentation.
* Added bittok2str().Dario Lombardo2014-01-121-8/+6
|
* Improved output of -DDario Lombardo2014-01-111-1/+11
|
* reset the counter after a -G rollover (GH #352)zolf2014-01-101-0/+7
| | | | | | when -G -C is used the filename counter continued. Changed the behaviour so that when -G is rolled over to the next file the Cflag-counter is reset to 0 so that the filenames will restart counting.
* make Win32 version strings git-relatedDenis Ovsienko2014-01-031-3/+3
|