aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mq.c
AgeCommit message (Collapse)AuthorFilesLines
2021-09-16ptvcursor: add explicit memory scopeEvan Huus1-1/+1
I was hoping to avoid this, since the ptvcursor should already be implicitly scoped to the tree it is working on. But there are a bunch of call sites where the passed tree can be NULL (?) and a few places where the tree is explicitly set/reset after creation, so requiring an explicit scope is safer. Avoids global memory pools in favour of ones the compiler can verify.
2020-12-20More spelling fixes.Martin Mathieson1-1/+1
2020-12-15packet-mq: Improve MQINQ Displayrobionekenobi1-7/+3
Improve display of Integer value (use standard, no alignement) Reduce un-needed space in table display for Prm. Use, where possible, 'xxx: Text (decimal)' display for Integer value
2020-12-03packet-mq: Improve MQINQ Displayrobionekenobi1-3/+25
Improve the display of MQINQ Segment, by adding dec/hex/Name of selector in MQINQ/MQINQ_REPLY and trying to display dec/hex/Name value of Integer Value when possible in MQINQ_REPLY
2020-10-22packet-mq: Improve and fix bugsrobionekenobi1-22/+36
Improve MultiSegment display Fix Option (endianess) in MQCLOSE Add missing parsing for Q_MGR_STATUS_ATTRS Some minor code reformatting
2020-09-17packet-mq: Improve MultiSegment dissect and displayrobionekenobi1-60/+164
Dissect and display correctly Multi Segment for ASYNC_MESSAGE MQGET MQPUT MQPUT1
2020-09-11packet-mq: Improve Structure Displayrobionekenobi1-169/+237
FCNO Improve field display FOPA Improve field display FCMI Support new structure GMO Support version 4 LPOO Improve field display ID Initial Data Improve field display PMO Improve QName display in COL_INFO CONN Improve field display
2020-09-10packet-mq: code reformatingrobionekenobi1-631/+631
Reformat some code part to remove unneeeded spaces
2020-09-10packet_mq: Support V9.2, improve MultiSegment, improve some struct displayRobiOne (Robert Grange)1-263/+266
MQ V9.2 support Improve disscetion for multi-segment MQGET_REPLY, MQPUT, MQPUT1, ASYNCH_GET Improve display for some structure (ID, CONN) Some fixes
2020-09-07Yet more spelling fixes.Martin Mathieson1-1/+1
Includes small updates to the script and wireshark dictionary. Probably the last spelling fixes from me for a while.
2020-08-12MQ: use FT_STRING, not FT_STRINGZ, for strings.Guy Harris1-121/+120
The documentation mentioned looks more like API/ABI documentation than "data on the wire" documentation, but the strings all look like counted strings, with no trwminating NUL. Use FT_STRING, not FT_STRINGZ. Add a URL for the MQ PCF documentation and replace no-longer-working URLs for the MQ documentation with a working URL. Change-Id: Id656a3e6cd75bff34d1a5a650229b4ba749ef365 Reviewed-on: https://code.wireshark.org/review/38134 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-26MQ: Fix short NameValue presentationJaap Keuter1-2/+1
Patch from Robert Grange Bug: 16733 Change-Id: I7a11e060bb89aa1279a212f9dd958931c1031846 Reviewed-on: https://code.wireshark.org/review/37967 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-21/+21
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-28Clean up some ASCII vs. EBCDIC string handling.Guy Harris1-123/+143
In at least one capture, structure IDs are in ASCII even though the code page in the header is an EBCDIC code page. Determine the structure ID's character encoding based on whether it's the ASCII or EBCDIC version of the ID value, not on the global character encoding. We were using the *integer* encoding, not the *string* encoding, for the "qprotect" field, which is a string; fix that. Use STR_UNICODE for strings, as they're not guaranteed to consist of characters that can be mapped to ASCII characters (even the common subset of EBCDIC, not counting code page-dependent code points, has non-ASCII printable characters in it). Change-Id: I971dd7ae55617c27ebe88f31089b2495374593bf Reviewed-on: https://code.wireshark.org/review/33399 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-25Rename packet-ssl* to packet-tls*Gerald Combs1-1/+1
Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch]. Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06 Reviewed-on: https://code.wireshark.org/review/29659 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-20epan: fix various misannotations of VALS/RVALS/VALS64/TFSPeter Wu1-9/+9
No functional change, just using the correct macro for value_strings. Other fixes: Taking the address of the first element of an array gives the same address as the array itself. An array of a structure with a single element is the same as the single element itself (packet-sprt.c). Change-Id: I08bc9de49fbd1659a6700ace863e5f05144c7b3e Reviewed-on: https://code.wireshark.org/review/29752 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-09-13Start renaming SSL to TLS.Gerald Combs1-1/+1
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS" over "SSL" in user interface text and in the documentation. Fix the test_tls_master_secret test while we're here. Bug: 14922 Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8 Reviewed-on: https://code.wireshark.org/review/29649 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-08-16packet-mq: Fix LPOO Strucxt + Add MQV91 DefRobert Grange1-12/+8
Add MQ V9.1 Def Fix LPOO Struct Display Change-Id: I14ff534b7117e65dcc4b096aa478c0c16a863f67 Reviewed-on: https://code.wireshark.org/review/29153 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-11packet-mq: Fix some struct display add new defRobert Grange1-49/+52
Fix display for FCNO Struct Fix display for ID Struct Add new DEF Removed unused variable Change-Id: Id460ec3d9941d06cae4c400b89b8f979fd7d663f Reviewed-on: https://code.wireshark.org/review/29050 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-03-31packet-mq: Fix for SPI Verb and SPI OPEN FieldsRobert Grange1-10/+14
Add missing SPI VERB Improve display some Fields in SPI OPEN Change-Id: Ibe585d80ac7e3ddf1c85c972f0dd5cd50d64598c Reviewed-on: https://code.wireshark.org/review/26686 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-24packet-mq: Fix for Encoding problem in some MQ StructRobert Grange1-2/+6
Fix to use the MD encoding info when decoding some MQ Struct Change-Id: I0de05efeff41df893b82ac36ad28cfa04c68b1e0 Reviewed-on: https://code.wireshark.org/review/26510 Reviewed-by: Robert Grange <robionekenobi@bluewin.ch> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-14packet-mq: Code reformatRobert Grange1-499/+499
Only reformated code (VS2017 with Ctrl K + Ctrl D) No code logic change Change-Id: If574c50cf0efb75984beb45df958be991ea63819 Reviewed-on: https://code.wireshark.org/review/25771 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>
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>
2018-02-05packet-mq: Fix a wrong offset+Add value in val_strRobert Grange1-140/+137
fixed an offset error for mqmo in gmo Added value in comment when defining val_str Change-Id: Ie29f65f96d2ffb96c0cc0623346432f1f8380168 Reviewed-on: https://code.wireshark.org/review/25604 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-04MQ: use real string length when calling strip_trailing_blanks()Pascal Quantin1-2/+2
Bug: 14390 Change-Id: I5acfc651237da55c3ee907f21d89a3add6edeeef Reviewed-on: https://code.wireshark.org/review/25596 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-04MQ: keep extended value string array sortedPascal Quantin1-1/+1
Change-Id: If7d6c8d75179eca213a90977657c61e9a9677474 Reviewed-on: https://code.wireshark.org/review/25595 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-04packet-mq: Fix problem in get_mq_pdu_lenRobert Grange1-5/+4
Found during fuzz test that the get_mq_pdu_len can return a 0 length pdu. Fix to at least return tvb_reported_length_remaining Change-Id: I6410f71724a6288fe42a4f600e72a8af787aa7eb Reviewed-on: https://code.wireshark.org/review/25574 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-02-02packet-mq: Add support for IMS+TM StructDario Lombardo1-679/+412
Added support for IMS, TM, TMC2 Struct Improve display some Flags in ID Struct Fix display for FCNO Struct Fix error in get_mq_pdu_len Code reformat (VS2017) Moved DEFINE to header file More struct display fixed Fix for IMS Msg len display Change-Id: I80bfd25a5079598fc44124dc2c7b850640a38b00 Reviewed-on: https://code.wireshark.org/review/25295 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-02packet-mq: Fix after change 25009Robert Grange1-2/+10
Fix for unused variable mq_MQPRI_vals Fix test when displaying unique MQ Segment (vs multi MQ segment) Changed my name in AUTHORS Change-Id: I8ffa5523dbf8469d2814d2a90348eea61a05823a Reviewed-on: https://code.wireshark.org/review/25106 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-02packet-mq: Improve display of ID Struct + Segmented MsgsRobert Grange1-53/+98
Improve display of ID Struct for FAP Lvl 13 Improve display for Segmented MQ Mesages Add also the ReasonCode of the ASYNCH_MESSAGE in column and tre node Added various new CONST for display Change-Id: I458296e466d0744627e0b4f645d634b0c6d930de Reviewed-on: https://code.wireshark.org/review/25009 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-05packet-mq: Improve ECapFlag display + CapFlag3 Add new FlagRobert Grange1-7/+17
Improve dispaly of Error Cap Flags Add new Flag for Cap Flag Misc coding aligmement Change-Id: I9ad593dbe8bcc116057af9a6324f25451bac2a88 Reviewed-on: https://code.wireshark.org/review/22938 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>
2017-06-22MQ: put declaration before codePascal Quantin1-1/+2
Change-Id: I2b0d1a4795e3278a1702d51d4fd532a37a4eba19 Reviewed-on: https://code.wireshark.org/review/22332 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-20mq: start removing some if (tree) checksMartin Kaiser1-280/+202
There are lots of if (tree) checks. Start removing some which are obviously unnecessary. Change-Id: I3f8e4b82cd84d8e92ae79492d705438e2df739bb Reviewed-on: https://code.wireshark.org/review/22238 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20mq: don't THROW() an exception from a dissectorMartin Kaiser1-1/+1
We can simply stop the dissection and exit. Change-Id: Ida8895513a1949fe5826ab89ffec2168642a9e89 Reviewed-on: https://code.wireshark.org/review/22237 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-19MQ: check fragment length before trying to perform reassemblyPascal Quantin1-5/+28
Bug: 13792 Change-Id: Id0c116655288c5a3347911281a932ae80250c24f Reviewed-on: https://code.wireshark.org/review/22233 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-14MQ: fix typo (Comit -> Commit)Alexis La Goutte1-1/+1
Change-Id: I36f772f7b7cf0d8e9d3f287bc4bf9718180485d8 Reviewed-on: https://code.wireshark.org/review/21651 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-14Provide some URLs for the document in question.Guy Harris1-1/+8
Change-Id: Ief48dbc07add739ed7274947640cc9e68552242e Reviewed-on: https://code.wireshark.org/review/21654 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-30Have format_text_chr use wmem allocated memory.Michael Mann1-3/+3
Change-Id: Idcea59f6fc84238f04d9ffc11a0088ef97beec0c Reviewed-on: https://code.wireshark.org/review/19844 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-29Register reassembly tablesMichael Mann1-13/+3
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 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-17MQ: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
Change-Id: I62a67c4fff4604a3d1e335500b2453bae4f95f37 Reviewed-on: https://code.wireshark.org/review/18223 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-13packet-mq: Handle MQV9Robert Grange1-37/+57
Handle Put Message Option V3 Add various new defines Fix a typo Bug: 13006 Change-Id: I022de9f131558bb8a0144d840a6484944f75cffe Reviewed-on: https://code.wireshark.org/review/18121 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-12MQ: fix typo found by lintianAlexis La Goutte1-1/+1
Change-Id: I8fefb89116685b39567fe8041ca781612f67dbce Reviewed-on: https://code.wireshark.org/review/18177 Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-03-20Create call_data_dissector() to call data dissector.Michael Mann1-6/+4
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-10mq: enable SSL dissectionPeter Wu1-19/+22
Register dissector as "mq" (for Export SSL PDU) and consolidate different heuristics dissector functions into one (TCP vs. non-TCP). Make it possible to select mq for SSL and add heuristics. Bug: 4652 Change-Id: Ib0812dc75dda3fe47f46a917f14399f4a92f5b76 Reviewed-on: https://code.wireshark.org/review/13856 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>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-1/+1
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-11-16create_dissector_handle -> new_create_dissector_handleMichael Mann1-3/+4
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I96aa9cf53533cbb07105aa400d42922baf3016b3 Reviewed-on: https://code.wireshark.org/review/11860 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>