Commit Graph

112 Commits

Author SHA1 Message Date
Alexis La Goutte c00a12652f Fix warning found by doxygen
svn path=/trunk/; revision=54130
2013-12-15 19:07:26 +00:00
Chris Maynard 093ace5c24 Fix Visual Studio Code Analysis warning C6011: Dereferencing NULL pointer 'returnedDevmode'
svn path=/trunk/; revision=54051
2013-12-13 18:25:06 +00:00
Chris Maynard 4cabb63481 Fix Visual Studio Code Analysis warning C6001: Using uninitialized memory 'keylist'
svn path=/trunk/; revision=54050
2013-12-13 18:13:58 +00:00
Michael Mann 0c9aa51ec5 Patch to include YAML export. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen
From me: use switch statements instead of if-else

svn path=/trunk/; revision=53698
2013-12-01 15:44:22 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen

- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.

svn path=/trunk/; revision=53657
2013-11-29 22:47:59 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Guy Harris ad0a9f4b66 Indentation tweaks.
svn path=/trunk/; revision=53173
2013-11-08 19:38:28 +00:00
Martin Mathieson 6159e98cd3 Didn't need to include wtap.h again
svn path=/trunk/; revision=53171
2013-11-08 17:15:43 +00:00
Martin Mathieson 0c590a950a Fix up function names: type -> type_subtype
svn path=/trunk/; revision=53170
2013-11-08 17:12:31 +00:00
Guy Harris c4e9865f0c Fix more errors.
svn path=/trunk/; revision=53159
2013-11-08 01:25:48 +00:00
Guy Harris 7a2a486ef2 Wrong function.
svn path=/trunk/; revision=53158
2013-11-08 01:24:55 +00:00
Guy Harris 9dd06cd401 Fix errors.
svn path=/trunk/; revision=53157
2013-11-08 01:23:18 +00:00
Guy Harris bf4e84aba6 For open dialogs, offer a list of sets of extensions, not of file types;
.cap, for example, doesn't refer to a particular file type - a whole
bunch of file types use .cap.

Also offer, in addition to "All Files", "All Capture Files", which
matches all the extensions we know about.

svn path=/trunk/; revision=53156
2013-11-08 01:08:42 +00:00
Pascal Quantin cc0bba9e4b Tentative fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9287 :
Initialize ofn->lCustData variable

svn path=/trunk/; revision=52740
2013-10-21 18:03:37 +00:00
Pascal Quantin cf9bbdecef From RobiOneKenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9297 :
Add support for MSVC2013

svn path=/trunk/; revision=52716
2013-10-20 17:35:30 +00:00
Gerald Combs bc3cd5611e Make sure we have a valid capture file pointer in win32_export_file().
Fixes bug 9271.

svn path=/trunk/; revision=52612
2013-10-15 01:10:52 +00:00
Gerald Combs 259768dc1a Remove GTK+ and global cfile dependencies from file_dlg_win32.c.
Move the declaration of set_last_open_dir() to ui/util.h. It still
has separate GTK+ and Qt implemenations. We might want to move it to
ui/util.c at some point. Remove a lot of unnecessary GTK+ includes.
Remove most of the references to the global cfile while we're at it.

svn path=/trunk/; revision=52542
2013-10-11 17:20:50 +00:00
Chris Maynard f216d4e440 When a line of text wraps to the next line, the character that caused the line to wrap was not being printed.
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=52221
2013-09-26 17:27:53 +00:00
Guy Harris 32e1523bb2 For the Windows Open dialog for capture files, get rid of the "(*.*)" in
the "All Files" entry (the current UI guidelines from Microsoft say to
do so, and that's what Paint does, at least), and add an "All Capture
Files" entry with all the file extensions for the file types we support
(it'll pick up all text files, but there's not much we can do about
that, and it won't pick up files with *no* extension or weird
extensions, such as you might get from UN*X systems or from WinDump
commands, but at least it'll filter out some other crud).

Fix what appear to be memory leaks; that should be backported unless
I've missed something and they aren't leaks.

Fix an out-of-date comment, and add an additional comment.

svn path=/trunk/; revision=51481
2013-08-23 00:06:26 +00:00
Jeff Morriss 0a669967fa Move merge.{h,c} into wiretap: these modules use wiretap to merge files.
svn path=/trunk/; revision=50656
2013-07-16 02:35:33 +00:00
Guy Harris eedc0601d7 Fix whitespace.
svn path=/trunk/; revision=50572
2013-07-14 09:17:31 +00:00
Jeff Morriss 4dcc156cf3 Move the print modules into epan.
svn path=/trunk/; revision=50526
2013-07-12 03:50:50 +00:00
Chris Maynard 909d2eb309 Allow for column headers not to be printed in order to make it possible to export packets as plain text in a format that could then have a chance of being imported again (assuming other factors such as packet bytes were printed, etc.) in order to recover the original pcap file.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1636

svn path=/trunk/; revision=50036
2013-06-19 15:22:56 +00:00
Chris Maynard 2c71f23d1e Make use of text metrics and devmode data to properly format a page for printing. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7543
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=49946
2013-06-15 12:57:32 +00:00
Gerald Combs 8b4b8154a4 The CommDlg_OpenSave_GetFilePath macro fetches the path+name of the most
recently selected file in the current file dialog. This isn't the proper
routine to use when trying to figure out the save/export file name. We
have to dig through the OPENFILENAME struct instead. Fixes bug 8224.

#Backport 1.10

svn path=/trunk/; revision=49765
2013-06-04 18:07:59 +00:00
Guy Harris 2013b5ad31 Fix a comment (the "it worked but didn't pop up a window" conclusion
came from a bad test).

svn path=/trunk/; revision=49070
2013-04-27 03:51:40 +00:00
Guy Harris a36a0a7a84 Update comments.
svn path=/trunk/; revision=49069
2013-04-27 02:57:16 +00:00
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +00:00
Guy Harris edfe2fc28c Work around a bug in a Microsoft security fix.
svn path=/trunk/; revision=49046
2013-04-26 04:42:20 +00:00
Guy Harris 889e2d6e5e Get rid of leftover debugging variable.
svn path=/trunk/; revision=49045
2013-04-26 01:01:32 +00:00
Guy Harris d3dc1bfd43 Check, for each of the standard handles, whether they need to be
redirected to a console.  Only if at least one of them needs to be
redirected to we create a console, and don't redirect them if they don't
need to be redirected.

This makes redirection of the standard output of, for example,
"wireshark -D" work; we don't redirect it out from under the shell.

svn path=/trunk/; revision=49044
2013-04-26 00:50:21 +00:00
Guy Harris 39779a7bee Send the output of the -D and -L options to the standard output rather
than the standard error.

In Wireshark on Windows, create a console before doing so and destroy it
before exiting.  Don't do that in TShark or dumpcap, as those are
console-mode programs on Windows.

This should fix bug 8609 and still allow "wireshark -D" and "wireshark
-L" to work when the standard output isn't redirected.

svn path=/trunk/; revision=49025
2013-04-25 05:47:11 +00:00
Guy Harris b1ecd8d217 Add a wtap_dump_can_write() routine that indicates whether Wiretap
supports writing files with a given set of encapsulations and comment
types.  Use it, rather than asking for a list of file formats that
support the given set of encapsulation and comment types and checking
whether we got back such a list, or duplicating its logic.

Having file.c use it means that nobody's using
wtap_dump_can_write_encaps() any more; get rid of it.  Instead, have a
private routine that checks whether a given file format supports a given
set of encapsulations *and* comment types, and use that internally.

svn path=/trunk/; revision=48690
2013-04-01 21:17:50 +00:00
Guy Harris 82a602d697 Define a collection of bits for different types of capture file comments.
For each capture file type, have a bitset of comment types supported by
that capture file type.

Add a Wiretap routine that, for a given file type, returns the bitset of
comment types it supports.

Have wtap_get_savable_file_types() take a bitset of comment types that
need to be supported by the file types it returns.

Replace cf_has_comments() with a routine that returns a bitset of
capture file comment types in the capture file.

Use those routines in the capture file dialogs; don't wire in the notion
that pcap-NG supports all comment types and no other file formats
support any comment types.  (That's currently true, but we don't want to
wire that in as being forever true.)

svn path=/trunk/; revision=48689
2013-04-01 20:36:42 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Guy Harris ea888f9113 Squelch some more discarding-qualifiers warnings.
svn path=/trunk/; revision=46771
2012-12-26 11:27:21 +00:00
Pascal Quantin f69b25250b Simplify #ifdef blocks
svn path=/trunk/; revision=45694
2012-10-21 19:17:36 +00:00
Pascal Quantin b439ae0d6a Revert r45692 and try to fix link failure another way: console_win32.[ch] definitely belong to ui/win32
Add console_win32.[ch] to Makefile.am

svn path=/trunk/; revision=45693
2012-10-21 19:12:18 +00:00
Alexis La Goutte 5af3defc46 Try to fix LINK : fatal error LNK1181: cannot open input file 'win32/console_win32.obj'
move ui/win32/console_win32.[ch] to ui/console_win32.[ch]

svn path=/trunk/; revision=45692
2012-10-21 18:10:31 +00:00
Alexis La Goutte 1d4bd1cb33 Make Windows Buildbot happy
svn path=/trunk/; revision=45691
2012-10-21 16:37:45 +00:00
Alexis La Goutte 96f58b6f38 Make buildbot happy and add modelines info
svn path=/trunk/; revision=45690
2012-10-21 15:26:48 +00:00
Alexis La Goutte 62ce10ced8 Move MSWindows console "windows" to ui/win32/console_win32.[ch]
svn path=/trunk/; revision=45677
2012-10-21 14:45:23 +00:00
Gerald Combs 9f1fd13e9a Use topic_action instead of topic_cb for the Windows file dialogs. Move
the common Qt help code to wireshark_application.cpp.

svn path=/trunk/; revision=45594
2012-10-16 19:47:43 +00:00
Gerald Combs 403e6dc86a Move common SSL key export routines to ui/ssl_key_export.[ch]. Make the
exported keys a gchar *. Implement SSL key exports in the Qt UI. Remove
some no-longer-necessary packet-ssl*.h includes.

Change lastOpenDir().absolutePath() to .canonicalPath(). Get rid of the
"Export As PostScript" action.

svn path=/trunk/; revision=45589
2012-10-16 18:14:16 +00:00
Gerald Combs 419f851e34 Fix Windows compilation problems from r45513. #ifdef out some non-Windows
code.  Get rid of a few uses of the global cfile.

svn path=/trunk/; revision=45514
2012-10-13 00:18:46 +00:00
Anders Broman d7c4e6ccf0 In GTK3 the settings.ini file serves the same purpose as the gtkrc file.
It should be copied to the wireshark executable dir ..\etc\gtk-3.0

I'm not sure if this is the right place to put it.

makefile will be updated later if no one beats me to it or has a better idea where to put the file. I'm not sure if we should strive to make the GTK3 version as equal to the GTK2 version as possible or accept that it looks more like the *nix version.
If we are to use it it needs to be in the nsi installer as well.

svn path=/trunk/; revision=45474
2012-10-11 15:41:34 +00:00
Gerald Combs 18b10390da Move a couple of enums to the common UI directory. Remove an unused
definition.

svn path=/trunk/; revision=45440
2012-10-09 23:51:30 +00:00
Gerald Combs b28da10eec Fix Qt compilation on Windows. Check the user-supplied range syntax
and provide instant feedback in the Win32 file dialog similar to the Qt
code. Tango-ize some colors. Escape a backslash in QtShark.pro.

svn path=/trunk/; revision=45430
2012-10-09 15:34:40 +00:00
Gerald Combs 445148ac0e Add a PacketRangeGroupBox widget. Use it to implement "Export Selected
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been
implemented so we can't test that either.

Create a SyntaxLineEdit widget from the QLineEdit code in
DisplayFilterEdit. Use it in the file import and export dialogs and the
PacketRangeGroupBox widget. This lets us provide instant feedback
instead of popping up an error dialog.

Expand the Tango color list based on
http://emilis.info/other/extended_tango .

Rearrange QtShark.pro to (hopefully) work better with Qt Creator.

svn path=/trunk/; revision=45405
2012-10-08 20:01:59 +00:00
Pascal Quantin e835a6f205 Fix crash when exporting packet dissection as plain text on Windows (regression introduced in r45333)
svn path=/trunk/; revision=45378
2012-10-08 09:22:46 +00:00