Wireshark-bugs: [Wireshark-bugs] [Bug 11468] Changing name resolution via View->Name Resolution
Date: Fri, 28 Aug 2015 23:50:57 +0000

changed bug 11468


What Removed Added
Status UNCONFIRMED CONFIRMED
CC   jyoung@gsu.edu
Ever confirmed   1

Comment # 2 on bug 11468 from
Change 10301 had a related patch set uploaded by Gerald Combs:
Redraw the packet list when name resolution changes.

https://code.wireshark.org/review/10301
Comment # 1 on bug 11468 from
Hello Jeff,

I forgot to submit a bug about virtually the same issue with custom columns
(for example udp.srcport, udp.dstport).  One workaround to get the change to
take effect is is to reload the trace file immediately after making the change
to the custom column's name resolution state.

A "Resolve Names" entry is available from the packet-list's header''s context
menu. This is a column specific setting used to enable/disable name resolution
for custom columns.  Within the preferences file this state is recorded as 'R'
or 'U' as the last part of the tuple for each custom column entry.

Here is a diff snippit from my preferences file after I disabled name
resolution for the udp.srcport and udp.dstport columns and managed to
successfully make the change persistent.

-       "Source Port", "%Cus:udp.srcport:0:R",
-       "Destination Port", "%Cus:udp.dstport:0:R",
+       "Source Port", "%Cus:udp.srcport:0:U",
+       "Destination Port", "%Cus:udp.dstport:0:U",

I've stumbled into a related issue with getting the disable name resolution
change for custom columns to persist.  When one changes the state for the name
resolution for the custom column, the contents of the column will immediately
change from left justified to right justified depending on the new state of the
Name Resolution attribute, but the contents will still be presented in the
previous mode.

A reload of the trace file will update the contents of the column to the new
name resolution preference.   But the new preference will not necessarily be
written to the preferences file.  In fact opening up the main preferences
dialog and simply doing a save seems will reset any custom column preference to
re-enable Name Resolution (The custom column tuple in the preferences file ends
with 'R').

The only workaround I have found to persistently disable Name Resolution for a
custom column is to change and restore an unrelated preference option using a
packet-list context menu protocol preferences item which as a side effect
apparently saves the current state of the custom column name resolution
preference.

For example in the packet-details pane, i will right-click on the Ethernet
entry to display the Context Menu, scroll down and select the "Protocol
Preferences" and then enable the attribute "Assume packets have FCS".  I will
then immediately disable this option.  Both of these actions result in an
update of the preferences file with the current state of the various custom
columns' Name resolution attribute.

I started looking around at the in prefs.c and see that its the cfmt->resolved
variable that is in play here.  In certain save preferences code paths the
cfmt->resolved appears to get set unconditionally to TRUE for the custom
columns. 

To better understand what and when preferences are updated I ended up putting
my whole ~/.wireshark folder in git.  Since I almost always launch Wireshark
from a shell, I wrote a stupid "one-liner" script to do the following:

cd ~/.wireshark; wireshark; git status; git diff; git commit . -m "Wireshark
exit"

This allowed me to see and save the effect on Wireshark's preferences files
each time I ran Wireshark.


You are receiving this mail because:
  • You are watching all bug changes.