Wireshark-bugs: [Wireshark-bugs] [Bug 6651] Add dissector for CANopen protocol

Date: Wed, 7 Dec 2011 04:18:53 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6651

--- Comment #2 from Jaap Keuter <jaap.keuter@xxxxxxxxx> 2011-12-07 13:18:52 CET ---
Is CANopen a higher layer protocol, on top of SocketCAN, or an alternative
protocol, besides SocketCAN?

In the first case, you should create a next_tvb and pass that to the CANopen
dissector, just like you do with raw data.
Why? Because the 'separation of protocol layers' is important. No two
dissectors should work on the same frame data. When data has to be passed from
one protocol layer to the next, the packet_info structure provides you the
vehicle for that. 

Some other details:

Why do a 'bytes_data = tvb_memdup' and add those (without freeing?), while you
can do that with proto_tree_add_item()?

'01.01.84' should be represented as '1 Jan 1984' (based on RFC 1123)

"High-level protocol" preference label should be "Next level protocol", you
never know (ref 'separation of protocol layers') what rides on top of your
protocol.

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