Commit Graph

55 Commits

Author SHA1 Message Date
Anders Broman 8735a8d631 From Jose Pedro Oliveira:
#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-04-05 05:50:45 +00:00
Bill Meier 6d01681d93 Fix Windows comiler warning: remove unused 'wsadata' variable.
svn path=/trunk/; revision=35560
2011-01-16 22:10:03 +00:00
Gerald Combs 3bc1fc3802 On Windows, convert all of our command-line arguments from UTF-16 to
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
2011-01-06 23:28:58 +00:00
Gerald Combs a87bdf9660 Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().
svn path=/trunk/; revision=34137
2010-09-16 19:20:06 +00:00
Gerald Combs f194916d62 From Jim Young via bug 4049:
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-06-02 00:24:03 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Jeff Morriss 6e802e4e2e Remove extra % in printf format string.
svn path=/trunk/; revision=32651
2010-05-03 19:42:09 +00:00
Bill Meier 7cec985521 Add "inferred" snapshot length (if any) to the output.
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-05-03 19:08:11 +00:00
Stephen Fisher 7364f9d94f Add snaplen to capinfos output. Idea from Chris Maynard on -dev.
svn path=/trunk/; revision=32594
2010-04-29 06:29:51 +00:00
Guy Harris 9e2dc2cdfc Squelch some compiler warnings.
svn path=/trunk/; revision=32077
2010-03-02 00:11:42 +00:00
Bill Meier e81b0d3f7c Fix a gcc -Wshadow warning
svn path=/trunk/; revision=31934
2010-02-20 17:44:52 +00:00
Gerald Combs 23a90258fb Add an option to capinfos to print start and end times as seconds, which
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-02-17 20:15:50 +00:00
Jaap Keuter 81771c67b7 Avoid crash on invalid file name.
svn path=/trunk/; revision=31632
2010-01-23 12:29:57 +00:00
Bill Meier c14b985146 From Jim Young: Include svnversion.h in capinfos and text2pcap
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-29 16:11:43 +00:00
Gerald Combs 8fc1491a60 Switch to using a bundled version of the openSUSE Build Service packages
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-21 21:06:01 +00:00
Stig Bjørlykke 184ca96aba Initialize hd pointer to avoid a compiler warning.
svn path=/trunk/; revision=31290
2009-12-17 12:09:40 +00:00
Stephen Fisher 6db27eb8a2 From Jim Young via bug #4304: Patch to capinfos -H feature to generate
expected column header names


svn path=/trunk/; revision=31194
2009-12-08 07:04:12 +00:00
Guy Harris a6bae6e39b winposixtype.h appears to be Windows-only.
svn path=/trunk/; revision=31193
2009-12-08 01:49:01 +00:00
Gerald Combs e5be652056 Fix compilation under Windows. Allocate our hash buffer dynamically so
that _chkstk doesn't throw a hissy fit. When hashing, open the file in
binary mode.

svn path=/trunk/; revision=31192
2009-12-08 00:13:57 +00:00
Gerald Combs 7c276becfd Add SHA1, RMD160, and MD5 hashes to capinfos.
svn path=/trunk/; revision=31191
2009-12-07 23:18:12 +00:00
Jaap Keuter 25470e5663 From Jim Young:
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-11-13 21:43:57 +00:00
Stig Bjørlykke 2ac6a245e2 Removed redundant redeclaration of optind.
svn path=/trunk/; revision=30619
2009-10-19 14:44:37 +00:00
Stig Bjørlykke 98024a007f Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision.

svn path=/trunk/; revision=30370
2009-10-06 16:01:18 +00:00
Gerald Combs 1e93d53b56 Use "svn info" to fetch the version by default. Fetch the repository path as
well. Add the repository path to the version strings.

svn path=/trunk/; revision=29171
2009-07-22 23:59:15 +00:00
Bill Meier fa920e48ed Minor cleanup of "-h" output text.
svn path=/trunk/; revision=28334
2009-05-12 16:06:14 +00:00
Bill Meier 4853b28fba capinfos: Print "n/a" for rates and duration if only one packet in capture.\;
line up capinfos output. 

svn path=/trunk/; revision=28328
2009-05-11 14:00:05 +00:00
Guy Harris c73ab7dff7 Change the signature of init_progfile_dir() so the casting of the
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-22 06:53:17 +00:00
Guy Harris 6f059e8cb7 In Solaris, the second argument to dladdr() is just a void *, not a
const void *.

svn path=/trunk/; revision=27813
2009-03-22 06:38:02 +00:00
Guy Harris 7c6e2155cc Attempt to use dladdr() to get the pathname of the executable image if
it's available and works.

svn path=/trunk/; revision=27812
2009-03-22 00:42:33 +00:00
Guy Harris ace4af44fc Add a routine to report write errors to the list of failure-reporting
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
2009-02-15 21:47:57 +00:00
Jeff Morriss a7b7e98cb1 Only declare failure_message() if we HAVE_PLUGINS (since it's only used when that's the case).
svn path=/trunk/; revision=27051
2008-12-18 19:24:34 +00:00
Guy Harris 4caea25cc1 Get rid of an unused variable.
svn path=/trunk/; revision=26769
2008-11-13 17:37:47 +00:00
Jeff Morriss 83f9ecf96f Move privileges.c and unicode-utils.c from epan to wsutil (so things like
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-06-30 17:16:29 +00:00
Guy Harris be161ba460 Free up the err_info string returned by wtap_read() and
wtap_seek_read().

Clean up indentation.

svn path=/trunk/; revision=25400
2008-05-30 02:44:02 +00:00
Stig Bjørlykke 16717f3be2 From Andrew Feren (bug 2462):
Patch to print packet rate.

From me:
Document -x option in man page.

svn path=/trunk/; revision=25024
2008-04-14 20:02:45 +00:00
Jeff Morriss b59322ecc1 Don't link plugins against libwireshark: any program that loads the dissector
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-16 00:58:15 +00:00
Jeff Morriss ddca4dd583 Include epan/priveleges.h for get_credential_info()
svn path=/trunk/; revision=24649
2008-03-16 00:41:10 +00:00
Jeff Morriss d951728e6b Have started_with_special_privs() assert out if get_credential_info() was not
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
2008-03-16 00:32:12 +00:00
Guy Harris e1d5eaff72 Use G_GINT64_MODIFIER rather than PRI[duox]64 to print gint64's and
guint64's.

svn path=/trunk/; revision=23782
2007-12-06 08:33:46 +00:00
Guy Harris 5f9d1e28e6 Fix typo.
svn path=/trunk/; revision=23027
2007-09-29 02:05:31 +00:00
Gerald Combs e07ae47a02 Add the file encapsulation.
svn path=/trunk/; revision=22962
2007-09-25 19:52:19 +00:00
Luis Ontanon d8e818e9da Make sure that wiretap plugins are loaded before dissectors are (if a new encap type is registered the plugin probably needs it before reg_handoff)
svn path=/trunk/; revision=22461
2007-08-07 20:07:43 +00:00
Luis Ontanon 162382dcb1 Have editcap and capinfos compile --without-plugins
Should go in 0.99.6


svn path=/trunk/; revision=22116
2007-06-17 04:58:16 +00:00
Luis Ontanon 11f06217ce Have editcap and capinfos loading the wiretap plugins.
epan/filesystem.c
   have get_plugin_dir() calling init_plugin_dir() if necessary

epan/epan.c and epan/report_err.c
   move the report_failure family into the new report_err.c file, have epan_init() calling the initializer

epan/plugins.h and epan/proto.c
   do not have init_plugins() calling the proto_reg functions instead do it in init_proto()

gtk/main.c and tshark.c
   init_plugin_dir() has become suprefluous

capinfos.c and editcap.c
   load the wiretap plugins

Makefiles
   do what's needed to build withe the above changes.




svn path=/trunk/; revision=21935
2007-05-25 17:22:32 +00:00
Bill Meier 30dd4b8dda If no packets in input file then don't calc packets/sec, etc
svn path=/trunk/; revision=20587
2007-01-28 17:33:14 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Jörg Mayer 59c8c8065d Print help to output, not to error
svn path=/trunk/; revision=18464
2006-06-14 08:12:20 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping a5c90d377c same command line related changes as recently done with editcap
svn path=/trunk/; revision=16996
2006-01-11 01:38:16 +00:00