... as per the XXX comment removed from tshark.c this was a mess to keep the linker
happy... I couldn't!
I did this without even understanding whether calling main_window_update was realy
necessary in most cases. I guess nothing or more specific update cbs would be best.
svn path=/trunk/; revision=50188
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
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
value in a human-readable format. Use it in the welcome screen, status
bar, and Win32 interface details.
Note that in the welcome screen and status bar we've switched from
customary binary prefixes to strict SI.
svn path=/trunk/; revision=45453
Expand show version preference.
implementation of Steven's suggestion of a radio button (actually
dropdown) of the 4 possibilities.
I changed the default to have the version on both in
the welcome screen and on the window as that's how it was and people tend not to change the preferences I think.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6437
svn path=/trunk/; revision=44153
that want a list of interfaces should either call
fill_in_local_interfaces() to make sure the list has been populated at
least once or refresh_local_interface_lists() if they want the list to
be rescanned.
Also make get_interface_type() local to ui/gtk/main.c, as it's not
called from outside ui/gtk/main.c.
Don't declare fill_in_local_interfaces() or hide_interface() unless we
have pcap - we don't define them unless we have pcap.
svn path=/trunk/; revision=43518
fill_capture_box():
if there are interfaces on which to capture, constructs the
interface list, otherwise destroys the interface list and puts
up a message.
update_capture_box():
updates the interface list to reflect current reality.
welcome_if_panel_reload():
if there is an interface list, and if there are interfaces on
which to capture (so that we still want that list), updates the
list by calling update_capture_box(), otherwise creates or
destroys it by calling fill_capture_box() (as either it doesn't
exist but now needs to or does exist but needs to go away).
Have refresh_local_interface_lists(), which re-fetches the list of local
interfaces and updates every interface list that includes local
interfaces, and refresh_non_local_interface_lists(), which only updates
interface lists that (also) include interfaces other than local
interfaces (such as pipes and remote interfaces). Call them in the
apprpriate places (if we know the list of local interfaces has been
updated, call refresh_local_interface_lists(), otherwise, if we know
interfaces other than local interfaces have been added or removed, call
refresh_non_local_interface_lists()).
Don't have any routine that updates the interface list for one widget
update the interface list for any other widget; leave the global
updating of interface lists up to refresh_local_interface_lists() and
refresh_non_local_interface_lists() - only call one of them if any
interface lists are to be updated.
svn path=/trunk/; revision=43517
add a capture_dlg_refresh_if() routine to redraw the list of
interfaces in the Capture -> Interfaces dialog if the lsit of
known interfaces is updated, and have it do that not by
destroying and reconstructing the entire dialog box, but just by
destroying and reconstructing the table containing the
interfaces and their statistics.
From me:
have a refresh_interfaces_cb() routine in ui/gtk/main.c that
scans the local interfaces and refreshes *all* the widgets that
have interface lists;
add a "Refresh Interfaces" item to the Capture menu that calls
that;
have the "Refresh" button in the "Manage Interfaces" window also
call that;
rename the Capture Options window routine dlg_window_present()
to capture_dlg_window_present() to make it clearer *which*
dialog it checks for;
fix Pontus' patch to call capture_stat_stop() *before* nulling
out the global pointer for the statistics cache - if it's called
*after* nulling it out, the argument passed to
capture_stat_stop() is null, and it doesn't kill off the dumpcap
gathering the statistics so they just pile up (and, at least on
OS X, chewing up BPF devices until you run out of BPF devices
that have the right ownership and permissions for dumpcap to use
as a normal user);
if refreshing the interfaces fails to get an interface list,
close the Capture Interfaces dialog.
svn path=/trunk/; revision=43515
uses it once it's filled in.
From Evan Huus: in scan_local_interfaces(), pass NULL to
capture_interface_list(), as we don't use the error string (and don't
free it, either).
In fill_capture_box(), for CANT_GET_INTERFACE_LIST, include the error
string in the report, and free it, in all cases, when we're done with
it.
svn path=/trunk/; revision=42089