As with "file_write_error_message()", so with
[obnox/wireshark/wip.git] / packet-dcerpc-afs4int.c
1 /* packet-dcerpc-afs4int.c
2  *
3  * Routines for dcerpc Afs4Int dissection
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/fsint/afs4int.idl
7  *
8  * $Id: packet-dcerpc-afs4int.c,v 1.4 2003/08/04 02:49:04 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_afs4int = -1;
46 static int hf_afs4int_opnum = -1;
47
48
49 static gint ett_afs4int = -1;
50
51
52 static e_uuid_t uuid_afs4int = { 0x4d37f2dd, 0xed93, 0x0000, { 0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00, 0x00 } };
53 static guint16  ver_afs4int = 4;
54
55
56
57 static dcerpc_sub_dissector afs4int_dissectors[] = {
58         {  0, "SetContext", NULL, NULL },
59         {  1, "LookupRoot", NULL, NULL },
60         {  2, "FetchData", NULL, NULL },
61         {  3, "FetchACL", NULL, NULL },
62         {  4, "FetchStatus", NULL, NULL },
63         {  5, "StoreData", NULL, NULL },
64         {  6, "StoreACL", NULL, NULL },
65         {  7, "StoreStatus", NULL, NULL },
66         {  8, "RemoveFile", NULL, NULL },
67         {  9, "CreateFile", NULL, NULL },
68         { 10, "Rename", NULL, NULL },
69         { 11, "Symlink", NULL, NULL },
70         { 12, "HardLink", NULL, NULL },
71         { 13, "MakeDir", NULL, NULL },
72         { 14, "RemoveDir", NULL, NULL },
73         { 15, "Readdir", NULL, NULL },
74         { 16, "Lookup", NULL, NULL },
75         { 17, "GetToken", NULL, NULL },
76         { 18, "ReleaseTokens", NULL, NULL },
77         { 19, "GetTime", NULL, NULL },
78         { 20, "MakeMountPoint", NULL, NULL },
79         { 21, "GetStatistics", NULL, NULL },
80         { 22, "BulkFetchVV", NULL, NULL },
81         { 23, "BulkKeepAlive", NULL, NULL },
82         { 24, "ProcessQuota", NULL, NULL },
83         { 25, "GetServerInterfaces", NULL, NULL },
84         { 26, "SetParams", NULL, NULL },
85         { 27, "BulkFetchStatus", NULL, NULL },
86         {  0, NULL, NULL, NULL }
87 };
88
89 void
90 proto_register_afs4int (void)
91 {
92         static hf_register_info hf[] = {
93           { &hf_afs4int_opnum,
94             { "Operation", "afs4int.opnum", FT_UINT16, BASE_DEC,
95               NULL, 0x0, "Operation", HFILL }}
96         };  
97
98
99         static gint *ett[] = {
100                 &ett_afs4int,
101         };
102         proto_afs4int = proto_register_protocol ("DCE DFS Calls", "DCE_DFS", "dce_dfs");
103         proto_register_field_array (proto_afs4int, hf, array_length (hf));
104         proto_register_subtree_array (ett, array_length (ett));
105
106 }
107 void
108 proto_reg_handoff_afs4int (void)
109 {
110         /* Register the protocol as dcerpc */
111         dcerpc_init_uuid (proto_afs4int, ett_afs4int, &uuid_afs4int, ver_afs4int, afs4int_dissectors, hf_afs4int_opnum);
112 }