Commit Graph

175 Commits

Author SHA1 Message Date
Gerald Combs 422ad100aa Qt: Apply the main window geometry directly.
As of g2c00d66 we create the main window after we've read the recent
settings. This means that we can get rid of the property animation
workaround in MainWindow::loadWindowGeometry.

Change-Id: I028061c5bdab9261f9394a1840bcdcb752a4f0c8
Reviewed-on: https://code.wireshark.org/review/7278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 18:34:09 +00:00
Alexis La Goutte 5c60289753 Qt Wireshark - Once a live capture is stopped the title bar persists in reporting "Capturing from interface name"
With Qt Wireshark the title bar persists in reporting "Capturing from <interface name>" even though capturing has stopped.

With GTK Wireshark once a live capture is stopped the title bar is updated to report the interface name(s) used for the unsaved capture file.

Issue reported by Jim Young

Bug:10948
Change-Id: Ia6099f63f82b6610ade5c81af0cf257236f076ec
Reviewed-on: https://code.wireshark.org/review/7050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 15:17:20 +00:00
Gerald Combs b5a3b65f7a Qt: Fix side effects of recent WiresharkDialog changes.
Quit the application when the main window closes. This cleans up any
other top-level windows that might be open.

Don't dereference a NULL pointer when opening the sequence dialog from
the VoIP calls dialog.

Change-Id: I9902d40ead1c5f2e541b6d79f3d957228e4e9687
Reviewed-on: https://code.wireshark.org/review/7107
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 00:19:58 +00:00
Gerald Combs 936f685af5 Qt: Allow shift-double-clicking on a frame link.
You can open a new packet window in the GTK+ UI by holding down the
shift key and double-clicking on a frame link in the protocol tree. Add
this behavior to the Qt UI. Document the different ways of opening a new
packet window and update the image.

Change-Id: I55caf6cc8089a6c305fafd47b4870e7c69dbfb10
Reviewed-on: https://code.wireshark.org/review/7101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 17:30:26 +00:00
Gerald Combs a0498f177a Qt: Double clicking a packet opens the packet window.
Connect the packet list's doubleClicked signal to the main window's
openPacketDialog slot.

Change-Id: I5bc20c113fb1f22e2257fc1dbdef76c9920e05d0
Reviewed-on: https://code.wireshark.org/review/7092
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 03:02:47 +00:00
Gerald Combs 931807ea61 Qt: Add the "new packet" window^Wdialog^Wwindow.
Allow persistence across files. Preserve the use of "window" even
though we're really a dialog.

Update ByteViewTab and ProtoTree to support multiple instances.

Remove the need for a cast in frame_data.

Add more forward declarations.

Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2
Reviewed-on: https://code.wireshark.org/review/7086
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 23:32:54 +00:00
Gerald Combs b3f3dd8d82 Qt: Fix preference change behavior.
Main window:

Keep track of our current layout and only change it if the preferences
change. This keeps the panes from resizing.

Re-select the current packet if the layout changes so that the proto
tree and byte view aren't left in an invalid state. This fixes a crash
similar to bug 10896.

Search frame:

Get rid of an invalid error message. Update coding style.

I don't think any of these fix bug 10921 since Xiaochuan seems to get a
crash immediately upon opening the dialog.

Change-Id: I0e880a50d3c9ac1c6ae6a01034b05fd2249444f4
Reviewed-on: https://code.wireshark.org/review/6989
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-06 23:23:02 +00:00
Gerald Combs 89e6f4c468 Qt: Add the Protocol Hierarchy statistics dialog.
Change-Id: I6872e323daca4798c638d764873f54c4c0dc0006
Reviewed-on: https://code.wireshark.org/review/6934
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-04 02:06:01 +00:00
Gerald Combs 21dfda65d7 Qt: Remove windowIcon property from our .ui files.
Setting the windowIcon property in foo.ui means we end up with a
setWindowIcon call in ui_foo.h. Along with setting the window title
bar icon, it also sets the taskbar icon on Windows. A 16x16 PNG gives
us a jaggy taskbar icon. (Windows ICO format is supported via a plugin
which might not be available everywhere, otherwise we could try using
a .ico resource.)

Move the setWindowIcon call from ge990d1b to the top of the MainWindow
constructor and enable it everywhere.

Change-Id: I4e9765200bb3676c4faa8e0ab1505ce02fb64870
Reviewed-on: https://code.wireshark.org/review/6762
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-23 19:15:29 +00:00
Gerald Combs e990d1b2e8 Try to fix the jaggy taskbar icon.
Possibly related to https://bugreports.qt.io/browse/QTBUG-19441.

Change-Id: Idf7ff8a247f459ce465907760ca0ebeaff2cffa8
Reviewed-on: https://code.wireshark.org/review/6746
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-23 12:14:58 +00:00
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
Deon van der Westhuysen 7d43836b3a QT: stats_tree plug-ins not added to statistics menu
Wireshark Qt does not add plug-ins that register with stats_tree_register_plugin() to the statistics menu in the ui (like the gtk version does).

This patch dynamically adds all registered stats_tree plug-ins to the statistics menu.

Bug: 9528
Change-Id: I99f9415502ca9f7121d494c856861edc1a762079
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/6336
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-16 00:27:35 +00:00
Gerald Combs 5fb2f27428 Qt: Add a context menu to the packet list header.
Don't carry over the sort items from the GTK+ UI (for now, at least).
Update some names. Add a column editor frame similar to the "Go to
Packet" and "Search" frames.

Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77
Reviewed-on: https://code.wireshark.org/review/6277
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-06 15:22:04 +00:00
Gerald Combs e8ec11fb7e Qt: Add a WiresharkDialog convenience class.
Add WiresharkDialog, a common base class for dialogs centered around
capture files. Make it a parent of Capture File Properties, Traffic
Table, Conversations, and Endpoints.

Rename CaptureFile::read_only_ to file_closed_. Add methods to
WiresharkApplication for generating consistent window titles.

Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257
Reviewed-on: https://code.wireshark.org/review/6097
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-29 01:42:13 +00:00
Gerald Combs 8076f29fdb Qt: Fix status bar signal.
Change-Id: Ie935269f6cbe9495b95bcc24b45198fbd284fb35
Reviewed-on: https://code.wireshark.org/review/5963
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-22 00:42:15 +00:00
Gerald Combs 9ba9cd83a4 Qt: Add a CaptureFile class.
Wrap the capture_file struct in a QObject which translates cf_cb_* and
capture_cb_* events into signals. Move the global cfile to
capture_file.cpp.

Don't use a void pointer for the capture file struct.

Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a
Reviewed-on: https://code.wireshark.org/review/5885
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 17:39:29 +00:00
Gerald Combs 56697c244e Qt: Add name resolution menu items.
Change the text from "Enable for" to "Resolve". Make the tooltips more
descriptive. List them in OSI model order.

Change-Id: Ie671ba9d55c609ce475f1681add0ad7d975f19cd
Reviewed-on: https://code.wireshark.org/review/5737
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-12 20:40:53 +00:00
Gerald Combs e4b0141769 Qt: Obey main toolbar icon preferences.
Remove the preferences for the filter toolbar and mark them GTK+-only.

Change-Id: Ie48b19aee29a1cfcea4c41ca6c08ddbba3102377
Reviewed-on: https://code.wireshark.org/review/5693
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-10 01:51:09 +00:00
Gerald Combs bcaa5d84b1 Qt: Update and rename the summary dialog.
Go back to a single view similar to the GTK+ UI. Apply layouts using Qt
Designer.

Rename the menu item and class to "Capture File Properties". It's not
really a summary if it contains details such as "marked average bits
per second". We might want to move this to a "Properties" item under
the "File" menu similar to other applications.

Add the GTK+ summary icon (for now) to the toolbar and open the
properties dialog on clicking.

Singleton dialogs delenda est[1]. Let the user open as many summaries on
as many capture files as he or she wishes. Also, global cfile delenda
est[2].

Don't blindly include QtGui. Add specific components instead.

Use consistent method names, variable names, and patterns. Try to
document what "consistent" means.

Adjust the way we display some statistics to match the summary bar, e.g.
displayed = captured if we don't have a filter applied.

[1] Not really.
[2] Yes, really.

Change-Id: I11793b1d79dd0c3f70414ac8592b86181da59916
Reviewed-on: https://code.wireshark.org/review/5274
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 19:02:41 +00:00
Maarten Bezemer f16376ed7b Fix showing error dialog when calling vsimple_error_message_box()
SimpleDialog requires a parent, when none is provided (as there is no parent available during startup), the error message is queued and displayed after MainWindow is available.
Calling SimpleDialog::exec() directly returns if no parent is set (hence the dialog is not shown)

This resulted in silently ignoring error messages that were shown using vsimple_error_message_box(), as this function did not provide a parent (and the queue messages were not dequeued anymore as the MainWindow was already available)

Change-Id: I2f4c1b4926c196ab40b035161cec530105396537
Reviewed-on: https://code.wireshark.org/review/5519
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-08 01:15:22 +00:00
Peter Wu cd14ff3288 qt: use qstring_strdup
Replaces the more verbose `g_strdup(foo.toUtf8().constData())` by
`qstring_strdup(foo)`. While at it, plug a minor memleak in
MainWindow dialogs.

Change-Id: I32b53f972b4e3998ac9beabd98647a381b7b42e3
Reviewed-on: https://code.wireshark.org/review/5531
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-01 01:13:54 +00:00
Stig Bjørlykke ea167053ff Improved deregistering fields.
This improvement avoids use of deallocated memory (crash) if using a
deregistered field in display filter, color filter, custom column and
other cases when the field is used as "interesting field".

This functionality is currently used in http, imf and ldap preferences.

Also removed unused proto_registrar_n() as this does not work correctly
after deregistering fields.

Change-Id: I043e3bf7a98bd773c9801e712a012d1eab8a7f94
Reviewed-on: https://code.wireshark.org/review/5161
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-11-10 08:01:12 +00:00
Michal Labedzki 5025bc258c Qt: Dynamic languages
- get language as soon as possible (before creating any Qt objects) to make all
  translations working
- dynamic list of supported languages
- runtime change of GUI language (no need to restart application)
- add flags icons support
- search for *.qm languages in buildin resources, then
  data dir called "languages" (main directory in sources or
  /usr/share/wireshark/languages), then user directory
  (UNIX: ~/.wireshark/languages); "languages" directory should contains
  files wireshark_xx.qm where xx is language code (en, en_GB, etc.),
  and optional xx.svg for flag icon
- try to fix some untranslated manually-created UI items
  (need manual reset text of those components)

Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229
Reviewed-on: https://code.wireshark.org/review/5041
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-04 08:21:55 +00:00
Pascal Quantin e4c257a169 Qt: fix what seems to be a copy/paste error in MainWindow::loadWindowGeometry() (Coverity CID 1158563)
Change-Id: Iaa2a6367fbb434514751e0ed4f273f883798ce8a
Reviewed-on: https://code.wireshark.org/review/5066
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-03 07:32:29 +00:00
Gerald Combs 1c159818fd Qt: ByteViewText hover information.
When the user hovers over a byte view field, highlight it and show a
description in the status bar.

Add a "byte" status bar context and fix a label stack pop bug.

Keep proto_find_field_from_offset from matching generated items.
Otherwise hovering and selecting finds things like GeoIP entries and
checksum validation information. This affects the GTK+ UI as well.

Change-Id: Ic81c0d8159510a72d30c41f961807d8a48d05e16
Reviewed-on: https://code.wireshark.org/review/4943
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-27 02:05:13 +00:00
Gerald Combs e2bece7733 Qt: Show / hide main widgets.
Remove existing code which uses the visibilityChanged signal. It exists
in QToolbar but not QWidget. Use the actions to drive visibility
instead.

Update MainWindow::layoutPanes to respect "recent" settings.

Move the show / hide actions to the top of the View menu to match GTK+.

Change-Id: I670682e2a094945dbd36c80f43cd14515bbca5a6
Reviewed-on: https://code.wireshark.org/review/4911
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-22 17:55:18 +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
Gerald Combs a17067abb1 Qt: Rename the "check for updates" slot.
The "Check for Updates..." action doesn't exist when
QMetaObject::connectSlotsByName is called. Rename
on_actionHelpCheckForUpdates_triggered to checkForUpdates so that we
don't get the warning

QMetaObject::connectSlotsByName: No matching signal for on_actionHelpCheckForUpdates_triggered()

at startup.

Change-Id: Icbd7eb98731023c323212e6ec3d3c98f1321e245
Reviewed-on: https://code.wireshark.org/review/4510
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 22:59:40 +00:00
Gerald Combs 798eb97053 Qt: Packet list column sorting.
Sorting behavior should be identical to GTK+.

Pass the correct position to beginInsertRows. Add a list of to-do items
to packet_list.cpp.

Change-Id: Ie6ab4b9f2d780a2af430d0f90529edca5485dada
Reviewed-on: https://code.wireshark.org/review/4481
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06 21:10:11 +00:00
Gerald Combs ff307c72bc Add more HAVE_LIBPCAP checks.
Change-Id: I82e62f6be03a2ae1617cd5b8e430b73ca8fbe7f8
Reviewed-on: https://code.wireshark.org/review/4385
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 20:21:35 +00:00
Gerald Combs ced39b6de8 Qt: Start capture from the command line.
Fill in the capture-related mise en place so that -k and -i work. Get
rid of global_capture_session in ui/qt and make it a member of
MainWindow.

Copy over privilege checking from GTK+.

Move the global capture session struct to MainWindow.

Change-Id: Iab5ec683860a40255a7e1d82e3872ced24fd55cb
Reviewed-on: https://code.wireshark.org/review/4382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-30 18:44:59 +00:00
Gerald Combs ea6fa049c9 Update the simple dialog code.
Rename simple_dialog_qt.{cpp,h} to simple_dialog.{cpp,h}. Make it a
subclass of QMessageBox. Queue messages at startup similar to GTK+.

Move the GTK+-specific simple_dialog declarations to
gtk/simple_dialog.h.

Don't yell at the user so much. Replace exclamation points with periods.

Change-Id: I1cc771106222d5e06f1f52d67ac29d6dc367cce4
Reviewed-on: https://code.wireshark.org/review/4288
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-25 22:02:43 +00:00
Gerald Combs 31e86998fb Qt: Add zoom and column resize actions.
Plumb signals and slots for changing the text size in the main window.
Remove the bold font code from WiresharkApplication. It was only used in
ByteViewText. Adjust the icons a bit.

Bug: When we change the font preferences the packet list stops drawing
cached strings. I haven't been able to track down the cause.

Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387
Reviewed-on: https://code.wireshark.org/review/4269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 22:32:53 +00:00
Gerald Combs 717ff08f32 Qt: Add the colorization action.
Change-Id: I846a48c35c4ef3bbbcf17d03885acc5be8c9a6b5
Reviewed-on: https://code.wireshark.org/review/4259
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 14:26:45 +00:00
Gerald Combs d3cd4c4b28 Qt: Re-enable menu icons.
The GNOME HIG says "Where a corresponding toolbar icon exists, a menu
icon should mirror its design." The Windows and OS X HIGs say that you
should use them for common or familiar actions but otherwise avoid
clutter. I think icons in the "File" menu look like crap. Try to strike
a balance.

Use the 16x16 application icon for both the main web site and the wiki
since that's the favicon used on both sites.

Assume that "Reload" isn't used very often and remove it from the
toolbar.

Don't use a menu icon for the about box.

Other minor fixups.

Change-Id: I855211c218d266c2e9ed5acbe05a08750ab6d157
Reviewed-on: https://code.wireshark.org/review/4246
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23 02:42:14 +00:00
Gerald Combs 5d1aafbb36 Qt: Multi-state capture start icon.
Add ".on" versions of the x-capture-start icon along with corresponding
code in the StockIcon constructor to look for ".on" variants and add
them with the QIcon::On state.

Make the plain versions of x-capture-start blue to match the general
application icon. The goal is to make the toolbar and app icon fins blue
when Wireshark is "at rest" and green when it's capturing.

Change-Id: I31f4f9d910fc99c41d7c63bd9a722db1611760c7
Reviewed-on: https://code.wireshark.org/review/4225
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-21 16:45:14 +00:00
Gerald Combs 8576e1c103 Qt: Add stock icons.
The new icons are patterned after the existing capture icons. They could
probably benefit from some adjustments here and there.

Start moving toward icon names and a directory layout compliant with
freedesktop.org's Icon Naming Specification and Icon Theme
Specification. We aren't fully compliant and might never be but anyone
with exposure to FDO icon themes should at least know where everything
is.

Make Capture Start (x-capture-start) the first icon in the toolbar.

Define the Colorize Packets, Auto Scroll, and zoom icons even though the
Qt UI doesn't use them yet.

Leave the Capture Filter, Display Filter, Coloring Rules, Preferences,
and Help icons off for now. The GTK+ toolbar is overly cluttered and I'm
not sure they're necessary.

Try not to break ui/gtk/toolbar_icons.h.

Remove welcome.qrc. I initially added it in case we needed to overlay
the welcome screen with translucent .pngs but that never happened.

To do:

- Move the old GTK+ icons to their own directory.

- Find a better name for the "toolbar" directory. "stock"?

- Make the toolbar configurable.

Change-Id: Ie07592113d307b8db786aedace672312a870fe38
Reviewed-on: https://code.wireshark.org/review/4182
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-20 19:54:04 +00:00
Guy Harris fdff1b3b18 Don't connect to non-existent slots.
(Run-time warning, not compile-time error, alas.)

Change-Id: I002ca132d2c7cbc2cfd802438edb4509ff76bcbc
Reviewed-on: https://code.wireshark.org/review/3155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-22 00:15:56 +00:00
Guy Harris c7a2c89e40 Rename ifListChanged to localInterfaceListChanged.
That better indicates that it reflects changes to the list of local
interfaces on the system, as supplied by libpcap/WinPcap, not to any
other interface list we maintain, such as lists of remote interfaces, or
the list of non-hidden interfaces.

Change-Id: Idf79b365e07f2e3eaa83c105ae9cd7ace54c435e
Reviewed-on: https://code.wireshark.org/review/3154
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-21 23:30:58 +00:00
Guy Harris 48986f4fb9 Make the Qt version update displays when interfaces appear or disappear.
Change-Id: If1218baaae9dcd93ddb1cea81ac5457f90a57c6c
Reviewed-on: https://code.wireshark.org/review/3152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-21 19:07:28 +00:00
Guy Harris a3f7d1951d Get rid of #if 0'ed out includes of capture-pcap-util.h.
Change-Id: Ie3678a08ed9b3d46b22e7c59eef74e6e9636ae59
Reviewed-on: https://code.wireshark.org/review/3140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-20 22:14:26 +00:00
Gerald Combs d1d88f575d Add plumbing for stat commands ("-z ...").
Trigger dialog creation by passing a method name to
QMetaObject::invokeMethod. I'm not entirely sure this is sane but it
seems to work OK. Move getopt processing further down in the main initialization sequence
to more closely match GTK+ and allow for stat command registration.

Change-Id: I5cd5375fa71dbadac69d528b2ba3bb13598dc3f6
Reviewed-on: https://code.wireshark.org/review/2964
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-11 20:52:10 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00
Irene Ruengeler f3c5f14bc4 Manage Interfaces
- Add dialog to manage interfaces
- Add and delete pipes
- Hide local interfaces

Change-Id: I08323c306c2ea736f99e57c28e2fe3170a0c2216
Reviewed-on: https://code.wireshark.org/review/2613
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-02 20:56:37 +00:00
Guy Harris ad1391aa4e Move capture.[ch] to libui.
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0
Reviewed-on: https://code.wireshark.org/review/2711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:38:57 +00:00
Guy Harris b33512b704 Move capture_session.h to capchild; what it declares is defined there.
Change-Id: I8b1407839390b7ac0b45bf6f583c1a509073f002
Reviewed-on: https://code.wireshark.org/review/2709
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 05:09:31 +00:00
Guy Harris df5833723c Move capture_ui_utils.[ch] to libui.
Change-Id: Id0f3d4d60a1acc7aa64fd3737b8f16df5bca4e5a
Reviewed-on: https://code.wireshark.org/review/2708
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 01:36:56 +00:00
Alexis La Goutte 11243e3977 Qt: fix loading of language translation
But need always restart to apply change...

Based on http://qt-project.org/wiki/How_to_create_a_multi_language_application


Change-Id: I0f95afb68aa5b125e0707b0af1ce096dab9c29e4
Reviewed-on: https://code.wireshark.org/review/2286
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-17 00:08:51 +00:00
Irene Ruengeler df8c4bf264 Capture Interfaces Dialog:
- allow to change the interface options in the table
- save the options to preferences when the dialog is left
- add a field for setting a capture filter for all selected interfaces
- add a "Compile BPF" button and a window to show the compiled filter output
- try to address Alexis' and Evan's comments

Change-Id: Ic1272e29183ec80e2d2f4b3e494c79dabe2c3b6f
Reviewed-on: https://code.wireshark.org/review/1946
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-12 05:54:59 +00:00
Guy Harris 6db77b000f Allow wtap_read() and wtap_seek_read() to return records other than packets.
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
REC_TYPE_PACKET, for a record containing a packet, or
REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific
data.

Modify code that reads packets to be able to handle non-packet records,
even if that just means ignoring them.

Rename some routines to indicate that they handle more than just
packets.

We don't yet have any libwiretap code that supplies records other than
REC_TYPE_PACKET or that supporting writing records other than
REC_TYPE_PACKET, or any code to support plugins for handling
REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug
8590.

Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813
Reviewed-on: https://code.wireshark.org/review/1773
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-24 18:31:25 +00:00