Fix for bug 5422:
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-fileexp.c
1 /* packet-dcerpc-fileexp.c
2  *
3  * Routines for DCE DFS File Exporter dissection
4  * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.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$
9  *
10  * Wireshark - Network traffic analyzer
11  * By Gerald Combs <gerald@wireshark.org>
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 <glib.h>
39 #include <epan/packet.h>
40 #include "packet-dcerpc.h"
41 #include "packet-dcerpc-dce122.h"
42
43 #define AFS_SETMODTIME  1
44 #define AFS_SETOWNER  2
45 #define AFS_SETGROUP  4
46 #define AFS_SETMODE  8
47 #define AFS_SETACCESSTIME  0x10
48 #define AFS_SETCHANGETIME  0x20
49 #define AFS_SETLENGTH  0x40
50 #define AFS_SETTYPEUUID  0x80
51 #define AFS_SETDEVNUM  0x100
52 #define AFS_SETMODEXACT  0x200
53 #define AFS_SETTRUNCLENGTH  0x400
54 #define AFS_SETCLIENTSPARE  0x800
55
56 #define TKN_LOCK_READ                   0x001
57 #define TKN_LOCK_WRITE                  0x002
58 #define TKN_DATA_READ                   0x004
59 #define TKN_DATA_WRITE                  0x008
60 #define TKN_OPEN_READ                   0x010
61 #define TKN_OPEN_WRITE                  0x020
62 #define TKN_OPEN_SHARED                 0x040
63 #define TKN_OPEN_EXCLUSIVE              0x080
64 #define TKN_OPEN_DELETE                 0x100
65 #define TKN_OPEN_PRESERVE               0x200
66 #define TKN_STATUS_READ                 0x400
67 #define TKN_STATUS_WRITE                0x800
68 #define TKN_OPEN_UNLINK                 0x1000
69 #define TKN_SPOT_HERE                   0x2000
70 #define TKN_SPOT_THERE                  0x4000
71 #define TKN_OPEN_NO_READ                0x8000
72 #define TKN_OPEN_NO_WRITE               0x10000
73 #define TKN_OPEN_NO_UNLINK              0x20000
74
75 #define AFS_CONN_PARAM_HOSTLIFE  0
76 #define AFS_CONN_PARAM_HOSTRPC  1
77 #define AFS_CONN_PARAM_DEADSERVER  2
78 #define AFS_CONN_PARAM_EPOCH 3
79 #define AFS_CONN_PARAM_MAXFILE_CLIENT  4
80 #define AFS_CONN_PARAM_MAXFILE_SERVER  5
81 #define AFS_CONN_PARAM_HOST_TYPE_CLIENT 6
82 #define AFS_CONN_PARAM_HOST_TYPE_SERVER 7
83 #define AFS_CONN_PARAM_FT_MASK_CLIENT 8
84 #define AFS_CONN_PARAM_FT_MASK_SERVER 9
85 #define AFS_CONN_PARAM_SUPPORTS_64BITS 0x10000
86 #define AFS_CONN_PARAM_512BYTE_BLOCKS 0x20000
87
88 #define AFS_FLAG_SEC_SERVICE             0x1
89 #define AFS_FLAG_CONTEXT_NEW_IF          0x2
90 #define AFS_FLAG_CONTEXT_DO_RESET        0x4
91 #define AFS_FLAG_CONTEXT_NEW_ACL_IF      0x8
92 #define AFS_FLAG_CONTEXT_NEW_TKN_TYPES  0x10
93
94 #define AFS_FLAG_RETURNTOKEN           1
95 #define AFS_FLAG_TOKENJUMPQUEUE        2
96 #define AFS_FLAG_SKIPTOKEN             4
97 #define AFS_FLAG_NOOPTIMISM           0x8
98 #define AFS_FLAG_TOKENID              0x10
99 #define AFS_FLAG_RETURNBLOCKER        0x20
100 #define AFS_FLAG_ASYNCGRANT           0x40
101 #define AFS_FLAG_NOREVOKE             0x80
102 #define AFS_FLAG_MOVE_REESTABLISH     0x100
103 #define AFS_FLAG_SERVER_REESTABLISH   0x200
104 #define AFS_FLAG_NO_NEW_EPOCH         0x400
105 #define AFS_FLAG_MOVE_SOURCE_OK       0x800
106 #define AFS_FLAG_SYNC                 0x1000
107 #define AFS_FLAG_ZERO                 0x2000
108 #define AFS_FLAG_SKIPSTATUS           0x4000
109 #define AFS_FLAG_FORCEREVOCATIONS     0x8000
110 #define AFS_FLAG_FORCEVOLQUIESCE      0x10000
111 #define AFS_FLAG_FORCEREVOCATIONDOWN  0x20000
112
113 static int hf_fileexp_opnum = -1;
114
115
116 static int hf_fileexp_afsFid_cell_high = -1;
117 static int hf_fileexp_afsuuid_uuid = -1;
118 static int hf_fileexp_fetchdata_pipe_t_size = -1;
119 static int hf_fileexp_afsNameString_t_principalName_string = -1;
120 static int hf_fileexp_afsFid_cell_low = -1;
121 static int hf_fileexp_afsFid_volume_high = -1;
122 static int hf_fileexp_afsFid_volume_low = -1;
123 static int hf_fileexp_afsFid_Vnode = -1;
124 static int hf_fileexp_afsFid_Unique = -1;
125 static int hf_fileexp_volume_high = -1;
126 static int hf_fileexp_volume_low = -1;
127 static int hf_fileexp_vnode = -1;
128 static int hf_fileexp_unique = -1;
129 static int hf_fileexp_interfaceversion = -1;
130 static int hf_fileexp_filetype = -1;
131 static int hf_fileexp_linkcount = -1;
132 static int hf_fileexp_length_high = -1;
133 static int hf_fileexp_length_low = -1;
134 static int hf_fileexp_dataversion_high = -1;
135 static int hf_fileexp_dataversion_low = -1;
136 static int hf_fileexp_author = -1;
137 static int hf_fileexp_owner = -1;
138 static int hf_fileexp_group = -1;
139 static int hf_fileexp_calleraccess = -1;
140 static int hf_fileexp_anonymousaccess = -1;
141 static int hf_fileexp_aclexpirationtime = -1;
142 static int hf_fileexp_mode = -1;
143 static int hf_fileexp_parentvnode = -1;
144 static int hf_fileexp_parentunique = -1;
145 static int hf_fileexp_modtime_sec = -1;
146 static int hf_fileexp_modtime_msec = -1;
147 static int hf_fileexp_changetime_sec = -1;
148 static int hf_fileexp_changetime_msec = -1;
149 static int hf_fileexp_accesstime_sec = -1;
150 static int hf_fileexp_accesstime_msec = -1;
151 static int hf_fileexp_servermodtime_sec = -1;
152 static int hf_fileexp_servermodtime_msec = -1;
153 static int hf_fileexp_typeuuid = -1;
154 static int hf_fileexp_objectuuid = -1;
155 static int hf_fileexp_devicenumber = -1;
156 static int hf_fileexp_blocksused = -1;
157 static int hf_fileexp_clientspare1 = -1;
158 static int hf_fileexp_devicenumberhighbits = -1;
159 static int hf_fileexp_agtypeunique = -1;
160 static int hf_fileexp_himaxspare = -1;
161 static int hf_fileexp_lomaxspare = -1;
162 static int hf_fileexp_pathconfspare = -1;
163 static int hf_fileexp_spare4 = -1;
164 static int hf_fileexp_spare5 = -1;
165 static int hf_fileexp_spare6 = -1;
166 static int hf_fileexp_volid_hi = -1;
167 static int hf_fileexp_volid_low = -1;
168 static int hf_fileexp_vvage = -1;
169 static int hf_fileexp_vv_hi = -1;
170 static int hf_fileexp_vv_low = -1;
171 static int hf_fileexp_vvpingage = -1;
172 static int hf_fileexp_vvspare1 = -1;
173 static int hf_fileexp_vvspare2 = -1;
174 static int hf_fileexp_beginrange = -1;
175 static int hf_fileexp_beginrangeext = -1;
176 static int hf_fileexp_endrange = -1;
177 static int hf_fileexp_endrangeext = -1;
178 static int hf_fileexp_expirationtime = -1;
179 static int hf_fileexp_tokenid_hi = -1;
180 static int hf_fileexp_tokenid_low = -1;
181 static int hf_fileexp_type_hi = -1;
182 static int hf_fileexp_type_low = -1;
183 static int hf_fileexp_tn_length = -1;
184 static int hf_fileexp_storestatus_accesstime_sec = -1;
185 static int hf_fileexp_storestatus_accesstime_usec = -1;
186 static int hf_fileexp_storestatus_changetime_sec = -1;
187 static int hf_fileexp_storestatus_changetime_usec = -1;
188 static int hf_fileexp_storestatus_clientspare1 = -1;
189 static int hf_fileexp_storestatus_cmask = -1;
190 static int hf_fileexp_storestatus_devicenumber = -1;
191 static int hf_fileexp_storestatus_devicenumberhighbits = -1;
192 static int hf_fileexp_storestatus_devicetype = -1;
193 static int hf_fileexp_storestatus_group = -1;
194 static int hf_fileexp_storestatus_length_high = -1;
195 static int hf_fileexp_storestatus_length_low = -1;
196 static int hf_fileexp_storestatus_mask = -1;
197 static int hf_fileexp_storestatus_mode = -1;
198 static int hf_fileexp_storestatus_modtime_sec = -1;
199 static int hf_fileexp_storestatus_modtime_usec = -1;
200 static int hf_fileexp_storestatus_owner = -1;
201 static int hf_fileexp_storestatus_spare1 = -1;
202 static int hf_fileexp_storestatus_spare2 = -1;
203 static int hf_fileexp_storestatus_spare3 = -1;
204 static int hf_fileexp_storestatus_spare4 = -1;
205 static int hf_fileexp_storestatus_spare5 = -1;
206 static int hf_fileexp_storestatus_spare6 = -1;
207 static int hf_fileexp_storestatus_trunc_high = -1;
208 static int hf_afsconnparams_mask = -1;
209 static int hf_fileexp_storestatus_trunc_low = -1;
210 static int hf_fileexp_storestatus_typeuuid = -1;
211 static int hf_fileexp_l_end_pos = -1;
212 static int hf_fileexp_l_end_pos_ext = -1;
213 static int hf_fileexp_l_fstype = -1;
214 static int hf_fileexp_l_pid = -1;
215 static int hf_fileexp_l_start_pos = -1;
216 static int hf_fileexp_l_start_pos_ext = -1;
217 static int hf_fileexp_l_sysid = -1;
218 static int hf_fileexp_l_type = -1;
219 static int hf_fileexp_l_whence = -1;
220 static int hf_fileexp_acl_len = -1;
221 static int hf_fileexp_st = -1;
222 static int hf_fileexp_uint = -1;
223 static int hf_fileexp_setcontext_rqst_epochtime = -1;
224 static int hf_fileexp_setcontext_rqst_secobjectid = -1;
225 static int hf_fileexp_setcontext_rqst_clientsizesattrs = -1;
226 static int hf_fileexp_setcontext_rqst_parm7 = -1;
227 static int hf_fileexp_afsNetAddr_type = -1;
228 static int hf_fileexp_afsNetAddr_data = -1;
229 static int hf_fileexp_returntokenidp_high = -1;
230 static int hf_fileexp_minvvp_low = -1;
231 static int hf_fileexp_position_high = -1;
232 static int hf_fileexp_position_low = -1;
233 static int hf_fileexp_offsetp_high = -1;
234 static int hf_fileexp_nextoffsetp_low = -1;
235 static int hf_fileexp_cellidp_high = -1;
236 static int hf_afserrorstatus_st = -1;
237 static int hf_fileexp_length = -1;
238 static int hf_afsconnparams_values = -1;
239 static int hf_fileexp_acltype = -1;
240 static int hf_fileexp_afsTaggedPath_tp_chars = -1;
241 static int hf_fileexp_afsTaggedPath_tp_tag = -1;
242 static int hf_fileexp_afsacl_uuid1 = -1;
243 static int hf_fileexp_bulkfetchstatus_size = -1;
244 static int hf_fileexp_flags = -1;
245 static int hf_fileexp_afsreturndesc_tokenid_high = -1;
246 static int hf_fileexp_afsreturndesc_tokenid_low = -1;
247 static int hf_fileexp_afsreturndesc_type_high = -1;
248 static int hf_fileexp_afsreturndesc_type_low = -1;
249 static int hf_fileexp_returntokenidp_low = -1;
250 static int hf_fileexp_minvvp_high = -1;
251 static int hf_fileexp_offsetp_low = -1;
252 static int hf_fileexp_nextoffsetp_high = -1;
253 static int hf_fileexp_cellidp_low = -1;
254 static int hf_fileexp_tn_tag = -1;
255 static int hf_fileexp_tn_size = -1;
256 static int hf_fileexp_tn_string = -1;
257 static int hf_fileexp_bulkfetchvv_numvols = -1;
258 static int hf_fileexp_bulkfetchvv_spare1 = -1;
259 static int hf_fileexp_bulkfetchvv_spare2 = -1;
260 static int hf_fileexp_bulkkeepalive_numexecfids = -1;
261 static int hf_fileexp_bulkkeepalive_spare4 = -1;
262 static int hf_fileexp_bulkkeepalive_spare2 = -1;
263 static int hf_fileexp_bulkkeepalive_spare1 = -1;
264 static int hf_fileexp_afsacl_defaultcell_uuid = -1;
265 static int hf_fileexp_gettime_syncdispersion = -1;
266 static int hf_fileexp_gettime_syncdistance = -1;
267 static int hf_fileexp_gettime_usecondsp = -1;
268 static int hf_fileexp_readdir_size = -1;
269 static int hf_fileexp_afsNameString_t_principalName_size = -1;
270 static int hf_fileexp_afsNameString_t_principalName_size2 = -1;
271 static int hf_fileexp_afsTaggedPath_tp_length = -1;
272 static int hf_fileexp_fstype = -1;
273 static int hf_fileexp_gettime_secondsp = -1;
274
275 static int proto_fileexp = -1;
276
277 static gint ett_fileexp = -1;
278 static gint ett_fileexp_afsFid = -1;
279 static gint ett_fileexp_afsReturnDesc = -1;
280 static gint ett_fileexp_afsNetAddr = -1;
281 static gint ett_fileexp_fetchstatus = -1;
282 static gint ett_fileexp_afsflags = -1;
283 static gint ett_fileexp_volsync = -1;
284 static gint ett_fileexp_minvvp = -1;
285 static gint ett_fileexp_afsfidtaggedname = -1;
286 static gint ett_fileexp_afstaggedname = -1;
287 static gint ett_fileexp_afstoken = -1;
288 static gint ett_fileexp_afsstorestatus = -1;
289 static gint ett_fileexp_afsRecordLock = -1;
290 static gint ett_fileexp_afsAcl = -1;
291 static gint ett_fileexp_afsNameString_t = -1;
292 static gint ett_fileexp_afsConnParams = -1;
293 static gint ett_fileexp_afsErrorStatus = -1;
294 static gint ett_fileexp_afsNetData = -1;
295 static gint ett_fileexp_afsTaggedPath = -1;
296 static gint ett_fileexp_afsBulkStat = -1;
297 static gint ett_fileexp_afsuuid = -1;
298 static gint ett_fileexp_offsetp = -1;
299 static gint ett_fileexp_returntokenidp = -1;
300 static gint ett_fileexp_afsbundled_stat = -1;
301
302
303 /* vars for our macro(s) */
304 static int hf_error_st = -1;
305
306 static e_uuid_t uuid_fileexp =
307   { 0x4d37f2dd, 0xed93, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x00,
308                                  0x00}
309 };
310 static guint16 ver_fileexp = 4;
311
312 /* XXX the only macro that I could not find the right way to convert easily.
313 The reason is because we reset col_info if st is non zero for many rpcs.
314 This is because on error, many structures are filled with garbage.
315 We end up not knowing if data is valid until we get the st var at the very end of the stubdata..
316 We can not just jump to the end, because more often than not an extra buffer exists in payload
317 after st. Thus we have to advance on each item until we read in ST, then we clear col_info. on error
318 A good example is FetchStatus() on a file that returns ENOEXIST.
319 inode, volume, etc all will be garbage.
320 */
321
322 #define MACRO_ST_CLEAR(name) \
323   { \
324     guint32 st; \
325     const char *st_str; \
326     offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_st, &st); \
327     st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u"); \
328     if (st){ \
329       if (check_col (pinfo->cinfo, COL_INFO)) \
330         col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
331     }else{ \
332       if (check_col (pinfo->cinfo, COL_INFO)) \
333         col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); \
334     } \
335   }
336
337 static int
338 dissect_afsFid (tvbuff_t * tvb, int offset,
339                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
340 {
341
342 /*
343         afsHyper Cell;
344         afsHyper Volume;
345         unsigned32 Vnode;
346         unsigned32 Unique;
347 */
348
349
350   proto_item *item = NULL;
351   proto_tree *tree = NULL;
352   int old_offset = offset;
353   guint32 volume_low, unique, vnode, inode;
354   dcerpc_info *di;
355
356   di = pinfo->private_data;
357   if (di->conformant_run)
358     {
359       return offset;
360     }
361
362
363
364   if (parent_tree)
365     {
366       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "afsFid:");
367       tree = proto_item_add_subtree (item, ett_fileexp_afsFid);
368     }
369
370
371   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
372                                hf_fileexp_afsFid_cell_high, NULL);
373
374   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
375                                hf_fileexp_afsFid_cell_low, NULL);
376
377   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
378                                hf_fileexp_afsFid_volume_high, NULL);
379
380   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
381                                hf_fileexp_afsFid_volume_low, &volume_low);
382
383   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
384                                hf_fileexp_afsFid_Vnode, &vnode);
385
386   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
387                                hf_fileexp_afsFid_Unique, &unique);
388
389   if (check_col (pinfo->cinfo, COL_INFO))
390     col_append_fstr (pinfo->cinfo, COL_INFO, " :FSID:%u ", volume_low);
391
392   if ((vnode == 1) || (vnode == 2))
393     {
394       col_append_str (pinfo->cinfo, COL_INFO, " InFS ");
395     }
396   else
397     {
398       inode = ((volume_low << 16) + vnode) & 0x7fffffff;
399       if (check_col (pinfo->cinfo, COL_INFO))
400         col_append_fstr (pinfo->cinfo, COL_INFO, " inode:%u ", inode);
401     }
402
403   proto_item_set_len (item, offset - old_offset);
404   return offset;
405 }
406
407 static int
408 dissect_afsConnParams (tvbuff_t * tvb, int offset,
409                        packet_info * pinfo, proto_tree * parent_tree,
410                        guint8 *drep)
411 {
412
413 /*
414         unsigned32 Mask;
415         unsigned32 Values[20];
416 */
417
418   proto_item *item = NULL;
419   proto_tree *tree = NULL;
420   int old_offset = offset;
421   guint32 mask, Values[20];
422   dcerpc_info *di;
423
424   di = pinfo->private_data;
425   if (di->conformant_run)
426     {
427       return offset;
428     }
429
430
431   if (parent_tree)
432     {
433       item =
434         proto_tree_add_text (parent_tree, tvb, offset, -1,
435                              "afsConnParams_t:");
436       tree = proto_item_add_subtree (item, ett_fileexp_afsConnParams);
437     }
438   offset =
439     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
440                         hf_afsconnparams_mask, &mask);
441   offset =
442     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
443                         hf_afsconnparams_values, &Values[0]);
444   offset =
445     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
446                         hf_afsconnparams_values, &Values[1]);
447   offset =
448     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
449                         hf_afsconnparams_values, &Values[2]);
450   offset =
451     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
452                         hf_afsconnparams_values, &Values[3]);
453   offset =
454     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
455                         hf_afsconnparams_values, &Values[4]);
456   offset =
457     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
458                         hf_afsconnparams_values, &Values[5]);
459   offset =
460     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
461                         hf_afsconnparams_values, &Values[6]);
462   offset =
463     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
464                         hf_afsconnparams_values, &Values[7]);
465   offset =
466     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
467                         hf_afsconnparams_values, &Values[9]);
468   offset =
469     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
470                         hf_afsconnparams_values, &Values[9]);
471   offset =
472     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
473                         hf_afsconnparams_values, &Values[10]);
474   offset =
475     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
476                         hf_afsconnparams_values, &Values[11]);
477   offset =
478     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
479                         hf_afsconnparams_values, &Values[12]);
480   offset =
481     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
482                         hf_afsconnparams_values, &Values[13]);
483   offset =
484     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
485                         hf_afsconnparams_values, &Values[14]);
486   offset =
487     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
488                         hf_afsconnparams_values, &Values[15]);
489   offset =
490     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
491                         hf_afsconnparams_values, &Values[16]);
492   offset =
493     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
494                         hf_afsconnparams_values, &Values[17]);
495   offset =
496     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
497                         hf_afsconnparams_values, &Values[18]);
498   offset =
499     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
500                         hf_afsconnparams_values, &Values[19]);
501   if ((mask & AFS_CONN_PARAM_HOSTLIFE) == AFS_CONN_PARAM_HOSTLIFE)
502     {
503       col_append_str (pinfo->cinfo, COL_INFO, ":HOSTLIFE");
504     }
505   if ((mask & AFS_CONN_PARAM_HOSTRPC) == AFS_CONN_PARAM_HOSTRPC)
506     {
507       col_append_str (pinfo->cinfo, COL_INFO, ":HOSTRPC");
508     }
509   if ((mask & AFS_CONN_PARAM_DEADSERVER) == AFS_CONN_PARAM_DEADSERVER)
510     {
511       col_append_str (pinfo->cinfo, COL_INFO, ":DEADSERVER");
512     }
513   if ((mask & AFS_CONN_PARAM_EPOCH) == AFS_CONN_PARAM_EPOCH)
514     {
515       col_append_str (pinfo->cinfo, COL_INFO, ":EPOCH");
516     }
517   if ((mask & AFS_CONN_PARAM_MAXFILE_CLIENT) == AFS_CONN_PARAM_MAXFILE_CLIENT)
518     {
519       col_append_str (pinfo->cinfo, COL_INFO, ":MAXFILE_CLIENT");
520     }
521   if ((mask & AFS_CONN_PARAM_MAXFILE_SERVER) == AFS_CONN_PARAM_MAXFILE_SERVER)
522     {
523       col_append_str (pinfo->cinfo, COL_INFO, ":MAXFILE_SERVER");
524     }
525   if ((mask & AFS_CONN_PARAM_HOST_TYPE_CLIENT) ==
526       AFS_CONN_PARAM_HOST_TYPE_CLIENT)
527     {
528       col_append_str (pinfo->cinfo, COL_INFO, ":HOST_TYPE_CLIENT");
529     }
530   if ((mask & AFS_CONN_PARAM_HOST_TYPE_SERVER) ==
531       AFS_CONN_PARAM_HOST_TYPE_SERVER)
532     {
533       col_append_str (pinfo->cinfo, COL_INFO, ":HOST_TYPE_SERVER");
534     }
535   if ((mask & AFS_CONN_PARAM_FT_MASK_CLIENT) == AFS_CONN_PARAM_FT_MASK_CLIENT)
536     {
537       col_append_str (pinfo->cinfo, COL_INFO, ":FT_MASK_CLIENT");
538     }
539   if ((mask & AFS_CONN_PARAM_FT_MASK_SERVER) == AFS_CONN_PARAM_FT_MASK_SERVER)
540     {
541       col_append_str (pinfo->cinfo, COL_INFO, ":FT_MASK_SERVER");
542     }
543   if ((mask & AFS_CONN_PARAM_SUPPORTS_64BITS) ==
544       AFS_CONN_PARAM_SUPPORTS_64BITS)
545     {
546       col_append_str (pinfo->cinfo, COL_INFO, ":SUPPORTS_64BITS");
547     }
548   if ((mask & AFS_CONN_PARAM_512BYTE_BLOCKS) == AFS_CONN_PARAM_512BYTE_BLOCKS)
549     {
550       col_append_str (pinfo->cinfo, COL_INFO, ":512BYTE_BLOCKS");
551     }
552   if (check_col (pinfo->cinfo, COL_INFO))
553     col_append_fstr (pinfo->cinfo, COL_INFO,
554                      " Values:%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u",
555                      Values[0], Values[1], Values[2], Values[3],
556                      Values[4], Values[5], Values[6], Values[7], Values[8],
557                      Values[9], Values[10], Values[11], Values[12],
558                      Values[13], Values[14], Values[15], Values[16],
559                      Values[17], Values[18], Values[19]);
560
561   proto_item_set_len (item, offset - old_offset);
562   return offset;
563 }
564
565 static int
566 dissect_afsNameString_t (tvbuff_t * tvb, int offset,
567                          packet_info * pinfo, proto_tree * parent_tree,
568                          guint8 *drep)
569 {
570
571 /*
572 typedef [string] byte   NameString_t[AFS_NAMEMAX];
573 */
574
575   proto_item *item = NULL;
576   proto_tree *tree = NULL;
577   int old_offset = offset;
578 #define AFS_NAMEMAX    256
579   guint32 string_size;
580   const guint8 *namestring;
581   dcerpc_info *di;
582
583   di = pinfo->private_data;
584   if (di->conformant_run)
585     {
586       return offset;
587     }
588
589
590   if (parent_tree)
591     {
592       item =
593         proto_tree_add_text (parent_tree, tvb, offset, -1,
594                              "afsNameString_t:");
595       tree = proto_item_add_subtree (item, ett_fileexp_afsNameString_t);
596     }
597
598  offset =
599     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
600                         hf_fileexp_afsNameString_t_principalName_size,
601                         &string_size);
602       if (check_col (pinfo->cinfo, COL_INFO))
603         col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
604   if (string_size < AFS_NAMEMAX)
605     {
606 /* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
607
608       proto_tree_add_string (tree, hf_fileexp_afsNameString_t_principalName_string, tvb, offset, string_size, tvb_get_ptr (tvb, offset, string_size));
609       namestring = tvb_get_ptr (tvb, offset, string_size);
610       offset += string_size;
611       if (check_col (pinfo->cinfo, COL_INFO))
612         col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
613     }
614   else
615     {
616       if (check_col (pinfo->cinfo, COL_INFO))
617         col_append_fstr (pinfo->cinfo, COL_INFO,
618                          " :FIXME!: Invalid string length of  %u",
619                          string_size);
620     }
621
622   proto_item_set_len (item, offset - old_offset);
623   return offset;
624 }
625
626
627 static int
628 dissect_afsNetAddr (tvbuff_t * tvb, int offset,
629                     packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
630 {
631
632 /*                 unsigned16 type;
633                    unsigned8 data[14];
634 */
635
636   proto_item *item = NULL;
637   proto_tree *tree = NULL;
638   int old_offset = offset;
639   guint16 type;
640   guint8 data;
641   int i;
642   dcerpc_info *di;
643
644   di = pinfo->private_data;
645   if (di->conformant_run)
646     {
647       return offset;
648     }
649
650   if (parent_tree)
651     {
652       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
653                                   "afsNetAddr:");
654       tree = proto_item_add_subtree (item, ett_fileexp_afsNetAddr);
655     }
656
657
658   offset =
659     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
660                         hf_fileexp_afsNetAddr_type, &type);
661
662   if (type)
663     {
664       if (check_col (pinfo->cinfo, COL_INFO))
665         col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u ", type);
666
667
668       for (i = 0; i < 14; i++)
669         {
670
671           offset =
672             dissect_ndr_uint8 (tvb, offset, pinfo, tree, drep,
673                                hf_fileexp_afsNetAddr_data, &data);
674
675
676           switch (i)
677             {
678             case 1:
679               if (data)
680                 {
681                   if (check_col (pinfo->cinfo, COL_INFO))
682                     col_append_fstr (pinfo->cinfo, COL_INFO, " Port:%u",
683                                      data);
684                 }
685               break;
686             case 2:
687               if (check_col (pinfo->cinfo, COL_INFO))
688                 col_append_fstr (pinfo->cinfo, COL_INFO, " IP:%u.", data);
689               break;
690             case 3:
691               if (check_col (pinfo->cinfo, COL_INFO))
692                 col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
693               break;
694             case 4:
695               if (check_col (pinfo->cinfo, COL_INFO))
696                 col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
697               break;
698             case 5:
699               if (check_col (pinfo->cinfo, COL_INFO))
700                 col_append_fstr (pinfo->cinfo, COL_INFO, "%u", data);
701               break;
702             }
703
704         }
705
706     }
707   else
708     {
709
710       offset += 14;             /* space left after reading in type for the array. */
711     }
712
713
714   proto_item_set_len (item, offset - old_offset);
715   return offset;
716 }
717
718
719 static int
720 dissect_afsNetData (tvbuff_t * tvb, int offset,
721                     packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
722 {
723 /*
724         afsNetAddr sockAddr;
725         NameString_t principalName;
726 */
727   proto_item *item = NULL;
728   proto_tree *tree = NULL;
729   int old_offset = offset;
730   dcerpc_info *di;
731
732   di = pinfo->private_data;
733   if (di->conformant_run)
734     {
735       return offset;
736     }
737
738   if (parent_tree)
739     {
740       item =
741         proto_tree_add_text (parent_tree, tvb, offset, -1, "afsNetData:");
742       tree = proto_item_add_subtree (item, ett_fileexp_afsNetData);
743     }
744
745
746   offset = dissect_afsNetAddr ( tvb, offset, pinfo, tree, drep);
747   offset += 4; /* buffer */
748   offset = dissect_afsNameString_t ( tvb, offset, pinfo, tree, drep);
749
750    proto_item_set_len (item, offset - old_offset);
751   return offset;
752
753 }
754
755 static int
756 dissect_afsTaggedPath (tvbuff_t * tvb, int offset,
757                        packet_info * pinfo, proto_tree * parent_tree,
758                        guint8 *drep)
759 {
760
761 /*
762         codesetTag      tp_tag;
763         unsigned16      tp_length;
764         byte            tp_chars[AFS_PATHMAX+1]; 1024+1
765 */
766
767   proto_item *item = NULL;
768   proto_tree *tree = NULL;
769   int old_offset = offset;
770   guint32 tp_tag;
771   guint16 tp_length;
772   const guint8 *tp_chars;
773   dcerpc_info *di;
774
775   di = pinfo->private_data;
776   if (di->conformant_run)
777     {
778       return offset;
779     }
780
781
782   if (parent_tree)
783     {
784       item =
785         proto_tree_add_text (parent_tree, tvb, offset, -1, "afsTaggedPath");
786       tree = proto_item_add_subtree (item, ett_fileexp_afsTaggedPath);
787     }
788
789
790   offset =
791     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
792                         hf_fileexp_afsTaggedPath_tp_tag, &tp_tag);
793   offset =
794     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
795                         hf_fileexp_afsTaggedPath_tp_length, &tp_length);
796   proto_tree_add_string (tree, hf_fileexp_afsTaggedPath_tp_chars, tvb, offset,
797                          hf_fileexp_afsTaggedPath_tp_length, tvb_get_ptr (tvb,
798                                                                           offset,
799                                                                           tp_length));
800   tp_chars = tvb_get_ptr (tvb, offset, 1025);
801   offset += 1025;
802   if (check_col (pinfo->cinfo, COL_INFO))
803     col_append_fstr (pinfo->cinfo, COL_INFO, " :tp_chars %s", tp_chars);
804
805
806   proto_item_set_len (item, offset - old_offset);
807   return offset;
808 }
809
810 static int
811 dissect_afsAcl (tvbuff_t * tvb, int offset,
812                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
813 {
814 /*
815         unsigned32 afsACL_len;
816         [length_is(afsACL_len)] byte afsACL_val[AFS_ACLMAX];
817 */
818
819
820
821   proto_item *item = NULL;
822   proto_tree *tree = NULL;
823   int old_offset = offset;
824   guint32 acl_len;
825   e_uuid_t uuid1, defaultcell;
826   dcerpc_info *di;
827
828   di = pinfo->private_data;
829   if (di->conformant_run)
830     {
831       return offset;
832     }
833
834
835
836   if (parent_tree)
837     {
838       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "afsAcl");
839       tree = proto_item_add_subtree (item, ett_fileexp_afsAcl);
840     }
841
842
843   offset =
844     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_acl_len,
845                         &acl_len);
846   offset += 8;                  /* bypass spare and duplicate acl_len */
847   offset =
848     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
849                         hf_fileexp_afsacl_uuid1, &uuid1);
850   if (check_col (pinfo->cinfo, COL_INFO))
851     col_append_fstr (pinfo->cinfo, COL_INFO,
852                      " - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
853                      uuid1.Data1, uuid1.Data2, uuid1.Data3, uuid1.Data4[0],
854                      uuid1.Data4[1], uuid1.Data4[2], uuid1.Data4[3],
855                      uuid1.Data4[4], uuid1.Data4[5], uuid1.Data4[6],
856                      uuid1.Data4[7]);
857
858   offset =
859     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
860                         hf_fileexp_afsacl_defaultcell_uuid, &defaultcell);
861   if (check_col (pinfo->cinfo, COL_INFO))
862     col_append_fstr (pinfo->cinfo, COL_INFO,
863                      "  %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
864                      defaultcell.Data1, defaultcell.Data2, defaultcell.Data3,
865                      defaultcell.Data4[0], defaultcell.Data4[1],
866                      defaultcell.Data4[2], defaultcell.Data4[3],
867                      defaultcell.Data4[4], defaultcell.Data4[5],
868                      defaultcell.Data4[6], defaultcell.Data4[7]);
869
870   offset += (acl_len - 38);
871
872   if (offset <= old_offset)
873     THROW(ReportedBoundsError);
874
875   proto_item_set_len(item, offset-old_offset);
876   return offset;
877 }
878
879
880 static int
881 dissect_afsErrorStatus (tvbuff_t * tvb, int offset,
882                         packet_info * pinfo, proto_tree * parent_tree,
883                         guint8 *drep)
884 {
885   proto_item *item = NULL;
886   proto_tree *tree = NULL;
887   int old_offset = offset;
888   guint32 st;
889   dcerpc_info *di;
890   const char *st_str;
891
892   di = pinfo->private_data;
893   if (di->conformant_run)
894     {
895       return offset;
896     }
897
898   if (parent_tree)
899     {
900       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
901                                   "afsErrorStatus");
902       tree = proto_item_add_subtree (item, ett_fileexp_afsErrorStatus);
903     }
904
905   offset =
906     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_afserrorstatus_st,
907                         &st);
908   st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
909
910   if (check_col (pinfo->cinfo, COL_INFO))
911     col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
912
913   proto_item_set_len (item, offset - old_offset);
914   return offset;
915 }
916
917 static int
918 dissect_afsRecordLock (tvbuff_t * tvb, int offset,
919                        packet_info * pinfo, proto_tree * parent_tree,
920                        guint8 *drep)
921 {
922 /*
923         signed16     l_type;
924         signed16     l_whence;
925         unsigned32   l_start_pos;
926         unsigned32   l_end_pos;
927         unsigned32   l_pid;
928         unsigned32   l_sysid;
929         unsigned32   l_fstype;
930         unsigned32   l_start_pos_ext; was l_spare0: high 32b of l_start_pos
931         unsigned32   l_end_pos_ext; was l_spare1: high 32b of l_end_pos
932 */
933
934   proto_item *item = NULL;
935   proto_tree *tree = NULL;
936   int old_offset = offset;
937   guint16 l_type, l_whence;
938   guint32 l_start_pos, l_end_pos, l_pid, l_sysid, l_fstype, l_start_pos_ext,
939     l_end_pos_ext;
940   dcerpc_info *di;
941
942   di = pinfo->private_data;
943   if (di->conformant_run)
944     {
945       return offset;
946     }
947
948   if (parent_tree)
949     {
950       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
951                                   "afsRecordLock:");
952       tree = proto_item_add_subtree (item, ett_fileexp_afsRecordLock);
953     }
954
955   offset =
956     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_type,
957                         &l_type);
958   offset =
959     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_whence,
960                         &l_whence);
961   offset =
962     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
963                         hf_fileexp_l_start_pos, &l_start_pos);
964   offset =
965     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_end_pos,
966                         &l_end_pos);
967   offset =
968     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_pid,
969                         &l_pid);
970   offset =
971     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_sysid,
972                         &l_sysid);
973   offset =
974     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_l_fstype,
975                         &l_fstype);
976   offset =
977     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
978                         hf_fileexp_l_start_pos_ext, &l_start_pos_ext);
979   offset =
980     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
981                         hf_fileexp_l_end_pos_ext, &l_end_pos_ext);
982
983
984   proto_item_set_len (item, offset - old_offset);
985   return offset;
986 }
987
988 static int
989 dissect_afsstorestatus (tvbuff_t * tvb, int offset,
990                         packet_info * pinfo, proto_tree * parent_tree,
991                         guint8 *drep)
992 {
993 /*
994         unsigned32              mask;
995         afsTimeval              modTime;
996         afsTimeval              accessTime;
997         afsTimeval              changeTime;
998         unsigned32              owner;
999         unsigned32              group;
1000         unsigned32              mode;
1001         afsHyper                truncLength;     applied first
1002         afsHyper                length;
1003         afsUUID                 typeUUID;
1004         unsigned32              deviceType;      character or block
1005         unsigned32              deviceNumber;
1006         unsigned32              cmask;
1007         unsigned32              clientSpare1;    client-only attrs
1008         unsigned32              deviceNumberHighBits;
1009         unsigned32              spare1;
1010         unsigned32              spare2;
1011         unsigned32              spare3;
1012         unsigned32              spare4;
1013         unsigned32              spare5;
1014         unsigned32              spare6;
1015 */
1016
1017   proto_item *item = NULL;
1018   proto_tree *tree = NULL;
1019   int old_offset = offset;
1020   guint32 mask, modtime_sec, changetime_sec, accesstime_sec, devicenumber,
1021     clientspare1, devicenumberhighbits, spare1, spare2, spare3, spare4,
1022     spare5, spare6, accesstime_usec, changetime_usec, owner, group, mode,
1023     trunc_high, trunc_low, length_high, length_low, devicetype,
1024     cmask, modtime_usec;
1025   e_uuid_t typeuuid;
1026   dcerpc_info *di;
1027
1028   di = pinfo->private_data;
1029   if (di->conformant_run)
1030     {
1031       return offset;
1032     }
1033
1034
1035   if (parent_tree)
1036     {
1037       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1038                                   "afsStoreStatus:");
1039       tree = proto_item_add_subtree (item, ett_fileexp_afsstorestatus);
1040     }
1041
1042   offset =
1043     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1044                         hf_fileexp_storestatus_mask, &mask);
1045   offset =
1046     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1047                         hf_fileexp_storestatus_modtime_sec, &modtime_sec);
1048   offset =
1049     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1050                         hf_fileexp_storestatus_modtime_usec, &modtime_usec);
1051   offset =
1052     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1053                         hf_fileexp_storestatus_accesstime_sec,
1054                         &accesstime_sec);
1055   offset =
1056     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1057                         hf_fileexp_storestatus_accesstime_usec,
1058                         &accesstime_usec);
1059   offset =
1060     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1061                         hf_fileexp_storestatus_changetime_sec,
1062                         &changetime_sec);
1063   offset =
1064     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1065                         hf_fileexp_storestatus_changetime_usec,
1066                         &changetime_usec);
1067   offset =
1068     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1069                         hf_fileexp_storestatus_owner, &owner);
1070   offset =
1071     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1072                         hf_fileexp_storestatus_group, &group);
1073   offset =
1074     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1075                         hf_fileexp_storestatus_mode, &mode);
1076   offset =
1077     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1078                         hf_fileexp_storestatus_trunc_high, &trunc_high);
1079   offset =
1080     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1081                         hf_fileexp_storestatus_trunc_low, &trunc_low);
1082   offset =
1083     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1084                         hf_fileexp_storestatus_length_high, &length_high);
1085   offset =
1086     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1087                         hf_fileexp_storestatus_length_low, &length_low);
1088   offset =
1089     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
1090                         hf_fileexp_storestatus_typeuuid, &typeuuid);
1091   offset =
1092     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1093                         hf_fileexp_storestatus_devicetype, &devicetype);
1094   offset =
1095     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1096                         hf_fileexp_storestatus_devicenumber, &devicenumber);
1097   offset =
1098     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1099                         hf_fileexp_storestatus_cmask, &cmask);
1100   offset =
1101     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1102                         hf_fileexp_storestatus_clientspare1, &clientspare1);
1103   offset =
1104     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1105                         hf_fileexp_storestatus_devicenumberhighbits,
1106                         &devicenumberhighbits);
1107   offset =
1108     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1109                         hf_fileexp_storestatus_spare1, &spare1);
1110   offset =
1111     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1112                         hf_fileexp_storestatus_spare2, &spare2);
1113   offset =
1114     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1115                         hf_fileexp_storestatus_spare3, &spare3);
1116   offset =
1117     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1118                         hf_fileexp_storestatus_spare4, &spare4);
1119   offset =
1120     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1121                         hf_fileexp_storestatus_spare5, &spare5);
1122   offset =
1123     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1124                         hf_fileexp_storestatus_spare6, &spare6);
1125
1126   col_append_str (pinfo->cinfo, COL_INFO, " Mask=");
1127   if ((mask & AFS_SETMODTIME) == AFS_SETMODTIME)
1128     {
1129       if (check_col (pinfo->cinfo, COL_INFO))
1130         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETMODTIME-%u.%u",
1131                          modtime_sec, modtime_usec);
1132     }
1133   if ((mask & AFS_SETOWNER) == AFS_SETOWNER)
1134     {
1135       if (check_col (pinfo->cinfo, COL_INFO))
1136         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETOWNER-%u", owner);
1137     }
1138   if ((mask & AFS_SETGROUP) == AFS_SETGROUP)
1139     {
1140       if (check_col (pinfo->cinfo, COL_INFO))
1141         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETGROUP-%u", group);
1142     }
1143   if ((mask & AFS_SETMODE) == AFS_SETMODE)
1144     {
1145       if (check_col (pinfo->cinfo, COL_INFO))
1146         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETMODE-%o", mode);
1147     }
1148   if ((mask & AFS_SETACCESSTIME) == AFS_SETACCESSTIME)
1149     {
1150       if (check_col (pinfo->cinfo, COL_INFO))
1151         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETACCESSTIME-%u.%u",
1152                          accesstime_sec, accesstime_usec);
1153     }
1154   if ((mask & AFS_SETCHANGETIME) == AFS_SETCHANGETIME)
1155     {
1156       if (check_col (pinfo->cinfo, COL_INFO))
1157         col_append_fstr (pinfo->cinfo, COL_INFO, ":SETCHANGETIME-%u.%u",
1158                          changetime_sec, changetime_usec);
1159     }
1160   if ((mask & AFS_SETLENGTH) == AFS_SETLENGTH)
1161     {
1162       col_append_str (pinfo->cinfo, COL_INFO, ":SETLENGTH");
1163     }
1164   if ((mask & AFS_SETTYPEUUID) == AFS_SETTYPEUUID)
1165     {
1166       col_append_str (pinfo->cinfo, COL_INFO, ":SETTYPEUUID");
1167     }
1168   if ((mask & AFS_SETDEVNUM) == AFS_SETDEVNUM)
1169     {
1170       col_append_str (pinfo->cinfo, COL_INFO, ":SETDEVNUM");
1171     }
1172   if ((mask & AFS_SETMODEXACT) == AFS_SETMODEXACT)
1173     {
1174       col_append_str (pinfo->cinfo, COL_INFO, ":SETMODEXACT");
1175     }
1176   if ((mask & AFS_SETTRUNCLENGTH) == AFS_SETTRUNCLENGTH)
1177     {
1178       col_append_str (pinfo->cinfo, COL_INFO, ":SETTRUNCLENGTH");
1179     }
1180   if ((mask & AFS_SETCLIENTSPARE) == AFS_SETCLIENTSPARE)
1181     {
1182       col_append_str (pinfo->cinfo, COL_INFO, ":SETCLIENTSPARE");
1183     }
1184
1185   proto_item_set_len (item, offset - old_offset);
1186   return offset;
1187 }
1188
1189 static int
1190 dissect_afstoken (tvbuff_t * tvb, int offset,
1191                   packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1192 {
1193 /*
1194         afsHyper tokenID;
1195         unsigned32 expirationTime;
1196         afsHyper type;
1197         unsigned32 beginRange;
1198         unsigned32 endRange;
1199         unsigned32 beginRangeExt;
1200         unsigned32 endRangeExt;
1201 */
1202
1203   proto_item *item = NULL;
1204   proto_tree *tree = NULL;
1205   int old_offset = offset;
1206   guint32 tokenid_hi, tokenid_low, expirationtime, type_hi, type_low,
1207     beginrange, endrange, beginrangeext, endrangeext, type;
1208   dcerpc_info *di;
1209
1210   di = pinfo->private_data;
1211   if (di->conformant_run)
1212     {
1213       return offset;
1214     }
1215
1216
1217   if (parent_tree)
1218     {
1219       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "afsToken:");
1220       tree = proto_item_add_subtree (item, ett_fileexp_afstoken);
1221     }
1222
1223   offset =
1224     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_tokenid_hi,
1225                         &tokenid_hi);
1226   offset =
1227     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1228                         hf_fileexp_tokenid_low, &tokenid_low);
1229   offset =
1230     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1231                         hf_fileexp_expirationtime, &expirationtime);
1232   offset =
1233     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_type_hi,
1234                         &type_hi);
1235   offset =
1236     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_type_low,
1237                         &type_low);
1238   offset =
1239     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_beginrange,
1240                         &beginrange);
1241   offset =
1242     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_endrange,
1243                         &endrange);
1244   offset =
1245     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1246                         hf_fileexp_beginrangeext, &beginrangeext);
1247   offset =
1248     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1249                         hf_fileexp_endrangeext, &endrangeext);
1250   if (check_col (pinfo->cinfo, COL_INFO))
1251     col_append_fstr (pinfo->cinfo, COL_INFO,
1252                      "  :Tokenid:%u/%u ExpirationTime:%u beginrange:%u endrange:%u beginrangeext:%u endrangeext:%u",
1253                      tokenid_hi, tokenid_low, expirationtime, beginrange,
1254                      endrange, beginrangeext, endrangeext);
1255   type = type_low;
1256
1257   col_append_str (pinfo->cinfo, COL_INFO, " Type=");
1258
1259   if ((type & TKN_LOCK_READ) == TKN_LOCK_READ)
1260     {
1261       col_append_str (pinfo->cinfo, COL_INFO, ":LOCK_READ");
1262     }
1263   if ((type & TKN_LOCK_WRITE) == TKN_LOCK_WRITE)
1264     {
1265       col_append_str (pinfo->cinfo, COL_INFO, ":LOCK_WRITE");
1266     }
1267   if ((type & TKN_DATA_READ) == TKN_DATA_READ)
1268     {
1269       col_append_str (pinfo->cinfo, COL_INFO, ":DATA_READ");
1270     }
1271   if ((type & TKN_DATA_WRITE) == TKN_DATA_WRITE)
1272     {
1273       col_append_str (pinfo->cinfo, COL_INFO, ":DATA_WRITE");
1274     }
1275   if ((type & TKN_OPEN_READ) == TKN_OPEN_READ)
1276     {
1277       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_READ");
1278     }
1279   if ((type & TKN_OPEN_WRITE) == TKN_OPEN_WRITE)
1280     {
1281       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_WRITE");
1282     }
1283   if ((type & TKN_OPEN_SHARED) == TKN_OPEN_SHARED)
1284     {
1285       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_SHARED");
1286     }
1287   if ((type & TKN_OPEN_EXCLUSIVE) == TKN_OPEN_EXCLUSIVE)
1288     {
1289       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_EXCLUSIVE");
1290     }
1291   if ((type & TKN_OPEN_DELETE) == TKN_OPEN_DELETE)
1292     {
1293       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_DELETE");
1294     }
1295   if ((type & TKN_OPEN_PRESERVE) == TKN_OPEN_PRESERVE)
1296     {
1297       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_PRESERVE");
1298     }
1299   if ((type & TKN_STATUS_READ) == TKN_STATUS_READ)
1300     {
1301       col_append_str (pinfo->cinfo, COL_INFO, ":STATUS_READ");
1302     }
1303   if ((type & TKN_STATUS_WRITE) == TKN_STATUS_WRITE)
1304     {
1305       col_append_str (pinfo->cinfo, COL_INFO, ":STATUS_WRITE");
1306     }
1307   if ((type & TKN_OPEN_UNLINK) == TKN_OPEN_UNLINK)
1308     {
1309       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_UNLINK");
1310     }
1311   if ((type & TKN_SPOT_HERE) == TKN_SPOT_HERE)
1312     {
1313       col_append_str (pinfo->cinfo, COL_INFO, ":SPOT_HERE");
1314     }
1315   if ((type & TKN_SPOT_THERE) == TKN_SPOT_THERE)
1316     {
1317       col_append_str (pinfo->cinfo, COL_INFO, ":SPOT_THERE");
1318     }
1319   if ((type & TKN_OPEN_NO_READ) == TKN_OPEN_NO_READ)
1320     {
1321       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_NO_READ");
1322     }
1323   if ((type & TKN_OPEN_NO_WRITE) == TKN_OPEN_NO_WRITE)
1324     {
1325       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_NO_WRITE");
1326     }
1327   if ((type & TKN_OPEN_NO_UNLINK) == TKN_OPEN_NO_UNLINK)
1328     {
1329       col_append_str (pinfo->cinfo, COL_INFO, ":OPEN_NO_UNLINK");
1330     }
1331
1332   proto_item_set_len (item, offset - old_offset);
1333   return offset;
1334 }
1335
1336 static int
1337 dissect_afstaggedname (tvbuff_t * tvb, int offset,
1338                        packet_info * pinfo, proto_tree * parent_tree,
1339                        guint8 *drep)
1340 {
1341
1342 /*
1343         codesetTag      tn_tag;
1344         unsigned16      tn_length;
1345         byte            tn_chars[AFS_NAMEMAX+1];
1346 */
1347
1348   proto_item *item = NULL;
1349   proto_tree *tree = NULL;
1350   int old_offset = offset;
1351   guint32 tn_tag;
1352   guint16 tn_length;
1353   const guint8 *tn_string;
1354   dcerpc_info *di;
1355
1356   di = pinfo->private_data;
1357   if (di->conformant_run)
1358     {
1359       return offset;
1360     }
1361
1362
1363   if (parent_tree)
1364     {
1365       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1366                                   "afsTaggedName:");
1367       tree = proto_item_add_subtree (item, ett_fileexp_afstaggedname);
1368     }
1369
1370   offset =
1371     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_tn_tag,
1372                         &tn_tag);
1373   offset =
1374     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_fileexp_tn_length,
1375                         &tn_length);
1376   if (tn_length < 254)
1377     {
1378       proto_tree_add_string (tree, hf_fileexp_tn_string, tvb, offset,
1379                              hf_fileexp_tn_size, tvb_get_ptr (tvb, offset,
1380                                                               tn_length));
1381       tn_string = tvb_get_ptr (tvb, offset, 257);
1382       offset += 257;
1383       if (check_col (pinfo->cinfo, COL_INFO))
1384         col_append_fstr (pinfo->cinfo, COL_INFO, " :tn_tag: %s", tn_string);
1385     }
1386   else
1387     {
1388       if (check_col (pinfo->cinfo, COL_INFO))
1389         col_append_fstr (pinfo->cinfo, COL_INFO,
1390                          " :FIXME!: Invalid string length of  %u", tn_length);
1391     }
1392
1393   proto_item_set_len (item, offset - old_offset);
1394   return offset;
1395 }
1396
1397 static int
1398 dissect_afsfidtaggedname (tvbuff_t * tvb, int offset,
1399                           packet_info * pinfo, proto_tree * parent_tree,
1400                           guint8 *drep)
1401 {
1402 /*
1403         afsFid fid;
1404         afsTaggedName name;
1405 */
1406
1407   proto_item *item = NULL;
1408   proto_tree *tree = NULL;
1409   int old_offset = offset;
1410   dcerpc_info *di;
1411
1412   di = pinfo->private_data;
1413   if (di->conformant_run)
1414     {
1415       return offset;
1416     }
1417
1418
1419   if (parent_tree)
1420     {
1421       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1422                                   "FidTaggedName:");
1423       tree = proto_item_add_subtree (item, ett_fileexp_afsfidtaggedname);
1424     }
1425   offset = dissect_afsFid (tvb, offset, pinfo, tree, drep);
1426   offset = dissect_afstaggedname (tvb, offset, pinfo, tree, drep);
1427
1428   proto_item_set_len (item, offset - old_offset);
1429   return offset;
1430
1431 }
1432
1433 static int
1434 dissect_minvvp (tvbuff_t * tvb, int offset,
1435                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1436 {
1437
1438 /* unsigned32 minvvp_high
1439    unsigned32 minvvp_low
1440 */
1441
1442   proto_item *item = NULL;
1443   proto_tree *tree = NULL;
1444   int old_offset = offset;
1445   guint32 minvvp_high, minvvp_low;
1446   dcerpc_info *di;
1447
1448   di = pinfo->private_data;
1449   if (di->conformant_run)
1450     {
1451       return offset;
1452     }
1453
1454
1455   if (parent_tree)
1456     {
1457       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "minVVp:");
1458       tree = proto_item_add_subtree (item, ett_fileexp_minvvp);
1459     }
1460   offset =
1461     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1462                         hf_fileexp_minvvp_high, &minvvp_high);
1463   offset =
1464     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_minvvp_low,
1465                         &minvvp_low);
1466
1467   if (check_col (pinfo->cinfo, COL_INFO))
1468     col_append_fstr (pinfo->cinfo, COL_INFO, " minVVp:%u/%u", minvvp_high,
1469                      minvvp_low);
1470
1471
1472   proto_item_set_len (item, offset - old_offset);
1473   return offset;
1474 }
1475
1476
1477 static int
1478 dissect_afsuuid (tvbuff_t * tvb, int offset,
1479                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1480 {
1481
1482 /* uuid  UUID
1483 */
1484 /*HEREN*/
1485
1486   e_uuid_t uuid1;
1487
1488   proto_item *item = NULL;
1489   proto_tree *tree = NULL;
1490   int old_offset = offset;
1491   dcerpc_info *di;
1492
1493   di = pinfo->private_data;
1494   if (di->conformant_run)
1495     {
1496       return offset;
1497     }
1498
1499
1500   if (parent_tree)
1501     {
1502       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "afsUUID:");
1503       tree = proto_item_add_subtree (item, ett_fileexp_afsuuid);
1504     }
1505
1506   offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_fileexp_afsuuid_uuid, &uuid1);
1507
1508
1509 if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, ":%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid1.Data1, uuid1.Data2, uuid1.Data3, uuid1.Data4[0], uuid1.Data4[1], uuid1.Data4[2], uuid1.Data4[3], uuid1.Data4[4], uuid1.Data4[5], uuid1.Data4[6], uuid1.Data4[7]);
1510
1511   proto_item_set_len (item, offset - old_offset);
1512   return offset;
1513 }
1514
1515
1516 static int
1517 dissect_offsetp (tvbuff_t * tvb, int offset,
1518                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1519 {
1520
1521 /* unsigned32 offsetp_high
1522    unsigned32 offsetp_low
1523 */
1524
1525   proto_item *item = NULL;
1526   proto_tree *tree = NULL;
1527   int old_offset = offset;
1528   guint32 offsetp_high, offsetp_low;
1529   dcerpc_info *di;
1530
1531   di = pinfo->private_data;
1532   if (di->conformant_run)
1533     {
1534       return offset;
1535     }
1536
1537
1538   if (parent_tree)
1539     {
1540       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "minVVp:");
1541       tree = proto_item_add_subtree (item, ett_fileexp_offsetp);
1542     }
1543   offset =
1544     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1545                         hf_fileexp_offsetp_high, &offsetp_high);
1546   offset =
1547     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_offsetp_low,
1548                         &offsetp_low);
1549
1550   if (check_col (pinfo->cinfo, COL_INFO))
1551     col_append_fstr (pinfo->cinfo, COL_INFO, " offsetp:%u/%u", offsetp_high,
1552                      offsetp_low);
1553
1554
1555   proto_item_set_len (item, offset - old_offset);
1556   return offset;
1557 }
1558
1559
1560 static int
1561 dissect_returntokenidp (tvbuff_t * tvb, int offset,
1562                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1563 {
1564
1565 /* unsigned32 returntokenidp_high
1566    unsigned32 returntokenidp_low
1567 */
1568
1569   proto_item *item = NULL;
1570   proto_tree *tree = NULL;
1571   int old_offset = offset;
1572   guint32 returntokenidp_high, returntokenidp_low;
1573   dcerpc_info *di;
1574
1575   di = pinfo->private_data;
1576   if (di->conformant_run)
1577     {
1578       return offset;
1579     }
1580
1581
1582   if (parent_tree)
1583     {
1584       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "returnTokenIDp:");
1585       tree = proto_item_add_subtree (item, ett_fileexp_returntokenidp);
1586     }
1587   offset =
1588     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1589                         hf_fileexp_returntokenidp_high, &returntokenidp_high);
1590   offset =
1591     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_returntokenidp_low,
1592                         &returntokenidp_low);
1593
1594   if (check_col (pinfo->cinfo, COL_INFO))
1595     col_append_fstr (pinfo->cinfo, COL_INFO, " returnTokenIDp:%u/%u", returntokenidp_high,
1596                      returntokenidp_low);
1597
1598
1599   proto_item_set_len (item, offset - old_offset);
1600   return offset;
1601 }
1602
1603
1604 static int
1605 dissect_volsync (tvbuff_t * tvb, int offset,
1606                  packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1607 {
1608 /*
1609         afsHyper VolID;
1610         afsHyper VV;             volume's version
1611         unsigned32 VVAge;        age, in seconds, of the knowledge that the
1612                                         given VolVers is current
1613         unsigned32 VVPingAge; age, in seconds, of the last probe from
1614                                    the callee (the secondary) to the primary
1615         unsigned32 vv_spare1;
1616         unsigned32 vv_spare2;
1617 */
1618
1619   proto_item *item = NULL;
1620   proto_tree *tree = NULL;
1621   int old_offset = offset;
1622   guint32 volid_hi, volid_low, vv_hi, vv_low, vvage, vvpingage, vvspare1,
1623     vvspare2;
1624   dcerpc_info *di;
1625
1626   di = pinfo->private_data;
1627   if (di->conformant_run)
1628     {
1629       return offset;
1630     }
1631
1632
1633   if (parent_tree)
1634     {
1635       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1636                                   "AfsVolSync:");
1637       tree = proto_item_add_subtree (item, ett_fileexp_volsync);
1638     }
1639
1640   offset =
1641     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_volid_hi,
1642                         &volid_hi);
1643   offset =
1644     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_volid_low,
1645                         &volid_low);
1646   offset =
1647     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vv_hi,
1648                         &vv_hi);
1649   offset =
1650     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vv_low,
1651                         &vv_low);
1652   offset =
1653     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vvage,
1654                         &vvage);
1655   offset =
1656     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vvpingage,
1657                         &vvpingage);
1658   offset =
1659     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vvspare1,
1660                         &vvspare1);
1661   offset =
1662     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_vvspare2,
1663                         &vvspare2);
1664
1665   if (check_col (pinfo->cinfo, COL_INFO))
1666     col_append_fstr (pinfo->cinfo, COL_INFO,
1667                      " volid_hi:%u volid_low:%u vv_hi:%u vv_low:%u vvage:%u vvpingage:%u vvpspare1:%u vvspare2:%u",
1668                      volid_hi, volid_low, vv_hi, vv_low, vvage, vvpingage,
1669                      vvspare1, vvspare2);
1670
1671
1672   proto_item_set_len (item, offset - old_offset);
1673   return offset;
1674
1675 }
1676
1677 static int
1678 dissect_afsFlags (tvbuff_t * tvb, int offset,
1679                   packet_info * pinfo, proto_tree * parent_tree, guint8 *drep)
1680 {
1681
1682
1683 /*
1684   unsigned32 flags
1685 */
1686
1687   proto_item *item = NULL;
1688   proto_tree *tree = NULL;
1689   int old_offset = offset;
1690   guint32 flags;
1691   dcerpc_info *di;
1692
1693   di = pinfo->private_data;
1694   if (di->conformant_run)
1695     {
1696       return offset;
1697     }
1698
1699
1700   if (parent_tree)
1701     {
1702       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "AfsFlags:");
1703       tree = proto_item_add_subtree (item, ett_fileexp_afsflags);
1704     }
1705
1706   offset =
1707     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_flags,
1708                         &flags);
1709
1710   if (flags)
1711     {
1712       col_append_str (pinfo->cinfo, COL_INFO, " Flags=");
1713       if ((flags & AFS_FLAG_RETURNTOKEN) == AFS_FLAG_RETURNTOKEN)
1714         {
1715           col_append_str (pinfo->cinfo, COL_INFO, ":RETURNTOKEN");
1716         }
1717       if ((flags & AFS_FLAG_TOKENJUMPQUEUE) == AFS_FLAG_TOKENJUMPQUEUE)
1718         {
1719           col_append_str (pinfo->cinfo, COL_INFO, ":TOKENJUMPQUEUE");
1720         }
1721       if ((flags & AFS_FLAG_SKIPTOKEN) == AFS_FLAG_SKIPTOKEN)
1722         {
1723           col_append_str (pinfo->cinfo, COL_INFO, ":SKIPTOKEN");
1724         }
1725       if ((flags & AFS_FLAG_NOOPTIMISM) == AFS_FLAG_NOOPTIMISM)
1726         {
1727           col_append_str (pinfo->cinfo, COL_INFO, ":NOOPTIMISM");
1728         }
1729       if ((flags & AFS_FLAG_TOKENID) == AFS_FLAG_TOKENID)
1730         {
1731           col_append_str (pinfo->cinfo, COL_INFO, ":TOKENID");
1732         }
1733       if ((flags & AFS_FLAG_RETURNBLOCKER) == AFS_FLAG_RETURNBLOCKER)
1734         {
1735           col_append_str (pinfo->cinfo, COL_INFO, ":RETURNBLOCKER");
1736         }
1737       if ((flags & AFS_FLAG_ASYNCGRANT) == AFS_FLAG_ASYNCGRANT)
1738         {
1739           col_append_str (pinfo->cinfo, COL_INFO, ":ASYNCGRANT");
1740         }
1741       if ((flags & AFS_FLAG_NOREVOKE) == AFS_FLAG_NOREVOKE)
1742         {
1743           col_append_str (pinfo->cinfo, COL_INFO, ":NOREVOKE");
1744         }
1745       if ((flags & AFS_FLAG_MOVE_REESTABLISH) == AFS_FLAG_MOVE_REESTABLISH)
1746         {
1747           col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_REESTABLISH");
1748         }
1749       if ((flags & AFS_FLAG_SERVER_REESTABLISH) ==
1750           AFS_FLAG_SERVER_REESTABLISH)
1751         {
1752           col_append_str (pinfo->cinfo, COL_INFO, ":SERVER_REESTABLISH");
1753         }
1754       if ((flags & AFS_FLAG_NO_NEW_EPOCH) == AFS_FLAG_NO_NEW_EPOCH)
1755         {
1756           col_append_str (pinfo->cinfo, COL_INFO, ":NO_NEW_EPOCH");
1757         }
1758       if ((flags & AFS_FLAG_MOVE_SOURCE_OK) == AFS_FLAG_MOVE_SOURCE_OK)
1759         {
1760           col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_SOURCE_OK");
1761         }
1762       if ((flags & AFS_FLAG_SYNC) == AFS_FLAG_SYNC)
1763         {
1764           col_append_str (pinfo->cinfo, COL_INFO, ":SYNC");
1765         }
1766       if ((flags & AFS_FLAG_ZERO) == AFS_FLAG_ZERO)
1767         {
1768           col_append_str (pinfo->cinfo, COL_INFO, ":ZERO");
1769         }
1770       if ((flags & AFS_FLAG_SKIPSTATUS) == AFS_FLAG_SKIPSTATUS)
1771         {
1772           col_append_str (pinfo->cinfo, COL_INFO, ":SKIPSTATUS");
1773         }
1774       if ((flags & AFS_FLAG_FORCEREVOCATIONS) == AFS_FLAG_FORCEREVOCATIONS)
1775         {
1776           col_append_str (pinfo->cinfo, COL_INFO, ":FORCEREVOCATIONS");
1777         }
1778       if ((flags & AFS_FLAG_FORCEVOLQUIESCE) == AFS_FLAG_FORCEVOLQUIESCE)
1779         {
1780           col_append_str (pinfo->cinfo, COL_INFO, ":FORCEVOLQUIESCE");
1781         }
1782       if ((flags & AFS_FLAG_SEC_SERVICE) == AFS_FLAG_SEC_SERVICE)
1783         {
1784           col_append_str (pinfo->cinfo, COL_INFO, ":SEC_SERVICE");
1785         }
1786       if ((flags & AFS_FLAG_CONTEXT_NEW_ACL_IF) ==
1787           AFS_FLAG_CONTEXT_NEW_ACL_IF)
1788         {
1789           col_append_str (pinfo->cinfo, COL_INFO, ":CONTEXT_NEW_ACL_IF");
1790         }
1791     }
1792
1793
1794   proto_item_set_len (item, offset - old_offset);
1795   return offset;
1796 }
1797
1798 static int
1799 dissect_fetchstatus (tvbuff_t * tvb, int offset,
1800                      packet_info * pinfo, proto_tree * parent_tree,
1801                      guint8 *drep)
1802 {
1803
1804 /*
1805         unsigned32              interfaceVersion;
1806         unsigned32              fileType;
1807         unsigned32              linkCount;
1808         afsHyper                length;
1809         afsHyper                dataVersion;
1810         unsigned32              author;
1811         unsigned32              owner;
1812         unsigned32              group;
1813         unsigned32              callerAccess;
1814         unsigned32              anonymousAccess;
1815         unsigned32              aclExpirationTime;
1816         unsigned32              mode;
1817         unsigned32              parentVnode;
1818         unsigned32              parentUnique;
1819         afsTimeval              modTime;
1820         afsTimeval              changeTime;
1821         afsTimeval              accessTime;
1822         afsTimeval              serverModTime;
1823         afsUUID                 typeUUID;
1824         afsUUID                 objectUUID;
1825         unsigned32              deviceNumber;
1826         unsigned32              blocksUsed;
1827         unsigned32              clientSpare1;   * client-only attrs *
1828         unsigned32              deviceNumberHighBits;
1829         unsigned32              spare0;
1830         unsigned32              spare1;
1831         unsigned32              spare2;
1832         unsigned32              spare3;
1833         unsigned32              spare4;
1834         unsigned32              spare5;
1835         unsigned32              spare6;
1836 */
1837   proto_item *item = NULL;
1838   proto_tree *tree = NULL;
1839   int old_offset = offset;
1840   guint32 interfaceversion, filetype, linkcount, length_high, length_low,
1841     dataversion_high, dataversion_low, author, owner, group, calleraccess,
1842     anonymousaccess, aclexpirationtime, mode, parentvnode, parentunique,
1843     modtime_sec, modtime_msec, changetime_sec, changetime_msec,
1844     accesstime_sec, accesstime_msec, servermodtime_msec, servermodtime_sec,
1845     devicenumber, blocksused, clientspare1, devicenumberhighbits,
1846     agtypeunique, himaxspare, lomaxspare, pathconfspare, spare4, spare5,
1847     spare6;
1848   e_uuid_t typeuuid, objectuuid;
1849   dcerpc_info *di;
1850
1851   di = pinfo->private_data;
1852   if (di->conformant_run)
1853     {
1854       return offset;
1855     }
1856
1857
1858
1859   if (parent_tree)
1860     {
1861       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
1862                                   "FetchStatus:");
1863       tree = proto_item_add_subtree (item, ett_fileexp_fetchstatus);
1864     }
1865
1866   offset =
1867     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1868                         hf_fileexp_interfaceversion, &interfaceversion);
1869   offset =
1870     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_filetype,
1871                         &filetype);
1872   offset =
1873     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_linkcount,
1874                         &linkcount);
1875   offset =
1876     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1877                         hf_fileexp_length_high, &length_high);
1878   offset =
1879     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_length_low,
1880                         &length_low);
1881   offset =
1882     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1883                         hf_fileexp_dataversion_high, &dataversion_high);
1884   offset =
1885     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1886                         hf_fileexp_dataversion_low, &dataversion_low);
1887   offset =
1888     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_author,
1889                         &author);
1890   offset =
1891     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_owner,
1892                         &owner);
1893   offset =
1894     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_group,
1895                         &group);
1896   offset =
1897     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1898                         hf_fileexp_calleraccess, &calleraccess);
1899   offset =
1900     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1901                         hf_fileexp_anonymousaccess, &anonymousaccess);
1902   offset =
1903     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1904                         hf_fileexp_aclexpirationtime, &aclexpirationtime);
1905   offset =
1906     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_mode,
1907                         &mode);
1908   offset =
1909     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1910                         hf_fileexp_parentvnode, &parentvnode);
1911   offset =
1912     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1913                         hf_fileexp_parentunique, &parentunique);
1914   offset =
1915     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1916                         hf_fileexp_modtime_sec, &modtime_sec);
1917   offset =
1918     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1919                         hf_fileexp_modtime_msec, &modtime_msec);
1920   offset =
1921     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1922                         hf_fileexp_changetime_sec, &changetime_sec);
1923   offset =
1924     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1925                         hf_fileexp_changetime_msec, &changetime_msec);
1926   offset =
1927     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1928                         hf_fileexp_accesstime_sec, &accesstime_sec);
1929   offset =
1930     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1931                         hf_fileexp_accesstime_msec, &accesstime_msec);
1932   offset =
1933     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1934                         hf_fileexp_servermodtime_sec, &servermodtime_sec);
1935   offset =
1936     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1937                         hf_fileexp_servermodtime_msec, &servermodtime_msec);
1938   offset =
1939     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_fileexp_typeuuid,
1940                         &typeuuid);
1941   offset =
1942     dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep, hf_fileexp_objectuuid,
1943                         &objectuuid);
1944   offset =
1945     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1946                         hf_fileexp_devicenumber, &devicenumber);
1947   offset =
1948     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_blocksused,
1949                         &blocksused);
1950   offset =
1951     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1952                         hf_fileexp_clientspare1, &clientspare1);
1953   offset =
1954     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1955                         hf_fileexp_devicenumberhighbits,
1956                         &devicenumberhighbits);
1957   offset =
1958     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1959                         hf_fileexp_agtypeunique, &agtypeunique);
1960   offset =
1961     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_himaxspare,
1962                         &himaxspare);
1963   offset =
1964     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_lomaxspare,
1965                         &lomaxspare);
1966   offset =
1967     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
1968                         hf_fileexp_pathconfspare, &pathconfspare);
1969   offset =
1970     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_spare4,
1971                         &spare4);
1972   offset =
1973     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_spare5,
1974                         &spare5);
1975   offset =
1976     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_spare6,
1977                         &spare6);
1978
1979
1980   if (check_col (pinfo->cinfo, COL_INFO))
1981     col_append_fstr (pinfo->cinfo, COL_INFO,
1982                      " :interfacever:%u filetype:%u linkcount:%u length:%u dataver:%u author:%u owner:%u group:%u calleraccess:%u anonaccess:%u aclexpire:%u mode:%u parentvnode:%u parentunique:%u modtimesec:%u changetime_sec:%u accesstime_sec:%u servermodtimesec:%u devicenumber:%u blocksused:%u clientspare:%u devicehighbits:%u agtypeunique:%u",
1983                      interfaceversion, filetype, linkcount, length_low,
1984                      dataversion_low, author, owner, group, calleraccess,
1985                      anonymousaccess, aclexpirationtime, mode, parentvnode,
1986                      parentunique, modtime_sec, changetime_sec,
1987                      accesstime_sec, servermodtime_sec, devicenumber,
1988                      blocksused, clientspare1, devicenumberhighbits,
1989                      agtypeunique);
1990
1991
1992   proto_item_set_len (item, offset - old_offset);
1993   return offset;
1994 }
1995
1996 static int
1997 dissect_afsReturnDesc (tvbuff_t * tvb, int offset,
1998                        packet_info * pinfo, proto_tree * parent_tree,
1999                        guint8 *drep)
2000 {
2001 /*
2002         afsFid fid;             * useful hint *
2003         afsHyper tokenID;
2004         afsHyper type;          * mask *
2005         unsigned32 flags;       * just in case *
2006 */
2007
2008   proto_item *item = NULL;
2009   proto_tree *tree = NULL;
2010   int old_offset = offset;
2011   guint32 tokenid_high, tokenid_low, type_high, type_low;
2012   dcerpc_info *di;
2013
2014   di = pinfo->private_data;
2015   if (di->conformant_run)
2016     {
2017       return offset;
2018     }
2019
2020
2021   if (parent_tree)
2022     {
2023       item = proto_tree_add_text (parent_tree, tvb, offset, -1,
2024                                   "afsReturnDesc:");
2025       tree = proto_item_add_subtree (item, ett_fileexp_afsReturnDesc);
2026     }
2027
2028
2029   offset = dissect_afsFid ( tvb, offset, pinfo, tree, drep);
2030   offset =
2031     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2032                         hf_fileexp_afsreturndesc_tokenid_high, &tokenid_high);
2033   offset =
2034     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2035                         hf_fileexp_afsreturndesc_tokenid_low, &tokenid_low);
2036   offset =
2037     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2038                         hf_fileexp_afsreturndesc_type_high, &type_high);
2039   offset =
2040     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2041                         hf_fileexp_afsreturndesc_type_low, &type_low);
2042   if (check_col (pinfo->cinfo, COL_INFO))
2043     col_append_fstr (pinfo->cinfo, COL_INFO, " TokenId:%u/%u Type:%u/%u",
2044                      tokenid_high, tokenid_low, type_high, type_low);
2045
2046   offset =
2047     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2048                          NDR_POINTER_REF, "afsFlags: ", -1);
2049
2050   proto_item_set_len (item, offset - old_offset);
2051   return offset;
2052 }
2053
2054
2055
2056 static int
2057 dissect_afsReturns (tvbuff_t * tvb, int offset,
2058                     packet_info * pinfo, proto_tree * tree, guint8 *drep)
2059 {
2060
2061 /*
2062         long afsReturns_len;
2063         [length_is(afsReturns_len)] afsReturnDesc afsReturns_val[AFS_BULKMAX];
2064 */
2065
2066   /* this is not really a ucvarray, but with the initial len, we can
2067      cheat and pretend it is */
2068   dcerpc_info *di;
2069
2070   di = pinfo->private_data;
2071   if (di->conformant_run)
2072     {
2073       return offset;
2074     }
2075
2076   offset =
2077     dissect_ndr_ucvarray (tvb, offset, pinfo, tree, drep,
2078                           dissect_afsReturnDesc);
2079
2080   return offset;
2081 }
2082
2083 #if 0 /* not used */
2084
2085 static int
2086 dissect_afsbundled_stat (tvbuff_t * tvb, int offset,
2087                 packet_info * pinfo, proto_tree * parent_tree, guint8 *drep _U_)
2088 {
2089
2090
2091   proto_item *item = NULL;
2092   proto_tree *tree = NULL;
2093   int old_offset = offset;
2094   dcerpc_info *di;
2095
2096   di = pinfo->private_data;
2097   if (di->conformant_run)
2098     {
2099       return offset;
2100     }
2101
2102   if (parent_tree)
2103     {
2104       item = proto_tree_add_text (parent_tree, tvb, offset, -1, "afsbundled_stat:");
2105       tree = proto_item_add_subtree (item, ett_fileexp_afsbundled_stat);
2106     }
2107
2108 /*  bundled_stat
2109
2110         afsFid fid;
2111         afsFetchStatus stat;
2112         afsToken token;
2113         error_status_t error;
2114 */
2115
2116 /*
2117         offset = dissect_afsFid(tvb, offset, pinfo, tree, drep);
2118 */
2119 /* SKIPTOKEN/STAT?
2120         offset = dissect_fetchstatus(tvb, offset, pinfo, tree, drep);
2121         offset = dissect_afstoken(tvb, offset, pinfo, tree, drep);
2122 */
2123 /* This is currently under construction as I figure out the reverse layout of the packet. */
2124 /*
2125         offset = dissect_afsErrorStatus (tvb, offset, pinfo, tree, drep);
2126 */
2127
2128
2129
2130
2131   proto_item_set_len (item, offset - old_offset);
2132 return offset;
2133
2134 }
2135
2136 #endif /* not used */
2137
2138 static int
2139 dissect_afsBulkStat (tvbuff_t * tvb _U_, int offset,
2140                                   packet_info * pinfo _U_, proto_tree * tree _U_,
2141                                   guint8 *drep _U_)
2142 {
2143 /*
2144         unsigned32 BulkStat_len;
2145         [length_is(BulkStat_len)] bundled_stat BulkStat_val[AFS_BULKMAX];
2146 */
2147         /* this is not really a ucvarray, but with the initial len, we can
2148            cheat and pretend it is */
2149            /*
2150         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep,
2151                 dissect_afsbundled_stat);
2152                 */
2153
2154         return offset;
2155 }
2156
2157
2158
2159
2160 static int
2161 fileexp_dissect_removefile_rqst (tvbuff_t * tvb, int offset,
2162                                  packet_info * pinfo, proto_tree * tree,
2163                                  guint8 *drep)
2164 {
2165
2166
2167   dcerpc_info *di;
2168
2169   di = pinfo->private_data;
2170   if (di->conformant_run)
2171     {
2172       return offset;
2173     }
2174
2175
2176 /*
2177         [in]    afsFid          *DirFidp,
2178         [in]    afsFidTaggedName        *Namep,
2179         [in]    afsHyper        *returnTokenIDp,
2180         [in]    afsHyper        *minVVp,
2181         [in]    unsigned32      Flags,
2182 */
2183
2184
2185   offset =
2186     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2187                          NDR_POINTER_REF, "afsFid: ", -1);
2188   offset =
2189     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2190                          dissect_afsfidtaggedname, NDR_POINTER_REF,
2191                          "afsFidTaggedName: ", -1);
2192   offset =
2193     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_returntokenidp,
2194                          NDR_POINTER_REF, "afsReturnTokenIDp:", -1);
2195   offset =
2196     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2197                          NDR_POINTER_REF, "afsMinVVp:", -1);
2198
2199   offset =
2200     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2201                          NDR_POINTER_REF, "afsFlags:", -1);
2202
2203   return offset;
2204 }
2205
2206 static int
2207 fileexp_dissect_storedata_rqst (tvbuff_t * tvb, int offset,
2208                                 packet_info * pinfo, proto_tree * tree,
2209                                 guint8 *drep)
2210 {
2211   guint32 position_high, position_low, length;
2212   dcerpc_info *di;
2213
2214   di = pinfo->private_data;
2215   if (di->conformant_run)
2216     {
2217       return offset;
2218     }
2219
2220 /*
2221         [in]    afsFid          *Fidp,
2222         [in]    afsStoreStatus  *InStatusp,
2223         [in]    afsHyper        *Position,
2224         [in]    signed32        Length,
2225         [in]    afsHyper        *minVVp,
2226         [in]    unsigned32      Flags,
2227         [in]    pipe_t          *storeStream,
2228 */
2229
2230
2231   /* afsFid */
2232   offset =
2233     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2234                          NDR_POINTER_REF, "afsFid: ", -1);
2235   offset =
2236     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2237                          dissect_afsstorestatus, NDR_POINTER_REF,
2238                          "afsStoreStatus:", -1);
2239   offset =
2240     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2241                         hf_fileexp_position_high, &position_high);
2242   offset =
2243     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2244                         hf_fileexp_position_low, &position_low);
2245
2246   offset =
2247     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2248                         hf_fileexp_length, &length);
2249
2250   if (check_col (pinfo->cinfo, COL_INFO))
2251     col_append_fstr (pinfo->cinfo, COL_INFO, " Position:%u/%u Length:%u",
2252                      position_high, position_low, length);
2253
2254   offset =
2255     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2256                          NDR_POINTER_REF, "MinVVp:", -1);
2257
2258   offset =
2259     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2260                          NDR_POINTER_REF, "afsFlags:", -1);
2261
2262 /* XXX need to decode pipe_t still here */
2263
2264   return offset;
2265 }
2266
2267 static int
2268 fileexp_dissect_gettoken_rqst (tvbuff_t * tvb, int offset,
2269                                packet_info * pinfo, proto_tree * tree,
2270                                guint8 *drep)
2271 {
2272   dcerpc_info *di;
2273
2274   di = pinfo->private_data;
2275   if (di->conformant_run)
2276     {
2277       return offset;
2278     }
2279
2280
2281 /*
2282         [in]    afsFid          *Fidp,
2283         [in]    afsToken        *MinTokenp,
2284         [in]    afsHyper        *minVVp,
2285         [in]    unsigned32      Flags,
2286 */
2287
2288   /* afsFid */
2289   offset =
2290     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2291                          NDR_POINTER_REF, "afsFid: ", -1);
2292
2293   offset =
2294     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
2295                          NDR_POINTER_REF, "afsToken: ", -1);
2296
2297   offset =
2298     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2299                          NDR_POINTER_REF, "MinVVp:", -1);
2300
2301   offset =
2302     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2303                          NDR_POINTER_REF, "afsFlags:", -1);
2304
2305   return offset;
2306 }
2307 static int
2308 fileexp_dissect_gettoken_resp (tvbuff_t * tvb, int offset,
2309                                packet_info * pinfo, proto_tree * tree,
2310                                guint8 *drep)
2311 {
2312
2313   dcerpc_info *di;
2314   di = pinfo->private_data;
2315   if (di->conformant_run)
2316     {
2317       return offset;
2318     }
2319
2320 /*
2321         [out]   afsToken        *OutTokenp,
2322         [out]   afsRecordLock   *OutBlockerp,
2323         [out]   afsFetchStatus  *OutStatusp,
2324         [out]   afsVolSync      *Syncp
2325 */
2326
2327   offset =
2328     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
2329                          NDR_POINTER_REF, "afsToken: ", -1);
2330   offset =
2331     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2332                          dissect_afsRecordLock, NDR_POINTER_REF,
2333                          "afsRecordLock: ", -1);
2334   offset =
2335     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
2336                          NDR_POINTER_REF, "afsFetchStatus: ", -1);
2337   offset =
2338     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
2339                          NDR_POINTER_REF, "VolSync: ", -1);
2340   offset =
2341     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2342                          dissect_afsErrorStatus, NDR_POINTER_REF,
2343                          "afsErrorStatus: ", -1);
2344
2345   return offset;
2346 }
2347
2348 static int
2349 fileexp_dissect_lookuproot_rqst (tvbuff_t * tvb, int offset,
2350                                  packet_info * pinfo, proto_tree * tree,
2351                                  guint8 *drep)
2352 {
2353   dcerpc_info *di;
2354
2355   di = pinfo->private_data;
2356   if (di->conformant_run)
2357     {
2358       return offset;
2359     }
2360
2361
2362 /*
2363  *         [in]    afsFid          *InFidp,
2364  *         [in]    afsHyper        *minVVp,
2365  *         [in]    unsigned32   Flags,
2366  */
2367
2368   offset =
2369     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2370                          NDR_POINTER_REF, "afsFid: ", -1);
2371
2372   offset =
2373     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2374                          NDR_POINTER_REF, "MinVVp:", -1);
2375
2376   offset =
2377     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2378                          NDR_POINTER_REF, "afsFlags:", -1);
2379
2380   return offset;
2381 }
2382
2383 static int
2384 fileexp_dissect_fetchdata_rqst (tvbuff_t * tvb, int offset,
2385                                 packet_info * pinfo, proto_tree * tree,
2386                                 guint8 *drep)
2387 {
2388   guint32 position_high, position_low, length;
2389   dcerpc_info *di;
2390
2391   di = pinfo->private_data;
2392   if (di->conformant_run)
2393     {
2394       return offset;
2395     }
2396
2397 /*
2398         [in]    afsFid          *Fidp,
2399         [in]    afsHyper        *minVVp,
2400         [in]    afsHyper        *Position,
2401         [in]    signed32                Length,
2402         [in]    unsigned32      Flags,
2403 */
2404
2405   offset =
2406     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2407                          NDR_POINTER_REF, "afsFid: ", -1);
2408
2409   offset =
2410     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2411                          NDR_POINTER_REF, "MinVVp:", -1);
2412   offset =
2413     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2414                         hf_fileexp_position_high, &position_high);
2415   offset =
2416     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2417                         hf_fileexp_position_low, &position_low);
2418   offset =
2419     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2420                         hf_fileexp_length, &length);
2421   if (check_col (pinfo->cinfo, COL_INFO))
2422     col_append_fstr (pinfo->cinfo, COL_INFO, " Position:%u/%u Length:%u",
2423                      position_high, position_low, length);
2424
2425   offset =
2426     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2427                          NDR_POINTER_REF, "afsFlags:", -1);
2428
2429   return offset;
2430 }
2431
2432 static int
2433 fileexp_dissect_fetchacl_rqst (tvbuff_t * tvb, int offset,
2434                                packet_info * pinfo, proto_tree * tree,
2435                                guint8 *drep)
2436 {
2437
2438   guint32 acltype;
2439   dcerpc_info *di;
2440
2441   di = pinfo->private_data;
2442   if (di->conformant_run)
2443     {
2444       return offset;
2445     }
2446
2447
2448 /*
2449         [in]    afsFid          *Fidp,
2450         [in]    unsigned32      aclType,
2451         [in]    afsHyper        *minVVp,
2452         [in]    unsigned32      Flags,
2453 */
2454
2455   /* afsFid */
2456   offset =
2457     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2458                          NDR_POINTER_REF, "afsFid: ", -1);
2459
2460   offset =
2461     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_acltype,
2462                         &acltype);
2463   offset =
2464     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2465                          NDR_POINTER_REF, "MinVVp:", -1);
2466
2467   offset =
2468     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2469                          NDR_POINTER_REF, "afsFlags:", -1);
2470
2471   if (acltype)
2472     {
2473       col_append_str (pinfo->cinfo, COL_INFO,
2474                         " :copy the ACL from specified fid:");
2475     }
2476
2477
2478   return offset;
2479 }
2480 static int
2481 fileexp_dissect_fetchstatus_rqst (tvbuff_t * tvb, int offset,
2482                                   packet_info * pinfo, proto_tree * tree,
2483                                   guint8 *drep)
2484 {
2485   dcerpc_info *di;
2486
2487   di = pinfo->private_data;
2488   if (di->conformant_run)
2489     {
2490       return offset;
2491     }
2492
2493
2494 /*
2495         [in]    afsFid          *Fidp,
2496         [in]    afsHyper        *minVVp,
2497         [in]    unsigned32      Flags,
2498 */
2499
2500   offset =
2501     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2502                          NDR_POINTER_REF, "afsFid: ", -1);
2503   offset =
2504     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2505                          NDR_POINTER_REF, "MinVVp:", -1);
2506   offset =
2507     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2508                          NDR_POINTER_REF, "afsFlags:", -1);
2509
2510   return offset;
2511 }
2512 static int
2513 fileexp_dissect_storeacl_rqst (tvbuff_t * tvb, int offset,
2514                                packet_info * pinfo, proto_tree * tree,
2515                                guint8 *drep)
2516 {
2517   guint32 acltype;
2518   dcerpc_info *di;
2519
2520   di = pinfo->private_data;
2521   if (di->conformant_run)
2522     {
2523       return offset;
2524     }
2525
2526 /*
2527         [in]    afsFid          *Fidp,
2528         [in]    afsACL          *AccessListp,
2529         [in]    unsigned32      aclType,
2530         [in]    afsFid          *aclFidp,
2531         [in]    afsHyper        *minVVp,
2532         [in]    unsigned32      Flags,
2533 */
2534
2535
2536   offset =
2537     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2538                          NDR_POINTER_REF, "afsFid: ", -1);
2539   offset =
2540     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsAcl,
2541                          NDR_POINTER_REF, "afsAcl: ", -1);
2542   offset =
2543     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_fileexp_acltype,
2544                         &acltype);
2545   offset =
2546     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2547                          NDR_POINTER_REF, "afsFid: ", -1);
2548   offset =
2549     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2550                          NDR_POINTER_REF, "MinVVp:", -1);
2551   offset =
2552     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2553                          NDR_POINTER_REF, "afsFlags:", -1);
2554
2555   if (check_col (pinfo->cinfo, COL_INFO))
2556     col_append_fstr (pinfo->cinfo, COL_INFO, " aclType:%u",acltype);
2557
2558   return offset;
2559 }
2560
2561 static int
2562 fileexp_dissect_storestatus_rqst (tvbuff_t * tvb, int offset,
2563                                   packet_info * pinfo, proto_tree * tree,
2564                                   guint8 *drep)
2565 {
2566   dcerpc_info *di;
2567
2568   di = pinfo->private_data;
2569   if (di->conformant_run)
2570     {
2571       return offset;
2572     }
2573
2574
2575 /*
2576         [in]    afsFid          *Fidp,
2577         [in]    afsStoreStatus  *InStatusp,
2578         [in]    afsHyper        *minVVp,
2579         [in]    unsigned32      Flags,
2580 */
2581
2582   offset =
2583     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2584                          NDR_POINTER_REF, "afsFid: ", -1);
2585   offset =
2586     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2587                          dissect_afsstorestatus, NDR_POINTER_REF,
2588                          "afsStoreStatus: ", -1);
2589   offset =
2590     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2591                          NDR_POINTER_REF, "MinVVp:", -1);
2592   offset =
2593     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2594                          NDR_POINTER_REF, "afsFlags:", -1);
2595
2596
2597   return offset;
2598 }
2599
2600 static int
2601 fileexp_dissect_createfile_rqst (tvbuff_t * tvb, int offset,
2602                                  packet_info * pinfo, proto_tree * tree,
2603                                  guint8 *drep)
2604 {
2605   dcerpc_info *di;
2606
2607   di = pinfo->private_data;
2608   if (di->conformant_run)
2609     {
2610       return offset;
2611     }
2612
2613
2614 /*
2615         [in]    afsFid          *DirFidp,
2616         [in]    afsTaggedName   *Namep,
2617         [in]    afsStoreStatus  *InStatusp,
2618         [in]    afsHyper        *minVVp,
2619         [in]    unsigned32      Flags,
2620 */
2621
2622   offset =
2623     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2624                          NDR_POINTER_REF, "afsFid: ", -1);
2625   offset =
2626     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2627                          dissect_afstaggedname, NDR_POINTER_REF,
2628                          "afsTaggedName: ", -1);
2629   offset =
2630     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2631                          dissect_afsstorestatus, NDR_POINTER_REF,
2632                          "afsStoreStatus: ", -1);
2633   offset =
2634     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2635                          NDR_POINTER_REF, "MinVVp:", -1);
2636   offset =
2637     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
2638                          NDR_POINTER_REF, "afsFlags:", -1);
2639
2640   return offset;
2641 }
2642
2643 static int
2644 fileexp_dissect_rename_rqst (tvbuff_t * tvb, int offset,
2645                              packet_info * pinfo, proto_tree * tree,
2646                      guint8 *drep)
2647 {
2648   dcerpc_info *di;
2649
2650   di = pinfo->private_data;
2651   if (di->conformant_run)
2652     {
2653       return offset;
2654     }
2655
2656 /*
2657         [in]    afsFid          *OldDirFidp,
2658         [in]    afsFidTaggedName        *OldNamep,
2659         [in]    afsFid          *NewDirFidp,
2660         [in]    afsFidTaggedName        *NewNamep,
2661         [in]    afsHyper        *returnTokenIDp,
2662         [in]    afsHyper        *minVVp,
2663         [in]    unsigned32      Flags,
2664 */
2665
2666   /* afsFid */
2667   offset =
2668     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2669                          NDR_POINTER_REF, "afsFid: ", -1);
2670
2671   offset =
2672     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2673                          dissect_afsfidtaggedname, NDR_POINTER_REF,
2674                          "afsFidTaggedName: ", -1);
2675
2676   offset =
2677     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2678                          NDR_POINTER_REF, "afsFid: ", -1);
2679
2680   offset =
2681     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2682                          dissect_afstaggedname, NDR_POINTER_REF,
2683                          "afsFidTaggedName: ", -1);
2684
2685   offset =
2686     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2687                          dissect_returntokenidp, NDR_POINTER_REF,
2688                          "afsReturnTokenIDp: ", -1);
2689
2690   offset =
2691     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2692                          dissect_minvvp, NDR_POINTER_REF,
2693                          "afsminVVp: ", -1);
2694
2695   offset = dissect_afsFlags(tvb, offset, pinfo, tree, drep);
2696
2697   return offset;
2698 }
2699
2700 static int
2701 fileexp_dissect_symlink_rqst (tvbuff_t * tvb, int offset,
2702                               packet_info * pinfo, proto_tree * tree,
2703                               guint8 *drep)
2704 {
2705   dcerpc_info *di;
2706
2707   di = pinfo->private_data;
2708   if (di->conformant_run)
2709     {
2710       return offset;
2711     }
2712
2713 /*
2714         [in]    afsFid          *DirFidp,
2715         [in]    afsTaggedName   *Namep,
2716         [in]    afsTaggedPath   *LinkContentsp,
2717         [in]    afsStoreStatus  *InStatusp,
2718         [in]    afsHyper        *minVVp,
2719         [in]    unsigned32      Flags,
2720 */
2721
2722
2723   /* afsFid */
2724   offset =
2725     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2726                          NDR_POINTER_REF, "afsFid: ", -1);
2727
2728   offset =
2729     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2730                          dissect_afstaggedname, NDR_POINTER_REF,
2731                          "afsTaggedName: ", -1);
2732   offset =
2733     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2734                          dissect_afsTaggedPath, NDR_POINTER_REF,
2735                          "afsTaggedPath: ", -1);
2736   offset =
2737     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2738                          dissect_afsstorestatus, NDR_POINTER_REF,
2739                          "afsStoreStatus: ", -1);
2740   offset =
2741     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2742                          NDR_POINTER_REF, "MinVVp:", -1);
2743     offset = dissect_afsFlags (tvb, offset, pinfo, tree, drep);
2744
2745   return offset;
2746 }
2747
2748 static int
2749 fileexp_dissect_readdir_rqst (tvbuff_t * tvb, int offset,
2750                               packet_info * pinfo, proto_tree * tree,
2751                               guint8 *drep)
2752 {
2753   guint32 size;
2754   dcerpc_info *di;
2755
2756   di = pinfo->private_data;
2757   if (di->conformant_run)
2758     {
2759       return offset;
2760     }
2761
2762 /*
2763         [in]    afsFid          *DirFidp,
2764         [in]    afsHyper        *Offsetp,
2765         [in]    unsigned32      Size,
2766         [in]    afsHyper        *minVVp,
2767         [in]    unsigned32      Flags,
2768 */
2769
2770   offset =
2771     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2772                          NDR_POINTER_REF, "afsFid: ", -1);
2773   offset =
2774     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_offsetp,
2775                          NDR_POINTER_REF, "Offsetp: ", -1);
2776   offset =
2777     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2778                         hf_fileexp_readdir_size, &size);
2779
2780   if (check_col (pinfo->cinfo, COL_INFO))
2781     col_append_fstr (pinfo->cinfo, COL_INFO, " Size:%u", size);
2782
2783   offset =
2784     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2785                          NDR_POINTER_REF, "MinVVp:", -1);
2786    offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep);
2787
2788   return offset;
2789 }
2790
2791 static int
2792 fileexp_dissect_makedir_rqst (tvbuff_t * tvb, int offset,
2793                               packet_info * pinfo, proto_tree * tree,
2794                               guint8 *drep)
2795 {
2796   dcerpc_info *di;
2797
2798   di = pinfo->private_data;
2799   if (di->conformant_run)
2800     {
2801       return offset;
2802     }
2803
2804 /*
2805         [in]    afsFid          *DirFidp,
2806         [in]    afsTaggedName   *Namep,
2807         [in]    afsStoreStatus  *InStatusp,
2808         [in]    afsHyper        *minVVp,
2809         [in]    unsigned32      Flags,
2810 */
2811
2812   offset =
2813     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2814                          NDR_POINTER_REF, "afsFid: ", -1);
2815
2816   offset =
2817     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2818                          dissect_afstaggedname, NDR_POINTER_REF,
2819                          "afsTaggedName: ", -1);
2820   offset =
2821     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2822                          dissect_afsstorestatus, NDR_POINTER_REF,
2823                          "afsStoreStatus: ", -1);
2824   offset =
2825     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2826                          NDR_POINTER_REF, "MinVVp:", -1);
2827   offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep);
2828
2829   return offset;
2830 }
2831
2832 static int
2833 fileexp_dissect_removedir_rqst (tvbuff_t * tvb, int offset,
2834                                 packet_info * pinfo, proto_tree * tree,
2835                                 guint8 *drep)
2836 {
2837   guint32 returntokenidp_high, returntokenidp_low;
2838   dcerpc_info *di;
2839
2840   di = pinfo->private_data;
2841   if (di->conformant_run)
2842     {
2843       return offset;
2844     }
2845
2846 /*
2847         [in]    afsFid          *DirFidp,
2848         [in]    afsFidTaggedName        *Namep,
2849         [in]    afsHyper        *returnTokenIDp,
2850         [in]    afsHyper        *minVVp,
2851         [in]    unsigned32      Flags,
2852 */
2853
2854   offset =
2855     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2856                          NDR_POINTER_REF, "afsFid: ", -1);
2857   offset =
2858     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2859                          dissect_afsfidtaggedname, NDR_POINTER_REF,
2860                          "afsFidTaggedName: ", -1);
2861   offset =
2862     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2863                         hf_fileexp_returntokenidp_high, &returntokenidp_high);
2864   offset =
2865     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
2866                         hf_fileexp_returntokenidp_low, &returntokenidp_low);
2867
2868   if (check_col (pinfo->cinfo, COL_INFO))
2869     col_append_fstr (pinfo->cinfo, COL_INFO, " returnTokenIDp:%u/%u",
2870                      returntokenidp_high, returntokenidp_low);
2871   offset =
2872     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2873                          NDR_POINTER_REF, "MinVVp:", -1);
2874   offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep );
2875
2876   return offset;
2877 }
2878
2879 static int
2880 fileexp_dissect_lookup_rqst (tvbuff_t * tvb, int offset,
2881                              packet_info * pinfo, proto_tree * tree,
2882                              guint8 *drep)
2883 {
2884   dcerpc_info *di;
2885
2886   di = pinfo->private_data;
2887   if (di->conformant_run)
2888     {
2889       return offset;
2890     }
2891
2892 /*
2893         [in]    afsFid          *DirFidp,
2894         [in]    afsTaggedName   *Namep,
2895         [in]    afsHyper        *minVVp,
2896         [in]    unsigned32      Flags,
2897 */
2898
2899   offset =
2900     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2901                          NDR_POINTER_REF, "afsFid: ", -1);
2902
2903   offset =
2904     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2905                          dissect_afstaggedname, NDR_POINTER_REF,
2906                          "afsTaggedName: ", -1);
2907   offset =
2908     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
2909                          NDR_POINTER_REF, "MinVVp:", -1);
2910    offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep);
2911
2912   return offset;
2913 }
2914 static int
2915 fileexp_dissect_lookup_resp (tvbuff_t * tvb, int offset,
2916                              packet_info * pinfo, proto_tree * tree,
2917                              guint8 *drep)
2918 {
2919   dcerpc_info *di;
2920
2921   di = pinfo->private_data;
2922   if (di->conformant_run)
2923     {
2924       return offset;
2925     }
2926
2927 /*
2928         [out]   afsFid          *OutFidp,
2929         [out]   afsFetchStatus  *OutFidStatusp,
2930         [out]   afsFetchStatus  *OutDirStatusp,
2931         [out]   afsToken        *OutTokenp,
2932         [out]   afsVolSync      *Syncp
2933 */
2934
2935   offset =
2936     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2937                          NDR_POINTER_REF, "afsFid: ", -1);
2938
2939   offset =
2940     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
2941                          NDR_POINTER_REF, "FetchStatus: ", -1);
2942   offset =
2943     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
2944                          NDR_POINTER_REF, "FetchStatus: ", -1);
2945
2946   offset =
2947     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
2948                          NDR_POINTER_REF, "afsToken: ", -1);
2949   offset =
2950     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
2951                          NDR_POINTER_REF, "VolSync: ", -1);
2952   MACRO_ST_CLEAR ("Lookup reply");
2953
2954   return offset;
2955
2956 }
2957
2958 static int
2959 fileexp_dissect_makemountpoint_rqst (tvbuff_t * tvb, int offset,
2960                                      packet_info * pinfo, proto_tree * tree,
2961                                      guint8 *drep)
2962 {
2963   dcerpc_info *di;
2964   guint16 type;
2965
2966   di = pinfo->private_data;
2967   if (di->conformant_run)
2968     {
2969       return offset;
2970     }
2971
2972
2973 /*
2974         [in]    afsFid          *DirFidp,
2975         [in]    afsTaggedName   *Namep,
2976         [in]    afsTaggedName   *cellNamep,
2977         [in]    afsFStype       Type,
2978         [in]    afsTaggedName   *volumeNamep,
2979         [in]    afsStoreStatus  *InStatusp,
2980         [in]    afsHyper        *minVVp,
2981         [in]    unsigned32      Flags,
2982 */
2983
2984   /* afsFid */
2985   offset =
2986     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
2987                          NDR_POINTER_REF, "afsFid: ", -1);
2988
2989   offset =
2990     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2991                          dissect_afstaggedname, NDR_POINTER_REF,
2992                          "afsTaggedName: ", -1);
2993   offset =
2994     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
2995                          dissect_afstaggedname, NDR_POINTER_REF,
2996                          "afsTaggedName: ", -1);
2997   offset =
2998     dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep, hf_fileexp_fstype,
2999                         &type);
3000   offset =
3001     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
3002                          dissect_afstaggedname, NDR_POINTER_REF,
3003                          "afsTaggedName: ", -1);
3004   offset =
3005     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
3006                          dissect_afsstorestatus, NDR_POINTER_REF,
3007                          "afsStoreStatus: ", -1);
3008   offset =
3009     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
3010                          NDR_POINTER_REF, "MinVVp:", -1);
3011
3012   offset = dissect_afsFlags (tvb, offset, pinfo, tree, drep);
3013
3014   if (check_col (pinfo->cinfo, COL_INFO))
3015     col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u", type);
3016
3017   return offset;
3018
3019 }
3020
3021 static int
3022 fileexp_dissect_setcontext_rqst (tvbuff_t * tvb, int offset,
3023                                  packet_info * pinfo, proto_tree * tree,
3024                                  guint8 *drep)
3025 {
3026   dcerpc_info *di;
3027
3028   guint32 epochtime, clientsizesattrs, parm7;
3029
3030   di = pinfo->private_data;
3031   if (di->conformant_run)
3032     {
3033       return offset;
3034     }
3035
3036 /*
3037         [in]    unsigned32      epochTime,
3038         [in]    afsNetData      *callbackAddr,
3039         [in]    unsigned32      Flags,
3040         [in]    afsUUID         *secObjectID,
3041         [in]    unsigned32      clientSizesAttrs,
3042         [in]    unsigned32      parm7
3043 */
3044
3045
3046   offset =
3047     dissect_dcerpc_time_t (tvb, offset, pinfo, tree, drep,
3048                            hf_fileexp_setcontext_rqst_epochtime, &epochtime);
3049
3050   offset =  dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsNetData,
3051                          NDR_POINTER_REF, "afsNetData:", -1);
3052
3053   offset = dissect_afsFlags (tvb, offset, pinfo, tree, drep);
3054
3055 col_append_str (pinfo->cinfo, COL_INFO, " setObjectID");
3056
3057   offset =  dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsuuid,
3058                          NDR_POINTER_REF, "afsUUID:", -1);
3059   offset =
3060     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3061                         hf_fileexp_setcontext_rqst_clientsizesattrs,
3062                         &clientsizesattrs);
3063   offset =
3064     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3065                         hf_fileexp_setcontext_rqst_parm7, &parm7);
3066
3067 if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " epochTime:%u clientSizesAttrs:%u parm7:%u", epochtime, clientsizesattrs, parm7);
3068
3069   return offset;
3070 }
3071
3072 static int
3073 fileexp_dissect_setcontext_resp (tvbuff_t * tvb, int offset,
3074                                  packet_info * pinfo, proto_tree * tree,
3075                                  guint8 *drep)
3076 {
3077 /* nothing but error code */
3078
3079   dcerpc_info *di;
3080
3081
3082   di = pinfo->private_data;
3083   if (di->conformant_run)
3084     {
3085       return offset;
3086     }
3087
3088   MACRO_ST_CLEAR ("SetContext reply");
3089   return offset;
3090 }
3091
3092 static int
3093   fileexp_dissect_lookuproot_resp
3094   (tvbuff_t *
3095    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3096 {
3097   dcerpc_info *di;
3098
3099   di = pinfo->private_data;
3100   if (di->conformant_run)
3101     {
3102       return offset;
3103     }
3104
3105   /*
3106    *        [out]   afsFid          *OutFidp,
3107    *        [out]   afsFetchStatus  *OutFidStatusp,
3108    *        [out]   afsToken        *OutTokenp,
3109    *        [out]   afsVolSync      *Syncp
3110    */
3111   /* afsFid */
3112   offset =
3113     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3114                          NDR_POINTER_REF, "afsFid: ", -1);
3115
3116   offset =
3117     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3118                          NDR_POINTER_REF, "FetchStatus: ", -1);
3119   offset =
3120     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
3121                          NDR_POINTER_REF, "afsToken: ", -1);
3122   offset =
3123     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3124                          NDR_POINTER_REF, "VolSync: ", -1);
3125   MACRO_ST_CLEAR ("LookupRoot reply");
3126   return offset;
3127 }
3128
3129 static int
3130   fileexp_dissect_fetchdata_resp
3131   (tvbuff_t *
3132    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3133 {
3134
3135   dcerpc_info *di;
3136   guint32 pipe_t_size;
3137
3138   di = pinfo->private_data;
3139   if (di->conformant_run)
3140     {
3141       return offset;
3142     }
3143
3144 /*
3145         [out]   afsFetchStatus  *OutStatusp,
3146         [out]   afsToken        *OutTokenp,
3147         [out]   afsVolSync      *Syncp,
3148         [out]   pipe_t          *fetchStream
3149 */
3150 /* The SkipToken/SkipStatus flags are always used in every fetchdata request I have seen.
3151 There is also not sign of the afsVolSync structure... Just size, and data string... aka pipe_t */
3152
3153   offset =
3154     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3155                         hf_fileexp_fetchdata_pipe_t_size, &pipe_t_size);
3156
3157   return offset;
3158 }
3159
3160 static int
3161   fileexp_dissect_fetchacl_resp
3162   (tvbuff_t *
3163    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3164 {
3165   dcerpc_info *di;
3166
3167   di = pinfo->private_data;
3168   if (di->conformant_run)
3169     {
3170       return offset;
3171     }
3172
3173
3174 /*
3175         [out]   afsACL          *AccessListp,
3176         [out]   afsFetchStatus  *OutStatusp,
3177         [out]   afsVolSync      *Syncp
3178 */
3179   offset =
3180     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsAcl,
3181                          NDR_POINTER_REF, "afsAcl: ", -1);
3182   offset =
3183     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3184                          NDR_POINTER_REF, "FetchStatus: ", -1);
3185
3186   offset =
3187     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3188                          NDR_POINTER_REF, "VolSync: ", -1);
3189   MACRO_ST_CLEAR ("FetchAcl reply");
3190   return offset;
3191 }
3192
3193 static int
3194   fileexp_dissect_fetchstatus_resp
3195   (tvbuff_t *
3196    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3197 {
3198   dcerpc_info *di;
3199
3200   di = pinfo->private_data;
3201   if (di->conformant_run)
3202     {
3203       return offset;
3204     }
3205
3206 /*
3207         [out]   afsFetchStatus  *OutStatusp,
3208         [out]   afsToken        *OutTokenp,
3209         [out]   afsVolSync      *Syncp
3210 */
3211
3212   offset =
3213     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3214                          NDR_POINTER_REF, "FetchStatus: ", -1);
3215
3216   offset =
3217     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
3218                          NDR_POINTER_REF, "afsToken: ", -1);
3219   offset =
3220     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3221                          NDR_POINTER_REF, "VolSync: ", -1);
3222   MACRO_ST_CLEAR ("FetchStatus reply");
3223   return offset;
3224 }
3225
3226 static int
3227   fileexp_dissect_storedata_resp
3228   (tvbuff_t *
3229    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3230 {
3231   dcerpc_info *di;
3232
3233   di = pinfo->private_data;
3234   if (di->conformant_run)
3235     {
3236       return offset;
3237     }
3238
3239 /*
3240         [out]   afsFetchStatus  *OutStatusp,
3241         [out]   afsVolSync      *Syncp
3242 */
3243
3244   offset =
3245     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3246                          NDR_POINTER_REF, "FetchStatus: ", -1);
3247
3248   offset =
3249     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3250                          NDR_POINTER_REF, "VolSync: ", -1);
3251   MACRO_ST_CLEAR ("StoreData reply");
3252   return offset;
3253 }
3254
3255 static int
3256   fileexp_dissect_storeacl_resp
3257   (tvbuff_t *
3258    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3259 {
3260   dcerpc_info *di;
3261
3262   di = pinfo->private_data;
3263   if (di->conformant_run)
3264     {
3265       return offset;
3266     }
3267
3268 /*
3269         [out]   afsFetchStatus  *OutStatusp,
3270         [out]   afsVolSync      *Syncp
3271 */
3272
3273   offset =
3274     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3275                          NDR_POINTER_REF, "FetchStatus: ", -1);
3276
3277   offset =
3278     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3279                          NDR_POINTER_REF, "VolSync: ", -1);
3280   MACRO_ST_CLEAR ("StoreAcl reply");
3281   return offset;
3282 }
3283
3284 static int
3285   fileexp_dissect_storestatus_resp
3286   (tvbuff_t *
3287    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3288 {
3289   dcerpc_info *di;
3290
3291   di = pinfo->private_data;
3292   if (di->conformant_run)
3293     {
3294       return offset;
3295     }
3296
3297 /*
3298         [out]   afsFetchStatus  *OutStatusp,
3299         [out]   afsVolSync      *Syncp
3300 */
3301
3302   offset =
3303     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3304                          NDR_POINTER_REF, "FetchStatus: ", -1);
3305
3306   offset =
3307     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3308                          NDR_POINTER_REF, "VolSync: ", -1);
3309   MACRO_ST_CLEAR ("StoreStatus reply");
3310   return offset;
3311 }
3312
3313 static int
3314   fileexp_dissect_removefile_resp
3315   (tvbuff_t *
3316    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3317 {
3318   dcerpc_info *di;
3319
3320   di = pinfo->private_data;
3321   if (di->conformant_run)
3322     {
3323       return offset;
3324     }
3325
3326 /*
3327         [out]   afsFetchStatus  *OutDirStatusp,
3328         [out]   afsFetchStatus  *OutFileStatusp,
3329         [out]   afsFid          *OutFileFidp,
3330         [out]   afsVolSync      *Syncp
3331 */
3332   offset =
3333     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3334                          NDR_POINTER_REF, "FetchStatus: ", -1);
3335
3336   offset =
3337     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3338                          NDR_POINTER_REF, "FetchStatus: ", -1);
3339   offset =
3340     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3341                          NDR_POINTER_REF, "afsFid: ", -1);
3342   offset =
3343     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3344                          NDR_POINTER_REF, "VolSync: ", -1);
3345   MACRO_ST_CLEAR ("RemoveFile reply");
3346   return offset;
3347 }
3348
3349 static int
3350   fileexp_dissect_createfile_resp
3351   (tvbuff_t *
3352    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3353 {
3354   dcerpc_info *di;
3355
3356   di = pinfo->private_data;
3357   if (di->conformant_run)
3358     {
3359       return offset;
3360     }
3361
3362 /*
3363         [out]   afsFid          *OutFidp,
3364         [out]   afsFetchStatus  *OutFidStatusp,
3365         [out]   afsFetchStatus  *OutDirStatusp,
3366         [out]   afsToken        *OutTokenp,
3367         [out]   afsVolSync      *Syncp
3368 */
3369
3370   /* afsFid */
3371   offset =
3372     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3373                          NDR_POINTER_REF, "afsFid: ", -1);
3374   offset =
3375     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3376                          NDR_POINTER_REF, "FetchStatus: ", -1);
3377
3378   offset =
3379     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3380                          NDR_POINTER_REF, "FetchStatus: ", -1);
3381
3382   offset =
3383     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
3384                          NDR_POINTER_REF, "afsToken: ", -1);
3385   offset =
3386     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3387                          NDR_POINTER_REF, "VolSync: ", -1);
3388   MACRO_ST_CLEAR ("CreateFile reply");
3389
3390   return offset;
3391 }
3392 static int
3393   fileexp_dissect_rename_resp
3394   (tvbuff_t *
3395    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3396 {
3397   dcerpc_info *di;
3398
3399   di = pinfo->private_data;
3400   if (di->conformant_run)
3401     {
3402       return offset;
3403     }
3404
3405 /*
3406         [out]   afsFetchStatus  *OutOldDirStatusp,
3407         [out]   afsFetchStatus  *OutNewDirStatusp,
3408         [out]   afsFid          *OutOldFileFidp,
3409         [out]   afsFetchStatus  *OutOldFileStatusp,
3410         [out]   afsFid          *OutNewFileFidp,
3411         [out]   afsFetchStatus  *OutNewFileStatusp,
3412         [out]   afsVolSync      *Syncp
3413 */
3414
3415   offset =
3416     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3417                          NDR_POINTER_REF, "FetchStatus: ", -1);
3418   offset =
3419     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3420                          NDR_POINTER_REF, "FetchStatus: ", -1);
3421   offset =
3422     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3423                          NDR_POINTER_REF, "afsFid: ", -1);
3424   offset =
3425     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3426                          NDR_POINTER_REF, "FetchStatus: ", -1);
3427   offset =
3428     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3429                          NDR_POINTER_REF, "afsFid: ", -1);
3430
3431   offset =
3432     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3433                          NDR_POINTER_REF, "FetchStatus: ", -1);
3434
3435   offset =
3436     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3437                          NDR_POINTER_REF, "VolSync: ", -1);
3438   MACRO_ST_CLEAR("Rename reply");
3439   return offset;
3440 }
3441
3442 static int
3443   fileexp_dissect_symlink_resp
3444   (tvbuff_t *
3445    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3446 {
3447   dcerpc_info *di;
3448
3449   di = pinfo->private_data;
3450   if (di->conformant_run)
3451     {
3452       return offset;
3453     }
3454
3455 /*
3456         [out]   afsFid          *OutFidp,
3457         [out]   afsFetchStatus  *OutFidStatusp,
3458         [out]   afsFetchStatus  *OutDirStatusp,
3459         [out]   afsToken        *OutTokenp,
3460         [out]   afsVolSync      *Syncp
3461 */
3462
3463   offset =
3464     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3465                          NDR_POINTER_REF, "afsFid: ", -1);
3466   offset =
3467     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3468                          NDR_POINTER_REF, "FetchStatus: ", -1);
3469   offset =
3470     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3471                          NDR_POINTER_REF, "FetchStatus: ", -1);
3472   offset =
3473     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
3474                          NDR_POINTER_REF, "afsToken: ", -1);
3475   offset =
3476     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3477                          NDR_POINTER_REF, "VolSync: ", -1);
3478   MACRO_ST_CLEAR ("Symlink reply");
3479
3480   return offset;
3481 }
3482
3483 static int
3484   fileexp_dissect_hardlink_resp
3485   (tvbuff_t *
3486    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3487 {
3488   dcerpc_info *di;
3489
3490   di = pinfo->private_data;
3491   if (di->conformant_run)
3492     {
3493       return offset;
3494     }
3495
3496 /*
3497         [out]   afsFetchStatus  *OutFidStatusp,
3498         [out]   afsFetchStatus  *OutDirStatusp,
3499         [out]   afsVolSync      *Syncp
3500 */
3501
3502
3503   offset =
3504     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3505                          NDR_POINTER_REF, "FetchStatus: ", -1);
3506   offset =
3507     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3508                          NDR_POINTER_REF, "FetchStatus: ", -1);
3509   offset =
3510     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3511                          NDR_POINTER_REF, "VolSync: ", -1);
3512   MACRO_ST_CLEAR ("Hardlink reply");
3513
3514   return offset;
3515 }
3516 static int
3517   fileexp_dissect_hardlink_rqst
3518   (tvbuff_t *
3519    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3520 {
3521   dcerpc_info *di;
3522
3523   di = pinfo->private_data;
3524   if (di->conformant_run)
3525     {
3526       return offset;
3527     }
3528
3529 /*
3530         [in]    afsFid          *DirFidp,
3531         [in]    afsTaggedName   *Namep,
3532         [in]    afsFid          *ExistingFidp,
3533         [in]    afsHyper        *minVVp,
3534         [in]    unsigned32      Flags,
3535 */
3536
3537   /* afsFid */
3538   offset =
3539     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3540                          NDR_POINTER_REF, "afsFid: ", -1);
3541
3542   offset =
3543     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
3544                          dissect_afstaggedname, NDR_POINTER_REF,
3545                          "afsTaggedName: ", -1);
3546   /* afsFid */
3547   offset =
3548     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3549                          NDR_POINTER_REF, "afsFid: ", -1);
3550
3551   offset =
3552     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
3553                          NDR_POINTER_REF, "MinVVp:", -1);
3554
3555   offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep);
3556
3557   return offset;
3558 }
3559
3560 static int
3561   fileexp_dissect_makedir_resp
3562   (tvbuff_t *
3563    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3564 {
3565   dcerpc_info *di;
3566
3567   di = pinfo->private_data;
3568   if (di->conformant_run)
3569     {
3570       return offset;
3571     }
3572
3573 /*
3574         [out]   afsFid          *OutFidp,
3575         [out]   afsFetchStatus  *OutFidStatusp,
3576         [out]   afsFetchStatus  *OutDirStatusp,
3577         [out]   afsToken        *OutTokenp,
3578         [out]   afsVolSync      *Syncp
3579 */
3580   offset =
3581     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3582                          NDR_POINTER_REF, "afsFid: ", -1);
3583   offset =
3584     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3585                          NDR_POINTER_REF, "FetchStatus: ", -1);
3586   offset =
3587     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3588                          NDR_POINTER_REF, "FetchStatus: ", -1);
3589   offset =
3590     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
3591                          NDR_POINTER_REF, "afsToken: ", -1);
3592   offset =
3593     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3594                          NDR_POINTER_REF, "VolSync: ", -1);
3595
3596   MACRO_ST_CLEAR ("MakeDir reply");
3597
3598   return offset;
3599 }
3600
3601 static int
3602   fileexp_dissect_removedir_resp
3603   (tvbuff_t *
3604    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3605 {
3606   dcerpc_info *di;
3607
3608   di = pinfo->private_data;
3609   if (di->conformant_run)
3610     {
3611       return offset;
3612     }
3613
3614 /*
3615         [out]   afsFetchStatus  *OutDirStatusp,
3616         [out]   afsFid          *OutFidp,
3617         [out]   afsFetchStatus  *OutDelStatusp,
3618         [out]   afsVolSync      *Syncp
3619 */
3620
3621   offset =
3622     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3623                          NDR_POINTER_REF, "FetchStatus: ", -1);
3624   offset =
3625     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3626                          NDR_POINTER_REF, "afsFid: ", -1);
3627   offset =
3628     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3629                          NDR_POINTER_REF, "FetchStatus: ", -1);
3630   offset =
3631     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3632                          NDR_POINTER_REF, "VolSync: ", -1);
3633   MACRO_ST_CLEAR ("RemoveDir reply");
3634
3635   return offset;
3636
3637 }
3638
3639 static int
3640   fileexp_dissect_readdir_resp
3641   (tvbuff_t *
3642    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3643 {
3644
3645   guint32 nextoffsetp_high, nextoffsetp_low;
3646   dcerpc_info *di;
3647
3648   di = pinfo->private_data;
3649   if (di->conformant_run)
3650     {
3651       return offset;
3652     }
3653
3654
3655 /*
3656         [out]   afsHyper        *NextOffsetp,
3657         [out]   afsFetchStatus  *OutDirStatusp,
3658         [out]   afsToken        *OutTokenp,
3659         [out]   afsVolSync      *Syncp,
3660         [out]   pipe_t          *dirStream
3661 */
3662
3663   offset =
3664     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3665                         hf_fileexp_nextoffsetp_high, &nextoffsetp_high);
3666   offset =
3667     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3668                         hf_fileexp_nextoffsetp_low, &nextoffsetp_low);
3669
3670   if (check_col (pinfo->cinfo, COL_INFO))
3671     col_append_fstr (pinfo->cinfo, COL_INFO, " NextOffsetp:%u/%u",
3672                      nextoffsetp_high, nextoffsetp_low);
3673
3674   /* all packets seem to have SKIPTOKEN/SKIPSTATUS sent, and thus these structures are missing on calls holding tokens. */
3675
3676   offset =
3677     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3678                          NDR_POINTER_REF, "VolSync: ", -1);
3679   /* XXX need to add pipe_t here, once figured out. */
3680
3681   return offset;
3682 }
3683
3684 static int
3685   fileexp_dissect_releasetokens_resp
3686   (tvbuff_t *
3687    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3688 {
3689   dcerpc_info *di;
3690
3691   di = pinfo->private_data;
3692   if (di->conformant_run)
3693     {
3694       return offset;
3695     }
3696
3697   /* no out */
3698   MACRO_ST_CLEAR ("ReleaseTokens reply");
3699   return offset;
3700 }
3701
3702 static int
3703   fileexp_dissect_releasetokens_rqst
3704   (tvbuff_t *
3705    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3706 {
3707   dcerpc_info *di;
3708
3709   di = pinfo->private_data;
3710   if (di->conformant_run)
3711     {
3712       return offset;
3713     }
3714
3715
3716 /*
3717         [in]    afsReturns      *Tokens_Arrayp,
3718         [in]    unsigned32      Flags
3719 */
3720   offset =
3721     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsReturns,
3722                          NDR_POINTER_REF, "afsReturns: ", -1);
3723   offset =
3724     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
3725                          NDR_POINTER_REF, "afsFlags: ", -1);
3726   return offset;
3727 }
3728
3729 static int
3730   fileexp_dissect_gettime_resp
3731   (tvbuff_t *
3732    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3733 {
3734
3735   guint32 secondsp, usecondsp, syncdistance, syncdispersion;
3736   dcerpc_info *di;
3737
3738   di = pinfo->private_data;
3739   if (di->conformant_run)
3740     {
3741       return offset;
3742     }
3743
3744 /*
3745         [out]   unsigned32      *Secondsp,
3746         [out]   unsigned32      *USecondsp,
3747         [out]   unsigned32      *SyncDistance,
3748         [out]   unsigned32      *SyncDispersion
3749 */
3750
3751   offset =
3752     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3753                         hf_fileexp_gettime_secondsp, &secondsp);
3754   offset =
3755     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3756                         hf_fileexp_gettime_usecondsp, &usecondsp);
3757   offset =
3758     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3759                         hf_fileexp_gettime_syncdistance, &syncdistance);
3760   offset =
3761     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
3762                         hf_fileexp_gettime_syncdispersion, &syncdispersion);
3763
3764   if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, " Secondsp:%u  Usecondsp:%u SyncDistance:/%u SyncDispersion:%u", secondsp, usecondsp, syncdistance, syncdispersion);
3765
3766   MACRO_ST_CLEAR ("GetTime reply");
3767
3768   return offset;
3769
3770 }
3771
3772 static int
3773   fileexp_dissect_gettime_rqst
3774   (tvbuff_t *
3775    tvb _U_, int offset, packet_info * pinfo, proto_tree * tree _U_, guint8 *drep _U_)
3776 {
3777   dcerpc_info *di;
3778
3779   di = pinfo->private_data;
3780   if (di->conformant_run)
3781     {
3782       return offset;
3783     }
3784
3785   /* nothing */
3786
3787   return offset;
3788 }
3789
3790 static int
3791   fileexp_dissect_processquota_resp
3792   (tvbuff_t *
3793    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3794 {
3795   dcerpc_info *di;
3796
3797   di = pinfo->private_data;
3798   if (di->conformant_run)
3799     {
3800       return offset;
3801     }
3802
3803 /*
3804         [in,out]        afsQuota        *quotaListp,
3805         [out]           afsFetchStatus  *OutStatusp,
3806         [out]           afsVolSync      *Syncp
3807 */
3808
3809   /* XXX need afsQuota */
3810   offset += 92;
3811   offset =
3812     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3813                          NDR_POINTER_REF, "FetchStatus: ", -1);
3814   offset =
3815     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3816                          NDR_POINTER_REF, "VolSync: ", -1);
3817   MACRO_ST_CLEAR ("ProcessQuota reply");
3818
3819   return offset;
3820 }
3821
3822 static int
3823   fileexp_dissect_processquota_rqst
3824   (tvbuff_t *
3825    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3826 {
3827   dcerpc_info *di;
3828
3829   di = pinfo->private_data;
3830   if (di->conformant_run)
3831     {
3832       return offset;
3833     }
3834
3835 /*
3836         [in]            afsFid          *Fidp,
3837         [in]            afsHyper        *minVVp,
3838         [in]            unsigned32      Flags,
3839         [in,out]        afsQuota        *quotaListp,
3840 */
3841
3842   /* afsFid */
3843   offset =
3844     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3845                          NDR_POINTER_REF, "afsFid: ", -1);
3846   offset =
3847     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
3848                          NDR_POINTER_REF, "MinVVp:", -1);
3849   offset = dissect_afsFlags ( tvb, offset, pinfo, tree, drep);
3850
3851   /* XXX need to figure out afsQuota here */
3852   return offset;
3853 }
3854
3855 static int
3856   fileexp_dissect_getserverinterfaces_rqst
3857   (tvbuff_t *
3858    tvb _U_, int offset, packet_info * pinfo, proto_tree * tree _U_, guint8 *drep _U_)
3859 {
3860   dcerpc_info *di;
3861
3862   di = pinfo->private_data;
3863   if (di->conformant_run)
3864     {
3865       return offset;
3866     }
3867
3868 /*
3869         [in, out]               dfs_interfaceList *serverInterfacesP
3870 */
3871   /* XXX figure out dfs_interfacelist */
3872   return offset;
3873 }
3874
3875 static int
3876   fileexp_dissect_getserverinterfaces_resp
3877   (tvbuff_t *
3878    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3879 {
3880   dcerpc_info *di;
3881
3882   di = pinfo->private_data;
3883   if (di->conformant_run)
3884     {
3885       return offset;
3886     }
3887
3888 /*
3889         [in, out]               dfs_interfaceList *serverInterfacesP
3890 */
3891   /* XXX figure out dfs_interfacelist */
3892
3893   MACRO_ST_CLEAR ("GetServerInterfaces reply");
3894   return offset;
3895 }
3896
3897 static int
3898   fileexp_dissect_setparams_rqst
3899   (tvbuff_t *
3900    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3901 {
3902   dcerpc_info *di;
3903
3904   di = pinfo->private_data;
3905   if (di->conformant_run)
3906     {
3907       return offset;
3908     }
3909
3910 /*
3911         [in]            unsigned32      Flags,
3912         [in, out]       afsConnParams   *paramsP
3913 */
3914   offset = dissect_afsFlags( tvb, offset, pinfo, tree, drep);
3915   offset =
3916     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
3917                          dissect_afsConnParams, NDR_POINTER_REF,
3918                          "afsConnParams:", -1);
3919   return offset;
3920 }
3921
3922 static int
3923   fileexp_dissect_setparams_resp
3924   (tvbuff_t *
3925    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3926 {
3927   dcerpc_info *di;
3928
3929   di = pinfo->private_data;
3930   if (di->conformant_run)
3931     {
3932       return offset;
3933     }
3934
3935 /*
3936         [in, out]       afsConnParams   *paramsP
3937 */
3938
3939   offset =
3940     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
3941                          dissect_afsConnParams, NDR_POINTER_REF,
3942                          "afsConnParams:", -1);
3943   MACRO_ST_CLEAR ("SetParams reply");
3944   return offset;
3945 }
3946
3947 static int
3948   fileexp_dissect_makemountpoint_resp
3949   (tvbuff_t *
3950    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
3951 {
3952   dcerpc_info *di;
3953
3954   di = pinfo->private_data;
3955   if (di->conformant_run)
3956     {
3957       return offset;
3958     }
3959
3960 /*
3961         [out]   afsFid          *OutFidp,
3962         [out]   afsFetchStatus  *OutFidStatusp,
3963         [out]   afsFetchStatus  *OutDirStatusp,
3964         [out]   afsVolSync      *Syncp
3965 */
3966   /* afsFid */
3967   offset =
3968     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
3969                          NDR_POINTER_REF, "afsFid: ", -1);
3970   offset =
3971     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3972                          NDR_POINTER_REF, "FetchStatus: ", -1);
3973   offset =
3974     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
3975                          NDR_POINTER_REF, "FetchStatus: ", -1);
3976
3977   offset =
3978     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
3979                          NDR_POINTER_REF, "VolSync: ", -1);
3980   MACRO_ST_CLEAR ("MakeMountPoint reply");
3981   return offset;
3982 }
3983
3984 static int
3985   fileexp_dissect_getstatistics_rqst
3986   (tvbuff_t *
3987    tvb _U_, int offset, packet_info * pinfo, proto_tree * tree _U_, guint8 *drep _U_)
3988 {
3989   dcerpc_info *di;
3990
3991   di = pinfo->private_data;
3992   if (di->conformant_run)
3993     {
3994       return offset;
3995     }
3996
3997   /* nothing for request */
3998   return offset;
3999 }
4000
4001 static int
4002   fileexp_dissect_getstatistics_resp
4003   (tvbuff_t *
4004    tvb _U_, int offset, packet_info * pinfo, proto_tree * tree _U_, guint8 *drep _U_)
4005 {
4006   dcerpc_info *di;
4007
4008   di = pinfo->private_data;
4009   if (di->conformant_run)
4010     {
4011       return offset;
4012     }
4013
4014 /*
4015         [out]   afsStatistics   *Statisticsp
4016 */
4017   /* XXX figure out afsStatistics */
4018   return offset;
4019 }
4020
4021 static int
4022   fileexp_dissect_bulkfetchvv_rqst
4023   (tvbuff_t *
4024    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
4025 {
4026
4027   guint32 cellidp_high, cellidp_low, numvols, spare1, spare2;
4028   dcerpc_info *di;
4029
4030   di = pinfo->private_data;
4031   if (di->conformant_run)
4032     {
4033       return offset;
4034     }
4035
4036 /*
4037         [in]    afsHyper        *cellIdp,
4038         [in]    afsBulkVolIDs   *VolIDsp,
4039         [in]    unsigned32      NumVols,
4040         [in]    unsigned32      Flags,
4041         [in]    unsigned32      spare1,
4042         [in]    unsigned32      spare2,
4043 */
4044   offset =
4045     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4046                         hf_fileexp_cellidp_high, &cellidp_high);
4047   offset =
4048     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4049                         hf_fileexp_cellidp_low, &cellidp_low);
4050
4051   if (check_col (pinfo->cinfo, COL_INFO))
4052     col_append_fstr (pinfo->cinfo, COL_INFO, " CellIDp:%u/%u", cellidp_high,
4053                      cellidp_low);
4054
4055   /* XXX figure out the afsBulkVolIDS */
4056   offset =
4057     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4058                         hf_fileexp_bulkfetchvv_numvols, &numvols);
4059
4060   offset = dissect_afsFlags (tvb, offset, pinfo, tree, drep);
4061   offset =
4062     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4063                         hf_fileexp_bulkfetchvv_spare1, &spare1);
4064   offset =
4065     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4066                         hf_fileexp_bulkfetchvv_spare2, &spare2);
4067   return offset;
4068 }
4069
4070 static int
4071   fileexp_dissect_bulkfetchvv_resp
4072   (tvbuff_t *
4073    tvb _U_, int offset, packet_info * pinfo, proto_tree * tree _U_, guint8 *drep _U_)
4074 {
4075   dcerpc_info *di;
4076
4077   di = pinfo->private_data;
4078   if (di->conformant_run)
4079     {
4080       return offset;
4081     }
4082
4083 /*
4084         [out]   afsBulkVVs      *VolVVsp,
4085         [out]   unsigned32      *spare4
4086 */
4087   /* XXX need to figure out afsBulkVVs  ; */
4088   return offset;
4089 }
4090
4091 static int
4092   fileexp_dissect_bulkkeepalive_resp
4093   (tvbuff_t *
4094    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
4095 {
4096   guint32 spare4;
4097   dcerpc_info *di;
4098
4099   di = pinfo->private_data;
4100   if (di->conformant_run)
4101     {
4102       return offset;
4103     }
4104
4105 /*
4106         [out]   unsigned32      *spare4
4107 */
4108
4109   offset =
4110     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4111                         hf_fileexp_bulkkeepalive_spare4, &spare4);
4112   MACRO_ST_CLEAR ("BulkKeepAlive reply");
4113   return offset;
4114 }
4115
4116 static int
4117   fileexp_dissect_bulkkeepalive_rqst
4118   (tvbuff_t *
4119    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
4120 {
4121   guint32 numexecfids, spare1, spare2;
4122   dcerpc_info *di;
4123
4124   di = pinfo->private_data;
4125   if (di->conformant_run)
4126     {
4127       return offset;
4128     }
4129
4130 /*
4131         [in]    afsBulkFEX      *KAFEXp,
4132         [in]    unsigned32      numExecFids,
4133         [in]    unsigned32      Flags,
4134         [in]    unsigned32      spare1,
4135         [in]    unsigned32      spare2,
4136 */
4137   /* XXX figure out afsBulkFEX */
4138   offset =
4139     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4140                         hf_fileexp_bulkkeepalive_numexecfids, &numexecfids);
4141   offset =
4142     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFlags,
4143                          NDR_POINTER_REF, "afsFlags:", -1);
4144   offset =
4145     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4146                         hf_fileexp_bulkkeepalive_spare1, &spare1);
4147   offset =
4148     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4149                         hf_fileexp_bulkkeepalive_spare2, &spare2);
4150   return offset;
4151 }
4152
4153 static int
4154   fileexp_dissect_bulkfetchstatus_rqst
4155   (tvbuff_t *
4156    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
4157 {
4158   guint32 offsetp_high, offsetp_low, size;
4159   dcerpc_info *di;
4160
4161   di = pinfo->private_data;
4162   if (di->conformant_run)
4163     {
4164       return offset;
4165     }
4166
4167
4168 /*
4169         [in]            afsFid          *DirFidp,
4170         [in]            afsHyper        *Offsetp,
4171         [in]            unsigned32      Size,
4172         [in]            afsHyper        *minVVp,
4173         [in]            unsigned32      Flags,
4174 */
4175
4176   offset =
4177     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsFid,
4178                          NDR_POINTER_REF, "afsFid: ", -1);
4179   offset =
4180     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4181                         hf_fileexp_offsetp_high, &offsetp_high);
4182   offset =
4183     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4184                         hf_fileexp_offsetp_low, &offsetp_low);
4185
4186   if (check_col (pinfo->cinfo, COL_INFO))
4187     col_append_fstr (pinfo->cinfo, COL_INFO, " Offsetp:%u/%u", offsetp_high,
4188                      offsetp_low);
4189   offset =
4190     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4191                         hf_fileexp_bulkfetchstatus_size, &size);
4192   offset =
4193     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_minvvp,
4194                          NDR_POINTER_REF, "MinVVp:", -1);
4195   offset = dissect_afsFlags(tvb, offset, pinfo, tree, drep);
4196
4197   return offset;
4198 }
4199
4200 static int
4201   fileexp_dissect_bulkfetchstatus_resp
4202   (tvbuff_t *
4203    tvb, int offset, packet_info * pinfo, proto_tree * tree, guint8 *drep)
4204 {
4205
4206   dcerpc_info *di;
4207
4208   di = pinfo->private_data;
4209   if (di->conformant_run)
4210     {
4211       return offset;
4212     }
4213
4214 /*
4215         [out]           BulkStat        *bulkstats,
4216         [out]           afsHyper        *NextOffsetp,
4217         [out]           afsFetchStatus  *OutDirStatusp,
4218         [out]           afsToken        *OutTokenp,
4219         [out]           afsVolSync      *Syncp,
4220         [out]           pipe_t          *dirStream
4221 */
4222
4223   offset =
4224     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afsBulkStat,
4225                          NDR_POINTER_REF, "BulkStat: ", -1);
4226 /* Under construction. The packet seems to have the pipe_t before the rest of the data listed in idl. */
4227
4228 /*
4229   offset =
4230     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4231                         hf_fileexp_nextoffsetp_high, &nextoffsetp_high);
4232   offset =
4233     dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
4234                         hf_fileexp_nextoffsetp_low, &nextoffsetp_low);
4235
4236   if (check_col (pinfo->cinfo, COL_INFO))
4237     col_append_fstr (pinfo->cinfo, COL_INFO, " NextOffsetp:%u/%u",
4238                      nextoffsetp_high, nextoffsetp_low);
4239   offset =
4240     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_fetchstatus,
4241                          NDR_POINTER_REF, "FetchStatus: ", -1);
4242   offset =
4243     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_afstoken,
4244                          NDR_POINTER_REF, "afsToken: ", -1);
4245   offset =
4246     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep, dissect_volsync,
4247                          NDR_POINTER_REF, "VolSync: ", -1);
4248 */
4249   /* XXX figure out pipe_t */
4250
4251   return offset;
4252 }
4253
4254 static dcerpc_sub_dissector fileexp_dissectors[] = {
4255   { 0, "SetContext", fileexp_dissect_setcontext_rqst, fileexp_dissect_setcontext_resp} ,
4256   { 1, "LookupRoot", fileexp_dissect_lookuproot_rqst, fileexp_dissect_lookuproot_resp} ,
4257   { 2, "FetchData", fileexp_dissect_fetchdata_rqst, fileexp_dissect_fetchdata_resp} ,
4258   { 3, "FetchAcl", fileexp_dissect_fetchacl_rqst, fileexp_dissect_fetchacl_resp} ,
4259   { 4, "FetchStatus", fileexp_dissect_fetchstatus_rqst, fileexp_dissect_fetchstatus_resp} ,
4260   { 5, "StoreData", fileexp_dissect_storedata_rqst, fileexp_dissect_storedata_resp} ,
4261   { 6, "StoreAcl", fileexp_dissect_storeacl_rqst, fileexp_dissect_storeacl_resp} ,
4262   { 7, "StoreStatus", fileexp_dissect_storestatus_rqst, fileexp_dissect_storestatus_resp} ,
4263   { 8, "RemoveFile", fileexp_dissect_removefile_rqst, fileexp_dissect_removefile_resp} ,
4264   { 9, "CreateFile", fileexp_dissect_createfile_rqst, fileexp_dissect_createfile_resp} ,
4265   { 10, "Rename", fileexp_dissect_rename_rqst, fileexp_dissect_rename_resp} ,
4266   { 11, "Symlink", fileexp_dissect_symlink_rqst, fileexp_dissect_symlink_resp} ,
4267   { 12, "HardLink", fileexp_dissect_hardlink_rqst, fileexp_dissect_hardlink_resp} ,
4268   { 13, "MakeDir", fileexp_dissect_makedir_rqst, fileexp_dissect_makedir_resp} ,
4269   { 14, "RemoveDir", fileexp_dissect_removedir_rqst, fileexp_dissect_removedir_resp} ,
4270   { 15, "Readdir", fileexp_dissect_readdir_rqst, fileexp_dissect_readdir_resp} ,
4271   { 16, "Lookup", fileexp_dissect_lookup_rqst, fileexp_dissect_lookup_resp} ,
4272   { 17, "GetToken", fileexp_dissect_gettoken_rqst, fileexp_dissect_gettoken_resp} ,
4273   { 18, "ReleaseTokens", fileexp_dissect_releasetokens_rqst, fileexp_dissect_releasetokens_resp} ,
4274   { 19, "GetTime", fileexp_dissect_gettime_rqst, fileexp_dissect_gettime_resp} ,
4275   { 20, "MakeMountPoint", fileexp_dissect_makemountpoint_rqst, fileexp_dissect_makemountpoint_resp} ,
4276   { 21, "GetStatistics", fileexp_dissect_getstatistics_rqst, fileexp_dissect_getstatistics_resp} ,
4277   { 22, "BulkFetchVV", fileexp_dissect_bulkfetchvv_rqst, fileexp_dissect_bulkfetchvv_resp} ,
4278   { 23, "BulkKeepAlive", fileexp_dissect_bulkkeepalive_rqst, fileexp_dissect_bulkkeepalive_resp} ,
4279   { 24, "ProcessQuota", fileexp_dissect_processquota_rqst, fileexp_dissect_processquota_resp} ,
4280   { 25, "GetServerInterfaces", fileexp_dissect_getserverinterfaces_rqst, fileexp_dissect_getserverinterfaces_resp} ,
4281   { 26, "SetParams", fileexp_dissect_setparams_rqst, fileexp_dissect_setparams_resp} ,
4282   { 27, "BulkFetchStatus", fileexp_dissect_bulkfetchstatus_rqst, fileexp_dissect_bulkfetchstatus_resp} ,
4283   { 0, NULL, NULL, NULL}
4284   ,
4285 };
4286 void
4287 proto_register_fileexp (void)
4288 {
4289
4290   static hf_register_info hf[] = {
4291     { &hf_error_st, {"AFS4Int Error Status Code", "fileexp.st", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4292     { &hf_fileexp_flags, {"DFS Flags", "fileexp.flags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4293     { &hf_fileexp_tn_string, {"String", "fileexp.string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
4294     { &hf_fileexp_tn_size, {"String Size", "fileexp.tn_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4295     { &hf_fileexp_opnum, {"Operation", "fileexp.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4296     { &hf_fileexp_setcontext_rqst_epochtime, {"EpochTime:", "fileexp.setcontext_rqst_epochtime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL}},
4297     { &hf_fileexp_setcontext_rqst_secobjectid, { "SetObjectid:", "fileexp.setcontext_secobjextid", FT_STRING, BASE_NONE, NULL, 0x0, "UUID", HFILL} } ,
4298     { &hf_fileexp_setcontext_rqst_clientsizesattrs, { "ClientSizeAttrs:", "fileexp.setcontext_clientsizesattrs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4299     { &hf_fileexp_setcontext_rqst_parm7, { "Parm7:", "fileexp.setcontext.parm7", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4300     { &hf_fileexp_acl_len, {"Acl Length", "fileexp.acl_len", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4301     { &hf_fileexp_acltype, {"Acl type", "fileexp.acltype", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4302     { &hf_fileexp_minvvp_high, {"minVVp high", "fileexp.minvvp_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4303     { &hf_fileexp_minvvp_low, {"minVVp low", "fileexp.minvvp_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4304     { &hf_fileexp_volume_low, { "Volume low", "fileexp.volume_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4305     { &hf_fileexp_volume_high, { "Volume high", "fileexp.volume_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4306     { &hf_fileexp_vnode, { "Vnode", "fileexp.vnode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4307     { &hf_fileexp_unique, { "Unique", "fileexp.unique", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4308     { &hf_fileexp_accesstime_msec, { "Access time (msec)", "fileexp.accesstime_msec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4309     { &hf_fileexp_accesstime_sec, { "Access time (sec)", "fileexp.accesstime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4310     { &hf_fileexp_aclexpirationtime, { "Acl expiration time", "fileexp.aclexpirationtime", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4311     { &hf_fileexp_agtypeunique, { "agtypeunique", "fileexp.agtypeunique", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4312     { &hf_fileexp_anonymousaccess, { "Anonymous Access", "fileexp.anonymousaccess", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4313     { &hf_fileexp_author, { "Author", "fileexp.author", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4314     { &hf_fileexp_blocksused, { "Blocks used", "fileexp.blocksused", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} },
4315     { &hf_fileexp_calleraccess, { "Caller access", "fileexp.calleraccess", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4316     { &hf_fileexp_changetime_msec, { "Change time (msec)", "fileexp.changetime_msec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4317     { &hf_fileexp_changetime_sec, { "Change time (sec)", "fileexp.changetime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4318     { &hf_fileexp_clientspare1, { "Client spare1", "fileexp.clientspare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4319     { &hf_fileexp_dataversion_high, { "Data version (high)", "fileexp.dataversion_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4320     { &hf_fileexp_dataversion_low, { "Data version (low)", "fileexp.dataversion_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4321     { &hf_fileexp_devicenumber, { "Device number", "fileexp.devicenumber", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4322     { &hf_fileexp_devicenumberhighbits, { "Device number high bits", "fileexp.devicenumberhighbits", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4323     { &hf_fileexp_filetype, { "File type", "fileexp.filetype", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4324     { &hf_fileexp_group, { "Group", "fileexp.group", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4325     { &hf_fileexp_himaxspare, { "Hi max spare", "fileexp.himaxspare", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4326     { &hf_fileexp_interfaceversion, { "Interface version", "fileexp.interfaceversion", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4327     { &hf_fileexp_length_high, { "Length high", "fileexp.length_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4328     { &hf_fileexp_length_low, { "Length low", "fileexp.length_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4329     { &hf_fileexp_linkcount, { "Link count", "fileexp.linkcount", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4330     { &hf_fileexp_lomaxspare, { "Lo max spare", "fileexp.lomaxspare", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4331     { &hf_fileexp_mode, { "Mode", "fileexp.mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4332     { &hf_fileexp_modtime_msec, { "Modify time (msec)", "fileexp.modtime_msec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4333     { &hf_fileexp_modtime_sec, { "Modify time (sec)", "fileexp.modtime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4334     { &hf_fileexp_objectuuid, { "Object uuid", "fileexp.objectuuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL} } ,
4335     { &hf_fileexp_owner, { "Owner", "fileexp.owner", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4336     { &hf_fileexp_parentunique, { "Parent unique", "fileexp.parentunique", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4337     { &hf_fileexp_parentvnode, { "Parent vnode", "fileexp.parentvnode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4338     { &hf_fileexp_pathconfspare, { "Path conf spare", "fileexp.pathconfspare", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4339     { &hf_fileexp_servermodtime_msec, { "Server modify time (msec)", "fileexp.servermodtime_msec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4340     { &hf_fileexp_servermodtime_sec, { "Server modify time (sec)", "fileexp.servermodtime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4341     { &hf_fileexp_spare4, { "Spare4", "fileexp.spare4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4342     { &hf_fileexp_spare5, { "Spare5", "fileexp.spare5", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4343     { &hf_fileexp_spare6, { "Spare6", "fileexp.spare6", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4344     { &hf_fileexp_typeuuid, { "Type uuid", "fileexp.typeuuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL} } ,
4345     { &hf_fileexp_volid_hi, { "Vol id hi", "fileexp.volid_hi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4346     { &hf_fileexp_volid_low, { "Vol id low", "fileexp.volid_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4347     { &hf_fileexp_vvage, { "Vvage", "fileexp.vvage", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4348     { &hf_fileexp_vv_hi, { "Vv hi", "fileexp.vv_hi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4349     { &hf_fileexp_vv_low, { "Vv low", "fileexp.vv_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4350     { &hf_fileexp_vvpingage, { "Vv pingage", "fileexp.vvpingage", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4351     { &hf_fileexp_vvspare1, { "Vv spare1", "fileexp.vvspare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4352     { &hf_fileexp_vvspare2, { "Vv spare2", "fileexp.vvspare2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4353     { &hf_fileexp_beginrange, { "Begin range", "fileexp.beginrange", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4354     { &hf_fileexp_beginrangeext, { "Begin range ext", "fileexp.beginrangeext", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4355     { &hf_fileexp_endrange, { "End range", "fileexp.endrange", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4356     { &hf_fileexp_endrangeext, { "End range ext", "fileexp.endrangeext", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4357     { &hf_fileexp_expirationtime, { "Expiration time", "fileexp.expirationtime", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4358     { &hf_fileexp_tokenid_hi, { "Tokenid hi", "fileexp.tokenid_hi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4359     { &hf_fileexp_tokenid_low, { "Tokenid low", "fileexp.tokenid_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4360     { &hf_fileexp_type_hi, { "Type hi", "fileexp.type_hi", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4361     { &hf_fileexp_type_low, { "Type low", "fileexp.type_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4362     { &hf_fileexp_tn_length, { "Tn length", "fileexp.tn_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4363     { &hf_fileexp_tn_tag, { "Tn tag", "fileexp.tn_tag", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4364     { &hf_fileexp_storestatus_accesstime_sec, { "Store status access time (sec)", "fileexp.storestatus_accesstime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4365     { &hf_fileexp_storestatus_accesstime_usec, { "Store status access time (usec)", "fileexp.storestatus_accesstime_usec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4366     { &hf_fileexp_storestatus_changetime_sec, { "Store status change time (sec)", "fileexp.storestatus_changetime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4367     { &hf_fileexp_storestatus_changetime_usec, { "Store status change time (usec)", "fileexp.storestatus_changetime_usec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4368     { &hf_fileexp_storestatus_clientspare1, { "Store Status client spare1", "fileexp.storestatus_clientspare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4369     { &hf_fileexp_storestatus_cmask, { "Store status cmask", "fileexp.storestatus_cmask", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4370     { &hf_fileexp_storestatus_devicenumber, { "Store status device number", "fileexp.storestatus_devicenumber", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4371     { &hf_fileexp_storestatus_devicenumberhighbits, { "Store status device number high bits", "fileexp.storestatus_devicenumberhighbits", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4372     { &hf_fileexp_storestatus_devicetype, { "Store status device type", "fileexp.storestatus_devicetype", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4373     { &hf_fileexp_storestatus_group, { "Store status group", "fileexp.storestatus_group", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4374     { &hf_fileexp_storestatus_length_high, { "Store status length high", "fileexp.storestatus_length_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4375     { &hf_fileexp_storestatus_length_low, { "Store status length low", "fileexp.storestatus_length_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4376     { &hf_fileexp_storestatus_mask, { "Store status mask", "fileexp.storestatus_mask", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4377     { &hf_fileexp_storestatus_mode, { "Store status mode", "fileexp.storestatus_mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4378     { &hf_fileexp_storestatus_modtime_sec, { "Store status modify time (sec)", "fileexp.storestatus_modtime_sec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4379     { &hf_fileexp_storestatus_modtime_usec, { "Store status modify time (usec)", "fileexp.storestatus_modtime_usec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4380     { &hf_fileexp_storestatus_owner, { "Store status owner", "fileexp.storestatus_owner", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4381     { &hf_fileexp_storestatus_spare1, { "Store status spare1", "fileexp.storestatus_spare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4382     { &hf_fileexp_storestatus_spare2, { "Store status spare2", "fileexp.storestatus_spare2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4383     { &hf_fileexp_storestatus_spare3, { "Store status spare3", "fileexp.storestatus_spare3", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4384     { &hf_fileexp_storestatus_spare4, { "Store status spare4", "fileexp.storestatus_spare4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4385     { &hf_fileexp_storestatus_spare5, { "Store status spare5", "fileexp.storestatus_spare5", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4386     { &hf_fileexp_storestatus_spare6, { "Store status spare6", "fileexp.storestatus_spare6", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4387     { &hf_fileexp_storestatus_trunc_high, { "Store status trunc high", "fileexp.storestatus_trunc_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4388     { &hf_fileexp_storestatus_trunc_low, { "Store status trunc low", "fileexp.storestatus_trunc_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4389     { &hf_fileexp_storestatus_typeuuid, { "Store status type uuid", "fileexp.storestatus_typeuuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL} } ,
4390     { &hf_fileexp_st, { "st", "fileexp.st", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4391     { &hf_fileexp_uint, {"uint", "fileexp.uint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4392     { &hf_fileexp_l_end_pos, { "l_end_pos", "fileexp.l_end_pos", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4393     { &hf_fileexp_l_end_pos_ext, { "l_end_pos_ext", "fileexp.l_end_pos_ext", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4394     { &hf_fileexp_l_fstype, { "l_fstype", "fileexp.l_fstype", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4395     { &hf_fileexp_l_pid, { "l_pid", "fileexp.l_pid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4396     { &hf_fileexp_l_start_pos, { "l_start_pos", "fileexp.l_start_pos", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4397     { &hf_fileexp_l_start_pos_ext, { "l_start_pos_ext", "fileexp.l_start_pos_ext", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4398     { &hf_fileexp_l_sysid, { "l_sysid", "fileexp.l_sysid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4399     { &hf_fileexp_l_type, { "l_type", "fileexp.l_type", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4400     { &hf_fileexp_l_whence, { "l_whence", "fileexp.l_whence", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } ,
4401     {&hf_afsconnparams_mask, {"afs conn params mask", "fileexp.afs_connparams_mask", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4402     {&hf_afsconnparams_values, {"afs conn params values", "fileexp.afs_connparams_values", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4403     {&hf_fileexp_afsFid_cell_high, {"Cell High", "fileexp.afsFid.cell_high", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Cell High", HFILL}},
4404     {&hf_fileexp_afsFid_cell_low, {"Cell Low", "fileexp.afsFid.cell_low", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Cell Low", HFILL}},
4405     {&hf_fileexp_afsFid_volume_high, {"Volume High", "fileexp.afsFid.volume_high", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Volume High", HFILL}},
4406     {&hf_fileexp_afsFid_volume_low, {"Volume Low", "fileexp.afsFid.volume_low", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Volume Low", HFILL}},
4407     {&hf_fileexp_afsFid_Vnode, {"Vnode", "fileexp.afsFid.Vnode", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Vnode", HFILL}},
4408     {&hf_fileexp_afsFid_Unique, {"Unique", "fileexp.afsFid.Unique", FT_UINT32, BASE_HEX, NULL, 0x0, "afsFid Unique", HFILL}},
4409     {&hf_fileexp_afsNetAddr_type, {"Type", "afsNetAddr.type", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4410     {&hf_fileexp_afsNetAddr_data, {"IP Data", "afsNetAddr.data", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
4411     {&hf_fileexp_position_high, {"Position High", "fileexp.position_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4412     {&hf_fileexp_position_low, {"Position Low", "fileexp.position_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4413     {&hf_fileexp_afsreturndesc_tokenid_high, {"Token id High", "fileexp.afsreturndesc_tokenid_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4414     {&hf_fileexp_afsreturndesc_tokenid_low, {"Token id low", "fileexp.afsreturndesc_tokenid_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4415     {&hf_fileexp_afsreturndesc_type_high, {"Type high", "fileexp.type_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4416     {&hf_fileexp_afsreturndesc_type_low, {"Type low", "fileexp.type_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4417     {&hf_fileexp_offsetp_high, {"offset high", "fileexp.offset_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4418     {&hf_fileexp_offsetp_low, {"offset high", "fileexp.offset_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4419     {&hf_fileexp_nextoffsetp_high, {"next offset high", "fileexp.nextoffset_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4420     {&hf_fileexp_nextoffsetp_low, {"next offset low", "fileexp.nextoffset_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4421     {&hf_fileexp_returntokenidp_high, {"return token idp high", "fileexp.returntokenidp_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4422     {&hf_fileexp_returntokenidp_low, {"return token idp low", "fileexp.returntokenidp_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4423     {&hf_fileexp_cellidp_high, {"cellidp high", "fileexp.cellidp_high", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4424     {&hf_fileexp_cellidp_low, {"cellidp low", "fileexp.cellidp_low", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4425     {&hf_afserrorstatus_st, {"AFS Error Code", "fileexp.afserrortstatus_st", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4426     {&hf_fileexp_length, {"Length", "fileexp.length", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4427     {&hf_fileexp_afsTaggedPath_tp_chars, {"AFS Tagged Path", "fileexp.TaggedPath_tp_chars", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
4428     {&hf_fileexp_afsTaggedPath_tp_tag, {"AFS Tagged Path Name", "fileexp.TaggedPath_tp_tag", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4429     {&hf_fileexp_afsacl_uuid1, {"AFS ACL UUID1", "fileexp.afsacl_uuid1", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL}},
4430     {&hf_fileexp_bulkfetchstatus_size, {"BulkFetchStatus Size", "fileexp.bulkfetchstatus_size", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4431     {&hf_fileexp_bulkfetchvv_numvols, {"BulkFetchVv num vols", "fileexp.bulkfetchvv_numvols", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4432     {&hf_fileexp_bulkfetchvv_spare1, {"BulkFetchVv spare1", "fileexp.bulkfetchvv_spare1", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4433     {&hf_fileexp_bulkfetchvv_spare2, {"BulkFetchVv spare2", "fileexp.bulkfetchvv_spare2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4434     {&hf_fileexp_bulkkeepalive_numexecfids, {"BulkKeepAlive numexecfids", "fileexp.bulkkeepalive_numexecfids", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4435     {&hf_fileexp_bulkkeepalive_spare4, {"BulkKeepAlive spare4", "fileexp.bulkfetchkeepalive_spare2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4436     {&hf_fileexp_bulkkeepalive_spare2, {"BulkKeepAlive spare2", "fileexp.bulkfetchkeepalive_spare2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4437     {&hf_fileexp_bulkkeepalive_spare1, {"BulkFetch KeepAlive spare1", "fileexp.bulkfetchkeepalive_spare1", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4438     {&hf_fileexp_afsacl_defaultcell_uuid, {"Default Cell UUID", "fileexp.defaultcell_uuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL}},
4439     {&hf_fileexp_afsuuid_uuid, {"AFS UUID", "fileexp.uuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL}},
4440     {&hf_fileexp_gettime_syncdispersion, {"GetTime Syncdispersion", "fileexp.gettime_syncdispersion", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4441     {&hf_fileexp_gettime_syncdistance, {"SyncDistance", "fileexp.gettime.syncdistance", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4442     {&hf_fileexp_gettime_usecondsp, {"GetTime usecondsp", "fileexp.gettime_usecondsp", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4443     {&hf_fileexp_readdir_size, {"Readdir Size", "fileexp.readdir.size", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4444     {&hf_fileexp_afsNameString_t_principalName_size, {"Principal Name Size", "fileexp.principalName_size", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4445     {&hf_fileexp_afsNameString_t_principalName_size2, {"Principal Name Size2", "fileexp.principalName_size2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4446     {&hf_fileexp_afsTaggedPath_tp_length, {"Tagged Path Length", "fileexp.afsTaggedPath_length", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4447     {&hf_fileexp_fstype, {"Filetype", "fileexp.fstype", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4448     {&hf_fileexp_gettime_secondsp, {"GetTime secondsp", "fileexp.gettime_secondsp", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
4449     {&hf_fileexp_afsNameString_t_principalName_string, {"Principal Name", "fileexp.NameString_principal", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
4450     {&hf_fileexp_fetchdata_pipe_t_size, {"FetchData Pipe_t size", "fileexp.fetchdata_pipe_t_size", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
4451   };
4452
4453   static gint *ett[] = {
4454     &ett_fileexp,
4455     &ett_fileexp_afsReturnDesc,
4456     &ett_fileexp_afsFid,
4457     &ett_fileexp_afsNetAddr,
4458     &ett_fileexp_fetchstatus,
4459     &ett_fileexp_afsflags,
4460     &ett_fileexp_volsync,
4461     &ett_fileexp_minvvp,
4462     &ett_fileexp_afsfidtaggedname,
4463     &ett_fileexp_afstaggedname,
4464     &ett_fileexp_afstoken,
4465     &ett_fileexp_afsstorestatus,
4466     &ett_fileexp_afsRecordLock,
4467     &ett_fileexp_afsAcl,
4468     &ett_fileexp_afsNameString_t,
4469     &ett_fileexp_afsConnParams,
4470     &ett_fileexp_afsErrorStatus,
4471     &ett_fileexp_afsTaggedPath,
4472     &ett_fileexp_afsNetData,
4473     &ett_fileexp_afsBulkStat,
4474     &ett_fileexp_afsuuid,
4475     &ett_fileexp_offsetp,
4476     &ett_fileexp_returntokenidp,
4477     &ett_fileexp_afsbundled_stat,
4478   };
4479
4480   proto_fileexp = proto_register_protocol ("DCE DFS File Exporter", "FILEEXP", "fileexp");
4481   proto_register_field_array (proto_fileexp, hf, array_length (hf));
4482   proto_register_subtree_array (ett, array_length (ett));
4483 }
4484
4485 void
4486 proto_reg_handoff_fileexp (void)
4487 {
4488   /*
4489    * Register the protocol as dcerpc
4490    */
4491   dcerpc_init_uuid (proto_fileexp, ett_fileexp, &uuid_fileexp, ver_fileexp,
4492                     fileexp_dissectors, hf_fileexp_opnum);
4493 }