ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 1967] New: Not able to add to Protocol or Information colu

Date: Wed, 31 Oct 2007 18:51:42 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1967

           Summary: Not able to add to Protocol or Information column from a
                    plugin
           Product: Wireshark
           Version: 0.99.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Medium
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: fschorr@xxxxxxxxxxx


Build Information:
Version 0.99.6a (SVN Rev 22276)

Compiled with GTK+ 2.10.12, with GLib 2.12.12, with WinPcap (version unknown),
with libz 1.2.3, with libpcre 6.4, with Net-SNMP 5.4, with ADNS, with Lua 5.1,
with GnuTLS 1.6.1, with Gcrypt 1.2.3, with MIT Kerberos, with PortAudio
PortAudio V19-devel, with AirPcap.

Running on Windows XP Service Pack 2, build 2600, with WinPcap version 4.0.1
(packet.dll version 4.0.0.901), based on libpcap version 0.9.5, without
AirPcap.

Built using Microsoft Visual C++ 6.0 build 8804
--
Starting in Wireshark 0.99.5, my proprietary Plugins cannot write information
to either the Protocol or Information column in the Packet List window.  This
problem occurs for my protocols that are over TCP or UDP.

Code snippet:

        if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
                col_set_str(pinfo->cinfo, COL_PROTOCOL, "smart");

        if (check_col(pinfo->cinfo, COL_INFO))
                col_clear(pinfo->cinfo, COL_INFO);

It appears that both of the check_col() calls above are returning FALSE.  It
seems that both the Protocol and Information columns have "write enabled" set
to false somewhere else.  It appears that col_set_writable(pinfo_->cinfo,
FALSE) MAY being set and not being set back to TRUE.

If I comment out "if (check_col(pinfo->cinfo, COL_PROTOCOL))" above so my
plugins goes ahead and writes to the Protocol column, I get the following error
in Wireshark Packet Details window for each of the frames that have my protocol
in them:

Dissector bug, protocol SMART:  STATUS_ACCESS_VIOLATION: dissector accessed an
invalid memory address

If I comment out "if (check_col(pinfo->cinfo, COL_INFO))" above so that I force
writing to the Information column, Wireshark crashes on startup with the
following error in an error window:

Err file column-utils.c:  line 144:  assertion failed: (cinfo->col_first[e1] >=
0)

This problem occurs for my protocols that that are over UDP or TCP and for all
TCP packets if I have "Allow subdissector to reassemble TCP streams" turn on or
off, and also if the TCP packet is a compete PDU or part of a segmented PDU.

Since dissectors that are part of Wireshark don't seemed to be having this
problem and I don't have anyway to check out the plugins that come with the
wireshark release I suspect that this maybe related plugins since I've had a
series of problems I've worked through getting my dissector plugins to work
since 0.99.5

I've tried to use "col_set_writable(pinfo->cinfo, TRUE);" at the beginning of
my dissectors but this appears to have no effect.

I see "col_set_fence(pinfo->cinfo, COL_INFO);" used before the col_set_writable
call.  I'm having a difficult time understanding what "fence" means in this
context.

Thanks for your time,

Frank Schorr


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.