Commit Graph

241 Commits

Author SHA1 Message Date
Irene Ruengeler e5757d1dcc Fix GTK warning in EXTCAP parts
Change-Id: I3a4d9baf3592db1394d1177a19014cbef9140759
Reviewed-on: https://code.wireshark.org/review/5628
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Irene Ruengeler <iruengeler@googlemail.com>
2014-12-09 07:18:06 +00:00
Alexis La Goutte acc19b7679 extcap: warning: no previous prototype for ‘extcap_free_arglist’ [-Wmissing-prototypes]
Remove extcap_free_arglist (never used)

Change-Id: I1f751512be627380a992db63c3e4abd22b3aa486
Reviewed-on: https://code.wireshark.org/review/4455
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:16:36 +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
Roland Knall bed29af46d Extcap Capture Interface
Extcap is a plugin interface, which allows for the usage
 of external capture interfaces via pipes using a predefined
 configuration language which results in a graphical gui.

 This implementation seeks for a generic implementation,
 which results in a seamless integration with the current
 system, and does add all external interfaces as simple
 interfaces.

 Windows Note: Due to limitations with GTK and Windows,
 a gspawn-winXX-helper.exe, respective gspawn-winXX-helper-console.exe
 is needed, which is part of any GTK windows installation.

 The default installation directory from the build is an extcap
 subdirectory underneath the run directory. The folder used by
 extcap may be viewed in the folders tab of the about dialog.

 The default installation directory for extcap plugins with
 a pre-build or installer version of wireshark is the extcap
 subdirectory underneath the main wireshark directory.

 For more information see:

  http://youtu.be/Nn84T506SwU
  bug #9009

 Also take a look in doc/extcap_example.py for a Python-example
 and in extcap.pod for the arguments grammer.

 Todo:
   - Integrate with Qt - currently no GUI is generated, but
     the interfaces are still usable

Change-Id: I4f1239b2f1ebd8b2969f73af137915f5be1ce50f
Signed-off-by: Mike Ryan <mikeryan+wireshark@lacklustre.net>
Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: Roland Knall <rknall@gmail.com>
Reviewed-on: https://code.wireshark.org/review/359
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-21 03:34:02 +00:00
Guy Harris 435e7c6106 Move the AirPcap stuff into caputils.
Change-Id: I64b45dad36a3ec491aeb9de3439b4fe19b46f9d8
Reviewed-on: https://code.wireshark.org/review/3308
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-01 00:30:03 +00:00
Guy Harris a760a7db66 Clean up indentation (consistent two-space indentation).
Change-Id: I90210a051f820e70b8b41e5376f881f812c9539f
Reviewed-on: https://code.wireshark.org/review/3173
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-23 09:08:47 +00:00
Irene Ruengeler c7b45d0a7d GTK Remote Capturing
Move the GTK files necessary for managing the recnet remote host from capture_dlg.c to recent.c in order to use them in QT, too.

Change-Id: I3f3fd31ce928162de08c6db7309ef2a9b1e97760
Reviewed-on: https://code.wireshark.org/review/2955
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:29:46 +00:00
Pascal Quantin 032c261997 GTK: fix crash when closing Capture Options dialog box on Windows
Introduced in g929afd2

Change-Id: I911994af2a210f00cd099f26e68d1e1f0fea577b
Reviewed-on: https://code.wireshark.org/review/2901
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:14:52 +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
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 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
Irene Ruengeler 929afd23a7 Fix several GTK warnings in Windows.
Change-Id: I300137319129c3e188884e1240c025d92e34e410
Reviewed-on: https://code.wireshark.org/review/2687
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-28 05:57:30 +00:00
Guy Harris 7bbf35b9fa Fix some more capchild includes.
Change-Id: I6d6cd79ee9e630fe81eb6deca9691249b44bdaf4
Reviewed-on: https://code.wireshark.org/review/2595
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 00:36:24 +00:00
Roland Knall 268104a1dd CaptureDialog: Fix IF type for user created pipe
- If a user adds a pipe via "Capture Options"->"Manage Interfaces"
   ->"Pipes" the device.if_type.type is either not filled out (in
   the case if no other interfaces exist), or will be set to the
   last set if_type of the device queried by the iteration in line
   3537.

 - One could argue, that this is just a fixup, as still the issue
   remains, that the device structure will not be resetted, after
   the search for an already existing pipe element. Maybe a separate
   variable should be used for searching as it is used for adding
   the pipe

Change-Id: Ia727bf3ce270a62d065e8c524a13768af389c346
Reviewed-on: https://code.wireshark.org/review/1296
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-23 12:14:42 +00:00
Martin Kaiser 97ba9406e7 fix a crash in the GTK "Interface Management" dialogue
for Pipes and Local Interfaces
(Capture / Options / Manage Interfaces)

if you start with an empty dialogue, select a pipe using Browse and
press Save, wireshark crashes because of a strcmp() against the
uninitialized pipe_name

initialize pipe_name to NULL and make sure its value is reset when the
dialogue is closed

don't add a pipe unless there's an active selection in the pipe list
(which may be "New Pipe")

Change-Id: Id460c8d0d43cd7fc4cb8f4e9b4357898bbef20f7
Reviewed-on: https://code.wireshark.org/review/776
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21 21:24:28 +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
Peter Hatina 78ff87e655 Reorganize Capture Options dialog
Opening Capture Options dialog on low resolution displays (e.g. 1366x768) in GNOME-shell makes user unable to see the bottom of the dialog

Change-Id: Icc39d5ca89f98edb3ff246cd23ab9663a3dfbd1e
Reviewed-on: https://code.wireshark.org/review/453
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-03-06 21:27:02 +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
Alexis La Goutte 1115889c0b Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Change-Id: I745f838a763e5cc89e1b9c0536ad3cb299b00786
Reviewed-on: https://code.wireshark.org/review/245
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-18 13:50:58 +00:00
Stig Bjørlykke 0d31c840ae Removed debug output.
svn path=/trunk/; revision=53903
2013-12-10 14:43:15 +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
Chris Maynard 93f15d640c Specify SI units for the max filesize autostop condition. For now, keep the capture buffer size in IEC units, but document it as such.
#BACKPORT(1.10, 1.8(?))

svn path=/trunk/; revision=53728
2013-12-02 19:17:12 +00:00
Chris Maynard 8a849e82e1 When a snaplength isn't specifically set by the user, the default snaplength is used. In this case, rather than display the text, "default", display the actual value so the user always knows which value will be used. Other tools (tcpdump, for example) uses a different default snaplength, so it may not have been obvious to all users which value Wireshark uses for its default snaplength (even if it is documented in the man pages).
svn path=/trunk/; revision=53660
2013-11-29 23:52:32 +00:00
Chris Maynard 5d44edf894 While r53608 fixed the "Use promiscuous mode on all interfaces" toggle button behavior, it wasn't enough, so use the technique from r53609 for the "Capture on all interfaces" toggle button to fix it completely.
#BACKPORT(1.10)

svn path=/trunk/; revision=53611
2013-11-27 05:31:10 +00:00
Chris Maynard eabd5d8534 OK, capture_all is only ever set to TRUE or FALSE, so just use it directly.
svn path=/trunk/; revision=53610
2013-11-27 05:13:22 +00:00
Chris Maynard 136030657b Make "Capture on all interfaces" toggle button behave properly, particularly when all interfaces had been selected but one of them is deselected.
#BACKPORT(1.10)

svn path=/trunk/; revision=53609
2013-11-27 05:03:31 +00:00
Chris Maynard a01b501445 Make "Use promiscuous mode on all interfaces" toggle button work properly again.
#BACKPORT(1.10)

svn path=/trunk/; revision=53608
2013-11-27 03:02:51 +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 b01acd4b25 Add explanatory comments.
svn path=/trunk/; revision=53596
2013-11-26 09:10:50 +00:00
Guy Harris 747ab4e006 Blank after comma for all arguments in that call.
svn path=/trunk/; revision=53579
2013-11-25 20:54:19 +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
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
Jeff Morriss d0992bf8cd Add a #define for the default capture buffer size and use it.
svn path=/trunk/; revision=47942
2013-02-28 15:27:56 +00:00
Jeff Morriss 4e2090bdc9 From Anders: more places to increase the default capture buffer size.
svn path=/trunk/; revision=47939
2013-02-28 14:36:41 +00:00
Martin Kaiser b451f267b6 for an interface that does not support monitor mode, make sure that
monitor mode is not enabled

(this fixes the gui part but there's probably more to do)

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

svn path=/trunk/; revision=47399
2013-01-31 22:30:56 +00:00
Chris Maynard 394b6c1c00 Fix VS Studio Analysis warning C6244: Local declaration of 'iftype' hides previous declaration at line '1046'
svn path=/trunk/; revision=47213
2013-01-22 17:31:07 +00:00
Bill Meier 2dda8659ef Fix two issues related to conversion to use ws_gtk_grid...() [svn #47002].
svn path=/trunk/; revision=47154
2013-01-18 20:55:11 +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
Anders Broman 402906be13 Opening the capture options triggers a rescan of all the packets caused by the call to update_decryption_mode_list() for airpcap.
If we don't get the airpcap_if_list, don't do anything regarding air_pcap.

update_decryption_mode_list() should probably check if a change is taking place before rescaning all packets.

svn path=/trunk/; revision=47131
2013-01-17 12:21:57 +00:00
Irene Rüngeler 2dc365db46 Another solution to fix bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8183.
Now both windows are modal.

svn path=/trunk/; revision=47018
2013-01-10 12:44:52 +00:00
Irene Rüngeler 2a7031f12b Fix for bug 8183 reported by David Bergeron.
svn path=/trunk/; revision=47015
2013-01-10 09:27:07 +00:00
Anders Broman bf22d3ffd3 Use ws_gtk_grid...() instead of gtk_table...();
svn path=/trunk/; revision=47003
2013-01-09 19:10:47 +00:00
Guy Harris 6255cc03f0 Fix another discarded qualifier error.
Remove some redundant declarations/definitions from
ui/gtk/capture_dlg.h.

svn path=/trunk/; revision=46780
2012-12-26 12:24:55 +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
Evan Huus 52aff57285 Remove unneeded initializations, and one redundant if condition.
svn path=/trunk/; revision=46702
2012-12-22 21:14:13 +00:00
Irene Rüngeler 7f6519287e Make "Edit Interfaces Dialog" modal
-This line, and those below, will be ignored--

M    ui/gtk/capture_dlg.c

svn path=/trunk/; revision=46500
2012-12-11 16:55:17 +00:00
Irene Rüngeler 7cf0d9ed2b Capture Options Dialog: Update buttons for "Capture all in Prom. Mode" and "Capture on all interfaces"
Update filter string

svn path=/trunk/; revision=46499
2012-12-11 16:51:36 +00:00
Michael Tüxen 0f3f4eb79a Don't leak a string.
svn path=/trunk/; revision=46442
2012-12-07 12:58:19 +00:00
Irene Rüngeler df8cb34370 Fix Bug reported by Anders Broman concerning the capture filter.
svn path=/trunk/; revision=46440
2012-12-07 12:08:12 +00:00
Bill Meier 62d0eacfc7 Fix two more incorrect s/link/linkr/ done by me in SVN #46426.
svn path=/trunk/; revision=46428
2012-12-06 21:35:03 +00:00
Bill Meier 60fd1d6d27 Fix compile error;
svn path=/trunk/; revision=46427
2012-12-06 21:27:04 +00:00
Bill Meier ae68f42297 Fix [-Wshadow] warnings.
svn path=/trunk/; revision=46426
2012-12-06 20:59:53 +00:00