aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-29Trivial: Fix typo.Chris Maynard1-1/+1
svn path=/trunk/; revision=51011
2013-07-15Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific ↵Jeff Morriss1-2/+1
there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark). svn path=/trunk/; revision=50598
2013-04-13disable printing of all infos when USE_GOPTION is set andMartin Kaiser1-1/+5
a command line option for a specific info was set (in other words: make the behaviour of goption and getopt the same) svn path=/trunk/; revision=48841
2013-04-13TABs -> spacesMartin Kaiser1-201/+214
add editor modelines reformat some parts svn path=/trunk/; revision=48840
2013-04-13add a cast to make capinfos compile when USE_GOPTION is definedMartin Kaiser1-1/+1
svn path=/trunk/; revision=48839
2013-04-13capinfos -k displays the capture comment (from the shb)Martin Kaiser1-1/+46
svn path=/trunk/; revision=48837
2013-03-07From Balint:Gerald Combs1-0/+13
[PATCH 1/2] Revert "Try to fix the "LNK4217: locally defined symbol" warnings. This reverts commit r48158. [PATCH 2/2] Employ small hack in editcap to link with a few objects from libwireshark properly From me: Add the ability to reset symbol exports via ws_symbol_export.h's include guard and do so in capinfos.c and editcap.c. We include ws_symbol_export.h in over 200 files so it didn't seem to make sense to remove its include guard entirely. svn path=/trunk/; revision=48170
2013-03-05Use explicit casts.Anders Broman1-1/+1
svn path=/trunk/; revision=48108
2013-02-28str_util.c: Although the glib documentation doesn't explicitly say so,Gerald Combs1-0/+5
it looks like the thousands grouping (') modifier is supported so use it in format_size. capinfos.c: Set our locale. svn path=/trunk/; revision=47934
2013-02-26Try to fix compilation on Windows.Gerald Combs1-3/+3
svn path=/trunk/; revision=47901
2013-02-26Print human-readable statistics by default. Raw values can be printedGerald Combs1-11/+72
using "-M". Based on a suggestion by Hansang Bae. svn path=/trunk/; revision=47900
2013-02-21include the wsutil/wsgcrypt.h instead of including gcrypt.h directlyMartin Kaiser1-1/+1
svn path=/trunk/; revision=47802
2013-02-20When any of our executables start on Windows create or open a "WiresharkGerald Combs1-3/+4
is running" mutex. Have the NSIS installer check for this mutex and ask the user to close Wireshark if it's found. While not perfect this makes the WinSparkle update process much less annoying. svn path=/trunk/; revision=47758
2013-01-04Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8105 :Pascal Quantin1-1/+1
Allow use of huges values for localtime / ctime / gmtime with MSVC 2008 or later svn path=/trunk/; revision=46930
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2012-07-23Remove #define USE_GOPTION = 1, the code is incompleteAnders Broman1-1/+0
svn path=/trunk/; revision=43945
2012-07-06From Michael Mann:Anders Broman1-0/+142
Generic preferences implementation - Printing and Name Resolution. svn path=/trunk/; revision=43579
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-24Keep track, in Wiretap, of whether the file is compressed, and provideGuy Harris1-1/+5
an API to fetch that. When doing "Save" on a compressed file, write it out compressed. In the Statistics -> Summary dialog and in capinfos, report whether the file is gzip-compressed. svn path=/trunk/; revision=42818
2012-02-26Don't show time stamp-based information if we don't have it (now that weGuy Harris1-36/+105
know whether packets - or "packets" - have time stamps). Show the time stamp order as "Unknown" if we don't have enough information to determine whether it's certainly in order or out of order (XXX - we should do that if we have only one packet that has a time stamp). svn path=/trunk/; revision=41186
2011-12-13Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports anyGuy Harris1-2/+2
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
2011-11-16Handle ctime() and localtime() returning NULL and localtime() on WindowsGuy Harris1-31/+30
blowing up when handed a bad value. svn path=/trunk/; revision=39878
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
2011-06-28From Jose Pedro Oliveira via bug 5803:Stig Bjørlykke1-1/+1
#ifdef HAVE_LIBGCRYPT block includes a line too many. "Fixes 2nd instance of the problem" svn path=/trunk/; revision=37816
2011-06-28Replace all strerror() with g_strerror().Stig Bjørlykke1-1/+1
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. svn path=/trunk/; revision=37812
2011-05-24Move the Windows argument list conversion code to a common routine.Gerald Combs1-14/+2
svn path=/trunk/; revision=37372
2011-05-11Use a comparison instead of an assignment. Fixes Coverity CID 1194.Gerald Combs1-1/+1
svn path=/trunk/; revision=37066
2011-05-02For "per packet" file encapsulation, display a list of the encapsulations ↵Bill Meier1-1/+30
seen ("long form" report). Example: File type: Microsoft NetMon 2.x File encapsulation: Per packet IEEE 802.11 plus Network Monitor radio header ToDo: For the tabular form report display the list of per-packet encapsulations seen. svn path=/trunk/; revision=36962
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredGuy Harris1-0/+1
by the gunzipping code. Have it also supply a err_info string, and report it. Have file_error() supply an err_info string. Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to suggest a decompression error - into the rawshark and tshark errors, along the lines of what other programs print. Fix a case in the Netscaler code where we weren't fetching the error code on a read failure. svn path=/trunk/; revision=36748
2011-04-12Use g_snprintf instead of sprintf: Coverity 622.Chris Maynard1-4/+4
Use g_strlcpy instead of strcpy: Coverity 632. svn path=/trunk/; revision=36595
2011-04-06IMHO capinfos, when finished processing, should exit with an error statusBill Meier1-9/+22
if an error occurred while processing. E.G.,: For the default (no -C option): 'capinfos invalid.xxx' or 'capinfos a.pcap invalid.xxx c.pcap' should exit with an error status (after processing all the input args) if there is an error for invalid.xxx. With this fix, I expect fuzz-test.sh (and list_protos_in_cap.sh and presumably other scripts) will work a bit more as as expected. svn path=/trunk/; revision=36487
2011-04-05From Jose Pedro Oliveira:Anders Broman1-1/+1
#ifdef HAVE_LIBGCRYPT block includes a line too many. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5803 svn path=/trunk/; revision=36470
2011-01-16Fix Windows comiler warning: remove unused 'wsadata' variable.Bill Meier1-1/+0
svn path=/trunk/; revision=35560
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 toGerald Combs1-0/+21
UTF-8 where we don't already do so. In Wireshark use g_utf16_to_utf8 instead of utf_16to8. This should fix bug 5520. svn path=/trunk/; revision=35411
2010-09-16Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().Gerald Combs1-1/+1
svn path=/trunk/; revision=34137
2010-06-02From Jim Young via bug 4049:Gerald Combs1-1/+29
This patch adds a new '-o' option to capinfos (enabled by default) to report if the packets within a particular capture file are in strict chronological time order or not. svn path=/trunk/; revision=33041
2010-05-28Move some code (including the optional objects) into libwsutilJeff Morriss1-1/+1
svn path=/trunk/; revision=33012
2010-05-03Remove extra % in printf format string.Jeff Morriss1-5/+5
svn path=/trunk/; revision=32651
2010-05-03Add "inferred" snapshot length (if any) to the output.Bill Meier1-63/+113
A snapshot length is inferred if there are records in a capture file with "capture length" less than "packet length". svn path=/trunk/; revision=32649
2010-04-29Add snaplen to capinfos output. Idea from Chris Maynard on -dev.Stephen Fisher1-1/+31
svn path=/trunk/; revision=32594
2010-03-02Squelch some compiler warnings.Guy Harris1-4/+4
svn path=/trunk/; revision=32077
2010-02-20Fix a gcc -Wshadow warningBill Meier1-5/+5
svn path=/trunk/; revision=31934
2010-02-17Add an option to capinfos to print start and end times as seconds, whichGerald Combs1-5/+33
makes time-shifting using editcap easier. Sort the flags in the capinfos man page alphabetically to match the other man pages. Add a time-shifting example to the mergecap man page. svn path=/trunk/; revision=31905
2010-01-23Avoid crash on invalid file name.Jaap Keuter1-2/+2
svn path=/trunk/; revision=31632
2009-12-29From Jim Young: Include svnversion.h in capinfos and text2pcapBill Meier1-0/+2
This patch adds a #include "svnversion.h" statement to the capinfos.c and text2pcap.c files so that their usage() functions will display the SVNVERSION and SVNPATH infos (if defined). See Bug #4360 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4360) svn path=/trunk/; revision=31382
2009-12-21Switch to using a bundled version of the openSUSE Build Service packagesGerald Combs1-3/+0
for GNUTLS since they provide 32-bit and 64-bit Windows packages. We no longer have winposixtype.h, so remove its #includes and add a ssize_t typedef to config.h.win32. svn path=/trunk/; revision=31341
2009-12-17Initialize hd pointer to avoid a compiler warning.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=31290
2009-12-08From Jim Young via bug #4304: Patch to capinfos -H feature to generateStephen Fisher1-1/+1
expected column header names svn path=/trunk/; revision=31194
2009-12-08winposixtype.h appears to be Windows-only.Guy Harris1-0/+2
svn path=/trunk/; revision=31193
2009-12-08Fix compilation under Windows. Allocate our hash buffer dynamically soGerald Combs1-26/+28
that _chkstk doesn't throw a hissy fit. When hashing, open the file in binary mode. svn path=/trunk/; revision=31192