Commit Graph

41 Commits

Author SHA1 Message Date
D. Ulis 4d8581d7e1 CIP: Improve string handling
1. Add support for STRINGI
2. Add File Name attribute that is a STRINGI
3. CCO Get/Set Attr All: Connection Name is STRING2 not ASCII
4. TCP/IP Host Name attribute is not just a STRING. It also needs a pad byte.
5. Minor: Fix byte highlighting for CCO I/O Mapping tree
6. Minor: All back byte highlighting for Get Attr All Rsp individual attributes

Change-Id: Ib10d6f2e86e39e8cd6335dc6b6dbebbd1c4d8e64
Reviewed-on: https://code.wireshark.org/review/18166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 02:13:43 +00:00
D. Ulis 8cdc182aff CIP: Attribute updates
1. Switched to common way to parse Get Attr All, using dissect_cip_get_attribute_all_rsp, for CCO (class version) and CIP Validator. This also fixed a missing attribute in the old CIP Validator code.
2. Add cip_string2 attribute implementation
3. For CIP Validator, set the protocol as "CIPS Validator", previously this was "CIPS Supervisor".
4. For classes with subdissectors, add the service to the Info column in the response.

Change-Id: Id9593ca39497261075df8146cf63ee9581462e2a
Reviewed-on: https://code.wireshark.org/review/14837
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-04-07 06:14:45 +00:00
D. Ulis 103214abfe CIP: Restore path information to Info column
When the "Display enhanced Info column data" preference is set, ensure that:
1. For non-MSP packets, path information (class/symbol) is displayed in the Info column for Forward Open, Forward Close, regular Message Router Request/Response messages
2. For MSP packets, don't display the class/symbol in the Info column (it's too wordy)

This now relies on an extra boolean passed to dissect_cip_data() to handle #2 above. Previously, this relied on checking a proto_item* for NULL, which is not correct.

Change-Id: I7532660bcb23bd664c1f5532256755922c4937d1
Reviewed-on: https://code.wireshark.org/review/14458
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-14 17:07:41 +00:00
Guy Harris 0246f2d8a0 Don't let the existence of a protocol tree affect what's in the Info column.
A dissector must never assume that it will, or won't, be called with a
protocol tree; it's up to the Wireshark/TShark/etc. core to decide
whether to do it, and it can change its behavior over time or even
change it from release to release.

Have dissect_epath() take an argument that explicitly indicates whether
to add the CIP class to the Info column, rather than assuming that you
do so only if the tree pointer passed to it is null.

Bug: 12257
Change-Id: Ide8a6fc21252880f849a8d0aa4659a675bb3ae04
Reviewed-on: https://code.wireshark.org/review/14456
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-14 02:35:47 +00:00
D. Ulis 3eafa0b4a6 CIP: Improve info column information
1. Remove "Object" from CIP class names. It was already removed from some of the objects, the string "Object" is implied for all objects, and it helps reduce wordiness in the Info column.
2. Don't display Class/Symbol name in the Info column when it's inside a MSP.
3. Enable enhanced Info column by default now that some of the additional wordiness was removed by the above points.
4. Put single quotes around the symbol name in the Info column. This makes it more obvious that something is a symbol instead of an actual class name from the spec, and would prevent ambiguity if the symbol name was something like "Identity".
5. Print the CIP service for both requests/responses in CIP Safety processing. This was already added to normal CIP.
6. Display Class/Symbol and service on the Service Packet in the MSP tree. This makes it easier to find without expanding every MSP item.

Change-Id: I7197dd4bf3dad6d7bdba247d3d7ab76cca52c785
Reviewed-on: https://code.wireshark.org/review/14325
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: D. Ulis <daulis0@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-10 13:09:44 +00:00
D. Ulis 416ca6b9c9 CIP/ENIP: Attribute updates
1. More Identity attributes
2. Port attributes
3. Set Attribute List request highlighted too much attribute data
4. TCP/IP object, Attr 5 needs padding
5. Switch most attributes to use wrappers instead of dissect_epath() directly.
6. Change new Volume 8 attributes to treat path size as words instead of bytes, when parsing size+EPATH formats.

Change-Id: I1b8c476475c6fbb9c7cdb99ec4a6c28934631a19
Reviewed-on: https://code.wireshark.org/review/13898
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-16 05:56:14 +00:00
Michael Mann b3fb7f4bae ENIP: Add dissection of UCMM CPF Item over UDP
This includes request/response tracking

Change-Id: I12ac4c198929aa6a75f3f839f9ee52ebf00b8059
Reviewed-on: https://code.wireshark.org/review/13743
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: D. Ulis <daulis0@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-05 21:02:48 +00:00
Michael Mann 0cd0844b52 Have CIP dissectors find the CIP Class dissector table, rather than have a externed global variable.
Change-Id: Id8156680d67d65d87c156df05e8a66e2531728d2
Reviewed-on: https://code.wireshark.org/review/13709
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-04 13:43:11 +00:00
D. Ulis 36cf75efb1 CIP/ENIP: Enhance Info column display
1. ENIP: When there is more than one ENIP command in a given TCP packet, display both in the Info column. Previously, only 1 would be displayed.
2. CIP: Services need a context to be able to interpret properly. Display the Class or Symbol name in the Info column in an object oriented manner for Request Paths, or Connection Paths.
3. CIP: Display the request path/service in a CIP response, instead of just "Success". These changes make it visually easier to identify traffic.
4. CIP: For the Info column, make Multiple Service Packet formatting a little more consistent regarding the divider between embedded packets. Previously, it would display 2 different separator types "," and "|".
5. CIP: Add preference to enable/disable "Display enhanced Info column data"

Change-Id: I7e95bc144588c0925137e01abbc814babb494d19
Reviewed-on: https://code.wireshark.org/review/13632
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-04 04:56:24 +00:00
D. Ulis 59bdb4bcb6 CIP: Add support for all defined segment types
Add support for the following segment types:
1. Port: Extended
2. Logical: Service ID
3. Logical: Extended
4. Symbolic: ASCII, Extended String, including: Double-byte, Triple-byte, Numeric (USINT, UINT, UDINT)
5. Network: Extended
6. Network: Production Inhibit Time in Microseconds

Bug: 12049
Change-Id: I31b269c28c0101205cbc02f858de47106b9e7373
Reviewed-on: https://code.wireshark.org/review/13552
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-27 03:36:37 +00:00
Michael Mann fc511c3f11 CIP: Add support for Get Attributes All
Get Attributes All is a predefined list of existing attribute IDs for a given class.  Add a new index for each attribute for their place in GetAttributesAll response. Then a hash table of classes for existing attributes are created to handle the GetAttributesAll service.

Added more TCP/IP object attributes since more have been added to the spec.
Moved TCP/IP object attributes all to ENIP dissector.

Bug: 11996
Change-Id: I7f50c9aadf04efdb17ef31f39e6a991c0a84bef2
Reviewed-on: https://code.wireshark.org/review/13186
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-22 12:37:15 +00:00
D. Ulis 411104bd89 Enhancements for EtherNet/IP and CIP
EtherNet/IP
1. EtherNet Link object parsed Physical Address attribute response incorrectly.
2. Display Unknown Commands as ENIP instead of just TCP data.

CIP
1. For connected data, don't interpret it as a Message Router Request/Response format when the Forward Open connection was not directed to the Message Router. Previously, this data would be incorrectly shown as explicit CIP data. In many cases, this would show as malformed. This traffic will now just display as Data in the Wireshark tree, and "Implicit Data - Class (0x123)" in the Info column. Make this data filterable by "cip.conn_path_class == 0x123".
2. Fix parsing of Unconnected Send responses. Previously, for most cases, the response was not fully parsed, and would just show "Data", or it would parse the response as if the request class was the Connection Manager, which is incorrect. Now, also show the request path of the original embedded message in the tree.
3. Add some detailed error data for malformed Forward Close response.

Change-Id: I1c98ce516373d8c0ed6e049e25342f726bc370ea
Reviewed-on: https://code.wireshark.org/review/12339
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: D. Ulis <daulis0@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-05 11:51:50 +00:00
D. Ulis 7a3dadf042 Bugfixes for EtherNet/IP and CIP
EtherNet/IP
1. Only decode 32-bit header if there is enough data. Previously, this would show malformed data, even for I/O packets that have no data, eg: heartbeat data.
2. Typos

CIP
1. Many Time Sync attribute responses were flagged incorrectly as malformed.
2. Create service response highlighted the instance number incorrectly, and showed warnings.
3. Set Attribute List Request should exit early if it doesn't know about a particular attribute.
4. Incorrect format for Safety Network Segment: Router Format.
5. Typos

Change-Id: I506dbb053c247bc8efcbde2cce6ab24d9550c897
Reviewed-on: https://code.wireshark.org/review/12321
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 21:14:46 +00:00
Michael Mann 5db1352526 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I398e9cf4f6882e76644aa758e12c39a39159e95f
Reviewed-on: https://code.wireshark.org/review/3319
Petri-Dish: Michael Mann <mmann78@netscape.net>
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-03 16:30:10 +00:00
Michael Mann 0701d6170d Add EtherNet/IP connection conversation filters
Change-Id: Ia69cbe9fea364c735bde956d84a82404b46ec236
Reviewed-on: https://code.wireshark.org/review/1810
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-28 00:25:18 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Bill Meier ebaeed5a1f (Trivial)
- Fix indentation to match editor modelines (tabs-->spaces);
 - Rework/add some whitespace;

svn path=/trunk/; revision=53978
2013-12-12 20:16:30 +00:00
Michael Mann 643f9efce2 Add DeviceNet and J1939 dissectors. Both run on top of CAN (not necessarily always SocketCAN, but it did provide a good test environment)
svn path=/trunk/; revision=53802
2013-12-06 04:33:58 +00:00
Michael Mann 3a830bfe20 ENIP/CIP
Added the start of IPv6 support for I/O conversations (waiting for spec definitions to complete).
Added support for multiple messages in a single frame to be separated in the COL_INFO column.

ENIP
Added ListIdentity delay dissection
remove check_col()

CIP
Added TimeSync object dissection

svn path=/trunk/; revision=46020
2012-11-13 13:14:48 +00:00
Bill Meier 4248fa670a Explicit value_string array size specifier not required.
svn path=/trunk/; revision=43669
2012-07-11 20:26:24 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier e630561c2c Add editor modelines; Fix some indentation.
svn path=/trunk/; revision=41397
2012-03-07 16:01:31 +00:00
Jeff Morriss bb9b8880af From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6893 :
The attached patches fix the following issues:

1. CIP-Motion shouldn't be a heuristic dissector.  CIP-Motion packets are
determined by specific fields in a CIP ForwardOpen.  I ran into situations
where CIP-Motion's "vague" heuristics incorrectly dissected packets meant for
CIP-Safety.  Of course this requires the ForwardOpen to be in the trace, but it
is the most deterministic way to have CIP-Motion packets.

2. Minor bugfix to the CIP-Safety dissector.  A couple of fields were
"missing", causing errant malformed packets.

svn path=/trunk/; revision=41283
2012-03-02 03:39:16 +00:00
Anders Broman 6b2b82d213 From Michael Mann:
a dissector for the ODVA protocol: CIP Safety. More information
about the protocol can be found here: 

http://www.odva.org/Home/ODVATECHNOLOGIES/CIP/CIPTechnologyOverview/CIPSafety/CIPSafetyOverview/tabid/131/lng/en-US/Default.aspx

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6862

svn path=/trunk/; revision=41201
2012-02-27 09:30:26 +00:00
Alexis La Goutte 00dd4b455e From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6697
Modbus object support for CIP dissector

Support for the Modbus object within the CIP dissector.  Essentially wraps the Modbus protocol within a CIP object.

Also included update to Modbus error code per 
http://www.wireshark.org/lists/wireshark-dev/201111/msg00187.html

svn path=/trunk/; revision=40371
2012-01-04 13:29:48 +00:00
Anders Broman e8111a59aa From Michael Mann:
ENIP dissector - improved I/O connection dissection through "better conversation"

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6617

svn path=/trunk/; revision=40059
2011-12-01 06:05:39 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Anders Broman 4cfaa22784 From Michael Mann:
Improved CIP and ENIP dissectors

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416

svn path=/trunk/; revision=39595
2011-10-26 04:55:21 +00:00
Bill Meier a2e8e1cdcd From Benjamin Stocks (with some work by Michael Mann): "CIP Motion" dissector;
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5929

From me:
packet-cipmotion.c:
  FT_BOOLEAN fields with bitmasks need a bit-fieldwidth in the hf[] entry 'display' field;
  Define attribute_size as guint32 since it has to store guint8*guint16;
  Use ENC_NA as encoding arg in proto_tree_add_item() for FT_BYTES field types;
  Remove trailing whitespace from lines;
  Other minor cleanup and reformatting.

packet-enip.c:
  Use ENC_NA as encoding arg in proto_tree_add_item() for FT_BYTES field types;

svn path=/trunk/; revision=39396
2011-10-13 00:00:52 +00:00
Guy Harris 65ea44dd27 Back out the changes to packet-cip.h, too, so that a fixed version of
the patch that updates both can be cleanly applied.

svn path=/trunk/; revision=39231
2011-10-02 18:58:21 +00:00
Anders Broman 8bb88d9efc From Michael Mann :
General improvements to CIP and ENIP dissectors. 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6416

svn path=/trunk/; revision=39222
2011-10-02 16:35:10 +00:00
Jeff Morriss b2120849b1 From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5749 :
Added support for the following services of the Connection Manager object:
LargeForwardOpen
GetConnectionOwner

Added support for the following services of the Connection Configuration
Object:
GetAttributeAll
SetAttributeAll

From me:
Replace tabs with spaces; adjust modelines for 8-space tabs instead of 3.

svn path=/trunk/; revision=37404
2011-05-26 02:20:23 +00:00
Stig Bjørlykke 383809a151 Rewrite non-ASCII characters.
svn path=/trunk/; revision=28954
2009-07-06 14:14:13 +00:00
Stig Bjørlykke da47d6113a From Joakim Wiberg via bug 3670:
This patch correctes serveral minor things.

1. Adds decoding of generic services to classes that have a separate dissect
   function.
2. Adds new error codes.
3. Adds new CIP objects.
4. Extends the VendorID list.

svn path=/trunk/; revision=28951
2009-07-06 13:59:09 +00:00
Stig Bjørlykke 7f1f48a8b2 From Joakim Wiberg via bug 3103:
Various improvements to the CIP and ENIP dissectors.

From me:
Updated to latest trunk changes.

svn path=/trunk/; revision=28844
2009-06-26 02:38:23 +00:00
Stig Bjørlykke 1733596a6f Revert changes committed by an accident.
Will be committed again later.

svn path=/trunk/; revision=28779
2009-06-19 06:15:52 +00:00
Stig Bjørlykke b3e10e559a Moved setting of length2 to make it always set.
svn path=/trunk/; revision=28777
2009-06-19 05:45:40 +00:00
Jaap Keuter c3914ce6d5 From Ryan Wamsley:
For the EtherNet/IP protocol (ENIP), display text for Additional Status in the
Forward Open Response packet.

svn path=/trunk/; revision=25865
2008-07-30 06:07:47 +00:00
Bill Meier 211cdda386 From Ryan Wamsley: Add Connection Configuration Object support to EtherNet/IP dissector
svn path=/trunk/; revision=20897
2007-02-22 03:21:26 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Guy Harris e40f346a76 From Magnus Hansson: move CIP protocol to own dissector (we forgot to
check in packet-cip.h).

Also, add packet-cip.h to epan/dissectors/Makefile.common, so it gets
included in the release tarballs.

svn path=/trunk/; revision=12081
2004-09-23 22:36:01 +00:00