summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-pcep.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-26Parse enterprise-numbers at run timeJoão Valverde1-3/+3
"enterprise-numbers" is converted to tab-separated values and renamed "enterprises". Unused fields are stripped. PENs are stored in a hash table loaded at run-time. User "enterprises" file is loaded from the personal config dir. Misc make-sminmpec.pl improvements and fixes. Note: names of type "Entity (formerly ...)" have the formerly part commented out for a cleaner output. Change-Id: I60c533afbe3e399077fbf432088064471ad3e1e2 Reviewed-on: https://code.wireshark.org/review/22246 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2017-05-06packet-pcep.c: Fix infinite loopMichael Mann1-3/+3
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1363 Bug: 13687 Change-Id: I11d9736db945857fdcf2c23826a3acf5f6fd08a7 Reviewed-on: https://code.wireshark.org/review/21528 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-14pcep: add registration of missing ett fieldsJakub Zawadzki1-4/+6
Add registration of ett fields: - ett_pcep_obj_unreach_destination, - ett_pcep_obj_branch_node_capability, Which were used since 7bca5e168817f6f665e9aaec70ca37722c7afbea. Reorder, ett_ registration to match declaration order. Change-Id: Ie88cf518a77e134257570a054f6173ee49f27776 Reviewed-on: https://code.wireshark.org/review/21091 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-06PCEP: Decode "SR-RRO subobjects" as defined in ↵Simon Zhong1-0/+4
draft-ietf-pce-segment-routing-08. Change-Id: I93cc00da055364b2a6d647966fcd299c1f4e206e Reviewed-on: https://code.wireshark.org/review/20943 Reviewed-by: Anders Broman <a.broman58@gmail.com> 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>
2017-04-03Use col_append_str() for fixed stringsStig Bjørlykke1-1/+1
Change from col_append_fstr() to col_append_str() when appending strings without formatting. Change-Id: I8975704c246f2b9a1301ed5f96273aa9d61c6f44 Reviewed-on: https://code.wireshark.org/review/20857 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-19pcep: Add support of draft-ietf-pce-pcep-service-aware-13Simon Zhong1-88/+335
update support of draft-ietf-pce-segment-routing-08 Change-Id: I4d25268bb331462fbe219f242ff8278b017de37b Reviewed-on: https://code.wireshark.org/review/19642 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>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+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-09-28pcep: Added rfc 7334 support.Simon Zhong1-16/+41
Updated PCEP-ERROR Object Error Types and Values base on Path Computation Element Protocol (PCEP) Numbers 2016-08-09 version Change-Id: Ife0b49119a2b634279e33ab8f699a5dc57ecb34b Reviewed-on: https://code.wireshark.org/review/17957 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-27pcep: Added missed pieces of RFC 6006 support.Simon Zhong1-17/+741
Added display Object-Type number in string. Change-Id: Icbb44aae2379f308f49bef7355e8c8c901889c15 Reviewed-on: https://code.wireshark.org/review/17910 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-09-23pcep: add Conveying Vendor-Specific Constraints (RFC7470) supportszhong1-0/+77
Added capability to expand Private Enterprise Number to string. Change-Id: Id3df604a47c3067febb878caf89087aa00ecf038 Reviewed-on: https://code.wireshark.org/review/17770 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-05-20PCEP: fix L bit mask for PATH-KEY sub-objectFrancesco Fondelli1-2/+2
Change-Id: I93ca3e64af2a9f29109a3dc6fb42907562c27321 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/15502 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: Anders Broman <a.broman58@gmail.com>
2016-04-13PCEP: add TRIGGERED-INITIAL-SYNC flag parsing and alignFrancesco Fondelli1-14/+22
capabilities to draft-ietf-pce-stateful-sync-optimizations-04 Change-Id: I602e6395939e6f870782f2d1a867d2663e4b15e2 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/14892 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-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-26PCEP: support of "PCEP Extensions for EstablishingFrancesco Fondelli1-0/+171
Relationships Between Sets of LSPs", draft-ietf-pce-association-group-00 Bug: 11782 Change-Id: I1f0886bc30a71af54b51dea771a927d1f5742ca9 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/12179 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>
2015-08-16A new Early Allocation Request for draft-ietf-pce-lsp-setup-type andff1-4/+8
draft-ietf-pce-segment-routing has been issued. Reference: https://mailarchive.ietf.org/arch/msg/pce/Zdsc0HHl1SLvpANRWhpLvIzJQyI There are implementations out there that are using 5 as SR-ERO subobject identifier (instead of 36 that will be assigned by IANA) and 27 as the PATH-SETUP-TYPE TLV identifier (instead of 28 that will be assigned by IANA). This patch decodes both 5/36 as SR-ERO subobject and 27/28 as PATH-SETUP-TYPE. It is unlikely that IANA will re-assign code points 5 and 27 in the near future. Change-Id: Ie2efa869344e4c1121f19f1ee3a71711d566a037 Signed-off-by: ff <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/10057 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-06-22[pcep] (benign) Use ENC_BIG_ENDIAN (not ENC_NA) for certain multibyte fields.Bill Meier1-15/+15
Change-Id: Idc31728ce1b327ff86a58541ba01275107c7598b Reviewed-on: https://code.wireshark.org/review/9019 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-05-20PCEP: reorder pcep_class_vals extended value stringPascal Quantin1-2/+2
Change-Id: Iaa270bc085cbee41be9881eab2749c0ed26ef359 Reviewed-on: https://code.wireshark.org/review/8554 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-20Added support to RFC 6006, in particular, SERO and SSRO Objects and P2MP ↵Oscar Gonzalez de Dios1-25/+118
Endpoints Object. Trailing whitespaces, indent and typo fixed, used value_string. Fixed EOF Problem (Ubuntu Petri Dish failed) Bug:11213 Change-Id: I4ecc11b17c34dd993a72903ad4314c51ada64e02 Reviewed-on: https://code.wireshark.org/review/8532 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-13PCEP: fix SID parsing, label is the first 20 bitsFrancesco Fondelli1-1/+1
Change-Id: I13d2ff79b171b232dd4e1e1082beeae2e36dec51 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/8451 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-09PCEP: Update to last draftFrancesco Fondelli1-13/+14
- fix PLSP-ID parsing, is a 20 bits field - fix SID parsing, is in network order on the wire - fix PATH-SETUP-TYPE and SR-PCE-CAPABILITY code points Change-Id: If26035181462a9cad77a4a594aab3c007b4d00a2 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/8351 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-20replace some deprecated tvb_length callsEvan Huus1-2/+2
Change-Id: I18152e75aec2eedccad4d393c1b4b493cd7b406d Reviewed-on: https://code.wireshark.org/review/8125 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-16PCEP, support new drafts:Francesco Fondelli1-12/+234
Conveying path setup type in PCEP messages, draft-ietf-pce-lsp-setup-type-00 PCEP Extensions for Segment Routing, draft-ietf-pce-segment-routing-01 Bug: 11046 Change-Id: Ib2ea9a96079324377fa65ef8c3ab37a98f530793 Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com> Reviewed-on: https://code.wireshark.org/review/7618 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-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+1
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-3/+1
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-06PCEP: Missing break in switch (CID 1247685)Alexis La Goutte1-0/+1
Change-Id: Id001a6c1e116fdabfd51c354832ca68f50e65e7d Reviewed-on: https://code.wireshark.org/review/5618 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-12/+12
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-29Add missing use of a value_string definitionEvan Huus1-1/+1
Change-Id: I865256633dbcc378b53eeabb62fcf84c617ea1b9 Reviewed-on: https://code.wireshark.org/review/4365 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-27Added support ofSimon Zhong1-71/+550
- "PCEP Extensions for Stateful PCE" (draft-ietf-pce-stateful-pce-09) - "PCEP Extensions for PCE-initiated LSP Setup in a Stateful PCE Model" (draft-ietf-pce-pce-initiated-lsp-01) - "Optimizations of Label Switched Path State Synchronization Procedures for a Stateful PCE" (draft-ietf-pce-stateful-sync-optimizations-01) checkAPIs.pl executed, got "deprecated APIs tvb_length" warning, but I didn't modify them because I saw reverse operations. Fuzz test executed, no error. Can't submit pcap file because is captured during internal test. Change-Id: I063a7f6bda57543017b546506f9f89eda387daf6 Reviewed-on: https://code.wireshark.org/review/4275 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>
2014-09-06Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-3/+10
Other minor cleanups while in the area. Change-Id: I8ea59205cfe6fab643d8fe01b75ce91532004fd9 Reviewed-on: https://code.wireshark.org/review/4004 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-07-05convert to proto_tree_add_subtree[_format]Michael Mann1-8/+5
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35 Reviewed-on: https://code.wireshark.org/review/2865 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
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-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@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-14Fix warningsJakub Zawadzki1-2/+5
svn path=/trunk/; revision=54089
2013-12-12Reformat some hf[] entries;Bill Meier1-2170/+2987
Reformat some long lines; tabs --> spaces (to match editor modelines); Rework/add whitespace; svn path=/trunk/; revision=53991
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-6/+8
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-26/+26
svn path=/trunk/; revision=51852
2013-08-10coverity 1058716Martin Kaiser1-1/+1
set but not used variable svn path=/trunk/; revision=51242
2013-07-25Fix some more bugs that caused compiler warnings.Guy Harris1-2/+9
svn path=/trunk/; revision=50887
2013-07-25Get rid of an unused variable (set, but not used).Guy Harris1-5/+3
Get rid of extra arguments to expert_add_info_format_text() - as with any other printf-like routine, if the format string has no % items, you don't need to pass any additional arguments after that - you don't have to tack on a BASE_NONE just for the lulz. svn path=/trunk/; revision=50886
2013-07-251. MASSIVE conversion of proto_tree_add_text to proto_tree_add_item with the ↵Michael Mann1-709/+770
help of (and a few passes of) convert_proto_tree_add_text.pl. Tried to keep display filter names in line with existing filters. 2. Cleaned up a bunch of proto_tree_add_xxx that could really be proto_tree_add_item so "useless" local variables could be removed. 3. Bugfixed a few bitmask (probably) copy/pasteos. 4. Better standardized whitespace and added modelines. 5. Still think some of the "object" filters (with BASE_NONE) could be removed in favor of a single filter (value_string) with object ID number (BASE_DEC), but I'll leave that to someone more familiar with the protocol. svn path=/trunk/; revision=50884
2013-07-18Cleanup hf_ variables so they can be identified as such. "Array" of hf items ↵Michael Mann1-369/+302
not necessary and prevents "check" scripts from fully working. Made ett array local to proto_register_pcep. All this for preparing to use convert_proto_tree_add_text (which I thought should be its own patch/revision) svn path=/trunk/; revision=50733
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-3/+1
svn path=/trunk/; revision=49921
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-6/+0
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-26it's ==> its & its ==> it's as needed.Bill Meier1-7/+7
svn path=/trunk/; revision=47891
2012-09-25replaced decode_boolean_bitfield calls with itemized filtersMichael Mann1-10/+19
added tfs_no_yes to tfs.[ch] svn path=/trunk/; revision=45115
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-08-10Use val_to_str_const() where appropriate;Bill Meier1-21/+21
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