aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2021-09-23Fix some spelling errors.Martin Mathieson1-1/+1
2021-09-06dcerpc_spoolss: fix display filter nameAlexis La Goutte1-1/+1
found by conflict check 'spoolss.driverversion' exists multiple times with incompatible types: FT_UINT64 and FT_UINT32
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-11/+11
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2021-02-23Make a couple of dissector vars static.Martin Mathieson1-1/+1
These are the very last ones that are not mentioned in header files.
2021-02-20Make some more vars and functions static.Martin Mathieson1-1/+1
2020-08-30More spelling fixes, start of second pass of dissectors.Martin Mathieson1-1/+1
Now easier to find errors due to script improvements and more complete dictionary file.
2020-07-08spoolss: pick up what some printer attributes mean from Microsoft documentation.Guy Harris1-19/+19
The page at https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-printer lists a number of printer attributes that correspond to the attributes listed here. Describe what the hidden attribute means, more clearly describe whta the enable-devq attribute means, and clean up other descriptions to make them more stylistically consistent. Change-Id: I4830df6dc610bce6b7603750d5c4aa73685f6c28 Reviewed-on: https://code.wireshark.org/review/37806 Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-06SPOOLSS: make reserved field value presentation meaningfulJaap Keuter1-2/+2
Detected by conflict check Change-Id: Ie534564085884afd6f7c9329b6ee637440533f29 Reviewed-on: https://code.wireshark.org/review/37738 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> 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-7/+7
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>
2020-01-09DCERPC: display various driver version fields as hexGünther Deschner1-4/+4
Guenther Change-Id: I39eecf3e864df401dff9236d9614a5bd6ca68427 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35693 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20DCERPC: add DRIVER_INFO_8 decoding for DCE/RPC spoolss dissectorGünther Deschner1-2/+351
Guenther Change-Id: Iea53cf5eaaa76cb9be961fa39355b866d35e247e Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35488 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20DCERPC: Fix DRIVER_INFO_7 defines in DCE/RPC spoolss dissectorGünther Deschner1-6/+2
Guenther Change-Id: I54fc0668ea1146860beabed6628334ed4f369bf0 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35487 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20DCERPC: implement GetPrinterDriverPackagePath in DCE/RPC spoolss dissectorGünther Deschner1-0/+64
Guenther Change-Id: I62392e0df5aa2ce8cc7e16d0318d1d1288df2599 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35486 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20DCERPC: implement GetCorePrinterDrivers in DCE/RPC spoolss dissectorGünther Deschner1-0/+148
Guenther Change-Id: Iff909e4f624f7dcaeed1b41219933f36e179e348 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35485 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-17dissectors: re-use most of the existing spoolss container dissectorsGünther Deschner1-7/+7
Guenther Change-Id: Ifa261265112da2433f6f55385aba9dff9546551a Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/35425 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-30/+30
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>
2019-03-18dcerpc: ensure the length in the packet doesn't overcome the boundaries.Dario Lombardo1-0/+9
The spoolss dissector creates a new source using the length from the packet data. If it overcomes the ends of the packet we hit a crash. In this case add an expert info and stop the dissection Bug: 15568 Change-Id: Idfb0b54c1f41842170d3d03c80897a3b7edc9400 Reviewed-on: https://code.wireshark.org/review/32449 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-17/+17
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-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-01-03dcerpc-spoolss: use value_name variable to store string (CID: 1158734).Dario Lombardo1-5/+3
Change-Id: I30780134b3d8a8e48b8b4997ea27ce82171b4508 Reviewed-on: https://code.wireshark.org/review/25069 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-28dcerpc-spoolss: remove unneeded check (CID: 1158734).Dario Lombardo1-2/+2
Change-Id: Ie4f827835b9d59838d90d00e57f729c6a8004b19 Reviewed-on: https://code.wireshark.org/review/25015 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-11-24dissectors: add PRINTER_INFO_5 decoding for DCE/RPC spoolss dissector.Günther Deschner1-0/+52
Guenther Change-Id: I9eb8be636ebdf81092b7abd8d4749410cc5dcc06 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://code.wireshark.org/review/18932 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>
2016-10-30DCERPC: save strings in wmem file scopePascal Quantin1-1/+1
Bug: 13072 Change-Id: Ib5f3d91be822a3d7180d95e3299dec978941c1d5 Reviewed-on: https://code.wireshark.org/review/18564 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>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-8/+6
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-06-06*_stdup_printf -> strdup for "single string only" formatting.Michael Mann1-4/+4
Done for performance improvements. This could probably be done in checkAPIs.pl, but this was just a quick manual check with grepping. Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d Reviewed-on: https://code.wireshark.org/review/15751 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: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-04-21Do not mix wmem and glib allocatorsPascal Quantin1-27/+7
Change-Id: I4bf861ed9e6b767341f2cbd4e926606d4919f2ef Reviewed-on: https://code.wireshark.org/review/15041 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>
2016-04-18spoolss (DCERPC): fix 'drep' was marked unused but was used ↵Alexis La Goutte1-45/+45
[-Werror,-Wused-but-marked-unused] Change-Id: I0d52992f9b35fb0bceb41800d70719c282442177 Reviewed-on: https://code.wireshark.org/review/14972 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-30SPOOLSS: Try to avoid an infinite loop.Gerald Combs1-2/+3
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> 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-7/+7
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-12Remove -Wwrite-strings compiler flagJoão Valverde1-1/+1
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-12Eliminate proto_tree_add_text from some dissectors.Michael Mann1-108/+138
Change-Id: I7a7778802c442b254626a7676cb74ca2855fa65e Reviewed-on: https://code.wireshark.org/review/9977 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>
2015-06-23Remove more deprecated tvb_lengthEvan Huus1-3/+3
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2 Reviewed-on: https://code.wireshark.org/review/9042 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-18Convert proto_tree_add_boolean to ↵Michael Mann1-385/+121
proto_tree_add_bitmask_[value|value_with_flags|list] Part 1 of a few Change-Id: I413f23dfa92da5488ca8a7f62ca0738b25004635 Reviewed-on: https://code.wireshark.org/review/8117 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-03Eliminate e_uuid_t in favor of e_guid_t.Guy Harris1-2/+2
That eliminates a redundant and confusing data type, and avoids issues with one piece of code using e_uuid_t but wanting to use routines expecting an e_guid_t. Change-Id: I95e172d46d342ab40f6254300ecbd2a0530cde60 Reviewed-on: https://code.wireshark.org/review/7506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 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-2/+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-27Fix a number of dup hf[] filter-names probably mostly resulting from ↵Bill Meier1-1/+1
cut/paste errs Change-Id: Id658b9e1803b2f5b92e711a3ce981ff602333d98 Reviewed-on: https://code.wireshark.org/review/5513 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-02Add editor modelines & adjust indentation/whitespace as needed.Bill Meier1-0/+13
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc Reviewed-on: https://code.wireshark.org/review/4433 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-20proto_tree_add_text -> proto_tree_add_subtree[_format] for DCE/RPC dissectors.Michael Mann1-105/+39
Change-Id: I84755d059ef70ca98b0e7626b6425360daf0529d Reviewed-on: https://code.wireshark.org/review/4199 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
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-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-21Fix gcc "warning: no previous prototype ... [-Wmissing-prototypes]"; Do some ↵Bill Meier1-0/+3
whitespace changes Change-Id: I8c2e8694223270f1810aa6b13d955f0d08001d30 Reviewed-on: https://code.wireshark.org/review/1239 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.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-5/+5
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-27- Create/use several extended value_stringsBill Meier1-2/+2
(sort associated value_string arrays as needed); - Use new VALUE_STRING_LIST mechanism/macros to create enums and value_string arrays for: WERR_errors, DOS_errors, SRV_errors, and HRD_errors; - Declare certain global value_string arrays as static (local) and use global extended value_strings to reference same; (e.g., ms_coiuntry_codes value_string_array) - Rename SMBE_... defs used in several different value_string arrays to prevent potential name collisions: ( e.g., for SRV_errors: SMBE_... ==> SMBE_SRV_...) Done for value_string arrays: DOS_errors, SRV_errors, HRD_errors; - WERR_errors value_string array: Note that WERR associated defs no longer exist in the latest samba doserr.h. (The WERR_errors defs were originally generated from the samba doserr.h). For now: WERR_errors kept as is. - ToDo: Fix PIDL-generated dcerpc dissectors to use NT_errors_ext and WERR_errors_ext extended value_strings. - Add editor modelines to a few files. - Make whitespace changes. svn path=/trunk/; revision=53614
2013-11-06Add _U_ to a function parameter to fix a compiler warningBill Meier1-1/+1
svn path=/trunk/; revision=53105
2013-11-06Remove pinfo->private_data from DCERPC dissectors and instead have ↵Michael Mann1-731/+686
dcerpc_info* infomation be passed in as a function parameter. Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387) All "generated" source was manually modified (with the power of search/replace), but I believe the "source input" files have been adjusted (checked into revs 53098 and 53099) to reflect the necessary changes (with possible whitespace formatting differences). The Microsoft compiler doesn't flag "unused function parameters", so I apologize in advance if I may have missed a few. The "dcerpc_info* di" parameter is used in almost every function. svn path=/trunk/; revision=53100
2013-10-01Add cast.Evan Huus1-1/+1
svn path=/trunk/; revision=52312
2013-10-01Remove check_col for all non-generated DCE/RPC dissectors.Michael Mann1-85/+50
svn path=/trunk/; revision=52310