Rename the "packet-msrpc-XXX.[ch]" files to "packet-dcerpc-XXX.[ch]", as
[obnox/wireshark/wip.git] / packet-dcerpc-reg.c
1 /* packet-dcerpc-reg.c
2  * Routines for SMB \\PIPE\\winreg packet disassembly
3  * Copyright 2001, Tim Potter <tpot@samba.org>
4  *
5  * $Id: packet-dcerpc-reg.c,v 1.1 2001/11/21 02:08:57 guy Exp $
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 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29
30 #include <glib.h>
31 #include "packet.h"
32 #include "packet-dcerpc.h"
33 #include "packet-dcerpc-reg.h"
34
35 static int proto_dcerpc_reg = -1;
36 static gint ett_dcerpc_reg = -1;
37
38 static e_uuid_t uuid_dcerpc_reg = {
39         0x338cd001, 0x2244, 0x31f1,
40         { 0xaa, 0xaa, 0x90, 0x00, 0x38, 0x00, 0x10, 0x03 }
41 };
42
43 static guint16 ver_dcerpc_reg = 1;
44
45 static dcerpc_sub_dissector dcerpc_reg_dissectors[] = {
46         { REG_OPEN_HKCR, "REG_OPEN_HKCR", NULL, NULL },
47         { _REG_UNK_01, "_REG_UNK_01", NULL, NULL },
48         { REG_OPEN_HKLM, "REG_OPEN_HKLM", NULL, NULL },
49         { _REG_UNK_03, "_REG_UNK_03", NULL, NULL },
50         { REG_OPEN_HKU, "REG_OPEN_HKU", NULL, NULL },
51         { REG_CLOSE, "REG_CLOSE", NULL, NULL },
52         { REG_CREATE_KEY, "REG_CREATE_KEY", NULL, NULL },
53         { REG_DELETE_KEY, "REG_DELETE_KEY", NULL, NULL },
54         { REG_DELETE_VALUE, "REG_DELETE_VALUE", NULL, NULL },
55         { REG_ENUM_KEY, "REG_ENUM_KEY", NULL, NULL },
56         { REG_ENUM_VALUE, "REG_ENUM_VALUE", NULL, NULL },
57         { REG_FLUSH_KEY, "REG_FLUSH_KEY", NULL, NULL },
58         { REG_GET_KEY_SEC, "REG_GET_KEY_SEC", NULL, NULL },
59         { _REG_UNK_0D, "_REG_UNK_0D", NULL, NULL },
60         { _REG_UNK_0E, "_REG_UNK_0E", NULL, NULL },
61         { REG_OPEN_ENTRY, "REG_OPEN_ENTRY", NULL, NULL },
62         { REG_QUERY_KEY, "REG_QUERY_KEY", NULL, NULL },
63         { REG_INFO, "REG_INFO", NULL, NULL },
64         { _REG_UNK_12, "_REG_UNK_12", NULL, NULL },
65         { _REG_UNK_13, "_REG_UNK_13", NULL, NULL },
66         { _REG_UNK_14, "_REG_UNK_14", NULL, NULL },
67         { REG_SET_KEY_SEC, "REG_SET_KEY_SEC", NULL, NULL },
68         { REG_CREATE_VALUE, "REG_CREATE_VALUE", NULL, NULL },
69         { _REG_UNK_17, "_REG_UNK_17", NULL, NULL },
70         { REG_SHUTDOWN, "REG_SHUTDOWN", NULL, NULL },
71         { REG_ABORT_SHUTDOWN, "REG_ABORT_SHUTDOWN", NULL, NULL },
72         { REG_UNK_1A, "REG_UNK_1A", NULL, NULL },
73
74         {0, NULL, NULL,  NULL },
75 };
76
77 void 
78 proto_register_dcerpc_reg(void)
79 {
80         static gint *ett[] = {
81                 &ett_dcerpc_reg,
82         };
83
84         proto_dcerpc_reg = proto_register_protocol(
85                 "Microsoft Registry", "REG", "reg");
86
87         proto_register_subtree_array(ett, array_length(ett));
88 }
89
90 void
91 proto_reg_handoff_dcerpc_reg(void)
92 {
93         /* Register protocol as dcerpc */
94
95         dcerpc_init_uuid(proto_dcerpc_reg, ett_dcerpc_reg, &uuid_dcerpc_reg,
96                          ver_dcerpc_reg, dcerpc_reg_dissectors);
97 }