From 193cef0bcbcab25b95b4f124920d004ceaa7ae8a Mon Sep 17 00:00:00 2001 From: Anthony Coddington Date: Fri, 9 Jun 2017 20:03:38 +1200 Subject: Attempt to clean up addr_resolv flags by removing DUMMY_ADDRESS_ENTRY Replace with easier to understand and already present NAME_RESOLVED given dummy address is always filled. Change-Id: If8464f89e88722aac70689749fe0d4a31c119db2 Bug: 13798 Reviewed-on: https://code.wireshark.org/review/22110 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Jeff Morriss Reviewed-by: Michael Mann --- ui/cli/tap-hosts.c | 4 ++-- ui/gtk/addr_resolution_dlg.c | 4 ++-- ui/qt/resolved_addresses_dialog.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ui') diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c index f81a9fc739..98611b171d 100644 --- a/ui/cli/tap-hosts.c +++ b/ui/cli/tap-hosts.c @@ -48,7 +48,7 @@ ipv4_hash_table_print_resolved(gpointer key _U_, gpointer value, gpointer user_d { hashipv4_t *ipv4_hash_table_entry = (hashipv4_t *)value; - if (!(ipv4_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY)) { + if ((ipv4_hash_table_entry->flags & NAME_RESOLVED)) { printf("%s\t%s\n", ipv4_hash_table_entry->ip, ipv4_hash_table_entry->name); @@ -60,7 +60,7 @@ ipv6_hash_table_print_resolved(gpointer key _U_, gpointer value, gpointer user_d { hashipv6_t *ipv6_hash_table_entry = (hashipv6_t *)value; - if (!(ipv6_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY)) { + if ((ipv6_hash_table_entry->flags & NAME_RESOLVED)) { printf("%s\t%s\n", ipv6_hash_table_entry->ip6, ipv6_hash_table_entry->name); diff --git a/ui/gtk/addr_resolution_dlg.c b/ui/gtk/addr_resolution_dlg.c index 8a671fae4e..ebec831923 100644 --- a/ui/gtk/addr_resolution_dlg.c +++ b/ui/gtk/addr_resolution_dlg.c @@ -133,7 +133,7 @@ ipv4_hash_table_resolved_to_texbuff(gpointer key _U_, gpointer value, gpointer u GtkTextBuffer *buffer = (GtkTextBuffer*)user_data; hashipv4_t *ipv4_hash_table_entry = (hashipv4_t *)value; - if((ipv4_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY)== 0){ + if((ipv4_hash_table_entry->flags & NAME_RESOLVED)){ g_snprintf(string_buff, ADDRESS_STR_MAX, "%s\t%s\n", ipv4_hash_table_entry->ip, ipv4_hash_table_entry->name); @@ -167,7 +167,7 @@ ipv6_hash_table_resolved_to_texbuff(gpointer key _U_, gpointer value, gpointer u GtkTextBuffer *buffer = (GtkTextBuffer*)user_data; hashipv6_t *ipv6_hash_table_entry = (hashipv6_t *)value; - if((ipv6_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY)== 0){ + if((ipv6_hash_table_entry->flags & NAME_RESOLVED)){ g_snprintf(string_buff, ADDRESS_STR_MAX, "%s\t%s\n", ipv6_hash_table_entry->ip6, ipv6_hash_table_entry->name); diff --git a/ui/qt/resolved_addresses_dialog.cpp b/ui/qt/resolved_addresses_dialog.cpp index 4352d153d2..f8488bdce5 100644 --- a/ui/qt/resolved_addresses_dialog.cpp +++ b/ui/qt/resolved_addresses_dialog.cpp @@ -50,7 +50,7 @@ ipv4_hash_table_resolved_to_qstringlist(gpointer, gpointer value, gpointer sl_pt QStringList *string_list = (QStringList *) sl_ptr; hashipv4_t *ipv4_hash_table_entry = (hashipv4_t *) value; - if((ipv4_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY) == 0) { + if((ipv4_hash_table_entry->flags & NAME_RESOLVED)) { QString entry = QString("%1\t%2") .arg(ipv4_hash_table_entry->ip) .arg(ipv4_hash_table_entry->name); @@ -64,7 +64,7 @@ ipv6_hash_table_resolved_to_qstringlist(gpointer, gpointer value, gpointer sl_pt QStringList *string_list = (QStringList *) sl_ptr; hashipv6_t *ipv6_hash_table_entry = (hashipv6_t *) value; - if((ipv6_hash_table_entry->flags & DUMMY_ADDRESS_ENTRY) == 0) { + if((ipv6_hash_table_entry->flags & NAME_RESOLVED)) { QString entry = QString("%1\t%2") .arg(ipv6_hash_table_entry->ip6) .arg(ipv6_hash_table_entry->name); -- cgit v1.2.1