aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ethertype.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-10PROFINET: Update MRP dissection according to IEC62439-2 Ed.2.Birol Capa1-0/+1
The MRP PDU dissection is updated with respect to MRP standard IEC62439-2 Ed.2. 0x88e3 is added for MRP Ether Type String definions of MRP block and sub block types are updated. dissect_pn_ManuData function is removed since it is not used anymore. Change-Id: Iec6666abc75bcba4189f2c38851407abc23267f9 Reviewed-on: https://code.wireshark.org/review/18730 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> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-21ethertype: add missing value_string row for MACSECDavide Caratti1-0/+1
Change-Id: Ie062054249d847e4cc430818ce2deca96b2c7d90 Reviewed-on: https://code.wireshark.org/review/17845 Reviewed-by: d. caratti <davide.caratti@gmail.com> 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: Anders Broman <a.broman58@gmail.com>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-18etypes: Add ETHERTYPE_LINK_CTLStig Bjørlykke1-0/+1
The definition was found in the Linux kernel source code. Change-Id: I41d1435497042bc5905efc7e1af3941b9e8808e2 Ping-Bug: 12759 Reviewed-on: https://code.wireshark.org/review/17148 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-13Adding 802.1BR E-Tag dissectorKim Kempf1-0/+1
Based on IEEE Std 802.1BR-2012 Bug: 12613 Change-Id: Ic5198471f67a1af728df40a09443a1cab2621169 Reviewed-on: https://code.wireshark.org/review/16402 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-16Add Cisco ttag dissectorJaap Keuter1-0/+2
Add dissector for Cisco ttag protocol. Bug: 12518 Change-Id: Id17293a80b2b6827fd2d5c7ead098784c35a28ef Reviewed-on: https://code.wireshark.org/review/15964 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-05-16ethertype: Add old non-standard 802.1ad (QinQ)Alexis La Goutte1-0/+1
Issue reported by boaz Bug:12441 Change-Id: I1feb82615db65b0806c56425dd9f3cffdde463b4 Reviewed-on: https://code.wireshark.org/review/15461 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-16ethertype: fix indent (use tabs) and modelines infoAlexis La Goutte1-8/+7
Change-Id: I78253c35c84fed2e3f2775aa96798e29ae3b7bc3 Reviewed-on: https://code.wireshark.org/review/15460 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-03Added Bachmann bluecom protocolGerhard KHUENY1-0/+2
Bug: 12379 Change-Id: I2a6e779e28cd63c2bba6b2c075850f47162e9c7f Reviewed-on: https://code.wireshark.org/review/15119 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-10/+1
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
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>
2015-12-14Create capture dissector tables.Michael Mann1-49/+2
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 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-13Standardize the capture dissector function signature.Michael Mann1-9/+9
This will make it easier to mold into (capture) dissector tables. Change-Id: Iad63f2c2869782977992a3a072adb020be4b1818 Reviewed-on: https://code.wireshark.org/review/12587 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-13Create a way to register "capture" dissectors.Michael Mann1-2/+2
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 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_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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-11-26Don't allow the "Ethertype" pseudo-protocol's dissection to be disabled.Guy Harris1-0/+2
It's not a real protocol, it's a helper dissector for various protocols, and it makes no sense to disable it; doing so means that the Ethertype field itself isn't disabled, and allowing it to be disabled means that you can't do "Disable All", and manually enable Ethernet, IPv4, IPv6, and TCP to disable dissection of protocols running atop TCP on Ethernet. (See https://ask.wireshark.org/questions/48011/enabled-protocols-negation-of-disabled-proto for an example of somebody who wants to do exactly that.) Change-Id: Ibdd6ef53503de548e14cecc3766040c3a0b101d4 Reviewed-on: https://code.wireshark.org/review/12207 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-30nwp: add support for NWP packetsCody Doucette1-0/+1
Neighborhood Watch Protocol (NWP) is an XIA protocol for resolving network addresses to link-layer addresses. Hosts on a LAN send NWP Announcement packets with their host identifiers (HIDs), and neighbors in the LAN respond with NWP Neighbor List packets containing their HIDs and associated link-layer addresses. Bug: 11492 Change-Id: Ib1e801474b1aa72f5dd3d8303eeec36b96ee0a99 Reviewed-on: https://code.wireshark.org/review/10316 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-09-08Detect mismatched ethertype protocol ID (IPv4) and encapsulated IP packet (IPv6)João Valverde1-1/+1
Bug: 11458 Change-Id: I66b51654d268196da366b0e9aea6ced0076d4737 Reviewed-on: https://code.wireshark.org/review/10407 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-10xip: add support for XIP packetsCody Doucette1-0/+1
The eXpressive Internet Protocol (XIP) is the network layer protocol for the eXpressive Internet Architecture (XIA), a future Internet architecture project. The addresses in XIP are directed acyclic graphs, so much of the code included in this addition verifies the correctness of the DAGs and displays them in human-readable form. Bug: 11265 Change-Id: I948aaa73b927f8afc162d89689d184c5657f60b1 Reviewed-on: https://code.wireshark.org/review/8881 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-24Dissect 802.3 Jumbo frames while capturing.Michael Mann1-0/+4
Following the code Olivier Montanuy's code suggestion from bug 5390. Bug: 5390 Change-Id: Ie7425a76fd65fc9d50474c010b4a5beb1b3cf73e Reviewed-on: https://code.wireshark.org/review/7588 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23Remove more deprecated tvb_length callsEvan Huus1-2/+2
Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f Reviewed-on: https://code.wireshark.org/review/9050 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-05-20Improve VN-Tag dissector.Michael Mann1-0/+1
Bug: 7496 Change-Id: Ic1648f1c111913b7370b2eaf5557c4d8ea078033 Reviewed-on: https://code.wireshark.org/review/8546 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> 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: Anders Broman <a.broman58@gmail.com>
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-12-13dissector_try_uint(_new) and dissector_try_string now return the number of ↵Pascal Quantin1-2/+2
bytes consumed Change-Id: I528ad736caee1f29e2f0abfc0afcca6587d74eca Reviewed-on: https://code.wireshark.org/review/5743 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-7/+0
restore it. Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264 Reviewed-on: https://code.wireshark.org/review/5486 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-04Add editor modelines; Reformat as appropriate.Bill Meier1-8/+21
Change-Id: I8e9c58b75eea85877d22024201e5d8d0e9a3dbfd Reviewed-on: https://code.wireshark.org/review/4459 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
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-2/+2
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-07Reject the packet if data is NULL.Chris Maynard1-4/+9
svn path=/trunk/; revision=53835
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470) I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
2013-11-21Widen the Ethertype to a guint, to avoid compiler warnings.Guy Harris1-1/+1
Fix indentation while we're at it. svn path=/trunk/; revision=53493
2013-11-21Remove ethertype, mpls_label and ppids from packet_info structure.Michael Mann1-3/+4
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As". svn path=/trunk/; revision=53489
2013-11-20Provide "Decode As" functionality through dissectors themselves instead of ↵Michael Mann1-4/+24
the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450) The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table. When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog. This patch includes just the dissector portion of the functionality (minus packet-dcerpc.[ch] because it has hooks to the current GUI) svn path=/trunk/; revision=53445
2013-11-20Convert ethertype() function into a pure dissector. Bug 9454 ↵Michael Mann1-16/+27
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9454) The main driving force for this was my new Decode As functionality (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450) that wants a dissector/subdissector table relationship for all dissectors wanting to use Decode As functionality. The ethertype() function provides the value to the "ethertype" subdissector table, so I think it should be matched to a dissector. Only odd side effect is the display filter of "ethertype" returns no packets because there is no "item" associated with the dissector. svn path=/trunk/; revision=53443
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-10-21Remove if (fh_tree) checks as add_ethernet_trailer() calls such functions as ↵Chris Maynard1-3/+0
dissector_try_heuristic(), expert_add_info(), and col_append_str(), which all need to be called whether fh_tree is NULL or not. #BACKPORT(1.10,1.8) svn path=/trunk/; revision=52738
2013-10-18Beginnings of Motrola's MiNT protocol.Jörg Mayer1-0/+1
Most important missing item: Fill in the test functions to avoid using all packets to the (fixed) ports. svn path=/trunk/; revision=52669
2013-08-07From Vaibhav Katkade via ↵Jeff Morriss1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9011 : Add support for the Cisco MetaData (0x8909) ethertype. From me: Don't try to register the "eth.type" abbreviation; use "cmd.type" instead. Add SVN id. Clean up trailing white space and fix up some indentation. Don't declare a variable static that need not be. svn path=/trunk/; revision=51198
2013-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-1/+1
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
2013-03-17[-Wmissing-prototypes]Anders Broman1-0/+4
Use explicit casts. svn path=/trunk/; revision=48347
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-30/+12
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-16Add Ethertype for Network Controller Sideband InterfaceJörg Mayer1-0/+1
svn path=/trunk/; revision=47691
2012-12-27Add Media Independent Handover Protocol ethertypeAnders Broman1-0/+1
svn path=/trunk/; revision=46801
2012-11-06Add ETHERTYPE_ATMOEAnders Broman1-0/+1
svn path=/trunk/; revision=45951
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-08-02From Richard Stearn: add support for BPQ (AX.25 on Ethernet).Guy Harris1-0/+5
svn path=/trunk/; revision=44232