aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-prp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-1/+1
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-20Remove unused dissector registration prototypes, fix typoJoão Valverde1-1/+0
Change-Id: Ide5d7f2241db4ac87ed516f91f0bcaca347bb546 Reviewed-on: https://code.wireshark.org/review/24496 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-25Remove individual post-dissect enable preferences.Michael Mann1-34/+14
Use Analyze -> Enabled Protocol dialog interface. Added support for backwards compatibility of preference. Change-Id: I32b3fce9d18083d9324197e3fd7ddc7eb888d1fb Reviewed-on: https://code.wireshark.org/review/19422 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-24Indicate how this should be done.Guy Harris1-0/+7
Assuming that it could, if registered as an "eth.trailer" heuristic dissector, get the length of the entire frame, that is. Change-Id: I1ac26feeb10bb8ba357089a80f4b768f580bb51d Reviewed-on: https://code.wireshark.org/review/16121 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-23Fix "disable this protocol by default".Guy Harris1-0/+2
Allow a dissector to mark its protocol as "disabled by default", which means that the "enable all protocols" routine won't enable it. This is necessary in order to allow the disabling of protocols not to be unintentionally changed due to profile changes; see bug 9826. Change-Id: I3947f794c21350b70a8de06899cfc7715b77f90f Ping-Bug: 9826 Reviewed-on: https://code.wireshark.org/review/16109 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-23Fix some of the brokenness in the PRP redundancy control trailer dissector.Guy Harris1-0/+14
IF YOU ARE DOING A HEURISTIC CHECK TO DETERMINE WHETHER THE PACKET YOU'RE LOOKING AT IS ONE YOU SHOULD DISSECT, EVEN IN A DISSECTOR THAT'S NOT REGISTERED AS A HEURISTIC DISSECTOR, DO NOT LOOK AT PACKET BYTES UNLESS YOU HAVE ALREADY DETERMINED THAT THEY ARE AVAILABLE IN THE CAPTURE. THERE ARE NO EXCEPTIONS TO THIS RULE. Bug: 9826 Change-Id: I2327a92ee760003bc10489263c0c53acdf2094e9 Reviewed-on: https://code.wireshark.org/review/16092 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-11-25create_dissector_handle -> new_create_dissector_handleMichael Mann1-9/+8
This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-09-29Add editor modelines and adjust indentation as needed.Bill Meier1-0/+13
Change-Id: I857700d685354b0bc9e0ca647c57faba981b520f Reviewed-on: https://code.wireshark.org/review/4373 Reviewed-by: Bill Meier <wmeier@newsguy.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-12- Forward declaration of register functions.Anders Broman1-0/+2
svn path=/trunk/; revision=53971
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-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-01-19Localize a global variable; Do minor reformatting.Bill Meier1-10/+10
svn path=/trunk/; revision=40585
2011-11-14Remove uneeded #includes, forward refs & check_col();Bill Meier1-3/+2
tvb_reported_length_remaining() can return -1; Localize a variable. svn path=/trunk/; revision=39836
2011-10-31From Martin Renold via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5730Alexis La Goutte1-201/+93
Dissector for HSR and PRP-1 Here is a patch that adds a dissector for HSR and for PRP-1. Both protocols are defined in IEC62439 Part 3. (High-availability Seamless Redundancy / Parallel Redundancy Protocol) The existing PRP dissector has been refactored to support both the old PRP (now called PRP-0) and the new PRP-1. There are three distinct dissectors: - HSR (ethertype 892F) - HSR/PRP supervision (ethertype 88FB) - PRP-0 and PRP-1 (trailer dissector; disabled by default) From me : * Fix Clang Warning * Add modification for CMakeLists.txt svn path=/trunk/; revision=39692
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-20Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.Bill Meier1-4/+4
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-8/+8
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-01-21From Tobias Klauser:Anders Broman1-2/+2
Fix standard to IEC62439 Part 3 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5599 svn path=/trunk/; revision=35605
2011-01-21Adress => Address corrections (also in comments).Sake Blok1-3/+3
(see bug 5600) svn path=/trunk/; revision=35600
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-10-22From Tobias Klauservia ↵Jeff Morriss1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5327 : The current PRP dissector in packet-prp.c does not correctly identify VLAN tags. It uses the hard coded value 0x8000 to check the ethertype. The attached patch (against current SVN trunk) changes this to use the ETHERTYPE_VLAN define from epan/etypes.h and also fixes two misspellings in the respective comments. svn path=/trunk/; revision=34622
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2009-08-09Don't guard col_set_str (COL_INFO) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29342
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-07-07From Kovarththanan Rajaratnam:Stig Bjørlykke1-4/+4
More FT_XXX cleanup. svn path=/trunk/; revision=28971
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-12/+12
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2008-09-22Minor cleanup related to proto_reg_handoffBill Meier1-1/+1
svn path=/trunk/; revision=26246
2008-03-04From Sven Meier: update the PRP dissector to the newest version of the ↵Jeff Morriss1-194/+251
standard. There is also now a Wiki page for this protocol: http://wiki.wireshark.org/PRP svn path=/trunk/; revision=24554
2008-02-27Rather than always disabling the protocol at startup, just add a preference ↵Jeff Morriss1-15/+33
that decides if the dissector should be enabled or not. Still not perfect but it makes it more usable. svn path=/trunk/; revision=24494
2008-02-27From Sven Meier (on -dev in 6/2007):Jeff Morriss1-0/+304
This is a dissector for the Parallel Redundancy Protocol (PRP) defined in chapter 6 of the IEC 62439. PRP uses two independent networks in parallel and allows redundancy without switchovers. The protocol is sending Mac multicast messages with Ethertype 0x88fb. In addition to that it adds to every Ethernet frame a 4 byte trailer before the FCS. The trailer is detected by checking a size field and an identifier which are part of the trailer. Therefore, if the last 4 bytes of a frame match a correct trailer they get interpreted as a trailer, although it was probably not a real one. Note: This is a post-dissector which means it gets called for every frame. So as to not cause a performance hit for every Wireshark user (who may not even be looking at Ethernet frames) it currently disables itself every time Wireshark starts up. (There should be a better way to do this--maybe different Profiles (as discussed on -dev recently) is the way to go.) From me: Put ETHERTYPE_PRP (not IANA registered) in etypes.h and packet-ethertype.c svn path=/trunk/; revision=24493