Commit Graph

161 Commits

Author SHA1 Message Date
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
Michael Mann 36e13a4c55 Bugfix "Restart the running live capture" when using multiple files makes a long filename. Bug 2274 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2274)
Yes this solution leaks memory, but I think the handful of bytes leaked is worth fixing this nuisance.  Won't backport until leak is fixed though.

svn path=/trunk/; revision=52793
2013-10-23 15:31:48 +00:00
Gerald Combs a631772243 More ui/util.h includes.
svn path=/trunk/; revision=52545
2013-10-11 17:58:12 +00:00
Jeff Morriss 561a0713d1 Don't close the Capture Options window if there was an error in what was
selected (and we're not going to start capturing).  That way the user can fix
whatever was wrong without having to re-open the dialog.

svn path=/trunk/; revision=52512
2013-10-10 20:23:59 +00:00
Chris Maynard bc654875f0 Handle the 2GiB boundary case of the max filesize autostop condition properly so that we avoid overflow conditions and so that we ensure we don't capture more than 2GiB. Also, document the max filesize autostop value of 2GIB as well as indicating that it's truly GiB and not GB.
This fixes the problem reported on ask: http://ask.wireshark.org/questions/23891/wireshark-wont-run-with-multiple-capture-files

#BACKPORT(1.10) ... not sure about 1.8?

svn path=/trunk/; revision=51576
2013-08-29 18:15:13 +00:00
Gerald Combs 79454ef9fa Add initial capture filter support.
Add CaptureFilterCombo and CaptureFilterEdit classes, similar to their
display filter counterparts. Add a CaptureFilterSyntaxWorker class which
runs a syntax check in a background thread similar to the threaded code
in capture_dlg.c. Add a bunch of related signal and slot plumbing. Other
minor fixups.

svn path=/trunk/; revision=51200
2013-08-08 00:26:57 +00:00
Evan Huus f3fb2c00ec Remove unused variable caught by GCC 4.8.
svn path=/trunk/; revision=50992
2013-07-28 22:02:00 +00:00
Guy Harris 974d0509e8 Explain what the big loop in update_properties_all() is doing, and
what's done after that.

If we want to set the all-interfaces capture filter string, just set it,
don't add anything to the drop-down list for it.

If, after we've succeeded starting a capture, all active interfaces have
the same capture filter, *do* add that filter to the all-interfaces
recent capture filters list.

Also, free g_strduped capture filter strings when we're done with them.

svn path=/trunk/; revision=50986
2013-07-28 20:34:52 +00:00
Guy Harris 210507cc76 Have separate lists of recent capture filters for all interfaces, in
addition to a "global" list.  Store all of those lists in the recent
file.  Maintain the lists in ui/recent.c, rather than attaching them to
widgets; have the code that populates the combo boxes get the lists from
the ui/recent.c code.

This makes a little more of the code GUI-toolkit-independent, and should
fix bug 7278.

#BACKPORT 1.10, 1.8

svn path=/trunk/; revision=50956
2013-07-27 22:37:26 +00:00
Bill Meier e442680f48 gtk_widget_modify_font() has been renamed to gtk_widget_override_font() in GTK3
svn path=/trunk/; revision=50915
2013-07-26 16:19:00 +00:00
Guy Harris 045638fc9b Don't cast away constness, and constify a function parameter.
svn path=/trunk/; revision=50860
2013-07-24 00:12:41 +00:00
Irene Rüngeler 776c949898 Do not hide the interface name in capture options.
Fix for bug 8932 reported by tdarnell5.

svn path=/trunk/; revision=50609
2013-07-15 08:58:32 +00:00
Anders Broman bbf7636e61 From Cal Turney:
Wireshark crashes when switching from a v1.11.0 profile to a v1.4.6 prof and then to a v1.5.1 profile.

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

#BACKPORT 1.10

svn path=/trunk/; revision=50455
2013-07-09 04:22:43 +00:00
Luis Ontanon 7f5d688bda Windows changes for main_window_update ....
svn path=/trunk/; revision=50192
2013-06-27 17:45:07 +00:00
Luis Ontanon 0bdc0efc46 get main_window_update out of the way... pass an update_cb to the capture_sync stuff
... as per the XXX comment removed from tshark.c this was a mess to keep the linker
happy... I couldn't!

I did this without even understanding whether calling main_window_update was realy
necessary in most cases. I guess nothing or more specific update cbs would be best.


svn path=/trunk/; revision=50188
2013-06-27 17:10:50 +00:00
Guy Harris 0b8d569887 If, after editing the settings for a particular interface, we don't have
a Capture Options window to update, don't try to update it.

#BACKPORT

svn path=/trunk/; revision=49850
2013-06-09 00:24:28 +00:00
Guy Harris 845728e520 Make a routine not used outside this file static.
svn path=/trunk/; revision=49535
2013-05-22 23:25:17 +00:00
Guy Harris 8596d17d7f Pull the capture-session state information out of capture_opts and put
it into a separate capture_session structure.  capture_opts should
contain only user-specified option information (and stuff directly
derived from it, such as the "capturing from a pipe" flag).

svn path=/trunk/; revision=49493
2013-05-22 07:44:28 +00:00
Irene Rüngeler f4bb7f45be Apply the filter string if all interfaces are selected.
svn path=/trunk/; revision=49480
2013-05-21 13:00:03 +00:00
Guy Harris aa2e4c1535 Merge capture_start_confirmed() into capture_start_cb().
svn path=/trunk/; revision=49286
2013-05-14 08:22:12 +00:00
Irene Rüngeler 47dd0701f5 The Interface column cannot be hidden any more.
svn path=/trunk/; revision=49227
2013-05-10 07:04:46 +00:00
Irene Rüngeler c3ad89879e Fix Bug 8615 concerning the active "Start" button when remote interfaces are added.
svn path=/trunk/; revision=49134
2013-05-02 11:47:09 +00:00
Martin Kaiser 3beb9a36a3 free the linkname allocated by g_strdup()
set linkname to unknown for interfaces without a linkname (e.g.  pipes)
remove "this should not happen" warnings

svn path=/trunk/; revision=49072
2013-04-27 12:35:30 +00:00
Martin Kaiser e1bc174b39 when a named pipe is added to the interfaces list, it has no linktype
this triggered the g_assert(linktype) in create_and_fill_model()
    
the assert is not necessary as both gtk_list_store_set() and g_free()
can handle NULL parameters
    
remove the assert and add set linktype to "unknown" if the interface
has no linktype 

svn path=/trunk/; revision=49071
2013-04-27 09:55:46 +00:00
Anders Broman 0567069a98 Based on http://anonsvn.wireshark.org/viewvc?revision=48893&view=revision
"Cast scrolling values to gdoubles, not gfloats - GtkAdjustment have
always taken doubles that I've been able to find, and casting to floats
causes loss of precision and weird bugs when the values get enormous."

svn path=/trunk/; revision=48930
2013-04-19 16:26:27 +00:00
Evan Huus 0c8abacbec Fix a minor memory leak caught by cppcheck. Also replace a whole bunch of
"This shouldn't happen" fallback strings with a single assertion.

svn path=/trunk/; revision=48888
2013-04-16 21:20:57 +00:00
Irene Rüngeler 65043453b9 Update interface list when interface get lost and come back.
svn path=/trunk/; revision=48880
2013-04-16 15:12:38 +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
Evan Huus 75fbfb40cb Misc. small string changes to the capture options dialog for consistency and
grammar.

Mostly adapted from some of the less controversial ideas proposed in the thread
at https://www.wireshark.org/lists/wireshark-dev/201212/msg00055.html

svn path=/trunk/; revision=48819
2013-04-11 17:22:11 +00:00
Irene Rüngeler 799985b0f9 Don't select the 'any' device (in Linux), when 'capture all' is selected.
svn path=/trunk/; revision=48815
2013-04-11 12:08:48 +00:00
Pascal Quantin d40de83931 Put "Remote Interface" window on top of "Interface Management" window
svn path=/trunk/; revision=48752
2013-04-05 21:52:39 +00:00
Jaap Keuter 037bb3e614 Have 'Capture file' and 'Stop after' extries left aligned in GTK+ 3 as well.
svn path=/trunk/; revision=48652
2013-03-30 11:57:33 +00:00
Irene Rüngeler 9ace098f37 Fix bug 8524 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8524) and show the correct tooltips for the columns.
svn path=/trunk/; revision=48587
2013-03-27 15:05:32 +00:00
Anders Broman ab42847049 From Peter Hatina:
We call capture_dlg_prep() and do_file_close() in wrong order. capture_dlg_prep() clears global options for currently running capture and then we get an assertation fail in capture_input_new_packets().

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

svn path=/trunk/; revision=48581
2013-03-27 06:37:46 +00:00
Guy Harris f952217194 The capture options edit dialog is a dialog, not a menu, so don't use
GDK_WINDOW_TYPE_HINT_MENU, use GDK_WINDOW_TYPE_HINT_DIALOG.

GDK_WINDOW_TYPE_HINT_MENU, at least on OS X with quartz-wm, causes the
combo box for the interface type not to work, so
GDK_WINDOW_TYPE_HINT_MENU breaks things.

GDK_WINDOW_TYPE_HINT_DIALOG, at least on OS X with quartz-wm, causes the
minimize and whatevertheheckthegreenbuttondoesize buttons to be clear
and inactive, so maybe GDK_WINDOW_TYPE_HINT_DIALOG does something
approximating the right thing.

svn path=/trunk/; revision=48545
2013-03-25 11:41:59 +00:00
Alexis La Goutte 1b5350b10a Add Modelines Info (and remove some tabs)
svn path=/trunk/; revision=48487
2013-03-22 17:37:34 +00:00
Alexis La Goutte f24ce3f381 Remove minimize / maximize buttons for "Edit Interfaces / Remote Capture Settings" Dialog
svn path=/trunk/; revision=48483
2013-03-22 17:31:23 +00:00
Alexis La Goutte d5e14301ba After Revision 46500 ( Make "Edit Interfaces Dialog" modal )
The "Advanced Wireless / Remote Capture Settings" is not on the top of Dialog

Make "Advanced Wireless / Remote Capture Settings " Dialog modal too

svn path=/trunk/; revision=48482
2013-03-22 17:31:15 +00:00
Gerald Combs fa7cc9c20f Bill pointed out that gtk_window_get_size() + gtk_window_resize()
doesn't work well in some cases.  Switch to window_get_geometry() +
gtk_window_set_default_size(). (We use gtk_widget_get_preferred_size()
elsewhere but fetches what appeares the minimum width of the top-level
window on my machine instead of the actual width.)

Use a macro to define the initial conversation and endpoint dialog
heigth and increase its value. Use best-guess dialog metrics and UTF8
entities in a few more spots.

Add a comment about alignment not working quite right in Gtk3.

svn path=/trunk/; revision=48459
2013-03-21 18:39:16 +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
Gerald Combs a8e0c85548 Add frame_new, which creates a frame that best conforms to the GNOME,
Windows, and OS X HIGs. Use it in the capture options dialog. The
capture options dialog is a bit taller now and could probably use a bit
more tweaking.

In the capture options, conversation, and endpoint dialogs use our
best-guess dialog spacing and pad out some areas.

svn path=/trunk/; revision=48445
2013-03-20 22:41:51 +00:00
Irene Rüngeler 44e6a88b13 Add interface options preferences.
svn path=/trunk/; revision=48275
2013-03-13 12:38:08 +00:00
Bill Meier db5727f34c Set the "Capture Options" window as the parent ('transient_for') of the "Interface Management" window.
svn path=/trunk/; revision=48240
2013-03-11 15:46:04 +00:00
Bill Meier 60b9be7c7b "Capture ! Options ! Manage Interfaces": Cleanup handling of Window epansion.
Improves 'expand' handling for both Gtk2 & Gtk3;

Adapted (with additions by me) from a proposed patch by Peter Hatina (Bug #8315).

Also:

1. Don't use gtk_widget_set_size() in several cases when a single use of
   gtk_window_set_default_size() for the "Manage Interfaces" window is sufficient.

2. Add an XXX comment as to a specific call to 'gtk_window_destroy_with_parent'
   actually being a no-op on Windows.

svn path=/trunk/; revision=48237
2013-03-11 01:11:38 +00:00
Anders Broman 5147d6cffa Use explicit casts.
svn path=/trunk/; revision=48187
2013-03-08 07:09:39 +00:00
Anders Broman dc505fd90e Make the prefernce settings work.
svn path=/trunk/; revision=48182
2013-03-07 22:57:11 +00:00
Irene Rüngeler 3a4d29498d Use if_string instead og if_string->name.
svn path=/trunk/; revision=48168
2013-03-07 14:11:45 +00:00
Irene Rüngeler ad61d2ca01 Use ifdefs for buffer size.
svn path=/trunk/; revision=48167
2013-03-07 13:16:48 +00:00
Michael Tüxen 15501fad2a Try to fix the buildbots.
The patch for capture_dlg.c is from Anders...

svn path=/trunk/; revision=48164
2013-03-07 12:06:55 +00:00
Irene Rüngeler cb42bc9fec Add buffersize and snap length to the preferences.
svn path=/trunk/; revision=48163
2013-03-07 09:16:55 +00:00