aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isis-snp.c
AgeCommit message (Collapse)AuthorFilesLines
2020-04-03Clean up a number of things.Guy Harris1-60/+97
Pass to the routines that handle particular ISIS PDU types a tvbuff for the *full* PDU; some PDU types may have a checksum CLV type that checksums the *entire* PDU. Pass an isis_data_t * around to various routines, rather than passing some individual bits of information around. Add to that structure: the PDU length from the common-to-all-PDU-types part of the ISIS header; a proto_item * for the header length field; an expert_field * for a "the header length is bad" error. Use the PDU length from that structure when handling the aforementioned checksum CLV. When dissecting the PDU-type-specific part of the ISIS header, check to make sure we're not going past the header length and, if we are, report it with an expert info, using the header length field proto_item * and expert_field * from that structure. Show the type field in sub-TLVs of the Group Address TLV (RFC 7176 section 2.1) and, if the type is unknown, add a top-level item with the type and length fields under it. This fixes some bugs. Bug: 16477 Change-Id: I875306d9d4fd8f65a60b7a6d3be7e356afabe851 Reviewed-on: https://code.wireshark.org/review/36671 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-12Clean up some things.Guy Harris1-39/+48
Have separate expert info items for the PDU length field being too short, the PDU length field being too long, a CLV being too short, and a CLV being too long. Do the PDU length checks when we add the PDU length field, and add the expert infos to the length item; remember the results of the checks for future use. Use DISSECTOR_ASSERT for the tests in osi_check_and_get_checksum() that make sure the checksum field is contained within the data to be checksummed, so that's reported as a dissector bug to the user. That means that osi_check_and_get_checksum() only returns FALSE if we don't have all the data available to checksum; that already gets reported as an indication that the checksum is unverified, so we don't need to put confusing and misleading expert infos about the PDU length - whatever PDU length errors need to be reported have already been reported, as per the above. Make expert info names more consistent, and fix one expert info variable name. Make the length argument to isis_dissect_clvs() unsigned. Clean up white space. Change-Id: I0ce799c766dc427602d155c5b48099df8bf51c67 Reviewed-on: https://code.wireshark.org/review/33179 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-05-19IS-IS: Add support for CRYPTO_AUTH authentication typeDhiru Kholia1-1/+1
CRYPTO_AUTH (generic cryptographic authentication) is documented in RFC 5310, https://tools.ietf.org/html/rfc5310. Sample IS-IS .pcap files using CRYPTO_AUTH (HMAC-SHA1/HMAC-SHA256) can be found at https://c0decafe.de/svn/codename_loki/test/. Bug: 13727 Change-Id: If25edc5985e13de56ab6bade570f06e0e9db276c Reviewed-on: https://code.wireshark.org/review/21697 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-07-27Follow up for proto_tree_add_checksum.Michael Mann1-3/+9
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 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>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-16/+11
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-4/+4
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-28IS-IS: Add Instance ID TLV (RFC 6822)Alexis La Goutte1-0/+58
Bug:11649 Change-Id: I852b0f93797ba9e67c2772f482182b1f0d753a43 Reviewed-on: https://code.wireshark.org/review/12254 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-11-28ISIS: Add Expert Info when undecoded/unknown CLVAlexis La Goutte1-2/+6
Change-Id: I8048954cce6a370cc37faad62b657704f6ccef6a Reviewed-on: https://code.wireshark.org/review/12255 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-06-24Remove another batch of deprecated tvb_length callsEvan Huus1-1/+1
Change-Id: Icfdde38e40cca05d0705a081153a4ea3e8782ee7 Reviewed-on: https://code.wireshark.org/review/9086 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23Replace more deprecated tvb_length callsEvan Huus1-4/+4
The return values of new-style dissectors always use the captured length, so replace those automagically with sed. Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a Reviewed-on: https://code.wireshark.org/review/9065 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-26isis: bugfix in csnp source id length.Dario Lombardo1-1/+1
Change-Id: Ib9f8507ed0a5a0788970b5fa150917f7c1b10de3 Reviewed-on: https://code.wireshark.org/review/7418 Reviewed-by: Alexis La Goutte <alexis.lagoutte@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-09Eliminate proto_tree_add_text from some dissectors.Michael Mann1-7/+30
Change-Id: I44cc6b70ec4dfc565934da499f46fca60a4ded93 Reviewed-on: https://code.wireshark.org/review/5524 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>
2014-08-08ISIS: Add type and length to CLVAlexis La Goutte1-2/+18
Change-Id: If6dc8e3a9328571ccdb106b0aabc617889c434c7 Reviewed-on: https://code.wireshark.org/review/3465 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-06Add Modelines and fix indentAlexis La Goutte1-0/+13
Change-Id: I7abb415bccff4de846ab273eed3e3b2a434d94b7 Reviewed-on: https://code.wireshark.org/review/3455 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-01Fixing indentation with tabs in isis dissectorMatthieu Texier1-309/+309
Change-Id: I4f6296f1cb988dca8c94ca5089ff6aa03439da32 Reviewed-on: https://code.wireshark.org/review/3333 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-3/+2
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332 Reviewed-on: https://code.wireshark.org/review/2694 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-5/+5
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-5/+5
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14Put the system ID in the top-level items for neighbors.Guy Harris1-4/+4
Add a tvb_print_system_id() routine, and use that in various ISIS dissectors, while we're at it. Change-Id: I31b6b9ea8faf2b4849f974ec7ed27fbdd14b91ef Reviewed-on: https://code.wireshark.org/review/1145 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-05Fix some code remove by 296591399f90a9d89be958d91047aa724a77ee6dAlexis La Goutte1-0/+1
(Copyright or info about file...) Change-Id: I90ba8b1c3ec8406b0c3365a69a8555837fc4bbb1 Reviewed-on: https://code.wireshark.org/review/515 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-02-25Remove trailing whitespace.Bill Meier1-1/+1
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6 Reviewed-on: https://code.wireshark.org/review/372 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-12-27Fix [-Wmissing-prototypes]Anders Broman1-0/+9
svn path=/trunk/; revision=54473
2013-12-23Add FT_SYSTEM_ID type and convert the dissectors that use print_system_id ↵Michael Mann1-36/+15
with FT_BYTES to now use FT_SYSTEM_ID type. svn path=/trunk/; revision=54383
2013-12-22Overhaul the ISIS dissectorsMichael Mann1-319/+279
1. Make real dissectors and call dissector_try_uint_new for each "isis.type" 2. Use make_register script for dissector initialization 3. Replace isis_dissect_unknown() with real expert info 4. Use convert_proto_tree_add_text.pl to make many more filterable items and gets some files off of the checkAPIs.pl naughty list. 5. Remove (now unnecessary) dissector specific header files 6. Do some reordering of functions to eliminate the need for function declarations. Additional whitespace formatting and modelines should probably be applied to all of these dissectors. Used capture files from bug 5354 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5354) and bug 1792 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1792) for fuzztesting. svn path=/trunk/; revision=54367
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-2/+2
svn path=/trunk/; revision=52591
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-26/+16
svn path=/trunk/; revision=49938
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
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-06-19From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-1/+1
More header_field_info cleanup. svn path=/trunk/; revision=28772
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-1/+1
(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
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-1/+1
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-07-08checksum messages: use "[correct]" instead of "(correct)" and other "alike" ↵Ulf Lamping1-4/+4
messages svn path=/trunk/; revision=14880
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+595
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410