make KRB_SAFE more consistent with the other PDUs by removing the SAFE expansion.
[obnox/wireshark/wip.git] / packet-dcerpc-budb.c
1 /* packet-dcerpc-budb.c
2  * Routines for budb dissection
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/file.tar.gz bubasics/budb.idl
6  *
7  * $Id: packet-dcerpc-budb.c,v 1.2 2004/01/27 04:15:48 guy Exp $
8  *      
9  * Ethereal - Network traffic analyzer
10  * By Gerald Combs <gerald@ethereal.com>
11  * Copyright 1998 Gerald Combs
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  */
27
28 #ifdef HAVE_CONFIG_H
29 #include "config.h"
30 #endif
31
32
33 #ifdef HAVE_SYS_TYPES_H
34 #include <sys/types.h>
35 #endif
36
37 #include <string.h>
38
39 #include <glib.h>
40 #include <epan/packet.h>
41 #include "packet-dcerpc.h"
42
43 static int proto_budb = -1;
44 static int hf_budb_opnum = -1;
45
46
47 static gint ett_budb = -1;
48
49 static e_uuid_t uuid_budb = { 0xeb814e2a, 0x0099, 0x11ca, { 0x86, 0x78, 0x02, 0x60, 0x8c, 0x2e, 0xa9, 0x6e } };
50 static guint16  ver_budb = 4;
51
52
53 static dcerpc_sub_dissector budb_dissectors[] = {
54 { 0, "BUDB_AddVolume", NULL, NULL },
55 { 1, "BUDB_CreateDump", NULL, NULL },
56 { 2, "BUDB_DeleteDump", NULL, NULL },
57 { 3, "BUDB_DeleteTape", NULL, NULL },
58 { 4, "BUDB_DeleteVDP", NULL, NULL },
59 { 5, "BUDB_FindClone", NULL, NULL },
60 { 6, "BUDB_FindDump", NULL, NULL },
61 { 7, "BUDB_FindLatestDump", NULL, NULL },
62 { 8, "BUDB_FinishDump", NULL, NULL },
63 { 9, "BUDB_FinishTape", NULL, NULL },
64 { 10, "BUDB_GetDumps", NULL, NULL },
65 { 11, "BUDB_GetTapes", NULL, NULL },
66 { 12, "BUDB_GetVolumes", NULL, NULL },
67 { 13, "BUDB_UseTape", NULL, NULL },
68 { 14, "BUDB_GetText", NULL, NULL },
69 { 15, "BUDB_GetTextVersion", NULL, NULL },
70 { 16, "BUDB_SaveText", NULL, NULL },
71 { 17, "BUDB_FreeAllLocks", NULL, NULL },
72 { 18, "BUDB_FreeLock", NULL, NULL },
73 { 19, "BUDB_GetInstanceId", NULL, NULL },
74 { 20, "BUDB_GetLock", NULL, NULL },
75 { 21, "BUDB_DbVerify", NULL, NULL },
76 { 22, "BUDB_DumpDB", NULL, NULL },
77 { 23, "BUDB_RestoreDbHeader", NULL, NULL },
78 { 24, "BUDB_T_GetVersion", NULL, NULL },
79 { 25, "BUDB_T_DumpHashTable", NULL, NULL },
80 { 26, "BUDB_T_DumpDatabase", NULL, NULL },
81 { 27, "BUDB_GetServerInterfaces", NULL, NULL },
82 { 28, "BUDB_AddVolumes", NULL, NULL },
83         { 0, NULL, NULL, NULL }
84 };
85
86 void
87 proto_register_budb (void)
88 {
89         static hf_register_info hf[] = {
90         { &hf_budb_opnum,
91                 { "Operation", "budb.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, "Operation", HFILL }},
92         };
93
94         static gint *ett[] = {
95                 &ett_budb,
96         };
97         proto_budb = proto_register_protocol ("DCE/RPC BUDB", "BUDB", "budb");
98         proto_register_field_array (proto_budb, hf, array_length (hf));
99         proto_register_subtree_array (ett, array_length (ett));
100 }
101
102 void
103 proto_reg_handoff_budb (void)
104 {
105         /* Register the protocol as dcerpc */
106         dcerpc_init_uuid (proto_budb, ett_budb, &uuid_budb, ver_budb, budb_dissectors, hf_budb_opnum);
107 }