[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #10 from Guy Harris --- (In reply to Maksim Salau from comment #9) > I tried byacc and it works fine with valid input. But if I induce errors I > get memory leaks, since byacc shipped with Fedora doesn't have support for > btyacc extensions and thus I'm not allowed to use %destructor directive to > get rid of memory allocated data. > > So here is the question: does Wireshark require btyacc extensions to be > enabled? Our one and only Bison/BYACC parser (wiretap/ascend.y) doesn't require them. The primary reason for BYACC support is for systems that ship with BYACC but not Bison, as I think might be the case for some *BSD systems. The version of BYACC that ships with a Linux distribution is less relevant than the version that ships with various *BSDs, as Linux distributions will almost certainly ship Bison as well. -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #9 from Maksim Salau --- Hi Guy (In reply to Guy Harris from comment #8) > Either Flex & Bison/BYACC (if there's any .y file in the Wireshark source > that works only with Bison, not Berkeley YACC, that's a bug), or Flex & > Lemon (most of the generated parsers in Wireshark are Lemon, not > Bison/BYACC). Please elaborate on byacc compatibility. I've implemented the parser with flex & bison. Just a parser, no integration into wireshark dissector yet. I've chosen bison, since I'm new to describing parser syntax and help with bison is easier available to me :) I tried byacc and it works fine with valid input. But if I induce errors I get memory leaks, since byacc shipped with Fedora doesn't have support for btyacc extensions and thus I'm not allowed to use %destructor directive to get rid of memory allocated data. So here is the question: does Wireshark require btyacc extensions to be enabled? Here is what I get: $ byacc -L byacc: w - -L flag unsupported, reconfigure with --enable-btyacc Since lemon parser generator looks more predictable across platforms for obvious reasons, I consider rewriting parser using lemon, if there will be no way ensure btyacc extensions presence. Regards, Maksim -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #8 from Guy Harris --- (In reply to Maksim Salau from comment #7) > The parser is implemented by hand, possibly it should be rewritten to make > use of flex & bison. Either Flex & Bison/BYACC (if there's any .y file in the Wireshark source that works only with Bison, not Berkeley YACC, that's a bug), or Flex & Lemon (most of the generated parsers in Wireshark are Lemon, not Bison/BYACC). -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #7 from Maksim Salau --- Hi Michael, > What exactly is this and what other Wireshark constructs would you equate it > to? The dissector is for decoding data payload of CAN frames. This is somewhat similar to AUTOSAR NM "User Data Field Configuration". In AUTOSAR NM you can define how to interpret data payload, but in this dissector one can define payload format for any CAN frame based on its id. Usage scenarios for the dissector are CAN buses that don't make use of standard protocols like CANopen or J1939. > Is this similar to ASN.1 definitions where you want a "dbc to dissector" > tool that will generate a C code dissector from the data in the .dbc file? > (that in this case would register handlers for the j1939.pgn dissector > table) This dissector has J1939 file type support but it only partially overlap with it. The J1939 dissector decodes only CAN id, but not data, while this dissector aims at data and uses id only to pick correct spec from a DBC file. > Is this supposed to be dynamically loaded at runtime and the J1939 dissector > would create a "database of hf_ fields" based on the information in the .dbc > file(s)? Yes, the spec is loaded in runtime. And 'no' - this dissector doesn't make use of the J1939 subdissector but acts on its own. 'J1939' in this dissector is only used to define 2 ways of interpreting ids: 1. full id match; 2. masked (only J1939 type PGN should match). > Is there a DBC spec that explains the fields in the file? Unfortunately there is no official spec of the file format, but there are a number of open-source tools [1]..[5] that may used as a reference. Since spec is not available, parser is much more forgiving than the official tool: CANdb++ Editor by Vector Informatik GmbH. The parser is implemented by hand, possibly it should be rewritten to make use of flex & bison. [1] https://github.com/rbei-etas/busmaster/ [2] https://github.com/ebroecker/canmatrix/ [3] https://bitbucket.org/tobylorenz/vector_dbc/ [4] https://github.com/collin80/SavvyCAN/ [5] https://github.com/eerimoq/cantools/ -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 Michael Mann changed: What|Removed |Added Severity|Normal |Enhancement Ever confirmed|0 |1 CC||mman...@netscape.net Status|UNCONFIRMED |CONFIRMED --- Comment #6 from Michael Mann --- (In reply to Maksim Salau from comment #4) > Created attachment 16876 [details] > Sample J1939 type DBC file What exactly is this and what other Wireshark constructs would you equate it to? Is this similar to ASN.1 definitions where you want a "dbc to dissector" tool that will generate a C code dissector from the data in the .dbc file? (that in this case would register handlers for the j1939.pgn dissector table) Is this supposed to be dynamically loaded at runtime and the J1939 dissector would create a "database of hf_ fields" based on the information in the .dbc file(s)? Is there a DBC spec that explains the fields in the file? -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #5 from Maksim Salau --- Created attachment 16877 --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16877=edit Sample capture with unexpected DLC -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #4 from Maksim Salau --- Created attachment 16876 --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16876=edit Sample J1939 type DBC file -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #3 from Maksim Salau --- Created attachment 16875 --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16875=edit Sample J1939 capture -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #2 from Maksim Salau --- Created attachment 16872 --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16872=edit Sample DBC file -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 Maksim Salau changed: What|Removed |Added CC||maksim.sa...@gmail.com -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe
[Wireshark-bugs] [Bug 15454] Dissection of CAN packets based on a DBC specification
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15454 --- Comment #1 from Maksim Salau --- Created attachment 16871 --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16871=edit Sample capture -- You are receiving this mail because: You are watching all bug changes.___ Sent via:Wireshark-bugs mailing list Archives:https://www.wireshark.org/lists/wireshark-bugs Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe