Ian Schorr <ian.schorr@gmail.com>
[obnox/wireshark/wip.git] / epan / dissectors / packet-fmp.h
1 /* packet-fmp.h
2  * Defines for fmp dissection
3  *  
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
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 #ifndef PACKET_FMP_H
27 #define PACKET_FMP_H
28
29 #define FMP_PROGRAM     1001911
30 #define FMP_VERSION_3    3
31
32
33
34 /*
35  * FMP Procedures
36  */
37 #define FMP_SessionCreate       1
38 #define FMP_HeartBeat           2
39 #define FMP_Mount               3
40 #define FMP_Open                4
41 #define FMP_Close               5
42 #define FMP_OpenGetMap          6
43 #define FMP_OpenAllocSpace      7
44 #define FMP_GetMap              8
45 #define FMP_AllocSpace          9
46 #define FMP_Flush               10
47 #define FMP_CancelReq           11
48 #define FMP_PlugIn              12
49 #define FMP_SessionTerminate    13
50 #define FMP_SessionCreateEx     14
51 #define FMP_ReportClientError   15
52 #define FMP_GetAttr             16
53 #define FMP_OpenGetAttr         17
54 #define FMP_FlushGetAttr        18
55 #define FMP_OpenGetMapEx        19
56 #define FMP_OpenAllocSpaceEx    20
57 #define FMP_GetMapEx            21
58 #define FMP_AllocSpaceEx        22
59 #define FMP_FlushEx             23
60 #define FMP_FlushGetAttrEx      24
61 #define FMP_GetVolumeInfo       25
62
63
64
65 /*
66  * Volume Mgmt Capability
67  */
68
69 #define FMP_SERVER_BASED                0x01
70 #define FMP_THIRD_PARTY                 0x02
71 #define FMP_CLIENT_BASED_DART           0x04
72 #define FMP_CLIENT_BASED_SIMPLE         0x08
73 #define FMP_DISK_SIGNATURE              0x10
74 #define FMP_IPSTORAGE_BASED             0X20
75 #define FMP_HIERARCHICAL_VOLUME         0x40
76
77 /*
78  * Flush Command Type
79  */
80
81 #define FMP_COMMIT_SPECIFIED 0x01
82 #define FMP_RELEASE_SPECIFIED 0x02
83 #define FMP_RELEASE_ALL 0x04
84 #define FMP_CLOSE_FILE 0x08
85 #define FMP_UPDATE_TIME 0x10
86 #define FMP_ACCESS_TIME 0x20
87
88 #define FMP_PLUG_IN_ID_SZ 16
89
90 /* 
91  * FMP Notify Protocol
92  */
93 #define FMP_TCP 0
94 #define FMP_UDP 1
95
96 /*
97  * Capabilities 
98  */
99
100 #define FMP_CAP_REVOKE_HANDLE_LIST 0x0001
101 #define FMP_CAP_UNC_NAMES 0x0002
102 #define FMP_CAP_CIFSV2 0x0004
103
104
105 typedef enum  {
106         FMP_CE_GENERIC = 1,
107         FMP_CE_DISK_ERROR = 2
108 }clientErrorNum;
109
110
111 /*
112  * FMP Reply Status
113  */
114
115 typedef enum {
116         FMP_OK = 0,
117         FMP_IOERROR = 5,
118         FMP_NOMEM = 12,
119         FMP_NOACCESS = 13,
120         FMP_INVALIDARG = 22,
121         FMP_FSFULL = 28,
122         FMP_QUEUE_FULL = 79,
123         FMP_WRONG_MSG_NUM = 500,
124         FMP_SESSION_LOST = 501,
125         FMP_HOT_SESSION = 502,
126         FMP_COLD_SESSION = 503,
127         FMP_CLIENT_TERMINATED = 504,
128         FMP_WRITER_LOST_BLK = 505,
129         FMP_REQUEST_QUEUED = 506,
130         FMP_FALL_BACK = 507,
131         FMP_REQUEST_CANCELLED = 508,
132         FMP_WRITER_ZEROED_BLK = 509,
133         FMP_NOTIFY_ERROR = 510,
134         FMP_WRONG_HANDLE = 511,
135         FMP_DUPLICATE_OPEN = 512,
136         FMP_PLUGIN_NOFUNC = 600
137 } fmpStat;
138
139
140 typedef enum {
141         FMP_PATH = 0,
142         FMP_NFS = 1,
143         FMP_CIFS = 2,
144         FMP_FMP = 3,
145         FMP_FS_ONLY = 4,
146         FMP_SHARE = 5,
147         FMP_MOUNT = 6,
148         FMP_CIFSV2  = 7,
149         FMP_UNC     = 8
150 } nativeProtocol;
151    
152  
153 #define FMP_MAX_PATH_LEN        1024
154
155
156 /*
157  * Encoding type for genString
158  */
159
160 typedef enum {
161         FMP_ASCII = 0,
162         FMP_UTF8 = 1,
163         FMP_UNICODE1 = 2
164 } encoding;
165
166 typedef enum  {
167     FMP_DISK_IDENTIFIER_SIGNATURE = 0,
168     FMP_DISK_IDENTIFIER_SERIAL = 1
169 } fmpDiskIdentifierType;
170
171 typedef enum  {
172     FMP_VOLUME_DISK    = 0,
173     FMP_VOLUME_SLICE   = 1,
174     FMP_VOLUME_STRIPE  = 2,
175     FMP_VOLUME_META    = 3
176 }fmpVolumeType;
177
178 /*
179  * Extent States
180  */
181 typedef enum {
182        FMP_VALID_DATA = 0,
183        FMP_INVALID_DATA = 1,
184        FMP_NONE_DATA = 2
185 } extentState;
186
187
188 #define FMP_MAX_PATH_LEN       1024
189
190 /*
191  * Query Command
192  */
193 typedef enum {
194         FMP_SCSI_INQUIRY = 0,
195         FMP_DART_STAMP = 1
196 } queryCmd;
197
198
199 #define MAX_MSG_SIZE            256  /* For wireshark messages */
200 /*
201 extern int hf_fmp_fsID;
202 extern int hf_fmp_fsBlkSz;
203 extern int hf_fmp_sessionHandle;
204 extern int hf_fmp_fmpFHandle;
205 extern int hf_fmp_msgNum;
206 extern int hf_fmp_fileSize;
207 extern int hf_fmp_firstLogBlk;
208 extern int hf_fmp_numBlksReq;
209 extern int hf_fmp_cookie;
210 */
211 int dissect_fmp_status(tvbuff_t *, int, proto_tree *, int *);
212 int dissect_fmp_extentList(tvbuff_t *, int, packet_info *, proto_tree *);
213
214 #endif