Maybe the problem is that the compilers used on AIX weren't defining
[obnox/wireshark/wip.git] / packet-dcerpc-fldb.c
1 /* packet-dcerpc-fldb.c
2  *
3  * Routines for dcerpc FLDB Calls
4  * Copyright 2002, Jaime Fournier <jafour1@yahoo.com>
5  * This information is based off the released idl files from opengroup.
6  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/flserver/afsvl_proc.idl
7  *
8  * $Id: packet-dcerpc-fldb.c,v 1.4 2003/08/04 02:49:03 tpot Exp $
9  *
10  * Ethereal - Network traffic analyzer
11  * By Gerald Combs <gerald@ethereal.com>
12  * Copyright 1998 Gerald Combs
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27  */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33
34 #ifdef HAVE_SYS_TYPES_H
35 #include <sys/types.h>
36 #endif
37
38 #include <string.h>
39
40 #include <glib.h>
41 #include <epan/packet.h>
42 #include "packet-dcerpc.h"
43
44
45 static int proto_fldb = -1;
46 static int hf_fldb_opnum = -1;
47
48
49 static gint ett_fldb = -1;
50
51
52 static e_uuid_t uuid_fldb = { 0x4d37f2dd, 0xed43, 0x0000, { 0x02, 0xc0, 0x37, 0xcf, 0x2e, 0x00, 0x00, 0x01 } };
53 static guint16  ver_fldb = 4;
54
55                  
56                  
57 static dcerpc_sub_dissector fldb_dissectors[] = {
58         {  0, "GetEntryByID", NULL, NULL },
59         {  1, "GetEntryByName", NULL, NULL },
60         {  2, "Probe", NULL, NULL},
61         {  3, "GetCellInfo", NULL, NULL},
62         {  4, "GetNextServersByID", NULL, NULL},
63         {  5, "GetNextServersByName", NULL, NULL},
64         {  6, "GetSiteInfo", NULL, NULL },
65         {  7, "GetCEntryByID", NULL, NULL},
66         {  8, "GetCEntryByName", NULL, NULL},
67         {  9, "GetCNextServersByID", NULL, NULL},
68         { 10, "GetCNextServersByName", NULL, NULL},
69         { 11, "ExpandSiteCookie", NULL, NULL},
70         { 12, "GetServerInterfaces", NULL, NULL},
71         { 13, "CreateEntry", NULL, NULL},
72         { 14, "DeleteEntry", NULL, NULL},
73         { 15, "GetNewVolumeId", NULL, NULL},
74         { 16, "ReplaceEntry", NULL, NULL},
75         { 17, "SetLock", NULL, NULL},
76         { 18, "ReleaseLock", NULL, NULL},
77         { 19, "ListEntry", NULL, NULL },
78         { 20, "ListByAttributes", NULL, NULL},
79         { 21, "GetStats", NULL, NULL},
80         { 22, "AddAddress", NULL, NULL},
81         { 23, "RemoveAddress", NULL, NULL},
82         { 24, "ChangeAddress", NULL, NULL},
83         { 25, "GenerateSites", NULL, NULL},
84         { 26, "GetNewVolumeIds", NULL, NULL},
85         { 27, "CreateServer", NULL, NULL},
86         { 28, "AlterServer", NULL, NULL},
87         { 0, NULL, NULL, NULL }
88 };
89
90 void
91 proto_register_fldb (void)
92 {
93         static hf_register_info hf[] = {
94           { &hf_fldb_opnum,
95             { "Operation", "fldb.opnum", FT_UINT16, BASE_DEC,
96               NULL, 0x0, "Operation", HFILL }}
97         };
98
99         static gint *ett[] = {
100                 &ett_fldb,
101         };
102         proto_fldb = proto_register_protocol ("DCE/RPC FLDB", "FLDB", "fldb");
103         proto_register_field_array (proto_fldb, hf, array_length (hf));
104         proto_register_subtree_array (ett, array_length (ett));
105 }
106
107 void
108 proto_reg_handoff_fldb (void)
109 {
110         /* Register the protocol as dcerpc */
111         dcerpc_init_uuid (proto_fldb, ett_fldb, &uuid_fldb, ver_fldb, fldb_dissectors, hf_fldb_opnum);
112 }