aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ms-mms.c
AgeCommit message (Collapse)AuthorFilesLines
2022-08-25Rename a bunch of things with "conversation".Guy Harris1-9/+9
A conversation in Wireshark might have two endpoints or might have no endpoints; few if any have one endpoint. Distinguish between conversations and endpoints.
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-2/+2
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2021-12-05Dissectors should not include stdio.h, unless neededJaap Keuter1-1/+1
2021-07-21First pass pinfo->pool conversionEvan Huus1-9/+9
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
2020-08-08Fix most remaining detected cases where item with wrong type is used.Martin Mathieson1-10/+11
Error: proto_tree_add_string(.., hf_ansi_a_lai_mcc, ...) called at epan/dissectors/packet-ansi_a.c:3656 with type FT_UINT8 (allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} ) Error: proto_tree_add_string(.., hf_ansi_a_lai_mnc, ...) called at epan/dissectors/packet-ansi_a.c:3666 with type FT_UINT8 (allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} ) Error: proto_tree_add_none_format(.., hf_bthci_evt_vendor_codecs_item, ...) called at epan/dissectors/packet-bthci_evt.c:4712 with type FT_UINT32 (allowed types are {'FT_NONE'} ) Error: proto_tree_add_string(.., hf_kademlia_tag_hash, ...) called at epan/dissectors/packet-edonkey.c:1100 with type FT_BYTES (allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} ) Error: proto_tree_add_string(.., hf_msmms_data_timing_pair, ...) called at epan/dissectors/packet-ms-mms.c:680 with type FT_NONE (allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} ) Error: proto_tree_add_float_format_value(.., hf_fp_tpc_po, ...) called at epan/dissectors/packet-umts_fp.c:2405 with type FT_UINT8 (allowed types are {'FT_FLOAT'} ) Change-Id: I1ed0276ad9c810ca6b1b01d581c3d73ae28fb9ad Reviewed-on: https://code.wireshark.org/review/38081 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-07-27HTTPS In Still More Places, update more URLs.Guy Harris1-1/+1
Microsoft reshuffled their documentation - almost all of it moved from msdn.microsoft.com to docs.microsoft.com. Some blogs moved to devblogs.microsoft.com; the comments *didn't* move, so in one case we go to the Wayback Machine - the link isn't dead, but it formats horribly, at least on my browser, but the archived version formats OK. Use the Wayback Machine for some URLs, and update others. Update the sections for MS-ADTS. Point to the HTML versions of some RFCs and I-Ds. Change-Id: I344b20f880de63f1ae2a4e3f9ff98af78a7fe139 Reviewed-on: https://code.wireshark.org/review/34101 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-2/+2
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-1/+1
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Don't gratuitiously cast constness away.Guy Harris1-3/+3
Change-Id: Ie373b7e1079092e01c99939f29d7afdbf465bd8b Reviewed-on: https://code.wireshark.org/review/25848 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-10-29Add conversation endpoint typeMichael Mann1-9/+9
For the moment this mirrors the port_type enumeration (PT_XXX), but the intent is to move away from using "port types", eliminating most (if not all) Added conversation_pt_to_endpoint_type() so that conversations deal with the correct enumeration. This is for dissector that use pinfo->ptype as input to conversation APIs. Explicit use of port types are converted to using ENDPOINT_XXX type. Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef Reviewed-on: https://code.wireshark.org/review/24166 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-31format_text_wmem -> format_textMichael Mann1-4/+4
All cases of the "original" format_text have been handled to add the proper wmem allocator scope. Remove the "original" format_text and replace it with one that has a wmem allocator as a parameter. Change-Id: I278b93bcb4a17ff396413b75cd332f5fc2666719 Reviewed-on: https://code.wireshark.org/review/19884 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-31Add format_text_wmem.Michael Mann1-4/+4
This allows for a wmem_allocator for users of format_text who want it (dissectors for wmem_packet_scope()). This lessens the role of current format_text functionality in hopes that it will eventually be replaced. Change-Id: I970557a65e32aa79634a3fcc654ab641b871178e Reviewed-on: https://code.wireshark.org/review/19855 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-2/+1
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-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-1/+1
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 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-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-20/+14
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 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>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-1/+1
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-1/+1
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-1/+1
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
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-1/+1
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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-1/+1
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>
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-22remove unnecessary integer overflow checksMartin Kaiser1-23/+4
... and don't call THROW() from a dissector If we have a guint32 a and interpret 2*a as gint, we'll always end up with a negative value if 2*a overflows. Both tvb_get_string_enc() and proto_tree_add_item() handle this case and throw an exception. Change-Id: Ibb142328837b6a583057531c76d08631fc731848 Reviewed-on: https://code.wireshark.org/review/5948 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.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-12-20no need for if (tree)Martin Kaiser1-38/+23
Change-Id: I0749f8e10d6f8d97b85da6bb52b0ab336ba06c38 Reviewed-on: https://code.wireshark.org/review/5919 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-20hide the hf_msmms_data item, not the NULL itemMartin Kaiser1-1/+1
Change-Id: If92c9bc281f44de8f3b1de71005240755748403a Reviewed-on: https://code.wireshark.org/review/5918 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-09-29Add editor modelines and adjust indentation as needed.Bill Meier1-0/+12
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c Reviewed-on: https://code.wireshark.org/review/4371 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-06ms-mms: fix retval for short pkts, fix reading flagsPeter Wu1-7/+5
uint16 & 0xFF00 will always equal 0. Use tvb_get_guint8 instead. Convert from tvb_length to tvb_captured_length. Fix the return value of dissectors, 0 means reject but that cannot be combined with reassembly requests. Change-Id: I5fca66e2e809699392237aff5813eecdfb15857f Reviewed-on: https://code.wireshark.org/review/2885 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
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-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-1/+1
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 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-16Use proto_tree_add_item() in preference to fetching the string andGuy Harris1-4/+10
adding it with proto_tree_add_string(). Use tvb_get_string_enc() rather than tvb_get_unicode_string() to fetch strings. We assume a UTF-16 encoding for all "Unicode" strings. Use tvb_strsize() and tvb_unicode_strsize() to get the lengths of null-terminated strings. Get rid of unused ett_nt_unicode_string variable. svn path=/trunk/; revision=54158
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-22emem -> wmem conversion:Pascal Quantin1-5/+5
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-04-18Let proto_tree_add_item() do the length checking for string lengths, soGuy Harris1-64/+51
we thrown an exception if the lengths are too long. For UCS-2/UTF-16 strings, do an extra length check to avoid overflows, but throw ReportedBoundsError if the check fails, so we report them the same way we report other too-large length errors. Just use proto_tree_add_item() to put UCS-2/UTF-16 strings (assumed to be UTF-16, not UCS-2; is that correct?) into the protocol tree. svn path=/trunk/; revision=48913
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
2013-03-01Revert r47839, it is not needed with r47979.Evan Huus1-1/+1
svn path=/trunk/; revision=47980
2013-03-01Add a much better workaround for bug #8382 and some expert info.Evan Huus1-4/+22
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382 svn path=/trunk/; revision=47979
2013-02-23Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382Evan Huus1-1/+1
Don't pass a length longer than the strlen of the string into format_text(). This can happen if the length we ask for from the tvb overflows, for example. svn path=/trunk/; revision=47839
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-2/+2
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-1/+3
by checkhf. svn path=/trunk/; revision=47312
2012-12-22revert r46678Martin Kaiser1-2/+1
now that tvb_get_ephemeral_unicode_string() throws an exception for invalid length parameters, there's no point in doing an explicit check beforehand (when I added the check, there were many places that I missed) svn path=/trunk/; revision=46707
2012-12-21fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8112Martin Kaiser1-1/+2
by adding a range to the length that is passed to tvb_get_ephemeral_unicode_string() svn path=/trunk/; revision=46678
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-3/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-19/+19
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