aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2015-07-25 09:24:48 -0400
committerHadriel Kaplan <hadrielk@yahoo.com>2015-07-25 17:05:01 +0000
commit190e313e9d949a837a0b3c3fe027647b35c2f8be (patch)
tree62c25c82c240d5aff4ef24b582c40c08d937e3d9 /epan/addr_resolv.h
parent3fc4a831e035604b0af14ed8a5c9f6596a3448d0 (diff)
DNS: move DNS name resolution pref to Name Resolution prefs
Move the boolean flag for using captured DNS packet info for name resolution to the Name Resolution preferences settings, as it was rather surprising to disable Name Resolution preferences and still have names being resolved. Also disble them all if the '-n' command line switch is used, and re-enable it for a 'd' character in the '-N' option. Bug: 10337 Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917 Reviewed-on: https://code.wireshark.org/review/9786 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index 25bd0156d1..c60e2c5180 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -47,13 +47,17 @@ extern "C" {
#define MAXNAMELEN 64 /* max name length (hostname and port name) */
#endif
+/**
+ * @brief Flags to control name resolution.
+ */
typedef struct _e_addr_resolve {
- gboolean mac_name;
- gboolean network_name;
- gboolean transport_name;
- gboolean concurrent_dns;
- gboolean use_external_net_name_resolver;
- gboolean load_hosts_file_from_profile_only;
+ gboolean mac_name; /**< Whether to resolve Ethernet MAC to manufacturer names */
+ gboolean network_name; /**< Whether to resolve IPv4, IPv6, and IPX addresses into host names */
+ gboolean transport_name; /**< Whether to resolve TCP/UDP ports into service names */
+ gboolean concurrent_dns; /**< Whether to use concurrent DNS name resolution */
+ gboolean dns_pkt_addr_resolution; /**< Whether to resolve addresses using captured DNS packets */
+ gboolean use_external_net_name_resolver; /**< Whether to system's configured DNS server to resolve names */
+ gboolean load_hosts_file_from_profile_only; /**< Whether to only load the hosts in the current profile, not hosts files */
} e_addr_resolve;
struct hashether;
@@ -138,6 +142,11 @@ WS_DLL_PUBLIC gchar *sctp_port_to_display(wmem_allocator_t *allocator, guint por
struct pref_module;
extern void addr_resolve_pref_init(struct pref_module *nameres);
+/*
+ * disable_name_resolution() sets all relevant gbl_resolv_flags to FALSE.
+ */
+WS_DLL_PUBLIC void disable_name_resolution(void);
+
/** If we're using c-ares or ADNS, process outstanding host name lookups.
* This is called from a GLIB timeout in Wireshark and before processing
* each packet in TShark.