aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isis-clv.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-25Fix lots of spellingsMartin Mathieson1-1/+1
2023-09-21Add hmac-md5 to packet-isis-clv algorithm_valsmivens1-0/+1
2023-04-23Fix more calls to val_to_str() and related functionsMartin Mathieson1-1/+1
2021-09-01tvbuff: convert helper methods to pinfo->poolEvan Huus1-1/+1
A few of them just needed scratch memory, so allocate and free it manually after doing any exception-raising checks. A few others were returning memory, and needed conversion to accept a wmem scope argument.
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-2/+2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2021-05-06isis(clv): Fix Dead Store (unused variable)Alexis La Goutte1-1/+1
2021-03-25isis: Support for proprietary Avaya/Extremenetworks Fabric TLVs/NLIPDJoerg Mayer1-17/+15
- TLV 129 NLPID decoding cleanup with multiple NLPIDs - NLPID 0x8f added (Avaya proprietary) - TLV 147 decoding added (Avaya proprietary) - TLV 184 Avaya prorietary IPVPN decoding added - TLV Types 185-186 Avaya proprietary IPVPN MC added without decoding
2020-04-03Clean up a number of things.Guy Harris1-7/+9
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-2/+2
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>
2019-05-12Fix the length of the item added for the value field of undissected CLVs.Guy Harris1-1/+1
The length variable is the length of the value, not the length of the entire CLV, so there's no need to subtract the length of the C and the L from the length - it covers just the V. Change-Id: I711657e4e0b76e2aac9d58efd88f45201b9c2c5b Reviewed-on: https://code.wireshark.org/review/33174 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-19ISIS: Add Prefix Attribute Flags TLV (rfc7794)Taisuke Sasaki1-21/+12
Fix according to review 31069 Change-Id: I03552eaba434597386d8bf386117a3366f2c3446 Reviewed-on: https://code.wireshark.org/review/31101 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-17ISIS: Add Prefix Attribute Flags TLV (rfc7794)Taisuke Sasaki1-2/+2
Also add the below minor fixes/enhancements: - Fix O-bit in MT TLV (rfc5120) - Add IPv4/IPv6 prefix string in a parent subtree - Modify the IPv6 Reachability TLV dissector so that it would dissect in TLV format order - Add a new SR Local Block TLV dissector (draft-ietf-isis-segment-routing-extensions-21) - Fix offset in SID/Label sub-TLV Change-Id: Ie317f094ff8f2ed3352e844c212eb59a677e18c6 Reviewed-on: https://code.wireshark.org/review/31069 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot 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-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-1/+1
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-19IS-IS: Add support for CRYPTO_AUTH authentication typeDhiru Kholia1-4/+29
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-05-18Use some FT_BYTE "BASE"s in isis dissectors.Michael Mann1-1/+1
Change-Id: I59acb37250f6248e985482e4b972250e295fd638 Reviewed-on: https://code.wireshark.org/review/15469 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-28IS-IS: Add Instance ID TLV (RFC 6822)Alexis La Goutte1-0/+37
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/+3
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-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-3/+3
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-1/+1
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 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-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Third batch (packet-icmpv6.c -> packet-mac-lte.c). Will look at cleaning up and committing script afterwards. Change-Id: Ib91e36ad200db01c3000605f6a7a21125b96a640 Reviewed-on: https://code.wireshark.org/review/6018 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
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-12-09Eliminate proto_tree_add_text from some dissectors.Michael Mann1-94/+27
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-10-28ISIS: Display code/type and length for unknown code/typeAlexis La Goutte1-9/+4
Change-Id: Idb70d571ae7d7f5fc87c08012ab380d35b2856a0 Reviewed-on: https://code.wireshark.org/review/4961 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-17Remove unnecessary includesMichael Mann1-1/+0
Change-Id: Ib1a90a07b2d467a81927c53917e05a1af6ba4ee6 Reviewed-on: https://code.wireshark.org/review/3666 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-08-08ISIS: Add type and length to CLVAlexis La Goutte1-3/+6
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-337/+337
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-18/+5
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332 Reviewed-on: https://code.wireshark.org/review/2694 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-2/+2
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
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>
2013-12-22Overhaul the ISIS dissectorsMichael Mann1-37/+35
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-09-22emem -> wmem conversion:Pascal Quantin1-2/+2
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-06-19Based on patch from gyanesh via ↵Evan Huus1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8268 Clarify display of the overload bit in multi-topology supported TLV for SPB. svn path=/trunk/; revision=50068
2012-12-25Add some additional sanity checks.Guy Harris1-0/+4
svn path=/trunk/; revision=46745
2012-12-21Check whether something's too big before subtracting it from anotherGuy Harris1-5/+5
variable. Adjust offset and len in parallel. svn path=/trunk/; revision=46665
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-10Use val_to_str_const() where appropriate;Bill Meier1-2/+2
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
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-02From "oss.2nerds":Anders Broman1-2/+8
IEEE P802.1aq/D3.6 and the corresponding IETF draft (http://tools.ietf.org/html/draft-ietf-isis-ieee-aq-05) defines a series of new ISIS TLVs for the shortest-path-bridging protocol. The attached patch file contains a simple dissector for one such TLV (the MT-Port-Cap TLV) and several corresponding sub-TLVs (mcid, aux_mcid, digest, and b-vid). The digest sub-TLV dissector has not been exercised because no suitable capture files are available (the digest sub-TLV seems not to be widely implemented at this point in time). Note that the codepoints mentioned in the IETF draft have changed. The IANA-assigned codepoints are further described in these pages: http://www.ietf.org/mail-archive/web/spb-isis/current/msg00007.html http://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xml#tlv-143 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7154 svn path=/trunk/; revision=42385
2011-10-27Fix proto_tree_add_item( encoding args;Bill Meier1-2/+2
Do whitespace cleanup (for a few files). svn path=/trunk/; revision=39640
2011-09-19Don't assign the return value of proto_tree_add_text() if it's not going to ↵Chris Maynard1-1/+1
be used. Fixes Coverity CID 1232. svn path=/trunk/; revision=39056
2011-05-18Mark a function arg as _U_Bill Meier1-1/+1
svn path=/trunk/; revision=37246
2011-05-18Don't assign to an unused 'proto_item *': Coverity 939 [UNUSED];Bill Meier1-2/+10
Don't create a subtree which is never used: Coverity 940 [UNUSED]. svn path=/trunk/; revision=37243
2011-01-16Use tvb_memeql().Jeff Morriss1-2/+2
Use tvb_ip_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the return string is NULL terminated. svn path=/trunk/; revision=35547
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32411
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2008-08-26#include <emem.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26091