As the gtk2 directory is no longer needed (GTK1 and 2 are using the same sources...
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-frsapi.c
1 /* packet-dcerpc-frsapi.c
2  * Routines for the frs API (File Replication Service) MSRPC interface 
3  * Copyright 2004 Jean-Baptiste Marchand <jbm@hsc.fr>
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
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include <glib.h>
32 #include <epan/packet.h>
33 #include "packet-dcerpc.h"
34 #include "packet-dcerpc-frsapi.h"
35
36 static int proto_dcerpc_frsapi = -1;
37
38 static int hf_frsapi_opnum = 0;
39
40 static gint ett_dcerpc_frsapi = -1;
41
42 /*
43 IDL [ uuid(d049b186-814f-11d1-9a3c-00c04fc9b232),
44 IDL  version(1.1),
45 IDL  implicit_handle(handle_t rpc_binding)
46 IDL ] interface frsapi
47 */
48
49 static e_uuid_t uuid_dcerpc_frsapi = {
50         0xd049b186, 0x814f, 0x11d1,
51         { 0x9a, 0x3c, 0x00, 0xc0, 0x4f, 0xc9, 0xb2, 0x32 }
52 };
53
54 static guint16 ver_dcerpc_frsapi = 1; 
55
56
57 static dcerpc_sub_dissector dcerpc_frsapi_dissectors[] = {
58         {  FRSAPI_VERIFY_PROMOTION, "VerifyPromotion", NULL, NULL },
59         {  FRSAPI_PROMOTION_STATUS, "PromotionStatus", NULL, NULL },
60         {  FRSAPI_START_DEMOTION, "StartDemotion", NULL, NULL },
61         {  FRSAPI_COMMIT_DEMOTION, "CommitDemotion", NULL, NULL },
62         {  FRSAPI_SET_DS_POLLING_INTERVAL_W, "Set_DsPollingIntervalW", NULL, NULL },
63         {  FRSAPI_GET_DS_POLLING_INTERVAL_W, "Get_DsPollingIntervalW", NULL, NULL },
64         {  FRSAPI_VERIFY_PROMOTION_W, "VerifyPromotionW", NULL, NULL },
65         {  FRSAPI_INFO_W, "InfoW", NULL, NULL },
66         {  FRSAPI_IS_PATH_REPLICATED, "IsPathReplicated", NULL, NULL },
67         {  FRSAPI_WRITER_COMMAND, "WriterCommand", NULL, NULL },
68         { 0, NULL, NULL,  NULL }
69 };
70
71 void
72 proto_register_dcerpc_frsapi(void)
73 {
74
75         static hf_register_info hf[] = {
76
77                 { &hf_frsapi_opnum, 
78                   { "Operation", "frsapi.opnum", FT_UINT16, BASE_DEC,
79                    NULL, 0x0, "Operation", HFILL }},    
80         };
81
82
83         static gint *ett[] = {
84                 &ett_dcerpc_frsapi,
85         };
86
87
88         proto_dcerpc_frsapi = proto_register_protocol(
89                 "Microsoft File Replication Service API", "FRSAPI", "frsapi");
90
91         proto_register_field_array(proto_dcerpc_frsapi, hf, array_length(hf));
92
93         proto_register_subtree_array(ett, array_length(ett));
94
95 }
96
97
98 void
99 proto_reg_handoff_dcerpc_frsapi(void)
100 {
101         /* register protocol as dcerpc */
102
103         dcerpc_init_uuid(
104                 proto_dcerpc_frsapi, ett_dcerpc_frsapi, &uuid_dcerpc_frsapi,
105                 ver_dcerpc_frsapi, dcerpc_frsapi_dissectors, hf_frsapi_opnum);
106 }