2 * This dissector is autogenerated
5 /* packet-dcerpc-atsvc.c
6 * Routines for ATSVC packet disassembly
7 * based on the original dissector that was
8 * * Copyright 2003 Jean-Baptiste Marchand <jbm@hsc.fr>
9 * and IDL file from samba 4
13 * Ethereal - Network traffic analyzer
14 * By Gerald Combs <gerald@ethereal.com>
15 * Copyright 1998 Gerald Combs
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include "packet-dcerpc.h"
41 #include "packet-dcerpc-nt.h"
42 #include "packet-windows-common.h"
43 #include "packet-dcerpc-atsvc.h"
45 static int proto_atsvc = -1;
51 atsvc_dissect_JobTime(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_)
54 guint8 job_hour, job_min, job_sec;
57 offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep,
60 job_hour = job_time / 3600000;
61 job_min = (job_time - job_hour * 3600000) / 60000;
62 job_sec = (job_time - (job_hour * 3600000) - (job_min * 60000)) / 1000;
63 job_msec = (job_time - (job_hour * 3600000) - (job_min * 60000) - (job_sec * 1000));
65 proto_tree_add_uint_format(tree, hf_index, tvb, offset - 4,
66 4, job_time, "Time: %02d:%02d:%02d:%03d", job_hour, job_min, job_sec, job_msec);
74 proto_register_atsvc(void)
76 static hf_register_info hf[] = {
80 static gint *ett[] = {
84 proto_atsvc = proto_register_protocol(
85 "Microsoft Task Scheduler Service",
87 proto_register_field_array(proto_atsvc, hf, array_length(hf));
88 proto_register_subtree_array(ett, array_length(ett));
91 static dcerpc_sub_dissector function_dissectors[] = {
93 { 0, NULL, NULL, NULL },
97 proto_reg_handoff_atsvc(void)