summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-mbim.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-29Register reassembly tablesMichael Mann1-15/+2
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-12-31Dissectors don't need a journey of self discovery.Michael Mann1-2/+2
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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-12-16Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.Michael Mann1-77/+42
Many proto_item_append_text calls were just adding a unit string to a field. There's a better way to do that now. Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78 Reviewed-on: https://code.wireshark.org/review/19289 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-04Bump GLib minimum required version to 2.22.0João Valverde1-1/+0
Change-Id: I0ab85be8090f234f9ca10914063f97f13c894413 Reviewed-on: https://code.wireshark.org/review/16879 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-07-14MBIM: add dissection of AT&T proprietary UUIDPascal Quantin1-13/+682
Based on AT&T Windows 8 Extended API Requirements version 1.8.0 Change-Id: Iaf54173812a02023581c530f2340ea21e9e220d9 Reviewed-on: https://code.wireshark.org/review/16431 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-14MBIM: add a missing breakPascal Quantin1-0/+1
Change-Id: I3a4483861b1d97ff5e43041b3ecca64c3077b284 Reviewed-on: https://code.wireshark.org/review/16427 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-13MBIM: add dissection of Intel proprietary UUIDsPascal Quantin1-283/+1220
Based on http://www.telit.com/fileadmin/user_upload/products/Downloads/4G/Telit_xN930_MBIM_Command_Functional_Specification_r2.pdf While we are at it, add placeholder for AT&T proprietary UUID (no dissection of the buffers). Change-Id: I4f9825d1f9fde474853f9b86a4302742c078d8cd Reviewed-on: https://code.wireshark.org/review/16413 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-7/+7
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 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-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-8/+8
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_register_dissector -> register_dissector for dissector directory.Michael Mann1-3/+3
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> 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-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-7/+2
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+1
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy for some dissectorsPeter Wu1-0/+7
This patch adds reassembly_table_destroy calls as cleanup function for dissectors which have a simple init routine that just calls reassembly_table_init (comments are ignored). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e (with the if and assignment parsers disabled). The only difference from the autogenerated output is that the XXX comments from the init routines in smb-pipe and tds dissectors are kept. Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7 Reviewed-on: https://code.wireshark.org/review/9222 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-20MBIM: fix GSM SMS transmitted PDU lengthPascal Quantin1-0/+1
Change-Id: I5568d6048f620f5332577e2cf0d36ffa20200ebf Reviewed-on: https://code.wireshark.org/review/8556 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-15MBIM: add checks on the maximum string or PDU size allowedPascal Quantin1-57/+186
Change-Id: I10912bbe5a4ee38732a200b595b8d34dfa40c698 Reviewed-on: https://code.wireshark.org/review/8475 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-12USB: allow to call sub dissectors for setup response packets without ↵Pascal Quantin1-1/+4
transaction available This is useful when people export displayed packets of a USB sub dissector (like MBIM) without keeping the USB setup requests and still expect to have "Decode As" functionality working Change-Id: Iad32ddc7b87544ff568a091f03e393a106f38554 Reviewed-on: https://code.wireshark.org/review/8430 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-12MBIM: fix dissection of captures taken on a Linux hostPascal Quantin1-1/+2
- ensure that MBIM tree is not below URB setup one - do not try to dissect an empty tvb Change-Id: I8c6655727eec7df84882fd861d5581848340e0f3 Reviewed-on: https://code.wireshark.org/review/8410 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: Michael Mann <mmann78@netscape.net>
2015-03-20MBIM: use proto_tree_add_item_ret_uintPascal Quantin1-281/+151
Change-Id: I70c348222f4f30a651c69ccfd479180684d9c9fe Reviewed-on: https://code.wireshark.org/review/7763 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-06MBIM: add request/response visual indicatorsPascal Quantin1-2/+2
Change-Id: I5f4ce93bb5b164fb8b75c0acf7dd8825663110b8 Reviewed-on: https://code.wireshark.org/review/7556 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-02MBIM: add it to "Decode As" menuPascal Quantin1-2/+34
Change-Id: If961ac8fcfa0d760e112036ea3e439c4e061af8b Reviewed-on: https://code.wireshark.org/review/7498 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-18Add a CF_FUNC macro for casting BASE_CUSTOM functions.Gerald Combs1-2/+2
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid the following warning: warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic] We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be more consistent with the other macros in proto.h. Update each instance of BASE_CUSTOM to use CF_FUNC. Adjust a dummy variable name generated by asn2wrs.py that was triggering an invalid error in checkhf.pl. Fix an encoding arguement in packet-elasticsearch.c found by fix-encoding-args.pl. Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22 Reviewed-on: https://code.wireshark.org/review/7150 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-16Put the 64-bit hash routines into a common file.Guy Harris1-8/+1
Some or all are used by the Infiniband, MBIM, and RSVD dissectors; put them into a common source file, with a header for them, and just include the header in the dissectors. Change-Id: I724f0c2232ba751ccbd491222af6f03bafd6d63c Reviewed-on: https://code.wireshark.org/review/7182 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-28Make the USB header information an enumerated type.Guy Harris1-1/+1
It's not really a bitset, it's a choice of one of four types of USB pseudo-header. Make it an enum. Change-Id: I4ea994e1606c23e0a0f08b1b61357eea40a2535e Reviewed-on: https://code.wireshark.org/review/6830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-08guid_to_ep_str -> guid_to_strMichael Mann1-3/+3
guid_to_str now uses wmem allocation. Change-Id: I8e48d1a720942fbefbaa6227ae0929cb9f856359 Reviewed-on: https://code.wireshark.org/review/6391 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-06MBIM: call dissector_(add|delete)_uint only when necessaryPascal Quantin1-6/+9
Change-Id: I12bbe9e1d81560f1874d4e575b19db1842fa0c72 Reviewed-on: https://code.wireshark.org/review/6352 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-26Fix a number of dup hf[] filter-names probably resulting from cut/paste errs.Bill Meier1-1/+1
Change-Id: I9242300b2ace3155c1506b584a90f073100a305e Reviewed-on: https://code.wireshark.org/review/5512 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-67/+34
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc Reviewed-on: https://code.wireshark.org/review/2852 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24MBIM: add an option to force SMS PDU decoding format if ↵Pascal Quantin1-4/+26
MBIM_DEVICE_CAPS_INFO message was not captured Change-Id: Iff78a00b463a7a33e1705c76ea49618af532f3aa Reviewed-on: https://code.wireshark.org/review/2621 Tested-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-11/+11
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-03MBIM: do not access to hash map when it is not initialized yetPascal Quantin1-1/+1
Change-Id: I560941115316ead5a85b9e0b55be693217fddff2 Reviewed-on: https://code.wireshark.org/review/1940 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-01MBIM: dissect MBIM_SET_STK_PAC and MBIM_STK_PAC_INFO messagesPascal Quantin1-9/+663
Change-Id: Ib58dece7ce7278e292d88f68368c238695c32394 Reviewed-on: https://code.wireshark.org/review/1463 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-30MBIM: use hash map instead of red/black tree for UUID extension tablePascal Quantin1-16/+26
Change-Id: Iaab9ff66e94bfe38fc875ad312b8e795b80814f4 Reviewed-on: https://code.wireshark.org/review/1438 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-28MBIM: make the backward compatibility function staticPascal Quantin1-1/+1
Change-Id: I51bbdf9c0dbb80a8350ec7762e588ca3182dce63 Reviewed-on: https://code.wireshark.org/review/1408 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-27MBIM: fix compilation with GLib versions < 2.22.0Pascal Quantin1-0/+8
Change-Id: I27e794347dc0988f0f34798cb62f08a11a217176 Reviewed-on: https://code.wireshark.org/review/1400 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-27MBIM: use wmem hash map functions for request/response trackingPascal Quantin1-27/+12
Change-Id: Ie550b0ef2b57827f610c4c6a83ff14868e853125 Reviewed-on: https://code.wireshark.org/review/1399 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23MBIM: fix dissection of GSM SMS messagesPascal Quantin1-12/+17
Change-Id: I07e753e50a42513daa704e56ee5c9b399a91fec9 Reviewed-on: https://code.wireshark.org/review/1305 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-13MBIM: fix dissection of ENVELOPE Sim Toolkit messagesPascal Quantin1-8/+8
Change-Id: I3e6567e8ebfe83f12a0e2cbb2998b2e43ad2277a Reviewed-on: https://code.wireshark.org/review/1092 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-13MBIM: add decoding of text based CDMA SMSPascal Quantin1-21/+92
Change-Id: Id2497597660bffeff2d98087d6511b91bfd93b1a Reviewed-on: https://code.wireshark.org/review/1091 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-27MBIM: fix identification of DSS streams and add a way to register an ↵Pascal Quantin1-9/+16
external dissector for DSS Change-Id: Ic7f5708b60ee5846d95725dbbd14d8958d43372e Reviewed-on: https://code.wireshark.org/review/843 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-25MBIM: fix dissection of control packets when capturing with usbmonPascal Quantin1-5/+13
Change-Id: Ie20fcb8d393a85d47ba78f6cb70de77fedda2587 Reviewed-on: https://code.wireshark.org/review/829 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-13MBIM: fix 3GPP SMS PDU record dissectionPascal Quantin1-3/+4
Change-Id: I232a12eb7f7ee49464bb45c6f284ca3a3825909c Reviewed-on: https://code.wireshark.org/review/644 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-10MBIM: add sanity checks to bulk packetsPascal Quantin1-11/+45
Change-Id: I425f4ecd03f5ae0ec27b77b1437366d66107342f Reviewed-on: https://code.wireshark.org/review/579 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-23Remove deprecated TVB APIsPascal Quantin1-13/+9
Change-Id: I87216c3bd2061c12ce486c752d4381ab722db95e Reviewed-on: https://code.wireshark.org/review/328 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-01-24Add ability to register new UUID and CIDsPascal Quantin1-18/+116
svn path=/trunk/; revision=54944