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