Commit Graph

96 Commits

Author SHA1 Message Date
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
Ulf Lamping 9af9a0e619 first round to replace SIGNAL_CONNECT with g_signal_connect
This requires some casts to be added and I just don't want to add casts at all possible places. So I compile and only add casts where the (MSVC) compiler has a hard time. 

Unfortunately this won't find any problems in Linux/Unix only code - I'll keep an eye on the buildbot and try to fix things as I'm going on ...

svn path=/trunk/; revision=24912
2008-04-11 21:20:51 +00:00
Ulf Lamping ae5f841083 replace all appearances of BUTTON_NEW_FROM_STOCK with GTK2's gtk_button_new_from_stock
svn path=/trunk/; revision=24904
2008-04-11 18:58:19 +00:00
Bill Meier 0502078a1b OBJECT_..._DATA --> g_object_..._data
svn path=/trunk/; revision=24898
2008-04-11 17:14:11 +00:00
Anders Broman c973aa3830 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24868
2008-04-09 19:39:58 +00:00
Ulf Lamping 2ddd2d6b6e remove GTK1 code
svn path=/trunk/; revision=24812
2008-04-06 22:44:20 +00:00
Stig Bjørlykke f3747bf637 Hide hidden devices in "Capture Interfaces" dialog.
Added a function to check for hidden devices, which also work correctly
for plumbed devices on solaris.

svn path=/trunk/; revision=24231
2008-01-31 16:47:05 +00:00
Bill Meier e923010814 Fix various small memory leaks & 1 invalid g_free (airpcap_gui_utils.c)
svn path=/trunk/; revision=24185
2008-01-24 22:26:05 +00:00
Ronnie Sahlberg 2830cf2045 fix the path to include g_ascii_strcasecmp.h
svn path=/trunk/; revision=23636
2007-11-28 01:23:09 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Stig Bjørlykke 2b49760882 It seems like capture_stats is working as a correctly implemented pcap_stats.
Update the Packets count in Capture Interfaces according to this.

svn path=/trunk/; revision=22755
2007-08-30 17:36:38 +00:00