aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet/packet-pn-dcp.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16plugins: Add source tree subfolder for plugin libraryJoão Valverde1-1400/+0
This allows some simplification and makes things more consistent, particularly for loading plugins from the build dir. Also fixes the issue reported here: https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d Reviewed-on: https://code.wireshark.org/review/25329 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-29Add conversation endpoint typeMichael Mann1-6/+6
For the moment this mirrors the port_type enumeration (PT_XXX), but the intent is to move away from using "port types", eliminating most (if not all) Added conversation_pt_to_endpoint_type() so that conversations deal with the correct enumeration. This is for dissector that use pinfo->ptype as input to conversation APIs. Explicit use of port types are converted to using ENDPOINT_XXX type. Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef Reviewed-on: https://code.wireshark.org/review/24166 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-02PROFINET: Fix undecoded signal value in DCP Set Request.Birol Capa1-1/+13
According to specification, when suboption is CONTROL, signal value is FLASH_ONCE. Change-Id: I942579cdf3d642e636d02b778ffaad99022678e3 Reviewed-on: https://code.wireshark.org/review/23812 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>
2017-06-07profinet: use proto_tree_add_item_ret_(u)int directlyMartin Kaiser1-1/+2
Profinet defined functions to add 32bit integers to the tree and get their value. This is equivalent to proto_tree_add_item_ret_(u)int. Call those functions directly and remove the now obsolete Profinet functions. In some cases, the returned 32bit value is discarded. Use proto_tree_add_item then. Change-Id: I7744fab2f27b8ae8e681a36e4e96eb2f8be87bd6 Reviewed-on: https://code.wireshark.org/review/21989 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-04profinet dcp: simplify dissect_PNDCP_Suboption_Manuf()Martin Kaiser1-9/+4
There's not much point in having a switch-case block with only a default statement ;-) Change-Id: Iaacd87bb2995783b98e5395b3654a1c8f32c473a Reviewed-on: https://code.wireshark.org/review/21938 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-04profinet dcp: don't THROW() an exception from a dissectorMartin Kaiser1-1/+5
In this case, we can simply replace the exception with an expert info and exit the loop. Change-Id: I232e554af299140d7123b5e21d78372a35a7923b Reviewed-on: https://code.wireshark.org/review/21936 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-05pn dcp (profinet): fix conflicting entry in its value_stringAlexis La Goutte1-1/+1
Field 'BlockQualifier: ResettoFactory' (pn_dcp.block_qualifier_reset) has a conflicting entry in its value_string: 9 is at indices 7 (Resets all stored data) and 12 (Reserved)) Change-Id: I9d43fc44899d47eaafb50a76511dda69560a75da Reviewed-on: https://code.wireshark.org/review/21512 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-29PROFINET: Fix variable may not have been initialized warningBirol Capa1-4/+4
The variable may not have been initialized. To make code more readable and to avoid possible future mistakes initialize the variables. Change-Id: I0c5e78b6d625c87252a4c47e263a3d5c701f2674 Reviewed-on: https://code.wireshark.org/review/17962 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-05-26Cyclic PROFINET PROFIsafe RTC1 data dissectionT. Scholz1-4/+84
New implemented functions for profinet plug-in to read cyclic RTC1 data frames more detailed and further to dissect PROFIsafe on PROFINET frames. New functions include: - Reading the PROFINET "Ident OK" Frame for detailed module information, as ModuleIdentNr., SubModuleIdentNr., etc. total dynamically - Improved the existing dissection of fParameter with usage of GSDML-files, as the indexnumber for those parameters can change - Reading a GSDML-file for further module-information, such as PROFIsafe Module, etc. - Aded new pnio protocol preferences, in which the user can define its own network path to his GSDML-files, so that Wireshark is able to read those files for detailed information output. - Added new filter functions for PROFINET and PROFIsafe - All gained and saved information will be used to dissect the cyclic PROFINET frames Bug: 12216 Change-Id: I379da1d349fa099047953042f1aa30450bee5b30 Reviewed-on: https://code.wireshark.org/review/14119 Petri-Dish: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Birol Capa <birol.capa@siemens.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-24More ADDRESS macro to address function conversions.Gerald Combs1-3/+3
Replace remaining calls to SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL, COPY_ADDRESS, and COPY_ADDRESS_SHALLOW with their lower-case equivalents. Replace all ADD_ADDRESS_TO_HASH calls with add_address_to_hash. Change-Id: I4cff857d7a84085abe0bccd52d2605d2a468bf6f Reviewed-on: https://code.wireshark.org/review/11229 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-1/+1
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+1
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-08Profinet: OEM Device ID is addedBirol Capa1-1/+32
The Device ID of the OEM part may additionally be offered using OEM Device ID Change-Id: Ic51cc4c05a41a8d18f265fb1abab739d1e82e28a Reviewed-on: https://code.wireshark.org/review/8832 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-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-3/+7
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22plugins: Cleanup #includesBill Meier1-3/+0
Change-Id: Ic839f2995532d68308f8b5908c185acc7acaaa9c Mostly: remove '#include <glib/glib.h>' and certain other #includes already included in packet.h Reviewed-on: https://code.wireshark.org/review/5971 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-24Pass FrameID as data to the heuristic table, rather than use ↵Michael Mann1-5/+3
pinfo->private_data. Change-Id: Idd5818cbb2b1f8628bb29c2c71dfc6d41df89b5d Reviewed-on: https://code.wireshark.org/review/5448 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-10-06plugins: Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I36124f6021d46a228721bdc976f6b9fef1c8c088 Reviewed-on: https://code.wireshark.org/review/4488 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-03-05Corrected mrp decoding of link up and downWidok1-5/+62
Added DCP decoding of reset to factory removed unused value_strings corrected decoding of PDSubFrameBlock most of the length display added a dec_hex display Signed-off-by: Widok <kellingwido@aol.com> Change-Id: I17b59b45eff37b65047a7a3e5e275f01a37ee616 Reviewed-on: https://code.wireshark.org/review/517 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@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>
2014-01-01Fix [-Wmissing-prototypes]Anders Broman1-1/+2
svn path=/trunk/; revision=54528
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53230
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-09-17emem -> wmemPascal Quantin1-10/+10
svn path=/trunk/; revision=52130
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-1/+1
svn path=/trunk/; revision=51850
2013-05-29Batch (some of) the plugins to filterable expert infos. The Profinet plugin ↵Michael Mann1-2/+14
started to get a bit complex in determining filter names (especially the DCOM stuff), so I'll leave that to someone more familiar with the protocol. svn path=/trunk/; revision=49624
2013-03-03From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :Pascal Quantin1-3/+3
Remove C++ incompatibilities from profinet plugin svn path=/trunk/; revision=48039
2013-02-10Comment out numerous unused hf_.... instances found by checkhf.Bill Meier1-1/+3
svn path=/trunk/; revision=47617
2012-12-13General cleanup:Bill Meier1-283/+422
- Localize some variables; remove unneeded initializers; - Reformat some hf[] entries; - Whitespace; style; long lines. svn path=/trunk/; revision=46529
2012-12-12From Wido Kelling: [Profinet] Updated disecction regarding the IEC 61158Bill Meier1-3/+3
(with a few minor fixes by me). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8002 major change: reassembling of PNIO fragments (only works if OpenSafty dissector is disabled) minor changes: improved handling of DFP Frames added / updated MRP Block decoding ARServerBlock ARVendorBlock PDInterfaceDataReal PDInterfaceAdjust PDPortStatistic SubdirFrameData corrected display and subblocks added PDIRGlobalData complete dissection decoding of FrameDataProperties and ARTypes updated to conform the STD removed now usuported RTC2 ranges svn path=/trunk/; revision=46522
2012-09-30Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+2
svn path=/trunk/; revision=45219
2012-09-30From Yu Zhang via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7769Alexis La Goutte1-1/+22
Add Dissector for SuboptionDeviceInstance under DevicePropertiesOption in PROFINET DCP In PROFINET DCP dissector, current build didn't have SuboptionDeviceInstance (0x07) under DevicePropertiesOption (0x02). This patch add the support of SuboptionDeviceInstance svn path=/trunk/; revision=45218
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-05AFAICT '#include sys/types.h' is not needed for these files.Bill Meier1-5/+0
svn path=/trunk/; revision=42446
2011-10-05Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-1/+1
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|1|0|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39262
2010-10-17Removed unused hf_pn_dcp and hf_pn_ptcp.Stig Bjørlykke1-4/+0
svn path=/trunk/; revision=34544
2010-04-08Get rid of check_col().Anders Broman1-2/+1
svn path=/trunk/; revision=32428
2010-01-13From Didier Gautheron:Anders Broman1-4/+2
check_col.diff Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 svn path=/trunk/; revision=31519
2009-10-04From Benjamin Meyer:Anders Broman1-1/+8
PROFINET DCP ResetFactorySettings not decoded. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4090 svn path=/trunk/; revision=30320
2009-09-23Use col_set_str instead of col_add_fstri/col_add_str when adding constant ↵Kovarththanan Rajaratnam1-1/+1
strings to COL_PROTOCOL svn path=/trunk/; revision=30088
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-35/+35
Cleanup header_field_info in plugins. svn path=/trunk/; revision=28771
2009-05-01From Reinhard Speyerer:Jaap Keuter1-1/+1
This patch fixes several misspellings/typos in Wireshark SVN revision 28201. svn path=/trunk/; revision=28204
2009-01-26Fix uninitialized variable.Guy Harris1-218/+218
More indentation cleanups. svn path=/trunk/; revision=27306
2009-01-26Non-constant strings should not be used as format items; the formatGuy Harris1-8/+9
should be "%s", with the string used as an argument, just in case the string contains a "%" character. Clean up indentation. svn path=/trunk/; revision=27304
2009-01-26add some expert infosUlf Lamping1-2/+23
svn path=/trunk/; revision=27298
2008-06-19fix BlockError stringsUlf Lamping1-4/+4
svn path=/trunk/; revision=25490
2008-01-17add some parentheses as suggested by the OS X buildbotUlf Lamping1-12/+12
svn path=/trunk/; revision=24122
2008-01-17better conformance to the released DCP protocol spec:Ulf Lamping1-123/+170
- redesign/refactoring the code to support BlockQualifier - fix handling of BlockInfo - rename some display strings for better spec conformance - remove LLDP suboption svn path=/trunk/; revision=24120
2007-04-02Add PN-IO FSHelloBlock and PN-DCP Device/AliasNameUlf Lamping1-3/+21
svn path=/trunk/; revision=21298