Commit graph

106 commits

Author SHA1 Message Date
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
Guy Harris
e53bf053f9 For now, just refer to global_capture_opts, replacing references to the
now-defult global capture_opts pointer; we eventually should try to
minimize the use of global variables.

Export global_capture_opts from gtk/main.h.

Clean up indentation.

svn path=/trunk/; revision=25571
2008-06-24 02:22:36 +00:00
Stig Bjørlykke
860028c634 Removed the usage of topic_available() as we now have all topics.
svn path=/trunk/; revision=25505
2008-06-21 13:36:31 +00:00
Ulf Lamping
6a5b1e0ec0 use the ending "_win32" for every windows specific file
svn path=/trunk/; revision=24972
2008-04-13 12:14:57 +00:00
Ulf Lamping
0b97c4211e sort #includes by directories
svn path=/trunk/; revision=24967
2008-04-13 00:55:59 +00:00
Ulf Lamping
1f8e6c08be various code cleanup
svn path=/trunk/; revision=24964
2008-04-12 23:34:44 +00:00
Guy Harris
21e4075535 Add a stub set_capture_if_dialog_for_capture_in_progress() routine when
HAVE_LIBPCAP isn't defined, as it's called even when it's not defined.

svn path=/trunk/; revision=24958
2008-04-12 21:30:38 +00:00
Ulf Lamping
e08ae89241 cleanup of "capture_in_progress" ugly hack from main_toolbar, call capture_if_dlg directly from within main.c
svn path=/trunk/; revision=24943
2008-04-12 17:04:21 +00:00
Ulf Lamping
4151a40503 rename toolbar to main_toolbar
svn path=/trunk/; revision=24940
2008-04-12 16:38:13 +00:00
Ulf Lamping
55c2be83db move stock icon code from toolbar.c into specific stock_icons file(s)
svn path=/trunk/; revision=24921
2008-04-12 00:49:20 +00:00