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