aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-llrp.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-05Fix some spelling errors found by Lintian.Gerald Combs1-1/+1
Change-Id: If6fc3aab7ad4fc634567121f7b9541bc6f6c5766 Reviewed-on: https://code.wireshark.org/review/30926 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> 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-04-18Rename BASE_VALS_NO_UNKNOWN to BASE_SPECIAL_VALS.Guy Harris1-11/+11
It makes it a bit clearer what its purpose is - to allow a value_string to be used for numeric rather than enumerated fields, giving certain values of the field a special meaning. Change the explanation in the documentation to match as well. Change-Id: Id07b22eee996b79ea5f3473928d29adcabe09bf3 Reviewed-on: https://code.wireshark.org/review/21209 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-10Add support for BASE_VALS_NO_UNKNOWNAlexis La Goutte1-78/+55
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single (maybe 2) numerical value(s). If a field has the numerical value that doesn't match anything in the value_string, just the number is supplied for the field (no "Unknown") Dissectors that had this use case have been converted in the patch. Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9 Reviewed-on: https://code.wireshark.org/review/20736 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-26LLRP: Remove PARAM_TREE_ADD* macrosAlexis La Goutte1-319/+562
and make checkhf happy (no need to rewrite some wireshark function...) Change-Id: I0214e809229ac14d5ecf136f61db232c5dd50cdb Reviewed-on: https://code.wireshark.org/review/20704 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>
2017-03-20LLRP: Fix LLRP Custom Parameter DecodingAlexis La Goutte1-3/+3
param_end is the offset+len... and also vendor unknown is not limited to uint32 Bug: 13473 Change-Id: I68cf435f52f28a4a399812f715b38edeecd1e78c Reviewed-on: https://code.wireshark.org/review/20650 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>
2017-03-20Replace PARAM_TREE_ADD_SPEC_STAY macro by proto_tree_add...Alexis La Goutte1-16/+6
(Make checkhf more happy) Change-Id: I27ff7d9ba1351bdc7dc1b801950ffdfaf3266629 Reviewed-on: https://code.wireshark.org/review/20634 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> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-19LLRP: Display unknown data when vendor is unknown...Alexis La Goutte1-0/+9
Bug:13473 Change-Id: Ia8ba177489be72c76b8b1168098de329ffcb8356 Reviewed-on: https://code.wireshark.org/review/20580 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>
2017-03-12llrp: fix this condition has identical branches ↵Alexis La Goutte1-1/+1
[-Werror=duplicated-branches] found by gcc7 Change-Id: I2bc9b5b50b8698c27f2a56b869de318fa98bf7b1 Reviewed-on: https://code.wireshark.org/review/20469 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-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-02-06llrp: limit recursion depthEvan Huus1-32/+35
LLRP defines fairly complex parameter nesting which we handle via recursion, however this means a large crafted packet could cause very deep stacks and potentially stack overflows. Limit our recursive depth to an arbitrary, which should be more than enough for any legitimate packet (I hope). Bug: 12048 Change-Id: I9ac31bddfa4ffd1a79809387d10d2261749b95e7 Reviewed-on: https://code.wireshark.org/review/13794 Reviewed-by: Evan Huus <eapache@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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-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>
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-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+1
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-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-8/+8
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-12dissectors/llrp: Add support for Impinj's Hub extensionPetr Štetiar1-0/+70
Based on Impinj extension schema v1.4. Change-Id: Ica9493a4527ae800d6e5daaf2d86b8cfdf479ed1 Signed-off-by: Petr Štetiar <petr.stetiar@gaben.cz> Reviewed-on: https://code.wireshark.org/review/2981 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
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-0/+3
svn path=/trunk/; revision=54089
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-6/+9
"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-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-7/+7
svn path=/trunk/; revision=51852
2013-09-03Make test.sh from buildbot HappyAlexis La Goutte1-1/+1
svn path=/trunk/; revision=51692
2013-09-02Batch of filterable expert info.Michael Mann1-7/+19
svn path=/trunk/; revision=51688
2013-06-17Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8809Evan Huus1-2/+2
The LLRP Standard 1.0.1 defines the ProtocolID Parameter as 8 bit value (see LLRP Standard 1.0.1 document, page 138, AccessSpecParameter) but Wireshark treats it as 16 bit value and therefore doesn't recognize the EPCGlobalClass1Gen2 protocol type and marks the whole packet afterwards as invalid. svn path=/trunk/; revision=49991
2013-04-01Now only if I can get the case right :)Jaap Keuter1-1/+1
svn path=/trunk/; revision=48686
2013-04-01Typo's. That is all.Jaap Keuter1-8/+8
svn path=/trunk/; revision=48685
2013-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-1/+1
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
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-09From Martin Kupec via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7658Evan Huus1-246/+953
Manually expand some of the macros in packet-llrp.c that were only being used in one place. Makes for a more traditional set of hf_ registrations. svn path=/trunk/; revision=44817
2012-08-28Fix a dead store and a few duplicate 'break' statements as caught byEvan Huus1-19/+33
clang and cppcheck. svn path=/trunk/; revision=44687
2012-08-28Remove variadic macro that accidentally made it in a while back.Evan Huus1-26/+259
svn path=/trunk/; revision=44686
2012-08-23Don't call dissect_custom_message() when it's not initialized.Jeff Morriss1-3/+4
svn path=/trunk/; revision=44646
2012-08-23Get rid of unnecessary function pointer - just directly call theGuy Harris1-4/+1
function in the switch statement. This keeps us from calling through an uninitialized pointer for custome parameter numbers other than LLRP_VENDOR_IMPINJ (as warned of by at least some compilers). svn path=/trunk/; revision=44624
2012-08-23From Martin Kupec via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7658Evan Huus1-128/+1916
Major enhancements to the LLRP dissector. svn path=/trunk/; revision=44621
2012-08-16'tab-width/tabstop/tabSize' in editor modelines should really always be 8;Bill Meier1-4/+3
Also: - In one case #include <epan/prefs.h> not needed; - Do some minor whitespace reformatting. svn path=/trunk/; revision=44537
2012-07-24Remove unneeded #include;Bill Meier1-17/+21
Create/use extended value strings for several value-string arrays; Minor whitespace cleanup. svn path=/trunk/; revision=43960
2012-06-12Fix: code under 'if(tree)' (in)directly calls ↵Bill Meier1-22/+19
sub-dissector/col_...()/expert...() fcns svn path=/trunk/; revision=43226
2012-05-02Remove most blurbs (they do not have any added value) and fix a few typo errorspascal1-17/+17
svn path=/trunk/; revision=42387
2012-05-02From Evan Huus:Anders Broman1-0/+994
Given the problems with the original attempt, and the fact that there's a new version of the protocol spec out (v1.1), I took a crack at writing a new dissector from scratch. It doesn't decode the fields within the message parameters (there are far too many to bother with for an initial draft), but it decodes everything else. Even though it's not complete, I feel it's worth checking in as an intermediate step (assuming it passes review), since it's still far better than nothing, and adding full parameter-field decoding is going to take a lot of time simply for transcribing all the different fields. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1957 svn path=/trunk/; revision=42383