From 631172f2f4046255a78a5628b5499f38054039bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Wed, 2 Dec 2015 07:32:48 +0100 Subject: Qt: Use uniform interface display name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use common function to generate the interface display name, both when scanning for interfaces (scan_local_interfaces()) and when changing Comment in the Manage Interfaces dialog. Change-Id: I3260208856563aaf387ce397d4ae61bddcc89b4f Reviewed-on: https://code.wireshark.org/review/12362 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/capture_ui_utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ui/capture_ui_utils.h') diff --git a/ui/capture_ui_utils.h b/ui/capture_ui_utils.h index eb4cdf9db5..5f6cdcd284 100644 --- a/ui/capture_ui_utils.h +++ b/ui/capture_ui_utils.h @@ -175,6 +175,15 @@ extern void set_active_dlt(interface_t *device, int global_default_dlt); extern GString *get_iface_list_string(capture_options *capture_opts, guint32 style); +/** Get the interface display name to present in the interfaces list. + * + * @param description A user-specified capture device description + * @param if_info The if_info for the interface + * + * @return A interface display name (must be g_free'd later) + */ +extern gchar *get_iface_display_name(const gchar *description, const if_info_t *if_info); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3