This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hello, I am trying to create a new dissector for CAN. I copied and modified the J1939 dissector. I successfully compiled the new dissector and it is visible as an enabled protocol but it is not visible as a next level protocol under CAN. I see CANopen, DeviceNet and J1939 but not the new dissector. Where are the next level protocols defined for CAN?

Thanks Patrick

asked 12 Apr '15, 00:06

pmendiuk's gravatar image

pmendiuk
6112
accept rate: 0%


You need to edit packet-socketcan.c file and add your new protocol at the same places as you can find the J1939 one.

permanent link

answered 12 Apr '15, 05:31

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%

Thanks that was it.

(12 Apr '15, 08:21) pmendiuk

If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.

(12 Apr '15, 09:24) grahamb ♦

Note that CAN subdissector registration has changed, now your subdissector should register with the "can.subdissector" table using dissector_add_for_decode_as.

Searching the dissectors for "can.subdissector" will show examples.

(30 Nov '15, 08:14) grahamb ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×14

question asked: 12 Apr '15, 00:06

question was seen: 1,566 times

last updated: 30 Nov '15, 08:14

p​o​w​e​r​e​d by O​S​Q​A