aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/capture_if_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-14Fix builds without pcap.Guy Harris1-0/+2
Change-Id: I5e327a8147ccd02e4fc689b321718b1910344b33 Reviewed-on: https://code.wireshark.org/review/23527 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-28iface_lists: Remove locked fieldMikael Kanstrup1-18/+13
It seems the locked field of interface_t was used to avoid simultaneous updates of interface entries from either multiple threads or most likely the recursive UI update callbacks case later identified. Since 802362e ("Avoid recursive scan_local_interfaces operation") the recursive callback behavior is no longer happening. And as code does not have consistent checks the locked field can anyway hardly protect a multi-threaded case if such a case exists. Remove the unnecessary locked field. Ping-Bug: 13864 Change-Id: Idc393f702b82aa6014dd636572d00f0d67120bf3 Reviewed-on: https://code.wireshark.org/review/23262 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-25Add GResource message to configure scriptJoão Valverde1-1/+1
Use more descriptive naming while at it. Change-Id: Ic89562cb9fa2cd5e315992f12ad9e46f2361da0b Reviewed-on: https://code.wireshark.org/review/14057 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-18Don't add the wiretap directory to the list of include directories.Guy Harris1-1/+1
If you include something from the wiretap directory, always precede it with wiretap/. Fix some includes of files in the top-level directory to use a path relative to the current directory, not relative to the wiretap directory. This makes it a bit clearer what's being included. Change-Id: Ib99655a13c6006cf6c3112e9d4db6f47df9aff54 Reviewed-on: https://code.wireshark.org/review/13990 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07Don't include much of anything if HAVE_LIBPCAP isn't defined.Guy Harris1-2/+4
We don't need it. Change-Id: Idca29cbd7208c388a1f5d4e2b0131f5cfddc7896 Reviewed-on: https://code.wireshark.org/review/13096 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07Get rid of unused #define.Guy Harris1-6/+0
Change-Id: I16abf022ea79f763b82a28f9dffccbf56630f14c Reviewed-on: https://code.wireshark.org/review/13087 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-12[GTK] Replace deprecated gdk_pixbuf_new_from_inline()João Valverde1-15/+12
Use GResource instead, if available. Add autotools and cmake compile time checks for build requirements (GIO >= 2.32 and GDK-Pixbuf >= 2.26). Merge all the various static pixbuf csource header files into a single pixbuf-csource.h header with external linkage through use of the tools/make-pixbuf-csource.pl script. Fix inline pixbuf build target for some image paths (broken for GTK in gb4a4de7). Add missing 'expert_ok.png' file to distribution (GTK only). Minor improvements to style/structure of ui/gtk/Makefile.am. Bug: 10750 Change-Id: I031296b666ee8b92730400dfa6f71f9ee4304863 Reviewed-on: https://code.wireshark.org/review/10992 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-22Use address functions instead of ADDRESS macros in ui.Gerald Combs1-2/+2
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the ui directory. Change-Id: I10e95e66c8da5b880133452ebc484c53046e87ba Reviewed-on: https://code.wireshark.org/review/11199 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02The official #define for 32-bit and 64-bit Windows is _WIN32.Guy Harris1-1/+1
It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. Replace all-caps "WIN32" referring to Windows in comments and other text with "Windows" or "Win32". (The two are pretty much equivalent, these days; nobody much cares about Win16, not that we ever ran on it, and 64-bit Windows is just a 64-bitified Win32.) Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70 Reviewed-on: https://code.wireshark.org/review/10367 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02Try to fix: warning C6244: Local declaration of 'airpcap_if_list' hidesAndersBroman1-2/+2
previous declaration. Change-Id: Id0c3b74ac52c427d9c1efdf749dc410bc5bb450f Reviewed-on: https://code.wireshark.org/review/9460 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-06Fix some --without-pcap build problems.Guy Harris1-3/+2
Change-Id: Ic80de2bf2e2e047667784b8d19207f7f097b3d5c Reviewed-on: https://code.wireshark.org/review/8317 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-29Extcap: fix USBPcap capture broken by g8204578Pascal Quantin1-2/+7
g8204578 was not the right way to do things: if_type is used to identify an extcap interface Change-Id: Iead6c5e63f6874012c27ed7c1bf7152a5891ad65 Reviewed-on: https://code.wireshark.org/review/7849 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-06Replace ep_address_to_str with address_to_str.Michael Mann1-3/+4
Change-Id: I4f1078b20f41800f72a751612703ad0d4c2ae87b Reviewed-on: https://code.wireshark.org/review/6323 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-1/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-28Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.Michael Mann1-1/+2
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b Reviewed-on: https://code.wireshark.org/review/6060 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-1/+3
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-21Extcap Capture InterfaceRoland Knall1-0/+3
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-01Move the AirPcap stuff into caputils.Guy Harris1-2/+2
Change-Id: I64b45dad36a3ec491aeb9de3439b4fe19b46f9d8 Reviewed-on: https://code.wireshark.org/review/3308 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04Move utility routines for capturing into a libcaputils static library.Guy Harris1-3/+3
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-06-30Move capture.[ch] to libui.Guy Harris1-1/+1
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0 Reviewed-on: https://code.wireshark.org/review/2711 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30Move capture_session.h to capchild; what it declares is defined there.Guy Harris1-1/+1
Change-Id: I8b1407839390b7ac0b45bf6f583c1a509073f002 Reviewed-on: https://code.wireshark.org/review/2709 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30Move capture_ui_utils.[ch] to libui.Guy Harris1-1/+1
Change-Id: Id0f3d4d60a1acc7aa64fd3737b8f16df5bca4e5a Reviewed-on: https://code.wireshark.org/review/2708 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24Fix some more capchild includes.Guy Harris1-1/+1
Change-Id: I6d6cd79ee9e630fe81eb6deca9691249b44bdaf4 Reviewed-on: https://code.wireshark.org/review/2595 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-1/+1
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-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-10-23As suggested by Michael in ↵Jeff Morriss1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4605 : Add a tooltip to tell users they can click to see the other IP addresses for the selected interface. svn path=/trunk/; revision=52792
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-0/+2
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-03-24add casts for ws_gtk_grid_attach_extended()Martin Kaiser1-9/+18
svn path=/trunk/; revision=48541
2013-03-24Forget about the show and hide dance.Jaap Keuter1-8/+0
svn path=/trunk/; revision=48531
2013-03-24Set the height to fit the interfaces actually shown.Jaap Keuter1-2/+2
svn path=/trunk/; revision=48529
2013-03-21Make the elided label width match our cutoff limit.Gerald Combs1-0/+2
svn path=/trunk/; revision=48469
2013-03-21Only elide text that's longer than 50 characters.Gerald Combs1-2/+7
svn path=/trunk/; revision=48468
2013-03-21Windows lets you use long interface names, e.g. "Local Area Connection 3Gerald Combs1-13/+15
was walking through the woods one day taking a basket full of emergency zombie apocalypse supplies to her grandmother. It was raining." This can make the interface list dialog really wide, so elide the interface text. Elide the description as well. Try to make the interface list resize sanely. This doesn't appear to work for Gtk2. svn path=/trunk/; revision=48467
2013-03-21From beroset:Bill Meier1-1/+1
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-16From Jaap Keuter: Fix "GTK3: Interface List dialog does not expand properly"Bill Meier1-16/+8
From me: Add an XXX comment about an un-related issue https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8468 svn path=/trunk/; revision=48342
2013-03-14Remove the tool string if all you do is free it in the end.Jaap Keuter1-16/+0
svn path=/trunk/; revision=48304
2013-03-07Use explicit casts.Anders Broman1-2/+2
svn path=/trunk/; revision=48183
2013-03-06gtk_alignment_new() args are gfloat; use constants of form 0.0F.Bill Meier1-1/+1
(A floating point constant without a suffix (e.g., 0.0) is a 'double'. svn path=/trunk/; revision=48129
2013-03-06From Peter Hatina: Fix for: Gtk3 widgets are not properly expanded.Bill Meier1-3/+13
(Part of suggested patch for WIreshark 1.8 applied to trunk instead) See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8315 From me: Add an XXX xomment about how, on Windows, closing the top_level Wireshark window while the capture_interfaces dialog window is open will leave the associated dumpcap process running. svn path=/trunk/; revision=48122
2013-03-04Fir Gtk 3.8 & newer: gtk_scrolled_window_add_with_viewport() ==> ↵Bill Meier1-0/+4
gtk_container_add(). svn path=/trunk/; revision=48065
2013-02-28Avoid a packet rescan if we don't have an AirPcap adapter.Anders Broman1-5/+8
svn path=/trunk/; revision=47945
2013-01-10Replace gtk_table...() with ws_gtk_grid...().Bill Meier1-21/+21
svn path=/trunk/; revision=47020
2012-12-19Set the icon for the wireless device if the decription name contains Wi-FiIrene Rüngeler1-0/+3
svn path=/trunk/; revision=46615
2012-11-25 Fix several [-Wshadow] warnings;Bill Meier1-63/+76
Also: Do some minor whitespace and formatting changes. svn path=/trunk/; revision=46185
2012-11-22On UN*X, if an interface has a description, use it as the "friendlyGuy Harris1-4/+4
name". If it doesn't have a description, on OS X, use the System Configuration framework to attempt to get a "friendly name" for interfaces. If a loopback device doesn't have a friendly name, give it "Loopback" as the friendly name. Move the "turn a CFString into a mallocated C string" routine into common code, as it's used in more than one place. svn path=/trunk/; revision=46131
2012-11-19From Mike Garratt:Anders Broman1-12/+24
Friendly Names for interfaces on Windows Notes on the changes the patch covers: * if_info_t struct: addition of friendly_name * Dumpcap Interface list format changes: + Win32: "dumpcap -D" shows friendly_name in place of descript if known + All: machine interface "dumpcap -D -Z none" includes friendly_name in the list in addition to the existing parameters * interface_options struct: addition of console_display_name + When an interface name is displayed in a console, it will typically be the console_display_name (instead of name). + console_display_name is used as the basis of the autogenerated temp filenames + console_display_name is typically set to the friendly_name if known, otherwise it is set to the interface name * Enhancements to capture_opts_add_iface_opt() (the function which process -i options). + Can now specify the interface using its name and friendly_name + Interface name matching is case insenstive + Name matching first attempts exact matching, then falls back to prefix matching (e.g. dumpcap -i local) + Validates interface names, instead of blindly sending them off to winpcap/libpcap + Interface specification by number is still supported. * capture_opts_trim_iface() has been refactored: + Instead of repeating a decent chunk of the cost in capture_opts_add_iface_opt(), it calls capture_opts_trim_iface() to specify the interface. * introduction of capture_win_ifnames.[ch] (windows only code) + Implements static function GetInterfaceFriendlyNameFromDeviceGuid() - a windows version independant function to convert an interface guid into its friendly name. Uses published api functions on windows vista and higher, but falls back to unpublished API functions on older windows releases. + void get_windows_interface_friendlyname(/* IN */ char *interface_devicename, /* OUT */char **interface_friendlyname); - extracts the GUID from the interface_devicename, then uses GetInterfaceFriendlyNameFromDeviceGuid() to do the resolution * Auto temp filename generation: + Now uses wireshark_pcapng_* or wireshark_pcap_* depending on file format + Basis temp filename format on console_display_name + Win32: if console_display_name is a windows interface guid, extracts numbers from GUID here (instead of in interface option processing) GUI CHANGES: * Dialog that displays when you click the "Manage Interfaces" button (within Capture Options dialog) has been renamed from "Add new interfaces" to "Interface Management" * ui/gtk/capture_dlg.c: new_interfaces_w variable renamed to interface_management_w * Win32: Local Interfaces tab on Interface Management dialog, shows includes friendly name as far left column * Interface Management dialog defaults to larger size on win32 - so it fits without resizing local interfaces tab * Interface Management dialog now saves preferences when you click the apply button (local hidden interfaces was not persisting across restarts) * Tweaks: "Interface Details" dialog (Interface list->Capture Interfaces -> Details): + "Friendly Name" renamed to "NDIS Friendly Name" + Added "OS Friendly Name" to the top of the list * Win32: The "Capture Interfaces" dialog now shows the friendly name instead of device guid * Welcome screen: + The height of the interface list scrollbox dynamically adjusts & updates to the number visible interfaces. Up to 10 interfaces can be listed without a scroll bar, the minimum height is for 2 interfaces. + Win32: now shows just the Friendly Name if known - in place of "Interfacename_Guid:(Description)" svn path=/trunk/; revision=46083
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-08-03Move capture_globals.h from ui/gtk/ to ui/. Show interface activityGerald Combs1-1/+1
using sparklines in the qtshark main window. svn path=/trunk/; revision=44253
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536