Commit Graph

236 Commits

Author SHA1 Message Date
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Guy Harris 63a3d043e3 Consistently use the "g_string_free returns a C string pointer" idiom.
g_string_free(str, FALSE) frees the GString container but not the
underlying g_malloc()ed string; instead, it returns a pointer to the
g_malloc()ed string.

Fix those places that didn't already get the string pointer from
g_string_free() to do so rather than manually extracting the string
themselves.

And fix one place that didn't even need to use a string - it was just
scanning a C string without even modifying it.

Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5
Reviewed-on: https://code.wireshark.org/review/6532
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 23:14:13 +00:00
Michael Mann 7967ef9510 Remove emem APIs from UAT functionality.
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856
Reviewed-on: https://code.wireshark.org/review/6460
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-12 14:25:12 +00:00
Michael Mann f5c4d06dba Replace some "low hanging fruit" uses of emem.
Most of the remaining ep_ uses are grouped with specific functionality.

Change-Id: I8fa64a17acc6bcdcf6891b2d28715ac0c58f1a4a
Reviewed-on: https://code.wireshark.org/review/6484
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-11 00:27:57 +00:00
Dario Lombardo 696fcdba21 Added DNS statistics support
This affects both the dissector (that has been added with a tap interface and a stats generator) and the UI (to recall the stats menu).

Change-Id: I90658f7aa6707aa39bdd787a51b20fed4dbddc53
Reviewed-on: https://code.wireshark.org/review/6236
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-05 09:06:32 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Pascal Quantin eff91ed57f Fix building of color conversation filter
Right now eth filter (the last one tried) is always applied

Change-Id: Ibe5d3c30033bd2d385bd1e68b20388114673cb5c
Reviewed-on: https://code.wireshark.org/review/6064
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-26 22:43:35 +00:00
Michael Mann 962fa218ef Replace uses of proto_get_frame_protocols with proto_is_frame_protocol when only one protocol is desired.
Also use proto_get_frame_protocols in main_menubar.c instead of doing it "manually".

Change-Id: Ie7a365c538700f2cebdd1e3d253f2fd9b189f5cf
Reviewed-on: https://code.wireshark.org/review/5851
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-19 18:00:20 +00:00
Michael Mann 1f031808e1 Use new color_dissector_filters.[ch] to refactor (color) conversation generation in GTK menus.
Change-Id: I5868a40b71a989a3a1522cb091064bb0aaec6daf
Reviewed-on: https://code.wireshark.org/review/5828
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-19 07:59:28 +00:00
Gerald Combs 9ddbc8de77 Qt: Fill in time display menu items. Other fixes and updates.
Reselect the current packet when we redraw the packet list.

Don't crash if we try to mark when no frame is selected. Try to
invalidate cached packet list strings when needed. Rename
PacketList::updateAll to redrawVisiblePackets so that its purpose is
more clear. When changing the font size, call redrawVisiblePackets
instead of rebuilding the entire list of visible rows.

Change-Id: I6e7a15067e7063d0efc26082170e1795ae3c0779
Reviewed-on: https://code.wireshark.org/review/4901
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-21 23:32:21 +00:00
Guy Harris 54b733ce9a Make the time stamp resolution per-packet.
Pcap-ng files don't have a per-file time stamp resolution, they have a
per-interface time stamp resolution.  Add new time stamp resolution
types of "unknown" and "per-packet", add the time stamp resolution to
struct wtap_pkthdr, have the libwiretap core initialize it to the
per-file time stamp resolution, and have pcap-ng do the same thing with
the resolution that it does with the packet encapsulation.

Get rid of the TS_PREC_AUTO_XXX values; just have TS_PREC_AUTO, which
means "use the packet's resolution to determine how many significant
digits to display".  Rename all the WTAP_FILE_TSPREC_XXX values to
WTAP_TSPREC_XXX, as they're also used for per-packet values.

Change-Id: If9fd8f799b19836a5104aaa0870a951498886c69
Reviewed-on: https://code.wireshark.org/review/4349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-28 18:38:18 +00:00
Michael Mann 018b84de84 Refactor "common" hostlist/endpoint table functionality.
This is very similar in architecture to the changes made to the Conversation table functionality.  Since all conversations have endpoints/hostlists, the "registered" list is shared for both.

Change-Id: Ie8c6910a68a1b3f27c5b18c4494f49b9404a7b31
Reviewed-on: https://code.wireshark.org/review/3214
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-18 04:24:39 +00:00
Michael Mann 31ecdf5b06 Refactor "common" Conversation table functionality.
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan.  Also refactor "common GUI" conversation table functionality.

The idea is to not have to modify the GUI when a dissector adds a new "conversation type"

Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda
Reviewed-on: https://code.wireshark.org/review/3113
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-26 20:59:42 +00:00
Guy Harris f862eaa7c2 "Export PDUs to File" pops up a dialog, so put "..." after it.
Also, capitalize "File" in the GTK+ version (it's already capitalized in
the Qt version).

Change-Id: I27eb27022930b1c0e0321cd1a1446c3b9dc1bd17
Reviewed-on: https://code.wireshark.org/review/3072
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 00:56:59 +00:00
Guy Harris 1c297771c3 Rename and move ui/stat_menu.h to epan/stat_groups.h.
The groups are, technically, independent of the notion of a menu, and,
if we have mechanisms by which taps that are not only GUI
toolkit-independent but independent of the *existence* of a GUI can be
registered, they might want to register themselves in a group just in
case they're running in a program that has a GUI.

Also, this might fix the Debian package build.

Change-Id: I29435681e79748fd4f2e0c5ac872cd11f831d172
Reviewed-on: https://code.wireshark.org/review/2830
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 20:30:42 +00:00
Guy Harris 5e28386540 Move stat_menu.h to libui.
Change-Id: I7bed7f7931845bc41035535cc62e1fe17c71047d
Reviewed-on: https://code.wireshark.org/review/2726
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 21:37:34 +00:00
James Coleman 8ac87dccde fix_bug_10199: enhancement Telephony VoIP Call add ability to show all SIP Flows.
Add SIP Flows menu option beside VoIP Calls.
Flow for all SIP message types (which have a call-id) is shown in SIP Flow.
Add useful info(original flow method, response code, cseq) to comment field in conversation and flow dialogs.

Change-Id: I4801a633ed9b6594b2d89629c9d6fec6352da150
Reviewed-on: https://code.wireshark.org/review/2479
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: James Coleman <gaoithe@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-25 16:14:58 +00:00
dameiss 46a808acf4 Add GTK modules for existing LBM dissectors.
bug: 10204
Change-Id: Ie21cc07b0ac9a56648ec72062ce58a1ac800318e
Reviewed-on: https://code.wireshark.org/review/2420
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 14:36:24 +00:00
Martin Mathieson 29222aba7c Add Object (file) export for files transferred over TFTP.
Updated following review comments.

Change-Id: I56e70d8f8e332d2aea604ceec16c980ad890fa58
Reviewed-on: https://code.wireshark.org/review/1885
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-06-05 18:00:49 +00:00
Alexis La Goutte dedc090c71 Fix -Wunreachable-code found by Clang
Change-Id: I895194655ff674fff5e84fa93b3f9a00a0f70e27
Reviewed-on: https://code.wireshark.org/review/1457
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-01 13:48:47 +00:00
Balint Reczey 00be1d31ce Migrate GTK icon handling to GTK 3.10 API
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids.
We keep a stock id based approach but without relying on GTK's
GtkStockItem system.

We create our own internal stock ids for {icon, label} tuples and keep
the original GTK stock id #define-s and values to preserve backward
compatibility.

Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0
Reviewed-on: https://code.wireshark.org/review/302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-11 05:38:01 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Michal Labedzki 579e7e19ce Wireshark: Add option to choose format type of capture file
The best heuristic can fail, so add possibility to manually choose
capture file format type, so not correctly recognize file format can be
loaded in Wireshark.

On the other side now it is possible to open capture file
as file format to be dissected.

Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a
Reviewed-on: https://code.wireshark.org/review/16
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-25 17:43:13 +00:00
Martin Kaiser fba61a31be add ssl detection to proto_get_frame_protocols()
svn path=/trunk/; revision=54439
2013-12-24 13:44:00 +00:00
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Guy Harris 28a1c45bfa Use g_strlcpy() and g_strlcat() to squelch API checker warnings.
svn path=/trunk/; revision=53726
2013-12-02 19:12:59 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Guy Harris 8c338ea543 Squelch a "parentheses suggested" warning.
Casts from void * are required in C++.

svn path=/trunk/; revision=53665
2013-11-30 00:07:15 +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 1f88ca3ca6 Note why refresh_local_interface_lists() is being called in various
cases.

svn path=/trunk/; revision=53597
2013-11-26 09:33:56 +00:00
Guy Harris a18cf1975f Always check cf->edt before dereferencing it, so that Coverity doesn't
say "you checked it here, but you dereferenced it later even if it was
null when you checked it".

This obviates the need for some checks of frame_selected, as cf->edt
will be non-null iff cf->current_frame is non-null.

Always check *cf, not cfile, in set_menus_for_selected_packet(). 
Currently, cf always == &cfile, but we aren't guaranteeing that will be
true forever.

svn path=/trunk/; revision=53523
2013-11-23 19:51:02 +00:00
Gerald Combs b3a24c5cc4 Replace similar code with a common routine.
svn path=/trunk/; revision=53519
2013-11-23 01:06:30 +00:00
Gerald Combs 22f8920d56 Remove an unused function.
svn path=/trunk/; revision=53479
2013-11-21 17:39:32 +00:00
Michael Mann 64c687346b Remove packet_info->ipproto and packet_info->ethertype uses in the GUI. Convert to walking packet protocol list looking for desired protocols.
I may eventually switch this to use proto_* values instead of strings, but just the addition of the loop is more jarring as compared to the simple comparing of ip or ethernet values.  But it should lead to a smaller (less protocol specific) packet_info structure.

svn path=/trunk/; revision=53476
2013-11-21 16:42:10 +00:00
Michael Mann 2e983ba89f Revert what I thought was a simple "compile" change for r53473, but causes Wireshark to crash at startup.
svn path=/trunk/; revision=53474
2013-11-21 12:46:31 +00:00
Michael Mann ad1d471b1b Walk list of protocol strings to determine which protocols are present in a packet rather than rely on protocol specific items in packet_info in an effort to (eventually) reduce packet_info members.
svn path=/trunk/; revision=53473
2013-11-21 12:16:49 +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
Alexis La Goutte c8dc57aaad Remove C++ comments
svn path=/trunk/; revision=53136
2013-11-07 09:03:46 +00:00
Alexis La Goutte 5af14eaf16 Add Edit Packet in Right Click
svn path=/trunk/; revision=53135
2013-11-07 07:43:19 +00:00
Alexis La Goutte 49485528d8 Add Packet Editor Preference
svn path=/trunk/; revision=53134
2013-11-07 07:43:11 +00:00
Guy Harris 2a088c1d53 Add support for displaying dates as year and day-of-year (1-origin).
In the process, fix various man page descriptions of the -t flag,
and add support for UTC absolute times in the iousers and iostat TShark
taps.

svn path=/trunk/; revision=53114
2013-11-06 20:39:09 +00:00
Irene Rüngeler 6d3988ffd3 Make the packet analysis for SCTP independent from GTK and QT.
svn path=/trunk/; revision=52945
2013-10-29 12:11:23 +00:00
Gerald Combs ba49d9bcf0 Revert part of 52896 and (for now) all of 52935. As Jeff pointed out,
the PortableApps version relies on U3_-prefixed environment variables.

svn path=/trunk/; revision=52941
2013-10-29 04:05:27 +00:00
Gerald Combs 69741d086b Remove U3 code and packaging.
svn path=/trunk/; revision=52896
2013-10-27 17:15:39 +00:00
Michael Tüxen eec2feb91e Revert previous commit of Irene, which doesn't work (yet).
svn path=/trunk/; revision=52814
2013-10-24 14:32:22 +00:00
Irene Rüngeler 9188e54108 Move sctp_stat to ui to make it independent from gtk.
svn path=/trunk/; revision=52812
2013-10-24 09:36:33 +00:00
Michael Mann bb25fad9de Add the ability to collapse subtrees with Shift+Left + additional menu items. Bug 9008 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9008).
Currently this is only for GTK, but allows users to test it to see if its worth adding to Qt (my personal opinion is yes).

From Jiří Engelthaler

svn path=/trunk/; revision=52790
2013-10-23 14:24:17 +00:00
Michael Mann 9ccefb0ecd Prefix all "Wireshark application specific" display filters with a "_ws." to distinguish them from dissector filters.
This was committed now to get it into the 1.11 release so users can start getting used to the changed filter names.

svn path=/trunk/; revision=52462
2013-10-09 12:56:19 +00:00
Anders Broman 7f57fe3357 Use a better hash algorithm and add a dialouge to get hastable data.
svn path=/trunk/; revision=52078
2013-09-15 19:35:10 +00:00
Jörg Mayer 5d4782b026 There is no use in checking for (cf) if we have already unconditionally
used cf-> ...

** CID 1068811: Dereference before null check (REVERSE_INULL)

svn path=/trunk/; revision=51559
2013-08-28 10:43:50 +00:00
Gerald Combs 6d731a3e79 Add TCP sequence number (Stevens-style) graphs.
Add the QCustomPlot widget. Thanks to Emanuel Eichhammer for granting a
license change. Move some common code from ui/gtk/tcp_graph.c to
ui/tap-tcp-stream.[ch]. Get rid of tcp_graph_selected_packet_enabled().
It was only used in the menu code and didn't match what we were doing
elsewhere.

Still quite a bit of work to do but it's a promising start.

svn path=/trunk/; revision=51538
2013-08-27 18:13:20 +00:00
Jeff Morriss 56735f8c16 Move u3.{h,c} and g711.{h,c} into wsutil.
Project g711.h against multiple inclusion and add C++ compatibility wrapper.

svn path=/trunk/; revision=50654
2013-07-16 02:04:55 +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 eb0d10c9d2 Sort the man pages. Add capinfos and reordercap. Should we also any others (i.e., asn2deb, dftest, idl2deb, idl2wrs, randpkt)?
svn path=/trunk/; revision=50107
2013-06-21 15:30:08 +00:00
Guy Harris 6c4ceb643b The SIP and WSP statistics taps register themselves; get rid of their
hardcoded menu items.

svn path=/trunk/; revision=49663
2013-05-31 23:05:40 +00:00
Guy Harris e8947ae24d Add a REGISTER_STAT_GROUP_TELEPHONY_SCTP, make the SCTP chunk counter
register itself in that group, and get rid of its hardcoded menu item.

Also, as the H.225 counter is registering itself, get rid of its
hardcoded menu item.

svn path=/trunk/; revision=49662
2013-05-31 23:00:39 +00:00
Guy Harris cfebdcd2f5 The BOOTP/DHCP statistics tap registers itself; get rid of the explicit
menu item for it.

svn path=/trunk/; revision=49660
2013-05-31 22:10:43 +00:00
Guy Harris a24a4db3f8 Consistently use "/Statistics", rather than "/StatisticsMenu", in action
names, to avoid confusion.  (Action names are not, in fact, paths; we're
just using path syntax for them as a convention.)

svn path=/trunk/; revision=49659
2013-05-31 22:07:11 +00:00
Guy Harris c7bd9ae115 Add a REGISTER_STAT_GROUP_TELEPHONY_LTE for the Telephony/LTE menu, and
use it o register the MAC and RLC statistics dialogues.  Get rid of the
explicit menu items for them, as they now show up in the menu as a
result of the tap registering itself.

svn path=/trunk/; revision=49658
2013-05-31 21:57:15 +00:00
Guy Harris 15894ac4dd Use #ifdefs in the XML to include or exclude the packet-editor and
capture menu items, rather than hiding them at run time.

For the capture menu items, translate the GtkAction callback calling
sequence to the normal widget callback calling sequence with individual
routines for each action, rather than a generic translator.

svn path=/trunk/; revision=49649
2013-05-31 07:06:10 +00:00
Guy Harris ecf32a1e7a Put back some conversation list and endpoint list statistics presumably
lost in the conversion to GTKUiManager.

svn path=/trunk/; revision=49642
2013-05-30 22:40:31 +00:00
Guy Harris d34f9683b0 Add a stat group REGISTER_STAT_GROUP_TELEPHONY_GSM for the Telephony/GSM
statistics menu.

Have the CAMEL counter register itself in that menu, rather than having
main_menubar.c create the menu item for it.

svn path=/trunk/; revision=49641
2013-05-30 22:32:10 +00:00
Guy Harris a8023c97a3 Menu labels aren't paths, they're just the strings shown to the user for
the menu item.

svn path=/trunk/; revision=49572
2013-05-25 02:37:51 +00:00
Guy Harris 3598d9e2ac Have register_param_stat() add menu items, rather than having the menu
items hardcoded into ui/gtk/main_menubar.c

Get rid of more stuff implying that the code for adding menu items is
used only by Lua, as it's also used by register_param_stat().

Add the items to the menu list sorted by the menu item name shown to the
user.

Get rid of some const declarations that are lies.

Use the label given for a menu item as the label in the menu, rather
than parsing it from a token.

svn path=/trunk/; revision=49552
2013-05-24 03:10:56 +00:00
Guy Harris 3c41347f67 Rename register_lua_menu_bar_menu_items() to
register_menu_bar_menu_items(), to emphasize that it's not just for Lua.

svn path=/trunk/; revision=49548
2013-05-24 01:05:39 +00:00
Guy Harris dcdfc836c2 We don't want to restrict the ability to dynamically add statistics
menus to Lua taps.

svn path=/trunk/; revision=49547
2013-05-23 23:32:20 +00:00
Guy Harris 6613d28818 Use a single #ifdef HAVE_LUA/#endif for two routines (currently) used
only from the Lua code.

svn path=/trunk/; revision=49544
2013-05-23 03:26:22 +00:00
Jeff Morriss 82554ebb52 make_menu_xml() is only used if we HAVE_LUA; only define it when we'll use it.
svn path=/trunk/; revision=49539
2013-05-23 00:33:33 +00:00
Guy Harris b213dcc584 Make a routine not used outside this file static.
svn path=/trunk/; revision=49532
2013-05-22 23:16:54 +00:00
Guy Harris f053368a0d Include ui/recent_utils.h, to check functions defined here against their
declarations - and fix a problem that turned up.

svn path=/trunk/; revision=49531
2013-05-22 23:14:44 +00:00
Guy Harris 70bb111bab Turn "packet_is_ssl()" into a general "does the packet whose dissection
is in this epan_dissect_t contain the field whose name is passed as an
argument" routine in libwireshark, and use it where we used
packet_is_ssl().  (We should check to see if anything *else* could use
it.)

svn path=/trunk/; revision=49530
2013-05-22 23:02:19 +00:00
Jeff Morriss 2572f8ac1e From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8690 :
Change "Edit" to "Rename" and add icons to "Manage Profiles..." and "Switch
to...". Update the associated widget, routine, and variable names in order
to facilitate future maintenance.

svn path=/trunk/; revision=49361
2013-05-17 00:42:45 +00:00
Irene Rüngeler 27816067e8 Set Start menu button inactive, if capture is in progress.
svn path=/trunk/; revision=49231
2013-05-10 11:52:44 +00:00
Anders Broman a268bb6b94 Add the abillity to export PDU:s to file using a USER_DLT adding meta data before the actual protocol PDU. Some meta tags makes it possible for the dissector of the user DLT to call the correct PDU dissector.
This is prof-of-concept needs a bit of cleanup.

svn path=/trunk/; revision=49177
2013-05-05 19:37:51 +00:00
Irene Rüngeler 22e43ff352 Ifdef LibPcap
svn path=/trunk/; revision=48830
2013-04-12 13:33:22 +00:00
Irene Rüngeler 590a68a677 The button are only needed if libpcap is present.
svn path=/trunk/; revision=48829
2013-04-12 12:46:25 +00:00
Irene Rüngeler a17ec349b4 Change the sensitivity of the start button depending on the number of interfaces selected.
svn path=/trunk/; revision=48827
2013-04-12 11:56:00 +00:00
Guy Harris d942759401 Add routines to file.c to indicate whether:
a save can be done ("can" in the sense of "there's something to
	save" and in the sense of "we can write that something out");

	a "save as" can be done (in the sense of "we can write what we
	have out");

	there's unsaved data to save (which might be unsaved changes or
	might be a temporary file full of packets);

and use them as appropriate.  This means that the "unsaved data"
indicator in the UI will be turned on for temporary files full of
packets as well as for files with unsaved changes; that's what we want.

svn path=/trunk/; revision=48693
2013-04-01 23:44:29 +00:00
Guy Harris f8965b7b2c If we can't write the capture out in a file format that supports
per-packet comments, don't let the user add/edit/delete per-packet
comments - they can comment all they want, but once Wireshark closes the
file, those comments will be gone.

svn path=/trunk/; revision=48692
2013-04-01 22:23:55 +00:00
Guy Harris e2eabbc883 Make the menu item for importing a hex dump text file be "Import from
Hex Dump", to clarify that it's not some sort of "generic" import
function, just one that can read a hex dump file.  ("Import from Hex
Dump Text" is another possibility.)  Use that string in the dialog title
as well.

svn path=/trunk/; revision=48665
2013-03-31 04:17:47 +00:00
Anders Broman 684c9e5d5c From Jim Young:
Add casts to support c++ when HAVE_GTKOSXAPPLICATION is defined.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8525

svn path=/trunk/; revision=48557
2013-03-26 05:02:05 +00:00
Pascal Quantin 1aa1f2ee67 Add a few missing explicit casts
svn path=/trunk/; revision=48544
2013-03-25 08:34:46 +00:00
Evan Huus c4a36c513f Redissect extra packet windows in all cases (that I know of) where we
redissect normal packet list.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8482

svn path=/trunk/; revision=48528
2013-03-24 16:47:38 +00:00
Chris Maynard 37e7e36915 Fix compilation if WANT_PACKET_EDITOR is defined. Should we also add an edit_window_cb_ref?
svn path=/trunk/; revision=48454
2013-03-21 16:50:47 +00:00
Evan Huus 4836f13ac0 From Michail Koreshkov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8371
Add item to context menu of frame references to open the referenced frame in a
new window. Very useful when the referenced frame is hidden by a filter.

From me:
- modelines
- simplify some of the logic

svn path=/trunk/; revision=48451
2013-03-21 15:27:38 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Anders Broman 2cc00294c7 Use explicit casts.
svn path=/trunk/; revision=48260
2013-03-12 06:41:00 +00:00
Alexis La Goutte a4eb0a12ed From Jose Pico via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8377 NEW FEATURE IMPLEMENTED: SMB2 SUPPORT FOR EXPORT->OBJECTS->SMB
Added functionality:
- SMB2 support for Export->Objects->SMB
- support for SMB_COM_CREATE, SMB_COM_OPEN, SMB_COM_READ and SMB_COM_WRITE commands
- Ability to choose between File Id and full file name as identifier for file re-building. Implemented as an option under Edit->Preferences->Protocols->SMB and Edit->Preferences->Protocols->SMB2.

Other minor changes and fixes:
- Full filename in file
- Inclusion of IP of SMB server when treeid name (i.e. hostname) is not known
- UTF-8 filenames encoding before passing them to Export Object Window
- Re-written insert_chunk function of export_object_smb.c to make it easier to debug
- Fixed of an error in insert_chunk function of export_object_smb.c (the verification of next free_chunk was always skipped after deleting one free_chunk).
- Removed duplicated code by inserting the function feed_eo_smb in packet-smb.c and packet-smb2.c
- Changed the label of Export->Objects->SMB menu into Export->Objects->SMB/SMB2

svn path=/trunk/; revision=48210
2013-03-09 08:44:14 +00:00
Bill Meier 162817ad33 it's ==> its & its ==> it's as needed.
In a few cases:
 Fix spelling;
 Clean up whitespace and formatting style.

svn path=/trunk/; revision=47889
2013-02-25 23:35:13 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.

svn path=/trunk/; revision=47748
2013-02-19 22:21:17 +00:00
Chris Maynard fae8a2aeb5 Separate Time Shift item from Time Reference items. From Cal Turney via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8176 with qt change from me.

svn path=/trunk/; revision=47261
2013-01-24 20:06:20 +00:00
Chris Maynard d85feecdd8 For menu consistency and shortcut simplification, change some "Ignore" related shortcuts to match "Mark" and "Time Reference" shortcuts. Specifically:
Ignore All Displayed Packets <alt><shift><control>D ==> <shift><control>D
Unignore All Packets         <shift><control>D      ==> <alt><control>D

svn path=/trunk/; revision=47203
2013-01-22 02:03:41 +00:00
Chris Maynard aed63758a1 Avoid using *<control>X shortcuts. In this case, using *<control>D instead.
From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8176

svn path=/trunk/; revision=47194
2013-01-21 16:36:40 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Bill Meier 18679dccbd Replace gtk_table..() with ws_gtk_grid...().
svn path=/trunk/; revision=47027
2013-01-11 01:41:55 +00:00
Gerald Combs 4ca47864db Move profile deletion code from profile_dlg.c to profile.c. Add left
mouse and context (right mouse) signals to label stacks and use them to
pop up profile menus in the status bar. Add profile actions (manage,
new, edit, delete) to the profile dialog.

svn path=/trunk/; revision=46863
2012-12-30 19:33:05 +00:00
Gerald Combs 5bd252c44f Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.

Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.

svn path=/trunk/; revision=46834
2012-12-29 01:39:02 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Gerald Combs a5d5162826 Qt: Implement packet comments. Fix packet detail updates.
GTK+: Shorten the packet comment menu item name.  Remove a couple of
unneeded includes.

Both: Add an arbitrary 20 MB limit when fetching all packet comments.
Use a color from the Tango palette for comments.

svn path=/trunk/; revision=46709
2012-12-23 04:37:58 +00:00