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