Add HP Switch Protocol SAP value
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-frsrpc.c
1 /* packet-dcerpc-frsrpc.c
2  * Routines for the frs (File Replication Service) MSRPC interface 
3  * Copyright 2004 Jean-Baptiste Marchand <jbm@hsc.fr>
4  *
5  * $Id$
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., 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-frsrpc.h"
35
36 static int proto_dcerpc_frsrpc = -1;
37
38 static int hf_frsrpc_opnum = 0;
39
40 static gint ett_dcerpc_frsrpc = -1;
41
42 /*
43 IDL [ uuid(f5cc59b4-4264-101a-8c59-08002b2f8426),
44 IDL  version(1.1),
45 IDL  implicit_handle(handle_t rpc_binding)
46 IDL ] interface frsrpc
47 */
48
49
50 static e_uuid_t uuid_dcerpc_frsrpc = {
51         0xf5cc59b4, 0x4264, 0x101a,
52         { 0x8c, 0x59, 0x08, 0x00, 0x2b, 0x2f, 0x84, 0x26 }
53 };
54
55 static guint16 ver_dcerpc_frsrpc = 1; 
56
57
58 static dcerpc_sub_dissector dcerpc_frsrpc_dissectors[] = {
59         { FRSRPC_SEND_COMM_PKT, "FrsRpcSendCommPkt", 
60                 NULL, NULL },
61         { FRSRPC_VERIFY_PROMOTION_PARENT, "FrsRpcVerifyPromotionParent", 
62                 NULL, NULL },
63         { FRSRPC_START_PROMOTION_PARENT, "FrsRpcStartPromotionParent", 
64                 NULL, NULL },
65         { FRSRPC_NOP, "FrsRpcNop", NULL, NULL },
66 /* operations 4 to 9 are apparently identical */
67         { FRSRPC_BACKUP_COMPLETE, "FrsRpcBackupComplete", NULL, NULL },
68         { FRSRPC_BACKUP_COMPLETE_5, "FrsRpcBackupComplete", NULL, NULL },
69         { FRSRPC_BACKUP_COMPLETE_6, "FrsRpcBackupComplete", NULL, NULL },
70         { FRSRPC_BACKUP_COMPLETE_7, "FrsRpcBackupComplete", NULL, NULL },
71         { FRSRPC_BACKUP_COMPLETE_8, "FrsRpcBackupComplete", NULL, NULL },
72         { FRSRPC_BACKUP_COMPLETE_9, "FrsRpcBackupComplete", NULL, NULL },
73         { FRSRPC_VERIFY_PROMOTION_PARENT_EX, "FrsRpcVerifyPromotionParentEx",
74                 NULL, NULL },
75         { 0, NULL, NULL,  NULL }
76 };
77
78
79 void
80 proto_register_dcerpc_frsrpc(void)
81 {
82
83         static hf_register_info hf[] = {
84
85                 { &hf_frsrpc_opnum, 
86                   { "Operation", "frsrpc.opnum", FT_UINT16, BASE_DEC,
87                    NULL, 0x0, "Operation", HFILL }},    
88         };
89
90
91         static gint *ett[] = {
92                 &ett_dcerpc_frsrpc,
93         };
94
95
96         proto_dcerpc_frsrpc = proto_register_protocol(
97                 "Microsoft File Replication Service", "FRSRPC", "frsrpc");
98
99         proto_register_field_array(proto_dcerpc_frsrpc, hf, array_length(hf));
100
101         proto_register_subtree_array(ett, array_length(ett));
102
103 }
104
105
106 void
107 proto_reg_handoff_dcerpc_frsrpc(void)
108 {
109         /* register protocol as dcerpc */
110
111         dcerpc_init_uuid(
112                 proto_dcerpc_frsrpc, ett_dcerpc_frsrpc, &uuid_dcerpc_frsrpc,
113                 ver_dcerpc_frsrpc, dcerpc_frsrpc_dissectors, hf_frsrpc_opnum);
114 }