aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ldp.c
AgeCommit message (Collapse)AuthorFilesLines
2022-11-08Fix more unused variables and enable unused-but-set-variable errors.Gerald Combs1-2/+1
Add -Werror=unused-but-set-variable to our default compiler flags and fix ``` epan/dissectors/packet-dcerpc-frsrpc.c:709:10: error: variable 'nb_chunk' set but not used [-Werror,-Wunused-but-set-variable] guint32 nb_chunk = 0; ^ ``` ``` epan/dissectors/packet-dcom-oxid.c:175:13: error: variable 'u32ItemIdx' set but not used [-Werror,-Wunused-but-set-variable] guint32 u32ItemIdx; ^ ``` ``` epan/dissectors/packet-l2tp.c:1775:104: error: parameter 'ccid' set but not used [-Werror,-Wunused-but-set-parameter] static int dissect_l2tp_ericsson_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 ccid) ^ ``` ``` epan/dissectors/packet-ldp.c:1922:19: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable] guint8 ix; ^ ``` ``` epan/dissectors/packet-nas_5gs.c:4757:14: error: variable 'curr_len' set but not used [-Werror,-Wunused-but-set-variable] guint i, curr_len; ^ ``` ``` epan/dissectors/packet-per.c:1769:6: error: variable 'extension_addition_entries' set but not used [-Werror,-Wunused-but-set-variable] int extension_addition_entries; ^ ``` ``` epan/dissectors/packet-rtitcp.c:618:11: error: variable 'messages_count' set but not used [-Werror,-Wunused-but-set-variable] guint messages_count, offset; ^ ``` ``` epan/dissectors/packet-tcp.c:2130:9: error: variable 'ackcount' set but not used [-Werror,-Wunused-but-set-variable] int ackcount; ^ epan/dissectors/packet-tcp.c:3317:12: error: variable 'nbOptionsChanged' set but not used [-Werror,-Wunused-but-set-variable] guint8 nbOptionsChanged = 0; ^ ``` ``` epan/dissectors/packet-zbee-zcl-se.c:11802:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable] for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5; i++) { ^ ``` ``` ui/iface_lists.c:142:23: error: variable 'linktype_count' set but not used [-Werror,-Wunused-but-set-variable] gint linktype_count; ^ ``` ``` ui/voip_calls.c:456:15: error: variable 'item_num' set but not used [-Werror,-Wunused-but-set-variable] guint item_num; ^ ``` ``` file.c:572:17: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable] guint32 count = 0; ^ ``` ``` file.c:3667:24: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual] pd = (guint8 *)ws_mempbrk_exec(pd, buf_end - pd, pattern, &c_char); ^ ``` ``` ui/qt/io_graph_dialog.cpp:1932:60: error: variable 'mavg_right' set but not used [-Werror,-Wunused-but-set-variable] unsigned int mavg_in_average_count = 0, mavg_left = 0, mavg_right = 0; ^ ``` ``` ui/qt/stats_tree_dialog.cpp:166:9: error: variable 'node_count' set but not used [-Werror,-Wunused-but-set-variable] int node_count = 0; ^ ``` ``` ui/qt/models/profile_model.cpp:1142:13: error: variable 'entryCount' set but not used [-Werror,-Wunused-but-set-variable] int entryCount = 0; ^ ```
2021-10-07to_str: scope tvb_ip_to_strEvan Huus1-1/+1
2021-09-15MPLS: Some systems display labels (mostly) in HEXJoerg Mayer1-1/+1
E.g. EXOS
2021-08-25LDP: Display Generic label with DECAlexis La Goutte1-1/+1
Fix #17539
2021-07-21First pass pinfo->pool conversionEvan Huus1-6/+6
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
2021-01-14Fix value_string consecutive repeated stringsMartin Mathieson1-1/+0
Detected by adding another check under ENABLE_CHECK_FILTER to look for consecutive labels likely to have been left as copy/paste errors. Change to proto.c probably too messy to merge.
2020-08-31More spelling fixes, part 2 of 2nd pass of dissectors.Martin Mathieson1-1/+1
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-04-15LDP: Dissect interface parameter of PWID FECUli Heilmeier1-9/+16
Bug: 15654 Change-Id: Idad1f531ec61efcde98872b092529cb8c3b28c9b Reviewed-on: https://code.wireshark.org/review/32855 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-09LDP: Support RFC7140 (Extensions for HSMP LSP)Uli Heilmeier1-0/+6
Adds support for RFC7140. Change-Id: I0d7312a078bcb654574707fc46da0fe0629dbb7d Reviewed-on: https://code.wireshark.org/review/32803 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-09LDP: Complete support for RFC8077 (PWID FEC)Uli Heilmeier1-0/+126
Adds support for PWid FEC Element and Generalized PWid FEC Element as defined in RFC8077. Bug: 15681 Change-Id: I114484e76a3b7161d9b510cde83c2d917f07a333 Reviewed-on: https://code.wireshark.org/review/32782 Petri-Dish: Alexis La Goutte <alexis.lagoutte@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-12-03LDP: Add support for MP2MP FECUli Heilmeier1-0/+2
As stated in https://tools.ietf.org/html/rfc6388#section-3.2 MP2MP uses the same structure as the P2MP FEC element. Bug: 13171 Change-Id: Ia619deac6075f5eb27dff2144edbbb60b440cc46 Reviewed-on: https://code.wireshark.org/review/24677 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-18Update ldp TLVs from iana webpage (scripted).Joerg Mayer1-276/+450
Change-Id: I1cb4210d4af93303298485c86627027adecd6052 Reviewed-on: https://code.wireshark.org/review/23578 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-04-10LDP: Add Entropy Label Capability TLVUli Heilmeier1-0/+9
s. https://tools.ietf.org/html/rfc6790#section-5.1 Bug: 13584 Change-Id: I1271b154960d7c46f9d0776a431beab3290c2871 Reviewed-on: https://code.wireshark.org/review/21007 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-1/+1
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-33/+7
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-09Note the registry for fec_vc_types_vals values and update it.Guy Harris1-1/+9
Change-Id: I0514417895ccc86f51bf239d56005245fd875809 Reviewed-on: https://code.wireshark.org/review/18127 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-12/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-05Fix expert_info errors found by new and improved checkhfs.pl.Michael Mann1-5/+5
Change-Id: I30f1b92ee438361c3bd58743f7d1ae8d5ffc96f0 Reviewed-on: https://code.wireshark.org/review/15718 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-3/+3
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-06-24Remove a bunch more deprecated tvb_length callsEvan Huus1-2/+2
(getting really close!) Change-Id: Ibf22a5f727c4dc0070b78144a4b0ab8e0c5e1bce Reviewed-on: https://code.wireshark.org/review/9081 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23Replace more deprecated tvb_length callsEvan Huus1-2/+2
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>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-24/+17
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+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-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-8/+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-11-02Eliminate proto_tree_add_text from several dissectors.Michael Mann1-5/+26
Change-Id: I6d3125f15d268edd47ef74dd655eb86cb25ee52d Reviewed-on: https://code.wireshark.org/review/5047 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>
2014-09-30Add editor modelines; Adjust whitespace as needed.Bill Meier1-25/+38
Change-Id: I434da226c842298f4fb2a4335d06d51e164af2af Reviewed-on: https://code.wireshark.org/review/4394 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-158/+102
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0 Reviewed-on: https://code.wireshark.org/review/2702 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
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-4/+4
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14Add support of RFC 6514 PMSI bgp attribute and tunnel ID decodingMatthieu Texier1-10/+14
Change-Id: Ia170002fb5af5f6548595688956cc01ec4a72298 Reviewed-on: https://code.wireshark.org/review/960 Reviewed-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-03Try to fix [-Wmissing-prototypes]Anders Broman1-0/+2
svn path=/trunk/; revision=53741
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53230
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-20Fix format error.Evan Huus1-1/+1
svn path=/trunk/; revision=52702
2013-10-20Convert the proto_tree_add_text calls that should have been expert info.Michael Mann1-133/+136
svn path=/trunk/; revision=52700
2013-09-30Convert proto_tree_add_double_format calls to ↵Michael Mann1-10/+10
proto_tree_add_double_format_value where appropriate. svn path=/trunk/; revision=52298
2013-09-16Remove a bunch more set-but-no-longer-used variables.Jeff Morriss1-6/+4
svn path=/trunk/; revision=52100
2013-09-16Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-21/+15
hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either: 1. Case sensitivity differences between hf_ field name and formatted string. 2. Unnecessary whitespace between hf_ field name and colon in formatted string There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed. svn path=/trunk/; revision=52098
2013-09-15More wmem conversion (leaving uat related functions aside)Pascal Quantin1-4/+4
svn path=/trunk/; revision=52055
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-35/+22
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-07-18Fix various errors found by checkAPI.pl and fix-encoding-args.pl scriptsPascal Quantin1-21/+21
svn path=/trunk/; revision=50723
2013-07-18From Rupesh Patro:Anders Broman1-5/+328
Add dissection of MPLS Upstream Label Assignment for LDP [RFC 6389]. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8020 svn path=/trunk/; revision=50719
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-11/+9
svn path=/trunk/; revision=49938
2013-05-27Batch of filterable expert infosMichael Mann1-4/+19
svn path=/trunk/; revision=49596
2013-04-22Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=48987
2013-04-01Typo's. That is all.Jaap Keuter1-8/+8
svn path=/trunk/; revision=48685