Move dissectors to epan/dissectors directory.
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-trksvr.c
1 /* packet-dcerpc-trksvr.c
2  * Routines for DCERPC Distributed Link tracking Server packet disassembly
3  * Copyright 2003, Ronnie Sahlberg
4  *
5  * $Id$
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25 /* The IDL file for this interface can be extracted by grepping for idl
26  * in capitals.
27  */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33 #include <glib.h>
34 #include <epan/packet.h>
35 #include "packet-dcerpc.h"
36 #include "packet-dcerpc-nt.h"
37 #include "smb.h"
38
39 static int proto_dcerpc_trksvr = -1;
40 static int hf_trksvr_opnum = -1;
41 static int hf_trksvr_rc = -1;
42
43 static gint ett_dcerpc_trksvr = -1;
44
45 /*
46   IDL [ uuid(4da1-943d-11d1-acae-00c0afc2aa3f),
47   IDL   version(1.0),
48   IDL   implicit_handle(handle_t rpc_binding)
49   IDL ] interface trksvr
50   IDL {
51 */
52 static e_uuid_t uuid_dcerpc_trksvr = {
53         0x4da1c422, 0x943d, 0x11d1,
54         { 0xac, 0xae, 0x00, 0xc0, 0x4f, 0xc2, 0xaa, 0x3f }
55 };
56
57 static guint16 ver_dcerpc_trksvr = 1;
58
59 static dcerpc_sub_dissector dcerpc_trksvr_dissectors[] = {
60         { 0, "LnkSvrMessage",
61                 NULL,
62                 NULL },
63         {0, NULL, NULL,  NULL }
64 };
65
66 void
67 proto_register_dcerpc_trksvr(void)
68 {
69 static hf_register_info hf[] = {
70         { &hf_trksvr_opnum, { 
71                 "Operation", "trksvr.opnum", FT_UINT16, BASE_DEC,
72                 NULL, 0x0, "", HFILL }},
73         { &hf_trksvr_rc, {
74                 "Return code", "trksvr.rc", FT_UINT32, BASE_HEX,
75                 VALS(NT_errors), 0x0, "TRKSVR return code", HFILL }},
76         };
77
78         static gint *ett[] = {
79                 &ett_dcerpc_trksvr
80         };
81
82         proto_dcerpc_trksvr = proto_register_protocol(
83                 "Microsoft Distributed Link Tracking Server Service", "TRKSVR", "trksvr");
84
85         proto_register_field_array(proto_dcerpc_trksvr, hf,
86                                    array_length(hf));
87
88         proto_register_subtree_array(ett, array_length(ett));
89 }
90
91 void
92 proto_reg_handoff_dcerpc_trksvr(void)
93 {
94         /* Register protocol as dcerpc */
95
96         dcerpc_init_uuid(proto_dcerpc_trksvr, ett_dcerpc_trksvr,
97                          &uuid_dcerpc_trksvr, ver_dcerpc_trksvr,
98                          dcerpc_trksvr_dissectors, hf_trksvr_opnum);
99 }