diff options
author | Günther Deschner <gd@samba.org> | 2016-09-21 16:50:21 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-11-24 07:04:25 +0000 |
commit | f39ce7de420ba38a8c90075099bac2132c47fa9f (patch) | |
tree | a4237fbbad3315f3708912ffa2a16e74d70f65da /epan | |
parent | 8eb6b3ee1476c23f2b7794716e09eb26779ad9d8 (diff) |
dissectors: add PRINTER_INFO_5 decoding for DCE/RPC spoolss dissector.
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>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dcerpc-spoolss.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c index 62d92825ea..710bab5cc5 100644 --- a/epan/dissectors/packet-dcerpc-spoolss.c +++ b/epan/dissectors/packet-dcerpc-spoolss.c @@ -71,6 +71,8 @@ static int hf_provider = -1; static int hf_start_time = -1; static int hf_end_time = -1; static int hf_elapsed_time = -1; +static int hf_device_not_selected_timeout = -1; +static int hf_transmission_retry_timeout = -1; /****************************************************************************/ @@ -2272,6 +2274,39 @@ dissect_PRINTER_INFO_3(tvbuff_t *tvb, int offset, } /* + * PRINTER_INFO_5 + */ + +static gint ett_PRINTER_INFO_5 = -1; + +static int +dissect_PRINTER_INFO_5(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, + dcerpc_info *di, guint8 *drep) +{ + offset = dissect_spoolss_relstr( + tvb, offset, pinfo, tree, di, drep, hf_printername, + 0, NULL); + + offset = dissect_spoolss_relstr( + tvb, offset, pinfo, tree, di, drep, hf_portname, + 0, NULL); + + offset = dissect_printer_attributes(tvb, offset, pinfo, tree, di, drep); + + offset = dissect_ndr_uint32( + tvb, offset, pinfo, tree, di, drep, + hf_device_not_selected_timeout, NULL); + + offset = dissect_ndr_uint32( + tvb, offset, pinfo, tree, di, drep, + hf_transmission_retry_timeout, NULL); + + return offset; +} + + +/* * PRINTER_INFO_7 */ @@ -3142,6 +3177,10 @@ SpoolssGetPrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo, dissect_PRINTER_INFO_3( buffer.tvb, 0, pinfo, subtree, di, drep); break; + case 5: + dissect_PRINTER_INFO_5( + buffer.tvb, 0, pinfo, subtree, di, drep); + break; case 7: dissect_PRINTER_INFO_7( buffer.tvb, 0, pinfo, subtree, di, drep); @@ -3759,6 +3798,10 @@ SpoolssEnumPrinters_r(tvbuff_t *tvb, int offset, packet_info *pinfo, dissect_PRINTER_INFO_3( buffer.tvb, 0, pinfo, subtree, di, drep); break; + case 5: + dissect_PRINTER_INFO_5( + buffer.tvb, 0, pinfo, subtree, di, drep); + break; case 7: dissect_PRINTER_INFO_7( buffer.tvb, 0, pinfo, subtree, di, drep); @@ -6811,6 +6854,14 @@ proto_register_dcerpc_spoolss(void) { "Elapsed time", "spoolss.elapsed_time", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, + { &hf_device_not_selected_timeout, + { "Device Not Selected Timeout", "spoolss.device_not_selected_timeout", + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, + + { &hf_transmission_retry_timeout, + { "Transmission Retry Timeout", "spoolss.transmission_retry_timeout", + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, + /* * New hf index values */ @@ -8234,6 +8285,7 @@ proto_register_dcerpc_spoolss(void) &ett_PRINTER_INFO_1, &ett_PRINTER_INFO_2, &ett_PRINTER_INFO_3, + &ett_PRINTER_INFO_5, &ett_PRINTER_INFO_7, &ett_RELSTR, &ett_RELSTR_ARRAY, |