aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sll.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-05Add conversation/endpoint statistics for Linux SLLMichael Mann1-0/+80
Bug: 14048 Change-Id: I320380c492b83f0e45bfbf20505deb3c5f11ae67 Reviewed-on: https://code.wireshark.org/review/24243 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-28Implement registration of capture dissectors by nameJoão Valverde1-1/+4
Mirror it after protocol dissector API. Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304 Reviewed-on: https://code.wireshark.org/review/18496 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-10sll: add unused bytes to tree.Dario Lombardo1-0/+11
The bytes that are not part of the address are not dissected. Added them to the tree as "unused", to have a complete dissection of the packet. Found by incomplete dissector check. Change-Id: Iafffebe8bc0f8254ac0b451d007e0a99aab91924 Reviewed-on: https://code.wireshark.org/review/17608 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-10Add Socket CANFD dissector.Michael Mann1-0/+1
Bug: 12687 Change-Id: Ib489b4c6aff1e0611e9b8a086054e56284f24b84 Reviewed-on: https://code.wireshark.org/review/16787 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
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-03-20Create call_data_dissector() to call data dissector.Michael Mann1-3/+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-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-2/+2
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 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-02-05SLL: add SLL protocol type to 'Decode As' dialogPascal Quantin1-1/+23
Bug: 12081 Change-Id: I2f2e2f85684f711c500bce83ce7a6d11676eabda Reviewed-on: https://code.wireshark.org/review/13713 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-17[sll] call the netlink dissector if the arp_hdr type is netlinkMartin Kaiser1-6/+18
re-order things a bit so that don't display anything if we just relay our packet to the netlink dissector Bug: 12018 Change-Id: Ic115de82d682b7105a1e97fb8be2709ac4875232 Reviewed-on: https://code.wireshark.org/review/13335 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-01-16[sll] add LINUX_SLL_P_NETLINKMartin Kaiser1-11/+9
remove some unnecessary if(tree) checks while at it Change-Id: I2ed7153a25a96f9fa08476176980655117aae26e Reviewed-on: https://code.wireshark.org/review/13334 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-3/+3
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 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-14Create some more capture dissector tables.Michael Mann1-27/+2
These were created from capture dissector functions that had switch statements determine "next" protocol/dissector. The registration decreases the need for function declarations in header files. Added new capture dissection tables for IP, IPv6, TCP and UDP as that seems like the next logical place to expand Change-Id: I1ec0cd54eecda4f400669ee5b026bf6e2b46545a Reviewed-on: https://code.wireshark.org/review/12634 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-14Create capture dissector tables.Michael Mann1-21/+13
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-2/+2
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-5/+8
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_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-18create_dissector_handle -> new_create_dissector_handleMichael Mann1-3/+4
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I9c7d1c092bbae896ec0c2832617891346927f2e1 Reviewed-on: https://code.wireshark.org/review/11932 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-11-06Add Nokia Intelligent Service Interface (ISI) dissectorTyson Key1-0/+1
From: https://github.com/shr-project/isi-wireshark-plugin/ Bug: 11676 Change-Id: If3f4d7e3e1dd674cb99e96eabdc3491dec76ea3a Reviewed-on: https://code.wireshark.org/review/11580 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-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-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-2/+2
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-2/+2
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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-03-01Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and ↵Michael Mann1-2/+2
SET_ADDRESS calls for the same address. Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116 Reviewed-on: https://code.wireshark.org/review/7437 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-01-07SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.Michael Mann1-18/+7
Not all changes were able to remove their corresponding tvb_get_ptr, because there are other API dependent on the (tvb_get)pointer, but future iterations optimizing those other APIs will then be able to remove it. Change-Id: Id7cefd440b81834de1d1aace7cd0789b1c871a22 Reviewed-on: https://code.wireshark.org/review/6358 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-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+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-08-15Remove unneeded #include <epan/prefs.h>; As needed: Add editor-modelines & ↵Bill Meier1-3/+16
adjust whitespaxcce. Change-Id: I6f79357e0f3906f6ccc5b68eb451b69b68636335 Reviewed-on: https://code.wireshark.org/review/3613 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-11- Make local functions static.Anders Broman1-0/+2
- Forward declaration of register functions. svn path=/trunk/; revision=53941
2013-11-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki1-1/+1
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-20Convert ethertype() function into a pure dissector. Bug 9454 ↵Michael Mann1-2/+11
(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-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53196
2013-11-08Convert: vlan, sll, rip to NEW_PROTO_TREE_APIJakub Zawadzki1-73/+90
svn path=/trunk/; revision=53175
2013-09-12More dissector table name related changes (a continuation of r51904).Chris Maynard1-1/+1
svn path=/trunk/; revision=51982
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-2/+1
svn path=/trunk/; revision=49923
2013-02-13From Sascha Herrmann:Jaap Keuter1-0/+1
Patch registering ieee802154 dissector to Linux SLL frames. svn path=/trunk/; revision=47649
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 Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-10Fix a proto_tree_add_ipv4() call that was presumably intended to be aGuy Harris1-2/+2
proto_tree_add_item() call. svn path=/trunk/; revision=42545
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-1/+1
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-10-04Use 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|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-3/+3
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-11-25Fix for bug 5435:Jaap Keuter1-0/+1
Add support for dissecting SLL type 0x17 frames. svn path=/trunk/; revision=35029
2010-11-21Fix for bug 5425:Jaap Keuter1-0/+1
Add support for dissecting SLL type 0x0C frames. svn path=/trunk/; revision=34991
2010-11-20Fix for bug 5422:Jaap Keuter1-0/+9
Add support for dissecting SLL type 0x03 frames. svn path=/trunk/; revision=34987
2010-10-01From Chris Maynard:Guy Harris1-1/+3
don't add a source address field if it's zero-length (fixes bug 2519); the source address length field is 8 octets long; if the purported length is > 8, only include the first 8 octets. svn path=/trunk/; revision=34303
2010-09-12Decode SLL payloads using a dissector table based on sll.ltype.Balint Reczey1-39/+10
The idea and the original patch came from Sebastian Reichel <elektranox@gmail.com> in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594390 svn path=/trunk/; revision=34101
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-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344