Commit Graph

29 Commits

Author SHA1 Message Date
Alexis La Goutte 6a6f64d53f cipmotion: fix conflicting entry in its value_string
Field 'Service Code' (cipm.svc.code) has a conflicting entry in its value_string: 83 is at indices 30 (Run Hookup Test) and 31 (Get Hookup Test Data))

Change-Id: I3d650b0a6aeacb8e992126a7008e0b256cf1fe94
Reviewed-on: https://code.wireshark.org/review/21395
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-28 11:53:38 +00:00
D. Ulis 2dbde83ee5 CIP Motion: Minor updates
1. Change protocol name from "Motion" to "CIP Motion". This now matches "CIP Safety" I/O.
2. Print out unparsed data as bytes.
3. Remove if(tree) check
4. Clean up the parsing to be a little more consistent, and in packet byte order.

Change-Id: I5c28522da7991852b708d825a349badc036b4b8d
Reviewed-on: https://code.wireshark.org/review/20673
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>
2017-03-24 04:38:19 +00:00
Michael Mann b7f4e25059 Adjust proto_tree_add_uint_format_value calls to use unit string
Several calls to proto_tree_add_uint_format_value could be better served
using BASE_UNIT_STRING with a "unit string" in hf_ field.  There also
a few cases where proto_tree_add_uint_format_value could just be
proto_tree_add_uint.

Added a few more "common" unit string values to unit_strings.[ch]

Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d
Reviewed-on: https://code.wireshark.org/review/19242
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13 22:56:50 +00:00
D. Ulis 8773ea03cb CIP: Minor enhancements
1. ENIP: Display the CIP Forward Open Request packet number for connected data
2. CIP: Extended Network: Display expert info when the expected bytes does not match actual bytes
3. CIP: Look up more data fields as CIP service or Device Type
4. CIP: Display data as Dec/Hex, depending on how the spec shows things
5. Minor: Pull out common code into load_cip_request_data()
6. Minor: Text corrections

Change-Id: I184ac3899786f650e4d4643a5dfe68bba785d6e0
Reviewed-on: https://code.wireshark.org/review/19092
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>
2016-12-06 00:08:35 +00:00
D. Ulis 0f18087ca3 CIP: Minor bug fixes
1. CIP: dissect_cip_set_attribute_list_req - Too many bytes highlighted. Could cause malformed packet
2. CIP: dissect_cip_cco_all_attribute_common - Too many bytes highlighted
3. CIP Motion: dissect_cntr_service - Wrong size passed in which tried to highlight too many bytes. Would cause malformed packet.
4. CIP: Some minor formatting/whitespace changes.

Change-Id: I5899888a3e58452945c8546cf635768cdd3cf738
Reviewed-on: https://code.wireshark.org/review/18000
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>
2016-09-30 21:26:39 +00:00
Peter Wu bf0f5a982b Use result of register_dissector
Assign result of `register_dissector(..., func, proto)` to FOO_handle
and remove `FOO_handle = create_dissector_handle(func, proto)`.

Found by looking for files named packet-FOO.c having the above
create_dissector_handle pattern. Some files (with different dissect
routines for the two functions) remain unchanged.

Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90
Reviewed-on: https://code.wireshark.org/review/13247
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-13 11:36:29 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
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>
2016-01-08 20:04:56 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
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-12-09 12:37:36 +00:00
Michael Mann 01f7356f85 register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
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-11-13 17:44:24 +00:00
cjdunlop e997aaabe9 packet-cipmotion.c: Modified CIP motion parser
Modified CIP Motion parser to include newly-defined Axis Safety related
fields in the status data set section.

Change-Id: I70c6dd345ae9353b87e6f7c1300b60687f41a1f6
Reviewed-on: https://code.wireshark.org/review/8342
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-11 04:26:57 +00:00
Michael Mann f031fafdcc Add proper "Decode As" mechanism for EtherNet/IP I/O instead of preference.
Change-Id: I9d7c0f296176679b61d7ee0c4358ce409dfc4f4f
Reviewed-on: https://code.wireshark.org/review/7895
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-04 02:21:01 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
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-24 23:42:13 +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
Anders Broman ef249623e6 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48313
2013-03-15 06:26:47 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Bill Meier fad55cdecc Remove unneeded #includes;
Rename header_fields[] tp hf[] as per convention;
Reformat hf[] entries;
Remove empty proto_reg_handoff...().

svn path=/trunk/; revision=43670
2012-07-11 20:31:47 +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 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +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
Alexis La Goutte ddcb796878 From Don Westman via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6889
CIP Motion parsing of set axis attribute list request is messing up attr data

parsing a CIP Motion 'Set Axis Attribute List' Request returns correct data for attribute ID, dimension and element size but 'attribute data' field retrieves the same data for each attribute in the list rather than the real data sent in the request.

From me :
Fix the typo error (use the wrong offset variable, need to use local_offset variable)



svn path=/trunk/; revision=41257
2012-03-01 09:11:08 +00:00
Alexis La Goutte c21455ce0e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40373
2012-01-04 17:35:41 +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 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 47c7565571 Initial a variable to prevent a (not actualy valid) compiler warning:
'inst_count' may be used uninitialized in this function.

svn path=/trunk/; revision=39400
2011-10-13 01:24:43 +00:00
Bill Meier de7561dc53 Fix a "set but not used" compiler warning.
svn path=/trunk/; revision=39399
2011-10-13 01:17:51 +00:00
Bill Meier eadae8da5f Fix a "defined but not used" compiler warning.
svn path=/trunk/; revision=39398
2011-10-13 01:09:17 +00:00
Bill Meier 45b2da0e44 Mark some function parameters as unused (_U_); Fixes compiler warnings.
svn path=/trunk/; revision=39397
2011-10-13 00:16:54 +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