aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ldp.c
AgeCommit message (Collapse)AuthorFilesLines
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
2013-03-19From beroset:Anders Broman1-3/+3
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-02-28Fix Coverity CID 280377: Dead default in switch.Chris Maynard1-14/+4
svn path=/trunk/; revision=47931
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-14/+10
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-01From Gaurav Patwardhan, RFC 6720 - Generalized TTL Security Mechanism (GTSM) ↵Michael Mann1-12/+40
for the Label Distribution Protocol (LDP) Bug 7856 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7856) svn path=/trunk/; revision=47428
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-7/+7
unused hf[] entries (which I should have done in the first place). svn path=/trunk/; revision=47391
2013-01-26Fix various instances of unused hf[] entries foundBill Meier1-4/+10
by checkhf. svn path=/trunk/; revision=47312
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-09-07From Aditya Ambadkar via ↵Jeff Morriss1-7/+13
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7046 : Fix CID 703472 and (external) fuzz failure 7567: The dissect_subtlv_interface_parameters is missing the handling of BFD 2..4. For the crash patch, we decided to add the bfd2..4 in dissect_tlc function(in the diff). We plan to open a separate bug to fix dissect_subtlv_interface_parameters to make it handle BFD2..4. (Thanks to Arun Arunachalam for this analysis) From me: fix up some indentation and replace tabs with spaces (for consistency). svn path=/trunk/; revision=44801
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-9/+9
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-29From Aditya Ambadkar and Diana Chris:Anders Broman1-6/+34
Enhancement to LDP dissector to support changes proposed in RFC6391 - flow aware transport of PW over an MPLS PSN. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7046 svn path=/trunk/; revision=42894
2012-01-20Change display filter name from "ldp.tlv...." to "ldp.msg.tlv...." to be ↵Chris Maynard1-3/+3
like the rest. svn path=/trunk/; revision=40613
2011-11-28from Shobhank Sharma:Anders Broman1-6/+31
- Removed some mpls preferences which are no longer relevant/needed like decode PWAC payloads as PPP traffic and assume all channel types except 0x21 are raw BFD. - MPLS extension from PW-ACH to MPLS Generic Associated Channel as per RFC 5586 - Updated Pseudowire Associated Channel Types as per http://www.iana.org/assignments/pwe3-parameters - Updated the VCCV bitmaps as per RFC 5885 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6574 svn path=/trunk/; revision=40026
2011-10-25Fix proto_tree_add_item() encoding args.Bill Meier1-34/+34
svn path=/trunk/; revision=39578
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-20Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.Bill Meier1-1/+1
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-32/+32
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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-79/+79
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-5/+5
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