aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
AgeCommit message (Collapse)AuthorFilesLines
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
2009-12-07Add SHA1, RMD160, and MD5 hashes to capinfos.Gerald Combs1-1/+130
svn path=/trunk/; revision=31191
2009-11-13From Jim Young:Jaap Keuter1-47/+392
The ability to continue processing additional files if and when wtap_open_offline() should fail. A new -C option reverts to capinfos' original behavior which is to cancel any further file processing at first file open failure. Change the behavior of how the default display of all infos is initiated. This gets rid of a special post getopt() argument count test. Add new table output format (with related options). This feature allows outputting the various infos into a tab delimited text file, or to a comma separated variables file (*.csv) instead of the original "long" format. svn path=/trunk/; revision=30956
2009-10-19Removed redundant redeclaration of optind.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=30619
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_HStig Bjørlykke1-2/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. svn path=/trunk/; revision=30370
2009-07-22Use "svn info" to fetch the version by default. Fetch the repository path asGerald Combs1-1/+1
well. Add the repository path to the version strings. svn path=/trunk/; revision=29171
2009-05-12Minor cleanup of "-h" output text.Bill Meier1-9/+9
svn path=/trunk/; revision=28334
2009-05-11capinfos: Print "n/a" for rates and duration if only one packet in capture.\;Bill Meier1-21/+29
line up capinfos output. svn path=/trunk/; revision=28328
2009-03-22Change the signature of init_progfile_dir() so the casting of theGuy Harris1-1/+1
function pointer (to main) to an argument to dladdr() is done in init_progfile_dir() rather than its callers. svn path=/trunk/; revision=27814
2009-03-22In Solaris, the second argument to dladdr() is just a void *, not aGuy Harris1-2/+1
const void *. svn path=/trunk/; revision=27813
2009-03-22Attempt to use dladdr() to get the pathname of the executable image ifGuy Harris1-1/+2
it's available and works. svn path=/trunk/; revision=27812
2009-02-15Add a routine to report write errors to the list of failure-reportingGuy Harris1-1/+1
routines handled by epan/report_err.c. Move copy_binary_file() in file.c to epan/filesystem.c, and rename it to copy_file_binary_mode() (to clarify that it *can* copy text files; arguably, *all* files are "binary" unless you're on, say, an IBM 1401 :-)). Have it use the report_err.c routines, so it works in console-mode programs. Clean up some comments while we're at it. svn path=/trunk/; revision=27456
2008-12-18Only declare failure_message() if we HAVE_PLUGINS (since it's only used when ↵Jeff Morriss1-0/+2
that's the case). svn path=/trunk/; revision=27051
2008-11-13Get rid of an unused variable.Guy Harris1-1/+0
svn path=/trunk/; revision=26769
2008-06-30Move privileges.c and unicode-utils.c from epan to wsutil (so things likeJeff Morriss1-1/+1
capinfos and dumpcap don't need to depend on libwireshark nor directly pull in those modules). Because capinfos and editcap were only being linked with privileges.c if we had plugins, this allows those programs to be linked when someone is compiling --without-plugins. svn path=/trunk/; revision=25640
2008-05-30Free up the err_info string returned by wtap_read() andGuy Harris1-0/+1
wtap_seek_read(). Clean up indentation. svn path=/trunk/; revision=25400
2008-04-14From Andrew Feren (bug 2462):Stig Bjørlykke1-1/+11
Patch to print packet rate. From me: Document -x option in man page. svn path=/trunk/; revision=25024
2008-03-16Don't link plugins against libwireshark: any program that loads the dissectorJeff Morriss1-5/+5
plugins should already be linked against libwireshark. Don't link capinfos and editcap against libwireshark: they only needed to be because the plugins were linked against libwireshark (see rev 24123 and the ensuing discussion on -dev). capinfos and editcap: don't complain if plugins fail to load: dissector plugins should fail to load because they need libwireshark. I am assuming here that wiretap plugins don't need libwireshark (I've never seen such a plugin but LEGO's code and comments suggest this is the case). (The goal of this checkin is to stop linking capinfos and editcap against libwireshark while still allowing wiretap plugins. Since we don't have any such plugins in the tree I do somewhat doubt the need for all this but I don't want to be the one to remove the functionality.) svn path=/trunk/; revision=24650
2008-03-16Include epan/priveleges.h for get_credential_info()Jeff Morriss1-0/+1
svn path=/trunk/; revision=24649
2008-03-16Have started_with_special_privs() assert out if get_credential_info() was notJeff Morriss1-2/+11
previously called. This prevents the function from always returning TRUE in programs that hadn't called get_credential_info(). Call get_credential_info() in the programs that should have been. svn path=/trunk/; revision=24648
2007-12-06Use G_GINT64_MODIFIER rather than PRI[duox]64 to print gint64's andGuy Harris1-2/+2
guint64's. svn path=/trunk/; revision=23782
2007-09-29Fix typo.Guy Harris1-1/+1
svn path=/trunk/; revision=23027
2007-09-25Add the file encapsulation.Gerald Combs1-24/+37
svn path=/trunk/; revision=22962
2007-08-07Make sure that wiretap plugins are loaded before dissectors are (if a new ↵Luis Ontanon1-1/+0
encap type is registered the plugin probably needs it before reg_handoff) svn path=/trunk/; revision=22461