aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-25In cap_pipe_open_live(), be sure to call ws_close(fd) before returning due ↵Chris Maynard1-0/+2
to a couple of error condtions. Fixes Coverity CID 702395 Resource leak. svn path=/trunk/; revision=42844
2012-05-18Expand a comment.Guy Harris1-2/+12
Clear the struct sigaction *before* we fill in any fields in it. svn path=/trunk/; revision=42706
2012-05-16Fix a bunch of uninitialized variables found by Coverity Scan. CIDsGerald Combs1-0/+1
702403, 702404, 702405, 702406, 702407, 702408, 702409, 702410, 702411, and 702412. svn path=/trunk/; revision=42658
2012-05-07From Evan Huus:Bill Meier1-19/+22
In get_capture_device_open_failure_messages() in dumpcap.c, there are some statements that should have been guarded by ifdefs, causing a little unnecessary work on some platforms, and a bunch of unused-variable warnings from static analyzers. The patch fixes the problem. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7228 svn path=/trunk/; revision=42454
2012-04-25Set also the pcap buffer, if the default of 1 MB is used. This bug wasMichael Tüxen1-1/+1
reported by Guy. svn path=/trunk/; revision=42246
2012-04-25Report the packets captured and the packets dropped (either by libpcap or by ↵Michael Tüxen1-3/+3
dumpcap). svn path=/trunk/; revision=42245
2012-04-25Allow writing ISB with given recv/drop counters.Michael Tüxen1-1/+12
No functional change by this commit. svn path=/trunk/; revision=42242
2012-04-25Fix the packet counters.Michael Tüxen1-2/+3
This fixes the inconsistencies reported on the command line by dumpcap as indicated by https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7191 svn path=/trunk/; revision=42236
2012-04-25Fix locking problem.Michael Tüxen1-0/+1
svn path=/trunk/; revision=42235
2012-04-14From Evan Huus: add a missing free. Fixes bug 7092.Guy Harris1-0/+1
svn path=/trunk/; revision=42070
2012-04-04Fix tpo.Guy Harris1-1/+1
svn path=/trunk/; revision=41941
2012-04-04Work around that WinPcap bug for another pcap_open() call.Guy Harris1-0/+7
svn path=/trunk/; revision=41938
2012-04-04Work around WinPcap bug wherein pcap_open() returns -1 without puttingGuy Harris1-2/+17
an error message into errbuf (the bug has been reported to winpcap-bugs). Should fix bug 6922. svn path=/trunk/; revision=41937
2012-03-13From Jose Pedro Oliveira:Anders Broman1-14/+14
dumpcap.c: code cleaning https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718 svn path=/trunk/; revision=41535
2012-03-12From Jose Pedro Oliveira:Anders Broman1-3/+3
Enforce the modelines in dumpcap.c and in pcapio.c svn path=/trunk/; revision=41505
2012-03-11Fix function name in debugging message.Guy Harris1-1/+1
svn path=/trunk/; revision=41488
2012-03-10In pcapng.c use the units per second value from the interface instead ofGerald Combs1-6/+12
the default. Add support for reading nseclibpcap files to dumpcap. svn path=/trunk/; revision=41455
2012-03-09Forward interface_opts.descr (currently empty) when writing IDB:sAnders Broman1-2/+2
svn path=/trunk/; revision=41454
2012-03-09From Jose Pedro Oliveira: Make dumpcap write the if_tsresol option (using ↵Anders Broman1-1/+1
the default value) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718 svn path=/trunk/; revision=41444
2012-03-06Add a note about using GetSystemTimePreciseAsFileTime.Gerald Combs1-0/+3
svn path=/trunk/; revision=41382
2012-03-05Fix comment.Guy Harris1-1/+1
svn path=/trunk/; revision=41347
2012-03-03From Jose Pedro Oliveira: Fix typosAnders Broman1-4/+4
svn path=/trunk/; revision=41330
2012-03-01Another small commit to test migration.Gerald Combs1-1/+1
svn path=/trunk/; revision=41251
2012-02-29Add a comment noting that we need to add support for files withGerald Combs1-4/+5
nanosecond timestamps. (Also test the recent anonymous repository migration.) svn path=/trunk/; revision=41248
2012-02-29Don't use deprecated API on glib 2.31.18 and higher.Michael Tüxen1-1/+16
This should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6884 svn path=/trunk/; revision=41247
2012-02-23As discussed with Anders: Only write a single ISB at the end. ProivdeMichael Tüxen1-31/+14
start/end time in the ISBs. svn path=/trunk/; revision=41160
2012-02-22- Write ISB(s) at start and end of capture.Anders Broman1-1/+66
- Read all options. - Prepare to write ISB. svn path=/trunk/; revision=41137
2012-02-22Expand the API for ISB:sAnders Broman1-1/+11
svn path=/trunk/; revision=41136
2012-02-21Whitespace changes.Michael Tüxen1-12/+12
svn path=/trunk/; revision=41124
2012-02-21Whitespace changes.Michael Tüxen1-4/+4
svn path=/trunk/; revision=41115
2012-02-21From Jose Pedro Oliveira:Anders Broman1-4/+6
dumpcap: only free os_version_str after the libpcap_write_interface_description_block() calls. svn path=/trunk/; revision=41114
2012-02-21Extend libpcap_write_interface_description_block() wiyh more optionsAnders Broman1-9/+19
all exept os curently unused. svn path=/trunk/; revision=41108
2012-02-21From Jose Pedro Oliveira shb_os value: get_os_version_info() instead of ↵Anders Broman1-5/+5
get_runtime_version_info() svn path=/trunk/; revision=41095
2012-02-20Jose Pedro Oliveira: get_os_version_info() is more apropriate for shb_osAnders Broman1-5/+5
svn path=/trunk/; revision=41086
2012-02-14From Anders: Add support for options in the SHB.Michael Tüxen1-2/+30
From me: Some whitespace changes. svn path=/trunk/; revision=41026
2012-01-23From Michael Mann:Anders Broman1-4/+5
help page update (pcapng is now the default file format). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6551 svn path=/trunk/; revision=40658
2011-12-29Add an additional DONT_HAVE_PCAP return value from get_interface_list()Guy Harris1-0/+2
and capture_interface_list(). Return it if, on Windows, we ask for the interface list but don't have WinPcap installed. Handle it like CANT_GET_INTERFACE_LIST. svn path=/trunk/; revision=40334
2011-12-29Just hard-code the error for "can't load WinPcap"; the one thatGuy Harris1-7/+15
cant_load_winpcap_err() has some redundant gunk in it. svn path=/trunk/; revision=40333
2011-12-29On Windows, if we can't open a capture device, check whether WinPcap isGuy Harris1-12/+26
loaded and, if not, report that as the problem, rather than suggesting that you didn't specify the proper interface. svn path=/trunk/; revision=40332
2011-11-22Show a "Capturing on ..." message similar to TShark.Guy Harris1-15/+34
svn path=/trunk/; revision=39989
2011-11-22If we're not running as a child process, report the interfaces on whichGuy Harris1-6/+18
we're capturing. (We do not require a -i flag; the message could be useful if you don't specify the interface, as it lets you know which interface was chosen, which might not be the interface you'd think it would be. Yes, that's arguably a libpcap bug, which I plan to look at; it should probably try to figure out which interfaces are "active" if possible, and prefer those.) Use cmdarg_err() for invalid capture filters and other capture errors. svn path=/trunk/; revision=39983
2011-11-16Don't set variables if we don't look at them later. All praise ClangGuy Harris1-3/+0
Cat. svn path=/trunk/; revision=39876
2011-11-09Try to fix the GLib thread API deprecations listed in bug 6552.Gerald Combs1-0/+12
svn path=/trunk/; revision=39776
2011-11-09As reported by Michael Speck:Stig Bjørlykke1-6/+1
Removed last occurrences of USE_THREADS. svn path=/trunk/; revision=39775
2011-11-07Change the use of threads from "mostly always, depending on yourGerald Combs1-30/+22
configure options and Gtk+ and GLib versions" to "always". svn path=/trunk/; revision=39751
2011-09-27Minor formatting changes to the dumpcap -h output.Chris Maynard1-3/+3
svn path=/trunk/; revision=39166
2011-09-21Fix vi "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39076
2011-09-07Windows: GetTickCount() returns a DWORD (not a time_t);Bill Meier1-3/+3
Fixes a problem on Windows wherein specifying a capture file time duration for autostop or file-switching would stop working after some period of time. The reason: GetTickCount returns DWORD (unsigned int) which wraps "every 49.7 days"; and: The GetTickCount() return value was being stored in a time_t which is int64 on Windows; thus: The test for elapsed time (using signed integers) didn't work correctly after the time had wrapped. Fixes Bug #6280: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6280 svn path=/trunk/; revision=38921
2011-08-29Attempt to fix coverity id 1212: MISSING_BREAK by inserting "FALLTHROUGH"Stephen Fisher1-0/+1
comment. svn path=/trunk/; revision=38785
2011-08-09Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :Jeff Morriss1-3/+1
getopt() can/should normally be found in unistd.h, so: - When testing for getopt(), define that we HAVE_GETOPT instead of HAVE_GETOPT_H (to avoid confusion). - Don't attempt to include getopt.h: not all OS's have it (for example, Solaris 9 does not). - (All the places which need getopt already include unistd.h (if we have it).) If this breaks things on some OS, we might need (a real) HAVE_GETOPT_H check. svn path=/trunk/; revision=38437