Commit Graph

231 Commits

Author SHA1 Message Date
Anders Broman 77074a5a37 From Evan Huus: - Make sure that unsupported link-layer types *always* have a dlt of -1 in the `device.links` list so that we can tell if they're unsupported. - When building the combo-box of link-layer types, make the unsupported ones insensitive (disabled), and be sure to default to a supported one if we have one. - Compiling a capture filter requires a supported link-layer type, so disable the 'Compile BPF' button if there are none. - It is not always a programming error to have no active pointer in the combo-box, as this can happen when all the available entries are unsupported (and thus disabled). Don't abort with g_assert_not_reached() when this happens. - Unlock the `pcap_compile_mtx` mutex in all cases after compiling a packet filter. This was causing a deadlock (complete program hang) if you tried to compile two different filters in a row on the same interface. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7135
svn path=/trunk/; revision=42410
2012-05-04 04:35:43 +00:00
ruengeler 0819722ad8 Fix bug #7178 reported by aparan
svn path=/trunk/; revision=42206
2012-04-23 12:34:16 +00:00
Anders Broman a094f232ea From Martin Kaiser: menus, main window title, icons are not reset when capture is interrupted before any data arrives. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7129
svn path=/trunk/; revision=42149
2012-04-20 05:20:04 +00:00
Guy Harris 53155a11c0 Get rid of the error code argument to scan_local_interfaces(); nobody
uses it once it's filled in.

From Evan Huus: in scan_local_interfaces(), pass NULL to
capture_interface_list(), as we don't use the error string (and don't
free it, either).

In fill_capture_box(), for CANT_GET_INTERFACE_LIST, include the error
string in the report, and free it, in all cases, when we're done with
it.

svn path=/trunk/; revision=42089
2012-04-15 23:03:58 +00:00
Guy Harris 6b1c5a9e0d From Evan Huus: free if_string when we're done with it. Fixes bug 7093.
From me: don't bother initializing if_string in its definition, as if
it's used at all it's set to a different value before all uses.

svn path=/trunk/; revision=42073
2012-04-14 18:04:12 +00:00
Anders Broman 7330ec7035 From Evan Huus: Memory leak in scan_local_interfaces. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7086
svn path=/trunk/; revision=42061
2012-04-14 07:44:51 +00:00
Guy Harris 7ee4c2fb40 Make the comment I added, saying what scan_local_interfaces() does, more
accurate.

svn path=/trunk/; revision=41713
2012-03-21 06:37:34 +00:00
Guy Harris 7f5162352f scan_local_interfaces() isn't in capture_opts.c; don't declare it in
capture_opts.h.  (It arguably belongs somewhere other than in a file in
ui/gtk, but, if so, move it there, e.g. to something in ui.)

svn path=/trunk/; revision=41712
2012-03-21 06:31:39 +00:00
Guy Harris 40a034b3f5 Fix 4-space tabs.
svn path=/trunk/; revision=41708
2012-03-21 06:10:17 +00:00
Guy Harris cd1debf183 Add an explicit capture_cb_capture_failed indication for the case where
we weren't even able to start a capture, rather than delivering a fake
"capture start" indication and relying on a later "capture file closed"
indication - for a capture that was never opened in the first place - to
handle GUI cleanups.

Don't deliver any GUI indications in cf_close() if we didn't have a
capture file open in the first place.

Clear the status bar and welcome header if that indication is delivered.

If we start a capture from the command line with the -k flag, don't show
the captured packet information unless the capture actually starts.

svn path=/trunk/; revision=41521
2012-03-13 08:36:25 +00:00
Guy Harris dce6f88487 SystemConfiguration framework, not IOKit?
svn path=/trunk/; revision=41519
2012-03-13 05:02:48 +00:00
Guy Harris b85eebdd7e Suggest a better way of getting the interface type on OS X.
svn path=/trunk/; revision=41518
2012-03-13 05:02:16 +00:00
Guy Harris fa64659e93 Closing a capture file has nothing to do with the list of interfaces on
which to do a live capture; don't clear the latter list when closing the
capture file.

collect_ifaces() should clear out the existing list of interfaces before
filling that list up with the interfaces selected by the user.  In
addition, when it frees up interfaces in that list, it should free up
the strings attached to those interfaces.

svn path=/trunk/; revision=41517
2012-03-13 03:48:27 +00:00
Guy Harris 681c29c5d5 Don't close the currently loaded capture file in capture_start(), do so
in its callers; when starting a capture with "wireshark -k", there's no
capture file to close, and closing it might be provoking some UI actions
that cause crashes on Windows.

Don't copy the list of selected interfaces to the list of capture
interfaces in capture_start(), either, do that in the callers; we were
already doing that in one place and, in one of the remaining cases,
namely "wireshark -k", we should do so only if no capture interfaces
were supplied on the command line.  (I.e., the set of interfaces on
which we want to capture depends on where in the UI the capture is being
started.)

svn path=/trunk/; revision=41491
2012-03-11 20:08:54 +00:00
Guy Harris 42df48aab0 capture_opts_add_opt() does just fine at adding an interface to the
capture options, so don't special-case the -i option.

svn path=/trunk/; revision=41477
2012-03-11 07:10:48 +00:00
Michael Tüxen 64ba56a080 From Irene Ruengeler: Whitespace changes.
svn path=/trunk/; revision=41174
2012-02-24 12:54:15 +00:00
Michael Tüxen b1fa4c19e6 From Irene Ruengeler:
* Add support in the GUI for pipes.
* Allow the local interfaces to be rescanned via the GUI.
* Allow remote interfaces to be added and deleted.
The GUI can be extended to support other ways of capturing.

svn path=/trunk/; revision=41105
2012-02-21 11:59:41 +00:00
Jörg Mayer a206a11e7e include "../util.h" -> include "ui/util.h"
svn path=/trunk/; revision=41048
2012-02-17 12:46:50 +00:00
Guy Harris 96b89de3e9 Capitalize the "P" in "Packet" in "Add or Edit Packet Comment". Add
"..." after it, as it pops up a dialog box to let you actually type in a
comment.

Add "Add or Edit Packet Comment" to the menubar's Edit menu.

svn path=/trunk/; revision=41005
2012-02-12 23:09:14 +00:00
Anders Broman 15d8fe8baa Get the comment and put it in the textview.
svn path=/trunk/; revision=40985
2012-02-12 16:18:25 +00:00
Martin Mathieson 203d9589f3 Initialise a variable to avoid warning.
svn path=/trunk/; revision=40916
2012-02-07 11:12:17 +00:00
Alexis La Goutte ee590fdd58 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40889
2012-02-06 22:02:03 +00:00
Michael Tüxen 3d3346bc7e Try to make the buildbots happy.
svn path=/trunk/; revision=40726
2012-01-25 20:26:34 +00:00
Michael Tüxen 14b1a44c0f Third try. This time pipes and stdin are supported and the
test scripts are passed.

Use a global list containing all interfaces and only change
properties of the entries when changes are made in the GUI.
Do not misuse the list of interfaces specified on the command
line anymore.

This patch does not provide any new functionality, it just
provides the base for future extensions like removing
remote interface, mulitple airpcap devices and multiple
pipes.

This patch was provided by Irene Ruengeler.

svn path=/trunk/; revision=40715
2012-01-25 13:04:32 +00:00
Michael Tüxen 4fece25e7f We need a 3rd try. (After learning how to run the testuite on Windows locally).
svn path=/trunk/; revision=40695
2012-01-24 17:12:56 +00:00
Michael Tüxen b0819f5a80 (Try to) make the buildbot happy.
svn path=/trunk/; revision=40694
2012-01-24 16:40:16 +00:00
Michael Tüxen 08d6785412 Second try. This time pipes and stdin are supported.
Use a global list containing all interfaces and only change
properties of the entries when changes are made in the GUI.
Do not misuse the list of interfaces specified on the command
line anymore.

This patch does not provide any new functionality, it just
provides the base for future extensions like removing
remote interface, mulitple airpcap devices and multiple
pipes.

This patch was provided by Irene Ruengeler.


svn path=/trunk/; revision=40693
2012-01-24 16:05:26 +00:00
Guy Harris dacb4133e8 Restructure the recent file code so that recent.c is GUI-independent;
move it to the top-level source directory for now, and move
ui/gtk/recent.h to the ui directory.

svn path=/trunk/; revision=40561
2012-01-18 19:38:34 +00:00
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Jörg Mayer 89ac6f314f More .. -> ../.. changes after gtk/ move
svn path=/trunk/; revision=40523
2012-01-15 22:40:03 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00