Wireshark-bugs: [Wireshark-bugs] [Bug 2896] New: TCP dissector not registered

Date: Wed, 24 Sep 2008 10:47:50 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2896

           Summary: TCP dissector not registered
           Product: Wireshark
           Version: 1.0.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Enhancement
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: amey_prabhugaonkar@xxxxxxxxxxxxxxxx
                CC: amey_prabhugaonkar@xxxxxxxxxxxxxxxx


Build Information:
Version 1.0.2 (SVN Rev 25698)

Copyright 1998-2008 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with GTK+ 2.12.8, with GLib 2.14.6, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,
with ADNS, with Lua 5.1, with GnuTLS 2.3.8, with Gcrypt 1.4.1, with MIT
Kerberos, with PortAudio V19-devel, with AirPcap.

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

Built using Microsoft Visual C++ 6.0 build 8804

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
Bug:
I wanted to dissect the data portion of my protocol with the TCP dissector. I
need a handle of the TCP dissector to do this using call_dissector().
The function call "tcp_handle = find_dissector("tcp")" always returns a NULL.

Analysis:
The TCP dissector is not registered by any name, so we cannot get a handle
to it by using find_dissector("tcp"). I registered it with the name “tcp”
by
using register_dissector("tcp", tcp_handle, proto_tcp) in the
proto_register_tcp() function in "epan/dissectors/packet-tcp.c".

This seems to work. I am not sure if this is the right way to get a handle /
call the TCP dissector as I had to modify the TCP dissector code; on the other
hand, this may be a bug.


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