Commit Graph

78 Commits

Author SHA1 Message Date
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
Jeff Morriss 2f77efce7d Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :
Try to call get_interface_descriptive_name() as little as possible (storing
the result in capture_opts) to avoid a performance hit during live capture
(especially if you have lots of interfaces) and to avoid leaking memory.

One issue with this is that capture_opts.c cannot (without adding significant
dependencies) set the iface_descr so readers of that field (only gtk/main.c
and tshark.c) use a macro to (set if not already set and) get the value of
that field.

svn path=/trunk/; revision=22587
2007-08-22 16:30:16 +00:00
Gerald Combs 89a2966ced Add a "-S" flag to dumpcap, which prints out interface statistics. Use
this in the GUI rather than calling pcap_stats() directly. This gets rid
of the last pcap_open_live() call in the GUI code. Update
README.packaging.

svn path=/trunk/; revision=22443
2007-08-02 21:45:27 +00:00
Gerald Combs e9f1a0b692 One more step in privilege separation.
Add a capture_interface_list(), which works similar to
get_interface_list() except that it forks dumpcap instead of calling
the pcap routines directly.  Use it in the GUI.

Add a "-I" flag to dumpcap, which prints out verbose interface
information.

Tested under Windows and Linux.

svn path=/trunk/; revision=22071
2007-06-11 03:58:58 +00:00
Guy Harris 11d553e9ce Convert the arguments to if_list_comparator_alph() to if_info_t *'s
early on, and use the converted versions.

#if 0 out the error dialog for CANT_GET_AIRPCAP_INTERFACE_LIST, rather
than commenting it out - it's a bit easier to un-out the code, and you
don't have to worry about whether there's a comment in the stuff being
xxx-outed.

svn path=/trunk/; revision=21838
2007-05-19 22:00:09 +00:00
Jaap Keuter 3e0d91c307 Get the build going.
svn path=/trunk/; revision=21833
2007-05-19 10:59:44 +00:00
Gerald Combs 55d2b928c2 From Dustin Johnson:
- Update the wireless/AirPcap GUI code to support 802.11n as well as
    some related upcoming code changes.
  - Remove airpcap.h from the repository, since it exists in the AirPcap
    devpack (and will be superseded Real Soon Now).
  - Show the individual channel flag bits in radiotap.
  
Fix the 802.11n MCS set display.

This is a partial checkin, so hopefully nothing is broken.

svn path=/trunk/; revision=21831
2007-05-18 21:06:20 +00:00
Gerald Combs ed12aa0cb1 Propagate the recent interface list changes (r20521) to the AirPcap code.
Fix a mismatched declaration found by Gisle Vanem.

svn path=/trunk/; revision=20535
2007-01-23 20:12:09 +00:00
Guy Harris cc22748169 Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have
them set that "gchar *" to point to a g_malloc()ed string containing the
error message, rather than taking a pointer to a buffer for that message
as an argument.  That's more like what's done in Wiretap, and doesn't
impose an upper limit on the lengths of those error messages.  If that
pointer is null, don't allocate the message string and return it.

Have that error message already have the "cant_get" processing applied
to it, so nobody other than those routines need to call the "cant_get"
routines to process the error messages.

Have get_airpcap_interface_list() explicitly set "*err" to the
appropriate error code.

Clean up indentation.

svn path=/trunk/; revision=20521
2007-01-21 23:45:36 +00:00
Ulf Lamping fdfd0be5bd remove some warnings
svn path=/trunk/; revision=20116
2006-12-11 19:43:19 +00:00
Gerald Combs a980d04783 From Davide Schiera and Giorgio Tino: Add initial WPA/WPA2 decryption
support.

WEP key preferences have been overloaded to allow WPA keys.  The
decryption code currently uses Windows-specific data types, but can be
converted to use glib equivalents.

Add a few text and whitespace fixups.

svn path=/trunk/; revision=20049
2006-12-05 19:24:25 +00:00
Ulf Lamping 2aa248f652 seems the height offset 16 seems a bit too small to prevent a scrollbar, using 20 instead
svn path=/trunk/; revision=19088
2006-08-30 20:24:49 +00:00
Ulf Lamping 8ed01f4cb7 fix a warning by removing now unused code
svn path=/trunk/; revision=19051
2006-08-27 10:41:30 +00:00
Guy Harris 0f6f2f4b45 Clean up indentation.
Only define cap_air_w if we have AirPcap.

svn path=/trunk/; revision=19041
2006-08-26 00:12:12 +00:00
Ulf Lamping 0fcfd360e9 capture interfaces dialog: use capture stock icons instead of plain text buttons
capture info dialog: add a "Help" and use stock buttons

svn path=/trunk/; revision=19020
2006-08-24 21:40:53 +00:00
Gerald Combs f9661850d1 Add support for AirPcap, an upcoming wireless product from CACE. Support
is disabled by default, and can be enabled by setting AIRPCAP_CONFIG
in config.nmake.  The code is currently limited to Windows, but should
be adaptable to other platforms.

The official announcement won't come until next week, so you'll have to
read the source for details.  :)

svn path=/trunk/; revision=18928
2006-08-16 18:01:25 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping ec5efe7370 as I've experienced a scrollbar again while having 7 interfaces, I've tried to add the number of interfaces to the height formula to fix this
svn path=/trunk/; revision=17960
2006-04-22 20:16:47 +00:00