aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-canopen.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-22Fix some hf_ field datatype conflicts.Michael Mann1-4/+4
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES 'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING 'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES 'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES 'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER 'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32 'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d Reviewed-on: https://code.wireshark.org/review/14070 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-04Some CANopen frame types can have zero size, so use tvb_reported_length ↵Michael Mann1-3/+2
instead of -1. Bug: 11083 Change-Id: Ib17649fbbc4f79705e3ad18903b5c8847cb09054 Reviewed-on: https://code.wireshark.org/review/7881 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-19Replace enumerated preference for choosing subdissector with a subdissector ↵Michael Mann1-2/+10
table and Decode As functionality. This makes it much easier for other subdissectors (and plugins) to associate themselves with CAN. Change-Id: I49dd832af51651d0c91f9850c100e544d178b8c4 Reviewed-on: https://code.wireshark.org/review/7734 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-24canopen: Verbosity for INFO columnEnrico Jorns1-152/+176
Display basic information about what is going on in the INFO column to ease protocol debugging. Change-Id: I2a3aba8008bf65ab9e236a3d81335cf723b2edd0 Reviewed-on: https://code.wireshark.org/review/5521 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13Use ENC_LITTLE_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-2/+2
(for some dissectors which fetch all other integral fields using ENC_LITTLE_ENDIAN). Change-Id: Ica72a68ac560f2920d61e0769de83130557c46fd Reviewed-on: https://code.wireshark.org/review/5752 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-27canopen: LSS dissectionEnrico Jorns1-7/+530
Dissection of Layer setting services (LSS) sub-protocol according to CiA 305. Change-Id: I24ca1827b25c30a672fb31cad390b3c1486102f4 Reviewed-on: https://code.wireshark.org/review/5516 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-26canopen: Enhanced SDO decodingEnrico Jorns1-14/+379
* Move sdo dissection to separate function Added dissect_sdo() function to handle the more complex SDO dissection. * SDO command specifier decoding Decoding of both client and server command specifier for SDO transfers according to CiA 301 Chaper 7.2.4.3. Note: Fully decoding block transfer frames is more complex and not supported yet. * basic SDO abort code decoding SDO abort codes as specified in CiA 301 Chapter 7.2.4.3.17 (Table 22). * Basic value ranges for object dict index parameter Object dict ranges as specified in CiA 301 7.4.1 (Table 41) * cs-based multiplexer and data decoding A data width of 4 byte is valid only for expedited transfer and a multiplex value is present only in initialisation messages. This patch now handles also normal sdo segment data. Reference: CiA 301, Chapter 7.2.4.3.3 and 7.2.4.3.6 Change-Id: I37005894082d62eed1ddd85e09e3676aa3af8222 Reviewed-on: https://code.wireshark.org/review/5504 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-26canopen: Improve NMT error control and SYNC message dissectionEnrico Jorns1-1/+21
1. Also show Reserved/Toggle bit of NMT error control In case of the node guarding protocol this bit is used as a toggle bit. In case of the hearbeat protocol this bit is reserved. Reference: CiA 301 (rev 4.2.0), Chap. 7.2.8.3.2 2. Show optional 'counter' parameter of SYNC messages if available Reference: CiA 301 (rev 4.2.0), Chap. 7.2.5.3.1 Change-Id: I5dc0ab65e95fec4846a9c8bd8972ef2eba664ee2 Reviewed-on: https://code.wireshark.org/review/5484 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-25canopen: Fixed tree expansionEnrico Jorns1-3/+7
Previously the COB-ID and Type subtree also used the main ett_canopen variable. This made control of subtree expansion impossible as both parent and subtree nodes shared the same state. Change-Id: I3dabf7f399e83bfcfbf78bc0e633e3696776c043 Reviewed-on: https://code.wireshark.org/review/5480 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-21CANopen bugfixesMichael Mann1-24/+24
1. Fixed endianess in CANopen dissector. According to CiA 301, 7.1.1. (p. 26): "For numerical data types the encoding is little endian style." 2. Fixed NMT type string in CANopen dissector NMT function code should not display 'EMERGENCY' 3. Fixed time stamp decoding * Offset increment was too low for data type size * Decoding of time_stamp_days must equal time_stamp_msec and thus be letohs instead of ntohs. CANopen data is little-endian encoded. 4. Fix: Use correct description string for NMT error control state bits canopen.nmt_guard.state was faulty named "Node-ID". This was changed to "State". 5. Fix nmt_guard_state value_string array CiA 301 desribes only 4 valid values. All other were deleted. 0x00 was renamed from 'Initalisation' to 'Boot-up' following CiA301. 6. Shortened EMERGENCY to EMCY The term EMCY is the standard abbreviation used in CiA standard for Emergency service. 7. Fix: Allow SYNC and NMT error frames without any payload NMT node guard remote requests do note have a payload, SYNC frames only have an optional payload (counter) If item length is set to -1, decode will cause a 'Malformed Packet' error. 8. Rename MT_NMT_GUARD to MT_NMT_ERR_CTRL which better reflects its scope Change-Id: I676f9b5f2e4efd8e7c9528fe289e7510c4d43235 Reviewed-on: https://code.wireshark.org/review/5425 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-29Add editor modelines and adjust indentation as needed.Bill Meier1-0/+12
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c Reviewed-on: https://code.wireshark.org/review/4371 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-24convert to proto_tree_add_subtree[_format]Michael Mann1-5/+3
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6 Reviewed-on: https://code.wireshark.org/review/2601 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-1/+1
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-05CAN protocols have a CAN ID and up to 8 bytes of data. How the CAN ID and ↵Michael Mann1-57/+49
data are presented is the responsibility of the previous layer. Make the interface be passing the CAN ID in dissector data and have the (up to) 8 bytes be the tvb. CAN protocols should treat the CAN ID as "generated" data. svn path=/trunk/; revision=53792
2013-03-15[-Wmissing-prototypes]Anders Broman1-0/+2
Use explicit casts. svn path=/trunk/; revision=48313
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-05-07General cleanup:Bill Meier1-294/+271
- Setup COL_PROTO & COL_INFO before fetching from the tvb; - Improve byte pane highlighing: Use proper length in proto_tree_add_item() calls; - Remove unneeded include; - Use VALS macro when referencing a value_string in hf[]; - Simplify/rework code slightly; - Whitespace. svn path=/trunk/; revision=42464
2012-03-07From Yegor Yefremov: Add dissector for CANopen protocol ↵Anders Broman1-0/+485
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6651 with some modifications svn path=/trunk/; revision=41394