Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-dtsstime_req.c
1 /* packet-dcerpc-dtsstime_req.c
2  * Routines for Time services stuff.
3  * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
4  * This information is based off the released idl files from opengroup.
5  * ftp://ftp.opengroup.org/pub/dce122/dce/src/time.tar.gz time/service/dtsstime_req.idl
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #include "config.h"
27
28
29 #include <glib.h>
30 #include <epan/packet.h>
31 #include "packet-dcerpc.h"
32
33 void proto_register_dtsstime_req (void);
34 void proto_reg_handoff_dtsstime_req (void);
35
36 static int proto_dtsstime_req = -1;
37 static int hf_dtsstime_req_opnum = -1;
38
39
40 static gint ett_dtsstime_req = -1;
41
42
43 static e_uuid_t uuid_dtsstime_req = { 0x019ee420, 0x682d, 0x11c9, { 0xa6, 0x07, 0x08, 0x00, 0x2b, 0x0d, 0xea, 0x7a } };
44 static guint16  ver_dtsstime_req = 1;
45
46
47 static dcerpc_sub_dissector dtsstime_req_dissectors[] = {
48         { 0, "ClerkRequestTime",  NULL, NULL},
49         { 1, "ServerRequestTime", NULL, NULL},
50         { 0, NULL, NULL, NULL }
51 };
52
53 void
54 proto_register_dtsstime_req (void)
55 {
56         static hf_register_info hf[] = {
57         { &hf_dtsstime_req_opnum,
58                 { "Operation", "dtsstime_req.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}
59         };
60
61         static gint *ett[] = {
62                 &ett_dtsstime_req,
63         };
64         proto_dtsstime_req = proto_register_protocol ("DCE Distributed Time Service Local Server", "DTSSTIME_REQ", "dtsstime_req");
65         proto_register_field_array (proto_dtsstime_req, hf, array_length (hf));
66         proto_register_subtree_array (ett, array_length (ett));
67 }
68
69 void
70 proto_reg_handoff_dtsstime_req (void)
71 {
72         /* Register the protocol as dcerpc */
73         dcerpc_init_uuid (proto_dtsstime_req, ett_dtsstime_req, &uuid_dtsstime_req, ver_dtsstime_req, dtsstime_req_dissectors, hf_dtsstime_req_opnum);
74 }