From 530c64f22c942104b64b43fd8d33e78efdcdb700 Mon Sep 17 00:00:00 2001 From: Jim Young Date: Tue, 25 Dec 2018 12:42:03 -0500 Subject: prefs: Document the possible hidden interface types The preferences file includes an optional comma-separated string of hidden interface type integer values (gui.interfaces_hidden_types). Augment the interface_type enum and the preferences file to better document what these interface type integer values stand for. Change-Id: Idd268ed7f252cfa56dd046d24ff7ff597018f5d3 Reviewed-on: https://code.wireshark.org/review/31191 Petri-Dish: Jim Young Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- caputils/capture_ifinfo.h | 24 ++++++++++++++---------- epan/prefs.c | 13 ++++++++++++- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/caputils/capture_ifinfo.h b/caputils/capture_ifinfo.h index 171561d16c..83b020c5f0 100644 --- a/caputils/capture_ifinfo.h +++ b/caputils/capture_ifinfo.h @@ -17,17 +17,21 @@ extern "C" { #include +/* + * Explicitly set the interface_type enum values as these values are exposed + * in the preferences gui.interfaces_hidden_types string. + */ typedef enum { - IF_WIRED, - IF_AIRPCAP, - IF_PIPE, - IF_STDIN, - IF_BLUETOOTH, - IF_WIRELESS, - IF_DIALUP, - IF_USB, - IF_EXTCAP, - IF_VIRTUAL + IF_WIRED = 0, + IF_AIRPCAP = 1, + IF_PIPE = 2, + IF_STDIN = 3, + IF_BLUETOOTH = 4, + IF_WIRELESS = 5, + IF_DIALUP = 6, + IF_USB = 7, + IF_EXTCAP = 8, + IF_VIRTUAL = 9 } interface_type; /* diff --git a/epan/prefs.c b/epan/prefs.c index b2f981818a..3c7a85f868 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -3396,7 +3396,18 @@ prefs_register_modules(void) &prefs.gui_interfaces_remote_display); register_string_like_preference(gui_module, "interfaces_hidden_types", "Hide interface types in list", - "Hide the given interface types in the startup list", + "Hide the given interface types in the startup list.\n" + "A commma-separated string of interface type values (e.g. 5,9).\n" + "0 = Wired,\n" + "1 = AirPCAP,\n" + "2 = Pipe,\n" + "3 = STDIN,\n" + "4 = Bluetooth,\n" + "5 = Wireless,\n" + "6 = Dial-Up,\n" + "7 = USB,\n" + "8 = External Capture,\n" + "9 = Virtual", &prefs.gui_interfaces_hide_types, PREF_STRING, NULL, TRUE); /* Console -- cgit v1.2.3