Commit Graph

115 Commits

Author SHA1 Message Date
Gerald Combs 4608a76a51 Remaining GLIB_CHECK_VERSION and GTK_CHECK_VERSION in the gtk directory.
svn path=/trunk/; revision=37973
2011-07-11 19:10:57 +00:00
Michael Tüxen b2ab9d134a You can't select/deselct interfaces in the capture/interfaces
dialog while you are capturing.
This patch is provided by Irene Ruengeler.

svn path=/trunk/; revision=37938
2011-07-08 13:40:00 +00:00
Michael Tüxen 746ca92b46 The argument of capture_get_if_icon() is used.
svn path=/trunk/; revision=37932
2011-07-07 21:16:03 +00:00
Michael Tüxen 4b8f5a1865 Support selecting multiple interfaces in the capture/interfaces
dialog.
Until the capture/options dialog supports multiple interfaces, the
options button is only selectable when 0 or 1 interfaces are selected.
This patch is based on work by Irene Ruengeler.

svn path=/trunk/; revision=37903
2011-07-05 20:29:33 +00:00
Michael Tüxen 421dafd2de Get rid of old non-interface specific settings which are now interface
specifc. This finalizes the change of the infrastructure.
This patch is based on work by Irene Ruengeler.

svn path=/trunk/; revision=37794
2011-06-27 00:09:03 +00:00
Michael Tüxen 985a98dd1b Fix the case where you start with interfaces on the command line
(so using ifaces) and then using the GUI (which only deals with
iface).

These kind of problems will completely disappear when the
old strucuture components like iface have completely be
retired. This is the next thing we will work on.

svn path=/trunk/; revision=37345
2011-05-22 11:11:00 +00:00
Guy Harris 4fdcc5c180 Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
as an argument, along the lines of ws_fstat64, and, on Windows, make it
use _wstati64, to handle 64-bit file sizes.

svn path=/trunk/; revision=36547
2011-04-10 20:59:10 +00:00
Gerald Combs 9bdecea98c Fix compilation on Windows.
svn path=/trunk/; revision=35967
2011-02-16 19:26:08 +00:00
Stephen Fisher 82c78778ae More cleanup toward being able to compile with GTK+ 3.0. Mostly replacing
deprecated GtkToolTips with new functions.


svn path=/trunk/; revision=35966
2011-02-16 18:27:00 +00:00
Bill Meier 2b0f6a63f1 Define some fcns & vars as static;
Rename g_capture_in_progress to gbl_capture_in_progress (capture_if_dlg.c)
Do some whitespace cleanup.

svn path=/trunk/; revision=34490
2010-10-12 17:39:44 +00:00
Jeff Morriss b4c2ed1b86 Remove some unnecessary includes: a lot of things don't need globals.h and register.h
svn path=/trunk/; revision=34017
2010-08-30 16:10:01 +00:00
Guy Harris 15e546e65d If the user asks for the Capture -> Interfaces dialog, and there are no
network interfaces, pop up a dialog saying that, rather than popping up
an empty Interfaces dialog.

svn path=/trunk/; revision=32884
2010-05-19 03:05:40 +00:00
Guy Harris 167ab3a98c In Wireshark and TShark, run dumpcap to get interface lists and lists of
link-layer header types for interfaces; if special privileges are
necessary to open capture devices, Wireshark and TShark shouldn't have
those privileges, but dumpcap should.

svn path=/trunk/; revision=32104
2010-03-04 01:12:04 +00:00
Bill Meier 7b01915b6b Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31730
2010-01-29 16:13:26 +00:00
Stig Bjørlykke 6946604051 Use the USB icon for usbmon devices on Linux.
svn path=/trunk/; revision=30960
2009-11-14 00:43:22 +00:00
Gerald Combs 7b7d48d2a7 Check for vmnet interfaces everywhere, not just Windows and OS X. Make
the "vmnet" check case-insensitive. Look for "vmxnet" as well. Clarify
vmnet (host) vs vmxnet (guest).

svn path=/trunk/; revision=30929
2009-11-11 00:43:23 +00:00
Gerald Combs 3d40778d1b Move the contents of image/expert_*.h to gtk/expert_indicators.h. Add
pixbuf versions of the wired, wireless, and bluetooth interface icons to
gtk/network_icons.h. In the interface list use the new icons in all
their alpha-channel-infested glory. Add Makefile targets for rebuilding
the pixbuf files.

svn path=/trunk/; revision=30922
2009-11-10 18:02:05 +00:00
Gerald Combs 3c3014820b Add some null pointer checks. This is a blind attempt to fix bug 4155.
svn path=/trunk/; revision=30846
2009-11-06 18:08:59 +00:00
Gerald Combs 77ce6145bb Draw little wireless icons for AirPcap adapters.
svn path=/trunk/; revision=30839
2009-11-05 22:23:41 +00:00
Anders Broman 135ca5136f Change window_new() to dlg_window_new() and destroy the window with the top level window.
svn path=/trunk/; revision=28796
2009-06-21 20:42:07 +00:00
Gerald Combs caa884723c For interfaces that don't support PacketOpenAdapter (such as TurboCap),
disable the "Details" button in the interface list. Update an error
dialog to try to be more helpful.

svn path=/trunk/; revision=28675
2009-06-09 20:08:47 +00:00
Stig Bjørlykke 8983d6813b Make it possible to toggle the displayed IP address in the capture interfacs
dialog if more than one IP address exists for the selected device.

svn path=/trunk/; revision=28498
2009-05-26 21:13:16 +00:00
Stig Bjørlykke 8a465b4cb3 From Carlos G Mendioroz:
Use the user defined comment in the Capture Interfaces dialog box.

svn path=/trunk/; revision=28482
2009-05-26 13:52:03 +00:00
Gerald Combs 0a069bc6a3 Migrate the Airpcap UI code from GtkCombos (deprecated) to GtkComboBoxes.
Consolidate some common code. Rename a bunch of variables. Remove some
unused code.

Fix an offset flag bug in airpcap_loader.c.

This had to be merged by hand with r28349. Hopefully none of those
changes were clobbered.

svn path=/trunk/; revision=28350
2009-05-13 16:14:28 +00:00
Stig Bjørlykke 182c7138e4 Removed an unused variable.
svn path=/trunk/; revision=28344
2009-05-13 10:02:23 +00:00
Jörg Mayer 54d5fdd08d #if 0 out an unused function declaration. Make it
match its implementation return type anyway.

The Airpcap icon should only depend of HAVE_AIRPCAP
but not on _WIN32


svn path=/trunk/; revision=28330
2009-05-11 18:29:23 +00:00
Anders Broman 7daa41088b Get rid of deprecated functions by removing
"#if 0":ed code.

svn path=/trunk/; revision=28278
2009-05-05 18:37:22 +00:00
Guy Harris 54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier 2adef63689 stat() ==> ws_stat() [to keep checkAPIs happy];
Also: free() ==> g_free();

svn path=/trunk/; revision=27676
2009-03-09 15:10:11 +00:00
Ulf Lamping bb3b362089 add "PPP/SLIP" to the dialup interfaces
svn path=/trunk/; revision=27660
2009-03-08 19:38:24 +00:00
Guy Harris 5c5f14fe49 Use the Bluetooth icon for Linux raw Bluetooth devices. Note some issues
with using it in OS X.

svn path=/trunk/; revision=27450
2009-02-14 03:03:28 +00:00
Ulf Lamping 974a0d94a7 add a (Windows only) bluetooth network interface icon
svn path=/trunk/; revision=27447
2009-02-13 21:35:41 +00:00
Guy Harris 63b93ee09f Use network_virtual_16.xpm for VMware interfaces on OS X (well, use them
if VMware Fusion ever lets you capture on them, which it currently
doesn't appear to do), on the assumption that this icon is appropriate
for VMware interfaces on the host machine.

svn path=/trunk/; revision=27437
2009-02-12 01:48:47 +00:00
Ulf Lamping b75dc4f8c8 network_virtual_16.xpm currently only used on Win32
svn path=/trunk/; revision=27434
2009-02-11 21:12:55 +00:00
Ulf Lamping a75c684a91 use a special icon for "VMware" virtual networks (yes, I know the icon is *not* very good - but I have no better idea how to display that)
svn path=/trunk/; revision=27431
2009-02-11 20:20:10 +00:00
Guy Harris 10e417e82e Add Linux support for determining the interface icon; this depends on a
2.6 kernel feature, but it will just pick the default icon if that
feature doesn't work.

svn path=/trunk/; revision=27350
2009-02-02 04:15:17 +00:00
Guy Harris 11281d8085 Don't include ../image/toolbar/network_wireless_16.xpm on platforms
where we don't (yet) use it.

svn path=/trunk/; revision=27348
2009-02-01 23:15:55 +00:00
Guy Harris 82b8d25678 Move declarations of routines in gtk/capture_if_dlg.c into
gtk/capture_if_dlg.h.  Include that header when appropriate.

Get rid of include of <sys/wait.h> in gtk/capture_if_dlg.c; there's no
forking or waiting in there.

Make update_if() in gtk/capture_if_dlg.c static - it's not used outside
that file.

svn path=/trunk/; revision=27347
2009-02-01 23:14:07 +00:00
Guy Harris b4940aca41 No such luck with the AF_LINK address on FreeBSD or OpenBSD.
svn path=/trunk/; revision=27346
2009-02-01 22:57:17 +00:00
Guy Harris ef07402aa5 Add (preliminary, and a bit hacky) support for interface-type icons on
OS X.

Add some comments to the interface-type icon code, and, when looking for
certain text in the description on Windows, look in the interface
description supplied by WinPcap rather than the user-supplied
description (if we want to look in the latter, we presumably want to
look in both, so the user giving a wireless interface a name they like
won't break the code that checks for wireless interfaces).  There's
probably *some* NDIS OID that can give you the information you want -
hopefully, not an NDIS 6-only OID).

svn path=/trunk/; revision=27345
2009-02-01 22:20:42 +00:00
Jaap Keuter 03a31436a1 Exclude the new icons from the *NIX build.
svn path=/trunk/; revision=27338
2009-01-31 07:00:05 +00:00
Ulf Lamping e1cce91312 mark unused parameter (under unix)
svn path=/trunk/; revision=27336
2009-01-31 00:33:02 +00:00
Ulf Lamping df3c99a109 Windows only: for some typical capture interface names (with a "built in" heuristic), show specific icons in the interface list and the welcome page (this helps to find the right interface)
svn path=/trunk/; revision=27335
2009-01-30 22:55:52 +00:00
Gerald Combs 41d39d4f33 If we click on an interface in the welcome screen, correctly enable/disable
the wireless toolbar.

svn path=/trunk/; revision=26471
2008-10-15 22:51:17 +00:00
Bill Meier 44efa0ed2e Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_timeout_add()     ==> g_timeout_add
   gtk_timeout_remove()  ==> g_source_remove()

Also: timer callback should return gboolean (not void or gint)

svn path=/trunk/; revision=25672
2008-07-08 02:25:30 +00:00
Bill Meier 56206e0002 Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_container_border_width()          ==> gtk_container_set_border_width()
  gtk_container_children()              ==> gtk_container_get_children()
  gtk_entry_new_with_max_length()       ==> gtk_entry_new(); gtk_entry_set_max_length()
  gtk_menu_append()                     ==> gtk_menu_shell_append()
  gtk_menu_prepend()                    ==> gtk_menu_shell_prepend()
  gtk_notebook_set_page()               ==> gtk_notebook_set_current_page()
  gtk_paned_gutter_size()               ==> gtk_paned_set_gutter_size()
  gtk_radio_button_group()              ==> gtk_radio_button_get_group()
  gtk_signal_connect()                  ==> g_signal_connect()
  gtk_signal_disconnect()               ==> g_signal_handler_disconnect()
  gtk_signal_emit_by_name()             ==> g_signal_emit_by_name()
  gtk_signal_handler_block_by_data()    ==> g_signal_handlers_block_matched()
  gtk_signal_handler_block_by_func()    ==> g_signal_handlers_block_by_func()
  gtk_signal_handler_unblock_by_data()  ==> g_signal-handlers_unblock_matched()
  gtk_signal_handler_unblock_by_func()  ==> g_signal-handlers_unblock_by_func()
  gtk_spin_button_get_value_as_float()  ==> gtk_spin_button_get_value()
  gtk_toggle_button_set_state()         ==> gtk_toggle_button_set_active()

svn path=/trunk/; revision=25634
2008-06-29 15:51:43 +00:00
Gerald Combs 72965329b0 Remove a lot of vestigal GTK-Wimp stuff. It's been included with
GTK+ since version 2.8, when its name was changed to the "GTK MS
Windows-Engine."

Simplify the Windows installer by removing the GTK-Wimp option (which
means the "Wireshark" item can be an entry instead of a group). Move
Rawshark to the "Tools" group.

(If anyone wants to disable the MS Windows Engine they can still do so
after installation by disabling or removing libwimp.dll.)

svn path=/trunk/; revision=25611
2008-06-26 16:42:07 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Guy Harris f441b8941e Add gtk/capture_globals.h, to declare global_capture_opts, so files that
don't need global_capture_opts don't need to have it declared and thus
don't need capture_options defined.

Include gtk/capture_globals in the files in question.

Change some more capture_opts references to refer to
global_capture_opts.

Change some global_capture_opts references in routines with a
capture_opts argument to refer to capture_opts.

The structure type is capture_options, not capture_opts; fix some
references.

Include <sys/types.h>, if it's present, in capture_opts.h, so we get
gid_t defined.

Clean up indentation.

svn path=/trunk/; revision=25574
2008-06-24 03:38:15 +00:00