2 * Routines for AFS packet dissection
3 * Copyright 1999, Nathan Neulinger <nneul@umr.edu>
4 * Based on routines from tcpdump patches by
5 * Ken Hornstein <kenh@cmf.nrl.navy.mil>
6 * Portions based on information retrieved from the RX definitions
7 * in Arla, the free AFS client at http://www.stacken.kth.se/project/arla/
8 * Portions based on information/specs retrieved from the OpenAFS sources at
9 * www.openafs.org, Copyright IBM.
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * Copied from packet-tftp.c
17 * SPDX-License-Identifier: GPL-2.0-or-later
22 #include <stdio.h> /* for sscanf() */
24 #include <epan/packet.h>
25 #include <epan/conversation.h>
26 #include <epan/reassemble.h>
27 #include <epan/ptvcursor.h>
29 #include "packet-rx.h"
31 /* Forward declarations */
32 void proto_register_afs(void);
34 /* Defragment (reassemble) fragmented AFS traffic */
35 static bool afs_defragment
;
37 #define AFS_PORT_FS 7000
38 #define AFS_PORT_CB 7001
39 #define AFS_PORT_PROT 7002
40 #define AFS_PORT_VLDB 7003
41 #define AFS_PORT_KAUTH 7004
42 #define AFS_PORT_VOL 7005
43 #define AFS_PORT_ERROR 7006 /* Doesn't seem to be used */
44 #define AFS_PORT_BOS 7007
45 #define AFS_PORT_UPDATE 7008
46 #define AFS_PORT_RMTSYS 7009
47 #define AFS_PORT_BACKUP 7021
48 #define AFS_PORT_BUTC 7025 /* and up */
51 #define AFSNAMEMAX 256
55 #define AFSOPAQUEMAX 1024
61 #define BOSNAMEMAX 256
63 #define PRSFS_READ 1 /* Read files */
64 #define PRSFS_WRITE 2 /* Write files */
65 #define PRSFS_INSERT 4 /* Insert files into a directory */
66 #define PRSFS_LOOKUP 8 /* Lookup files into a directory */
67 #define PRSFS_DELETE 16 /* Delete files */
68 #define PRSFS_LOCK 32 /* Lock files */
69 #define PRSFS_ADMINISTER 64 /* Change ACL's */
71 #define CB_TYPE_EXCLUSIVE 1
72 #define CB_TYPE_SHARED 2
73 #define CB_TYPE_DROPPED 3
76 #define OPCODE_HIGH 66000 /* arbitrary, is just a fuzzy check for encrypted traffic */
77 #define VOTE_LOW 10000
78 #define VOTE_HIGH 10007
79 #define DISK_LOW 20000
80 #define DISK_HIGH 20013
82 #define FILE_TYPE_FILE 1
83 #define FILE_TYPE_DIR 2
84 #define FILE_TYPE_LINK 3
100 uint32_t InterfaceVersion
;
104 uint32_t DataVersion
;
107 uint32_t CallerAccess
;
108 uint32_t AnonymousAccess
;
109 uint32_t UnixModeBits
;
110 uint32_t ParentVnode
;
111 uint32_t ParentUnique
;
113 uint32_t ClientModTime
;
114 uint32_t ServerModTime
;
123 struct afs_volumeinfo
{
131 uint32_t ServerCount
;
150 static int proto_afs
;
151 static int hf_afs_fs
;
152 static int hf_afs_cb
;
153 static int hf_afs_prot
;
154 static int hf_afs_vldb
;
155 static int hf_afs_kauth
;
156 static int hf_afs_vol
;
157 static int hf_afs_error
;
158 static int hf_afs_bos
;
159 static int hf_afs_update
;
160 static int hf_afs_rmtsys
;
161 static int hf_afs_ubik
;
162 static int hf_afs_backup
;
163 static int hf_afs_butc
;
164 static int hf_afs_service
;
166 static int hf_afs_fs_opcode
;
167 static int hf_afs_cb_opcode
;
168 static int hf_afs_prot_opcode
;
169 static int hf_afs_vldb_opcode
;
170 static int hf_afs_kauth_opcode
;
171 static int hf_afs_vol_opcode
;
172 static int hf_afs_error_opcode
;
173 static int hf_afs_bos_opcode
;
174 static int hf_afs_update_opcode
;
175 static int hf_afs_rmtsys_opcode
;
176 static int hf_afs_ubik_opcode
;
177 static int hf_afs_backup_opcode
;
178 static int hf_afs_butc_opcode
;
180 static int hf_afs_fs_fid_volume
;
181 static int hf_afs_fs_fid_vnode
;
182 static int hf_afs_fs_fid_uniqifier
;
183 static int hf_afs_fs_offset
;
184 static int hf_afs_fs_length
;
185 static int hf_afs_fs_flength
;
186 static int hf_afs_fs_offset64
;
187 static int hf_afs_fs_length64
;
188 static int hf_afs_fs_flength64
;
189 static int hf_afs_fs_errcode
;
190 static int hf_afs_fs_data
;
191 static int hf_afs_fs_name
;
192 static int hf_afs_fs_oldname
;
193 static int hf_afs_fs_newname
;
194 static int hf_afs_fs_symlink_name
;
195 static int hf_afs_fs_symlink_content
;
196 static int hf_afs_fs_volid
;
197 static int hf_afs_fs_volname
;
198 static int hf_afs_fs_timestamp
;
199 static int hf_afs_fs_offlinemsg
;
200 static int hf_afs_fs_motd
;
201 static int hf_afs_fs_xstats_version
;
202 static int hf_afs_fs_xstats_timestamp
;
203 static int hf_afs_fs_xstats_clientversion
;
204 static int hf_afs_fs_xstats_collnumber
;
205 static int hf_afs_fs_cps_spare1
;
206 static int hf_afs_fs_cps_spare2
;
207 static int hf_afs_fs_cps_spare3
;
208 static int hf_afs_fs_vicelocktype
;
209 static int hf_afs_fs_viceid
;
210 static int hf_afs_fs_ipaddr
;
211 static int hf_afs_fs_token
;
213 static int hf_afs_fs_status_anonymousaccess
;
214 static int hf_afs_fs_status_author
;
215 static int hf_afs_fs_status_calleraccess
;
216 static int hf_afs_fs_status_clientmodtime
;
217 static int hf_afs_fs_status_dataversion
;
218 static int hf_afs_fs_status_dataversionhigh
;
219 static int hf_afs_fs_status_filetype
;
220 static int hf_afs_fs_status_group
;
221 static int hf_afs_fs_status_interfaceversion
;
222 static int hf_afs_fs_status_length
;
223 static int hf_afs_fs_status_linkcount
;
224 static int hf_afs_fs_status_mask
;
225 static int hf_afs_fs_status_mask_fsync
;
226 static int hf_afs_fs_status_mask_setgroup
;
227 static int hf_afs_fs_status_mask_setmode
;
228 static int hf_afs_fs_status_mask_setmodtime
;
229 static int hf_afs_fs_status_mask_setowner
;
230 static int hf_afs_fs_status_mask_setsegsize
;
231 static int hf_afs_fs_status_mode
;
232 static int hf_afs_fs_status_owner
;
233 static int hf_afs_fs_status_parentunique
;
234 static int hf_afs_fs_status_parentvnode
;
235 static int hf_afs_fs_status_segsize
;
236 static int hf_afs_fs_status_servermodtime
;
237 static int hf_afs_fs_status_spare2
;
238 static int hf_afs_fs_status_spare3
;
239 static int hf_afs_fs_status_spare4
;
240 static int hf_afs_fs_status_synccounter
;
242 static int hf_afs_fs_volsync_spare1
;
243 static int hf_afs_fs_volsync_spare2
;
244 static int hf_afs_fs_volsync_spare3
;
245 static int hf_afs_fs_volsync_spare4
;
246 static int hf_afs_fs_volsync_spare5
;
247 static int hf_afs_fs_volsync_spare6
;
249 static int hf_afs_fs_acl_datasize
;
250 static int hf_afs_fs_acl_count_negative
;
251 static int hf_afs_fs_acl_count_positive
;
252 static int hf_afs_fs_acl_entity
;
253 static int hf_afs_fs_acl_r
;
254 static int hf_afs_fs_acl_l
;
255 static int hf_afs_fs_acl_i
;
256 static int hf_afs_fs_acl_d
;
257 static int hf_afs_fs_acl_w
;
258 static int hf_afs_fs_acl_k
;
259 static int hf_afs_fs_acl_a
;
261 static int hf_afs_fs_callback_version
;
262 static int hf_afs_fs_callback_expires
;
263 static int hf_afs_fs_callback_type
;
265 static int hf_afs_bos_errcode
;
266 static int hf_afs_bos_type
;
267 static int hf_afs_bos_instance
;
268 static int hf_afs_bos_status
;
269 static int hf_afs_bos_statusdesc
;
270 static int hf_afs_bos_num
;
271 static int hf_afs_bos_size
;
272 static int hf_afs_bos_flags
;
273 static int hf_afs_bos_date
;
274 static int hf_afs_bos_content
;
275 static int hf_afs_bos_user
;
276 static int hf_afs_bos_key
;
277 static int hf_afs_bos_path
;
278 static int hf_afs_bos_file
;
279 static int hf_afs_bos_cmd
;
280 static int hf_afs_bos_error
;
281 static int hf_afs_bos_spare1
;
282 static int hf_afs_bos_spare2
;
283 static int hf_afs_bos_spare3
;
284 static int hf_afs_bos_parm
;
285 static int hf_afs_bos_kvno
;
286 static int hf_afs_bos_cell
;
287 static int hf_afs_bos_host
;
288 static int hf_afs_bos_newtime
;
289 static int hf_afs_bos_baktime
;
290 static int hf_afs_bos_oldtime
;
291 static int hf_afs_bos_data
;
292 static int hf_afs_bos_keymodtime
;
293 static int hf_afs_bos_keychecksum
;
294 static int hf_afs_bos_keyspare2
;
296 static int hf_afs_vldb_errcode
;
297 static int hf_afs_vldb_name
;
298 static int hf_afs_vldb_name_uint_string
;
299 static int hf_afs_vldb_id
;
300 static int hf_afs_vldb_type
;
301 static int hf_afs_vldb_bump
;
302 static int hf_afs_vldb_index
;
303 static int hf_afs_vldb_nextindex
;
304 static int hf_afs_vldb_count
;
305 static int hf_afs_vldb_numservers
;
306 static int hf_afs_vldb_server
;
307 static int hf_afs_vldb_serveruuid
;
308 static int hf_afs_vldb_serveruniq
;
309 static int hf_afs_vldb_serverflags
;
310 static int hf_afs_vldb_serverip
;
311 static int hf_afs_vldb_partition
;
312 static int hf_afs_vldb_rovol
;
313 static int hf_afs_vldb_rwvol
;
314 static int hf_afs_vldb_bkvol
;
315 static int hf_afs_vldb_clonevol
;
316 static int hf_afs_vldb_flags
;
317 static int hf_afs_vldb_flags_rwexists
;
318 static int hf_afs_vldb_flags_roexists
;
319 static int hf_afs_vldb_flags_bkexists
;
320 static int hf_afs_vldb_flags_dfsfileset
;
322 static int hf_afs_vldb_spare1
;
323 static int hf_afs_vldb_spare2
;
324 static int hf_afs_vldb_spare3
;
325 static int hf_afs_vldb_spare4
;
326 static int hf_afs_vldb_spare5
;
327 static int hf_afs_vldb_spare6
;
328 static int hf_afs_vldb_spare7
;
329 static int hf_afs_vldb_spare8
;
330 static int hf_afs_vldb_spare9
;
332 static int hf_afs_kauth_errcode
;
333 static int hf_afs_kauth_princ
;
334 static int hf_afs_kauth_realm
;
335 static int hf_afs_kauth_domain
;
336 static int hf_afs_kauth_kvno
;
337 static int hf_afs_kauth_name
;
338 static int hf_afs_kauth_data
;
340 static int hf_afs_vol_errcode
;
341 static int hf_afs_vol_count
;
342 static int hf_afs_vol_id
;
343 static int hf_afs_vol_name
;
345 static int hf_afs_cb_errcode
;
346 static int hf_afs_cb_callback_version
;
347 static int hf_afs_cb_callback_type
;
348 static int hf_afs_cb_callback_expires
;
349 static int hf_afs_cb_fid_volume
;
350 static int hf_afs_cb_fid_vnode
;
351 static int hf_afs_cb_fid_uniqifier
;
353 static int hf_afs_cm_uuid
;
354 static int hf_afs_cm_numint
;
355 static int hf_afs_cm_ipaddr
;
356 static int hf_afs_cm_netmask
;
357 static int hf_afs_cm_mtu
;
358 static int hf_afs_cm_numcap
;
359 static int hf_afs_cm_capabilities
;
360 static int hf_afs_cm_cap_errortrans
;
362 static int hf_afs_prot_errcode
;
363 static int hf_afs_prot_name
;
364 static int hf_afs_prot_name_uint_string
;
365 static int hf_afs_prot_id
;
366 static int hf_afs_prot_count
;
367 static int hf_afs_prot_oldid
;
368 static int hf_afs_prot_newid
;
369 static int hf_afs_prot_pos
;
370 static int hf_afs_prot_flag
;
371 static int hf_afs_prot_uid
;
372 static int hf_afs_prot_gid
;
373 static int hf_afs_prot_maxuid
;
374 static int hf_afs_prot_maxgid
;
376 static int hf_afs_backup_errcode
;
377 static int hf_afs_butc_errcode
;
379 /* static int hf_afs_ubik_errcode; */
380 static int hf_afs_ubik_version_epoch
;
381 static int hf_afs_ubik_version_counter
;
382 static int hf_afs_ubik_votestart
;
383 static int hf_afs_ubik_state
;
384 static int hf_afs_ubik_site
;
385 static int hf_afs_ubik_interface
;
386 static int hf_afs_ubik_null_addresses
;
387 static int hf_afs_ubik_file
;
388 static int hf_afs_ubik_pos
;
389 static int hf_afs_ubik_length
;
390 static int hf_afs_ubik_locktype
;
391 /* static int hf_afs_ubik_voteend; */
392 /* static int hf_afs_ubik_votetype; */
394 static int hf_afs_ubik_now
;
395 static int hf_afs_ubik_lastyestime
;
396 static int hf_afs_ubik_lastyeshost
;
397 static int hf_afs_ubik_lastyesstate
;
398 static int hf_afs_ubik_lastyesclaim
;
399 static int hf_afs_ubik_lowesthost
;
400 static int hf_afs_ubik_lowesttime
;
401 static int hf_afs_ubik_synchost
;
402 static int hf_afs_ubik_synctime
;
403 static int hf_afs_ubik_amsyncsite
;
404 static int hf_afs_ubik_syncsiteuntil
;
405 static int hf_afs_ubik_nservers
;
406 static int hf_afs_ubik_lockedpages
;
407 static int hf_afs_ubik_writelockedpages
;
408 static int hf_afs_ubik_activewrite
;
409 static int hf_afs_ubik_tidcounter
;
410 static int hf_afs_ubik_anyreadlocks
;
411 static int hf_afs_ubik_anywritelocks
;
412 static int hf_afs_ubik_recoverystate
;
413 static int hf_afs_ubik_currenttrans
;
414 static int hf_afs_ubik_writetrans
;
415 static int hf_afs_ubik_epochtime
;
416 static int hf_afs_ubik_isclone
;
417 static int hf_afs_ubik_addr
;
418 static int hf_afs_ubik_lastvotetime
;
419 static int hf_afs_ubik_lastbeaconsent
;
420 static int hf_afs_ubik_lastvote
;
421 static int hf_afs_ubik_currentdb
;
422 static int hf_afs_ubik_beaconsincedown
;
423 static int hf_afs_ubik_up
;
424 static int hf_afs_repframe
;
425 static int hf_afs_reqframe
;
426 static int hf_afs_time
;
428 static int hf_afs_fragments
;
429 static int hf_afs_fragment
;
430 static int hf_afs_fragment_overlap
;
431 static int hf_afs_fragment_overlap_conflicts
;
432 static int hf_afs_fragment_multiple_tails
;
433 static int hf_afs_fragment_too_long_fragment
;
434 static int hf_afs_fragment_error
;
435 static int hf_afs_fragment_count
;
436 static int hf_afs_reassembled_in
;
437 static int hf_afs_reassembled_length
;
440 static int ett_afs_op
;
441 static int ett_afs_acl
;
442 static int ett_afs_fid
;
443 static int ett_afs_callback
;
444 static int ett_afs_ubikver
;
445 static int ett_afs_status
;
446 static int ett_afs_status_mask
;
447 static int ett_afs_volsync
;
448 static int ett_afs_volumeinfo
;
449 static int ett_afs_vicestat
;
450 static int ett_afs_vldb_flags
;
452 static int ett_afs_fragment
;
453 static int ett_afs_fragments
;
454 static int ett_afs_cm_interfaces
;
455 static int ett_afs_cm_capabilities
;
457 static const fragment_items afs_frag_items
= {
458 /* Fragment subtrees */
461 /* Fragment fields */
464 &hf_afs_fragment_overlap
,
465 &hf_afs_fragment_overlap_conflicts
,
466 &hf_afs_fragment_multiple_tails
,
467 &hf_afs_fragment_too_long_fragment
,
468 &hf_afs_fragment_error
,
469 &hf_afs_fragment_count
,
470 /* Reassembled in field */
471 &hf_afs_reassembled_in
,
472 /* Reassembled length field */
473 &hf_afs_reassembled_length
,
474 /* Reassembled data field */
482 * Macros for helper dissection routines
484 * The macros are here to save on coding. They assume that
485 * the current offset is in 'offset', and that the offset
486 * should be incremented after performing the macro's operation.
489 /* Output a simple rx array */
490 static void OUT_RXArray8(ptvcursor_t
*cursor
, int field
, int field_size
, int encoding
)
493 size
= tvb_get_uint8(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
495 ptvcursor_advance(cursor
, 1);
496 for (i
=0; i
<size
; i
++) {
497 ptvcursor_add(cursor
, field
, field_size
, encoding
);
501 /* Output a simple rx array */
502 #define OUT_RXArray32(func) \
505 j = tvb_get_ntohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor)); \
506 ptvcursor_advance(cursor, 4); \
507 for (i=0; i<j; i++) { \
512 /* Output a UNIX seconds/microseconds timestamp, after converting to an
514 static void OUT_TIMESTAMP(ptvcursor_t
*cursor
, int field
)
516 proto_tree_add_item(ptvcursor_tree(cursor
), field
, ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
), 8, ENC_TIME_SECS_USECS
|ENC_BIG_ENDIAN
);
517 ptvcursor_advance(cursor
, 8);
520 /* Output a seconds-only time value, after converting to an nstime_t;
521 this can be an absolute time as a UNIX time-since-epoch, or a
522 relative time in seconds */
523 static void OUT_TIMESECS(ptvcursor_t
*cursor
, int field
)
525 proto_tree_add_item(ptvcursor_tree(cursor
), field
, ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
), 4, ENC_TIME_SECS
|ENC_BIG_ENDIAN
);
526 ptvcursor_advance(cursor
, 4);
529 /* Output a rx style string, up to a maximum length first
530 4 bytes - length, then char data */
531 static void OUT_RXString(ptvcursor_t
*cursor
, int field
)
533 int offset
= ptvcursor_current_offset(cursor
),
536 ptvcursor_add(cursor
, field
, 4, ENC_BIG_ENDIAN
);
537 new_offset
= ptvcursor_current_offset(cursor
);
539 /* strings are padded to 32-bit boundary */
540 if ((new_offset
-offset
)&3)
541 ptvcursor_advance(cursor
, 4-((new_offset
-offset
)&3));
544 /* Output a fixed length vectorized string (each char is a 32 bit int) */
545 static void OUT_RXStringV(ptvcursor_t
*cursor
, int field
, uint32_t length
)
547 tvbuff_t
* tvb
= ptvcursor_tvbuff(cursor
);
548 wmem_strbuf_t
*strbuf
= wmem_strbuf_new_sized(wmem_packet_scope(), length
+1);
549 int offset
= ptvcursor_current_offset(cursor
),
550 start_offset
= offset
;
553 for (idx
= 0; idx
<length
; idx
++)
555 wmem_strbuf_append_c(strbuf
, (char)tvb_get_ntohl(tvb
, offset
));
558 /* XXX: There's no indication what encoding this string has.
559 * Treat it as UTF-8 for now.
561 if (!wmem_strbuf_utf8_validate(strbuf
, NULL
)) {
562 wmem_strbuf_utf8_make_valid(strbuf
);
564 proto_tree_add_string(ptvcursor_tree(cursor
), field
, tvb
, start_offset
, length
*4, wmem_strbuf_finalize(strbuf
));
565 ptvcursor_advance(cursor
, length
*4);
569 /* Output a callback */
570 static void OUT_FS_AFSCallBack(ptvcursor_t
*cursor
)
572 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
, ett_afs_callback
, "Callback");
573 ptvcursor_add(cursor
, hf_afs_fs_callback_version
, 4, ENC_BIG_ENDIAN
);
574 OUT_TIMESECS(cursor
, hf_afs_fs_callback_expires
);
575 ptvcursor_add(cursor
, hf_afs_fs_callback_type
, 4, ENC_BIG_ENDIAN
);
576 ptvcursor_pop_subtree(cursor
);
580 /* Output cache manager interfaces */
581 static void OUT_CM_INTERFACES(ptvcursor_t
*cursor
)
584 unsigned int maxint
= 32,
585 numint
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
587 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
, ett_afs_cm_interfaces
, "Interfaces");
588 ptvcursor_add(cursor
, hf_afs_cm_numint
, 4, ENC_BIG_ENDIAN
);
589 ptvcursor_add(cursor
, hf_afs_cm_uuid
, 4*11, ENC_NA
);
590 for ( i
=0; i
<numint
; i
++ ) {
591 ptvcursor_add(cursor
, hf_afs_cm_ipaddr
, 4, ENC_BIG_ENDIAN
);
593 ptvcursor_advance(cursor
, 4*(maxint
-numint
));
594 for ( i
=0; i
<numint
; i
++ ) {
595 ptvcursor_add(cursor
, hf_afs_cm_netmask
, 4, ENC_BIG_ENDIAN
);
597 ptvcursor_advance(cursor
, 4*(maxint
-numint
));
598 for ( i
=0; i
<numint
; i
++ ) {
599 ptvcursor_add(cursor
, hf_afs_cm_mtu
, 4, ENC_BIG_ENDIAN
);
601 ptvcursor_advance(cursor
, 4*(maxint
-numint
));
602 ptvcursor_pop_subtree(cursor
);
605 /* Output CM capabilities */
606 static void OUT_CM_CAPABILITIES(ptvcursor_t
*cursor
)
608 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
, ett_afs_cm_capabilities
, "Capabilities");
609 ptvcursor_add(cursor
, hf_afs_cm_numcap
, 4, ENC_BIG_ENDIAN
);
610 ptvcursor_add_no_advance(cursor
, hf_afs_cm_capabilities
, 4, ENC_BIG_ENDIAN
);
611 ptvcursor_add(cursor
, hf_afs_cm_cap_errortrans
, 4, ENC_BIG_ENDIAN
);
612 ptvcursor_pop_subtree(cursor
);
615 /* Output a callback */
616 static void OUT_CB_AFSCallBack(ptvcursor_t
*cursor
)
618 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
619 ett_afs_callback
, "Callback");
620 ptvcursor_add(cursor
, hf_afs_cb_callback_version
, 4, ENC_BIG_ENDIAN
);
621 OUT_TIMESECS(cursor
, hf_afs_cb_callback_expires
);
622 ptvcursor_add(cursor
, hf_afs_cb_callback_type
, 4, ENC_BIG_ENDIAN
);
623 ptvcursor_pop_subtree(cursor
);
626 /* Output a File ID */
627 static void OUT_FS_AFSFid(ptvcursor_t
*cursor
, const char* label
)
629 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
630 ett_afs_fid
, "FileID (%s)", label
);
631 ptvcursor_add(cursor
, hf_afs_fs_fid_volume
, 4, ENC_BIG_ENDIAN
);
632 ptvcursor_add(cursor
, hf_afs_fs_fid_vnode
, 4, ENC_BIG_ENDIAN
);
633 ptvcursor_add(cursor
, hf_afs_fs_fid_uniqifier
, 4, ENC_BIG_ENDIAN
);
634 ptvcursor_pop_subtree(cursor
);
638 /* Output a File ID */
639 static void OUT_CB_AFSFid(ptvcursor_t
*cursor
, const char* label
)
641 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
642 ett_afs_fid
, "FileID (%s)", label
);
644 ptvcursor_add(cursor
, hf_afs_cb_fid_volume
, 4, ENC_BIG_ENDIAN
);
645 ptvcursor_add(cursor
, hf_afs_cb_fid_vnode
, 4, ENC_BIG_ENDIAN
);
646 ptvcursor_add(cursor
, hf_afs_cb_fid_uniqifier
, 4, ENC_BIG_ENDIAN
);
647 ptvcursor_pop_subtree(cursor
);
650 /* Output a StoreStatus */
651 static void OUT_FS_AFSStoreStatus(ptvcursor_t
*cursor
, const char* label
)
653 static int * const status_mask_flags
[] = {
654 &hf_afs_fs_status_mask_setmodtime
,
655 &hf_afs_fs_status_mask_setowner
,
656 &hf_afs_fs_status_mask_setgroup
,
657 &hf_afs_fs_status_mask_setmode
,
658 &hf_afs_fs_status_mask_setsegsize
,
659 &hf_afs_fs_status_mask_fsync
,
663 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
664 ett_afs_status
, "%s", label
);
665 proto_tree_add_bitmask(ptvcursor_tree(cursor
), ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
),
666 hf_afs_fs_status_mask
, ett_afs_status_mask
, status_mask_flags
, ENC_BIG_ENDIAN
);
667 ptvcursor_advance(cursor
, 4);
668 OUT_TIMESECS(cursor
, hf_afs_fs_status_clientmodtime
);
669 ptvcursor_add(cursor
, hf_afs_fs_status_owner
, 4, ENC_BIG_ENDIAN
);
670 ptvcursor_add(cursor
, hf_afs_fs_status_group
, 4, ENC_BIG_ENDIAN
);
671 ptvcursor_add(cursor
, hf_afs_fs_status_mode
, 4, ENC_BIG_ENDIAN
);
672 ptvcursor_add(cursor
, hf_afs_fs_status_segsize
, 4, ENC_BIG_ENDIAN
);
674 ptvcursor_pop_subtree(cursor
);
677 /* Output a FetchStatus */
678 static void OUT_FS_AFSFetchStatus(ptvcursor_t
*cursor
, const char* label
)
680 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
681 ett_afs_status
, "%s", label
);
683 ptvcursor_add(cursor
, hf_afs_fs_status_interfaceversion
, 4, ENC_BIG_ENDIAN
);
684 ptvcursor_add(cursor
, hf_afs_fs_status_filetype
, 4, ENC_BIG_ENDIAN
);
685 ptvcursor_add(cursor
, hf_afs_fs_status_linkcount
, 4, ENC_BIG_ENDIAN
);
686 ptvcursor_add(cursor
, hf_afs_fs_status_length
, 4, ENC_BIG_ENDIAN
);
687 ptvcursor_add(cursor
, hf_afs_fs_status_dataversion
, 4, ENC_BIG_ENDIAN
);
688 ptvcursor_add(cursor
, hf_afs_fs_status_author
, 4, ENC_BIG_ENDIAN
);
689 ptvcursor_add(cursor
, hf_afs_fs_status_owner
, 4, ENC_BIG_ENDIAN
);
690 ptvcursor_add(cursor
, hf_afs_fs_status_calleraccess
, 4, ENC_BIG_ENDIAN
);
691 ptvcursor_add(cursor
, hf_afs_fs_status_anonymousaccess
, 4, ENC_BIG_ENDIAN
);
692 ptvcursor_add(cursor
, hf_afs_fs_status_mode
, 4, ENC_BIG_ENDIAN
);
693 ptvcursor_add(cursor
, hf_afs_fs_status_parentvnode
, 4, ENC_BIG_ENDIAN
);
694 ptvcursor_add(cursor
, hf_afs_fs_status_parentunique
, 4, ENC_BIG_ENDIAN
);
695 ptvcursor_add(cursor
, hf_afs_fs_status_segsize
, 4, ENC_BIG_ENDIAN
);
696 OUT_TIMESECS(cursor
, hf_afs_fs_status_clientmodtime
);
697 OUT_TIMESECS(cursor
, hf_afs_fs_status_servermodtime
);
698 ptvcursor_add(cursor
, hf_afs_fs_status_group
, 4, ENC_BIG_ENDIAN
);
699 ptvcursor_add(cursor
, hf_afs_fs_status_synccounter
, 4, ENC_BIG_ENDIAN
);
700 ptvcursor_add(cursor
, hf_afs_fs_status_dataversionhigh
, 4, ENC_BIG_ENDIAN
);
701 ptvcursor_add(cursor
, hf_afs_fs_status_spare2
, 4, ENC_BIG_ENDIAN
);
702 ptvcursor_add(cursor
, hf_afs_fs_status_spare3
, 4, ENC_BIG_ENDIAN
);
703 ptvcursor_add(cursor
, hf_afs_fs_status_spare4
, 4, ENC_BIG_ENDIAN
);
705 ptvcursor_pop_subtree(cursor
);
708 /* Output a VolSync */
709 static void OUT_FS_AFSVolSync(ptvcursor_t
*cursor
)
711 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
712 ett_afs_status
, "VolSync");
713 OUT_TIMESECS(cursor
, hf_afs_fs_volsync_spare1
);
714 ptvcursor_add(cursor
, hf_afs_fs_volsync_spare2
, 4, ENC_BIG_ENDIAN
);
715 ptvcursor_add(cursor
, hf_afs_fs_volsync_spare3
, 4, ENC_BIG_ENDIAN
);
716 ptvcursor_add(cursor
, hf_afs_fs_volsync_spare4
, 4, ENC_BIG_ENDIAN
);
717 ptvcursor_add(cursor
, hf_afs_fs_volsync_spare5
, 4, ENC_BIG_ENDIAN
);
718 ptvcursor_add(cursor
, hf_afs_fs_volsync_spare6
, 4, ENC_BIG_ENDIAN
);
720 ptvcursor_pop_subtree(cursor
);
723 /* Output a AFS acl */
724 #define ACLOUT(who, positive, acl, bytes) \
725 { proto_tree *save; \
730 if ( acl & PRSFS_READ ) (void) g_strlcat(tmp, "r", 10); \
731 if ( acl & PRSFS_LOOKUP ) (void) g_strlcat(tmp, "l", 10); \
732 if ( acl & PRSFS_INSERT ) (void) g_strlcat(tmp, "i", 10); \
733 if ( acl & PRSFS_DELETE ) (void) g_strlcat(tmp, "d", 10); \
734 if ( acl & PRSFS_WRITE ) (void) g_strlcat(tmp, "w", 10); \
735 if ( acl & PRSFS_LOCK ) (void) g_strlcat(tmp, "k", 10); \
736 if ( acl & PRSFS_ADMINISTER ) (void) g_strlcat(tmp, "a", 10); \
738 tree = proto_tree_add_subtree_format(tree, tvb, offset, bytes, \
739 ett_afs_acl, NULL, "ACL: %s %s%s", \
740 who, tmp, positive ? "" : " (negative)"); \
741 proto_tree_add_string(tree,hf_afs_fs_acl_entity, tvb,offset,(int)strlen(who), who);\
742 tmpoffset = offset + (int)strlen(who) + 1; \
743 acllen = bytes - (int)strlen(who) - 1; \
744 proto_tree_add_boolean(tree,hf_afs_fs_acl_r, tvb,tmpoffset,acllen,acl);\
745 proto_tree_add_boolean(tree,hf_afs_fs_acl_l, tvb,tmpoffset,acllen,acl);\
746 proto_tree_add_boolean(tree,hf_afs_fs_acl_i, tvb,tmpoffset,acllen,acl);\
747 proto_tree_add_boolean(tree,hf_afs_fs_acl_d, tvb,tmpoffset,acllen,acl);\
748 proto_tree_add_boolean(tree,hf_afs_fs_acl_w, tvb,tmpoffset,acllen,acl);\
749 proto_tree_add_boolean(tree,hf_afs_fs_acl_k, tvb,tmpoffset,acllen,acl);\
750 proto_tree_add_boolean(tree,hf_afs_fs_acl_a, tvb,tmpoffset,acllen,acl);\
754 /* output a bozo_key */
755 static void OUT_BOS_KEYINFO(ptvcursor_t
*cursor
)
757 OUT_TIMESTAMP(cursor
, hf_afs_bos_keymodtime
);
758 ptvcursor_add(cursor
, hf_afs_bos_keychecksum
, 4, ENC_BIG_ENDIAN
);
759 ptvcursor_add(cursor
, hf_afs_bos_keyspare2
, 4, ENC_BIG_ENDIAN
);
762 /* output a ubik interface addr array */
763 static void OUT_UBIK_InterfaceAddrs(ptvcursor_t
*cursor
)
765 unsigned int i
,j
,seen_null
=0;
767 for (i
=0; i
<255; i
++) {
768 j
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
770 ptvcursor_add(cursor
, hf_afs_ubik_interface
, 4, ENC_BIG_ENDIAN
);
774 ptvcursor_add_no_advance(cursor
, hf_afs_ubik_null_addresses
, -1, ENC_NA
);
777 ptvcursor_advance(cursor
, 4);
782 /* Output a UBIK version code */
783 static void OUT_UBIKVERSION(ptvcursor_t
*cursor
, const char* label
)
785 unsigned int epoch
,counter
;
787 epoch
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
788 counter
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
)+4);
792 ptvcursor_add_text_with_subtree(cursor
, SUBTREE_UNDEFINED_LENGTH
,
793 ett_afs_ubikver
, "UBIK Version (%s): %u.%u", label
, epoch
, counter
);
795 proto_tree_add_time(ptvcursor_tree(cursor
), hf_afs_ubik_version_epoch
, ptvcursor_tvbuff(cursor
),
796 ptvcursor_current_offset(cursor
), 4, &ts
);
798 proto_tree_add_time_format_value(ptvcursor_tree(cursor
), hf_afs_ubik_version_epoch
, ptvcursor_tvbuff(cursor
),
799 ptvcursor_current_offset(cursor
), 4, &ts
, "0");
800 ptvcursor_advance(cursor
, 4);
802 ptvcursor_add(cursor
, hf_afs_ubik_version_counter
, 4, ENC_BIG_ENDIAN
);
804 ptvcursor_pop_subtree(cursor
);
807 static void OUT_UBIK_DebugOld(ptvcursor_t
*cursor
)
809 OUT_TIMESECS(cursor
, hf_afs_ubik_now
);
810 OUT_TIMESECS(cursor
, hf_afs_ubik_lastyestime
);
811 ptvcursor_add(cursor
, hf_afs_ubik_lastyeshost
, 4, ENC_BIG_ENDIAN
);
812 ptvcursor_add(cursor
, hf_afs_ubik_lastyesstate
, 4, ENC_BIG_ENDIAN
);
813 OUT_TIMESECS(cursor
, hf_afs_ubik_lastyesclaim
);
814 ptvcursor_add(cursor
, hf_afs_ubik_lowesthost
, 4, ENC_BIG_ENDIAN
);
815 OUT_TIMESECS(cursor
, hf_afs_ubik_lowesttime
);
816 ptvcursor_add(cursor
, hf_afs_ubik_synchost
, 4, ENC_BIG_ENDIAN
);
817 OUT_TIMESECS(cursor
, hf_afs_ubik_synctime
);
818 OUT_UBIKVERSION(cursor
, "Sync Version");
819 OUT_UBIKVERSION(cursor
, "Sync TID");
820 ptvcursor_add(cursor
, hf_afs_ubik_amsyncsite
, 4, ENC_BIG_ENDIAN
);
821 OUT_TIMESECS(cursor
, hf_afs_ubik_syncsiteuntil
);
822 ptvcursor_add(cursor
, hf_afs_ubik_nservers
, 4, ENC_BIG_ENDIAN
);
823 ptvcursor_add(cursor
, hf_afs_ubik_lockedpages
, 4, ENC_BIG_ENDIAN
);
824 ptvcursor_add(cursor
, hf_afs_ubik_writelockedpages
, 4, ENC_BIG_ENDIAN
);
825 OUT_UBIKVERSION(cursor
, "Local Version");
826 ptvcursor_add(cursor
, hf_afs_ubik_activewrite
, 4, ENC_BIG_ENDIAN
);
827 ptvcursor_add(cursor
, hf_afs_ubik_tidcounter
, 4, ENC_BIG_ENDIAN
);
828 ptvcursor_add(cursor
, hf_afs_ubik_anyreadlocks
, 4, ENC_BIG_ENDIAN
);
829 ptvcursor_add(cursor
, hf_afs_ubik_anywritelocks
, 4, ENC_BIG_ENDIAN
);
830 ptvcursor_add(cursor
, hf_afs_ubik_recoverystate
, 4, ENC_BIG_ENDIAN
);
831 ptvcursor_add(cursor
, hf_afs_ubik_currenttrans
, 4, ENC_BIG_ENDIAN
);
832 ptvcursor_add(cursor
, hf_afs_ubik_writetrans
, 4, ENC_BIG_ENDIAN
);
833 OUT_TIMESECS(cursor
, hf_afs_ubik_epochtime
);
836 static void OUT_UBIK_SDebugOld(ptvcursor_t
*cursor
)
838 ptvcursor_add(cursor
, hf_afs_ubik_addr
, 4, ENC_BIG_ENDIAN
);
839 OUT_TIMESECS(cursor
, hf_afs_ubik_lastvotetime
);
840 OUT_TIMESECS(cursor
, hf_afs_ubik_lastbeaconsent
);
841 ptvcursor_add(cursor
, hf_afs_ubik_lastvote
, 4, ENC_BIG_ENDIAN
);
842 OUT_UBIKVERSION(cursor
, "Remote Version");
843 ptvcursor_add(cursor
, hf_afs_ubik_currentdb
, 4, ENC_BIG_ENDIAN
);
844 ptvcursor_add(cursor
, hf_afs_ubik_beaconsincedown
, 4, ENC_BIG_ENDIAN
);
845 ptvcursor_add(cursor
, hf_afs_ubik_up
, 4, ENC_BIG_ENDIAN
);
848 /* Output a kauth getticket request */
849 static void OUT_KAUTH_GetTicket(ptvcursor_t
*cursor
)
853 ptvcursor_add(cursor
, hf_afs_kauth_kvno
, 4, ENC_BIG_ENDIAN
);
854 OUT_RXString(cursor
, hf_afs_kauth_domain
);
855 len
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
856 ptvcursor_advance(cursor
, 4);
857 ptvcursor_add(cursor
, hf_afs_kauth_data
, len
, ENC_NA
);
858 OUT_RXString(cursor
, hf_afs_kauth_princ
);
859 OUT_RXString(cursor
, hf_afs_kauth_realm
);
862 #define VALID_OPCODE(opcode) ((opcode >= OPCODE_LOW && opcode <= OPCODE_HIGH) || \
863 (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \
864 (opcode >= DISK_LOW && opcode <= DISK_HIGH))
866 static const value_string fs_req
[] = {
867 { 130, "fetch-data" },
868 { 131, "fetch-acl" },
869 { 132, "fetch-status" },
870 { 133, "store-data" },
871 { 134, "store-acl" },
872 { 135, "store-status" },
873 { 136, "remove-file" },
874 { 137, "create-file" },
880 { 143, "old-set-lock" },
881 { 144, "old-extend-lock" },
882 { 145, "old-release-lock" },
883 { 146, "get-stats" },
884 { 147, "give-up-callbacks" },
885 { 148, "get-volume-info" },
886 { 149, "get-volume-status" },
887 { 150, "set-volume-status" },
888 { 151, "get-root-volume" },
889 { 152, "check-token" },
891 { 154, "nget-volume-info" },
892 { 155, "bulk-status" },
894 { 157, "extend-lock" },
895 { 158, "release-lock" },
896 { 159, "xstats-version" },
897 { 160, "get-xstats" },
898 { 161, "dfs-lookup" },
899 { 162, "dfs-flushcps" },
900 { 163, "dfs-symlink" },
901 /* 164-219 are reserved legacy space */
902 { 220, "residency" },
903 /* 221-65535 are reserved legacy space */
904 { 65536, "inline-bulk-status" },
905 { 65537, "fetch-data-64" },
906 { 65538, "store-data-64" },
907 { 65539, "give-up-all-callbacks" },
908 { 65540, "get-capabilities" },
909 { 65541, "call-back-rxconn-addr" },
910 { 65542, "get-statistics-64" },
913 static value_string_ext fs_req_ext
= VALUE_STRING_EXT_INIT(fs_req
);
915 static const value_string cb_req
[] = {
917 { 205, "init-callback-state" },
921 { 209, "xstats-version" },
922 { 210, "get-xstats" },
923 { 211, "init-callback-state2" },
924 { 212, "who-are-you" },
925 { 213, "init-callback-state3" },
926 { 214, "probeuuid" },
927 { 215, "get-server-prefs" },
928 { 216, "get-cellservdb" },
929 { 217, "get-local-cell" },
930 { 218, "get-cache-config" },
931 /* 219-65535 reserved legacy space */
932 { 65536, "get-ce-64" },
933 { 65537, "get-cell-by-num" },
934 { 65538, "get-capabilities" },
937 static value_string_ext cb_req_ext
= VALUE_STRING_EXT_INIT(cb_req
);
939 static const value_string prot_req
[] = {
941 { 501, "where-is-it" },
942 { 502, "dump-entry" },
943 { 503, "add-to-group" },
944 { 504, "name-to-id" },
945 { 505, "id-to-name" },
947 { 507, "remove-from-group" },
949 { 509, "new-entry" },
952 { 512, "list-entry" },
953 { 513, "change-entry" },
954 { 514, "list-elements" },
955 { 515, "is-member-of" },
956 { 516, "set-fld-sentry" },
957 { 517, "list-owned" },
959 { 519, "get-host-cps" },
960 { 520, "update-entry" },
961 { 521, "list-entries" },
962 /* 522-529 are reserved legacy space */
963 { 530, "list-supergroups" },
966 static value_string_ext prot_req_ext
= VALUE_STRING_EXT_INIT(prot_req
);
968 static const value_string vldb_req
[] = {
969 { 501, "create-entry" },
970 { 502, "delete-entry" },
971 { 503, "get-entry-by-id" },
972 { 504, "get-entry-by-name" },
973 { 505, "get-new-volume-id" },
974 { 506, "replace-entry" },
975 { 507, "update-entry" },
977 { 509, "release-lock" },
978 { 510, "list-entry" },
979 { 511, "list-attributes" },
980 { 512, "linked-list" },
981 { 513, "get-stats" },
983 { 515, "get-addrs" },
984 { 516, "change-addr" },
985 { 517, "create-entry-n" },
986 { 518, "get-entry-by-id-n" },
987 { 519, "get-entry-by-name-n" },
988 { 520, "replace-entry-n" },
989 { 521, "list-entry-n" },
990 { 522, "list-attrib-n" },
991 { 523, "linked-list-n" },
992 { 524, "update-entry-by-name" },
993 { 525, "create-entry-u" },
994 { 526, "get-entry-by-id-u" },
995 { 527, "get-entry-by-name-u" },
996 { 528, "replace-entry-u" },
997 { 529, "list-entry-u" },
998 { 530, "list-attrib-u" },
999 { 531, "linked-list-u" },
1001 { 533, "get-addrs-u" },
1002 { 534, "list-attrib-n2" },
1005 static value_string_ext vldb_req_ext
= VALUE_STRING_EXT_INIT(vldb_req
);
1007 static const value_string kauth_req
[] = {
1010 { 3, "get-ticket-old" },
1012 { 5, "set-fields" },
1013 { 6, "create-user" },
1014 { 7, "delete-user" },
1016 { 9, "list-entry" },
1017 { 10, "get-stats" },
1020 { 13, "get-random-key" },
1022 { 15, "lock-status" },
1023 { 21, "authenticate" },
1024 { 22, "authenticate-v2" },
1025 { 23, "get-ticket" },
1028 static value_string_ext kauth_req_ext
= VALUE_STRING_EXT_INIT(kauth_req
);
1030 static const value_string vol_req
[] = {
1031 { 100, "create-volume" },
1032 { 101, "delete-volume" },
1035 { 104, "end-trans" },
1037 { 106, "set-flags" },
1038 { 107, "get-flags" },
1039 { 108, "trans-create" },
1041 { 110, "get-nth-volume" },
1042 { 111, "set-forwarding" },
1043 { 112, "get-name" },
1044 { 113, "get-status" },
1045 { 114, "sig-restore" },
1046 { 115, "list-partitions" },
1047 { 116, "list-volumes" },
1048 { 117, "set-id-types" },
1050 { 119, "partition-info" },
1052 { 121, "list-one-volume" },
1054 { 123, "set-date" },
1055 { 124, "x-list-volumes" },
1056 { 125, "x-list-one-volume" },
1057 { 126, "set-info" },
1058 { 127, "x-list-partitions" },
1059 { 128, "forward-multiple" },
1060 { 65536, "convert-ro" },
1061 { 65537, "getsize" },
1062 { 65538, "dump-v2" },
1063 { 65539, "partition-info-64" },
1066 static value_string_ext vol_req_ext
= VALUE_STRING_EXT_INIT(vol_req
);
1068 static const value_string bos_req
[] = {
1069 { 80, "create-bnode" },
1070 { 81, "delete-bnode" },
1071 { 82, "set-status" },
1072 { 83, "get-status" },
1073 { 84, "enumerate-instance" },
1074 { 85, "get-instance-info" },
1075 { 86, "get-instance-parm" },
1076 { 87, "add-superuser" },
1077 { 88, "delete-superuser" },
1078 { 89, "list-superusers" },
1079 { 90, "list-keys" },
1081 { 92, "delete-key" },
1082 { 93, "set-cell-name" },
1083 { 94, "get-cell-name" },
1084 { 95, "get-cell-host" },
1085 { 96, "add-cell-host" },
1086 { 97, "delete-cell-host" },
1087 { 98, "set-t-status" },
1088 { 99, "shutdown-all" },
1089 { 100, "restart-all" },
1090 { 101, "startup-all" },
1091 { 102, "set-noauth-flag" },
1095 { 106, "uninstall" },
1096 { 107, "get-dates" },
1099 { 110, "set-restart-time" },
1100 { 111, "get-restart-time" },
1102 { 113, "wait-all" },
1103 { 114, "get-instance-strings" },
1104 { 115, "get-restricted" },
1105 { 116, "set restricted" },
1108 static value_string_ext bos_req_ext
= VALUE_STRING_EXT_INIT(bos_req
);
1110 static const value_string update_req
[] = {
1111 { 1, "fetch-file" },
1112 { 2, "fetch-info" },
1115 static value_string_ext update_req_ext
= VALUE_STRING_EXT_INIT(update_req
);
1117 static const value_string rmtsys_req
[] = {
1122 static value_string_ext rmtsys_req_ext
= VALUE_STRING_EXT_INIT(rmtsys_req
);
1124 static const value_string backup_req
[] = {
1125 { 0, "add-volume" },
1126 { 1, "create-dump" },
1127 { 2, "delete-dump" },
1128 { 3, "delete-tape" },
1129 { 4, "delete-vdp" },
1130 { 5, "find-clone" },
1132 { 7, "find-latest-dump" },
1133 { 8, "make-dump-appended" },
1134 { 9, "find-last-tape" },
1135 { 10, "finish-dump" },
1136 { 11, "finish-tape" },
1137 { 12, "get-dumps" },
1138 { 13, "get-tapes" },
1139 { 14, "get-volumes" },
1142 { 17, "get-text-version" },
1143 { 18, "save-text" },
1144 { 19, "free-all-locks" },
1145 { 20, "free-lock" },
1146 { 21, "get-instance-id" },
1148 { 23, "db-verify" },
1150 { 25, "restore-db-header" },
1151 { 26, "t-get-version" },
1152 { 27, "t-dump-hash-table" },
1153 { 28, "t-dump-database" },
1154 { 29, "add-volumes" },
1155 { 30, "list-dumps" },
1158 static value_string_ext backup_req_ext
= VALUE_STRING_EXT_INIT(backup_req
);
1160 static const value_string butc_req
[] = {
1161 { 100, "perform-dump" },
1162 { 101, "perform-restore" },
1163 { 102, "check-dump" },
1164 { 103, "abort-dump" },
1165 { 104, "wait-for-dump" },
1166 { 105, "end-dump" },
1167 { 106, "get-tm-info" },
1168 { 107, "label-tape" },
1169 { 108, "scan-nodes" },
1170 { 109, "read-label" },
1171 { 110, "scan-dumps" },
1172 { 111, "get-tc-info" },
1173 { 112, "save-database" },
1174 { 113, "restore-database" },
1175 { 114, "get-status" },
1176 { 115, "request-abort" },
1177 { 116, "end-status" },
1178 { 117, "scan-status" },
1179 { 118, "delete-dump" },
1182 static value_string_ext butc_req_ext
= VALUE_STRING_EXT_INIT(butc_req
);
1184 static const value_string ubik_req
[] = {
1185 { 10000, "vote-beacon" },
1186 { 10001, "vote-debug-old" },
1187 { 10002, "vote-sdebug-old" },
1188 { 10003, "vote-getsyncsite" },
1189 { 10004, "vote-debug" },
1190 { 10005, "vote-sdebug" },
1191 { 10006, "vote-xdebug" },
1192 { 10007, "vote-xsdebug" },
1193 { 20000, "disk-begin" },
1194 { 20001, "disk-commit" },
1195 { 20002, "disk-lock" },
1196 { 20003, "disk-write" },
1197 { 20004, "disk-getversion" },
1198 { 20005, "disk-getfile" },
1199 { 20006, "disk-sendfile" },
1200 { 20007, "disk-abort" },
1201 { 20008, "disk-releaselocks" },
1202 { 20009, "disk-truncate" },
1203 { 20010, "disk-probe" },
1204 { 20011, "disk-writev" },
1205 { 20012, "disk-interfaceaddr" },
1206 { 20013, "disk-setversion" },
1209 static value_string_ext ubik_req_ext
= VALUE_STRING_EXT_INIT(ubik_req
);
1211 static const value_string cb_types
[] = {
1212 { CB_TYPE_EXCLUSIVE
, "exclusive" },
1213 { CB_TYPE_SHARED
, "shared" },
1214 { CB_TYPE_DROPPED
, "dropped" },
1218 static const value_string afs_errors
[] = {
1220 { 180480, "Database Inconsistent"},
1221 { 180481, "Exists"},
1223 { 180483, "Create Failed"},
1226 { 180486, "Bad Name"},
1227 { 180487, "Bad Index"},
1228 { 180488, "No auth"},
1229 { 180489, "Answer too long"},
1230 { 180490, "Bad Request"},
1231 { 180491, "Old Interface"},
1232 { 180492, "Bad Argument"},
1233 { 180493, "Bad Command"},
1234 { 180494, "No keys"},
1235 { 180495, "Read PW"},
1236 { 180496, "Bad key"},
1237 { 180497, "Ubik Init"},
1238 { 180498, "Ubik Call"},
1239 { 180499, "Bad Protocol"},
1240 { 180500, "No cells"},
1241 { 180501, "No cell"},
1242 { 180502, "Too many ubiks"},
1243 { 180503, "Too many keys"},
1244 { 180504, "Bad ticket"},
1245 { 180505, "Unknown Key"},
1246 { 180506, "Key Cache Invalid"},
1247 { 180507, "Bad Server"},
1248 { 180508, "Bad User"},
1249 { 180509, "Bad CPW"},
1250 { 180510, "Bad Create"},
1251 { 180511, "No ticket"},
1252 { 180512, "Assoc user"},
1253 { 180513, "Not special"},
1254 { 180514, "Clock skew too great"},
1255 { 180515, "No recursion"},
1256 { 180516, "RX failed"},
1257 { 180517, "Null password"},
1258 { 180518, "Internal error"},
1259 { 180519, "Password expired"},
1260 { 180520, "Reused"},
1261 { 180521, "Too soon"},
1262 { 180522, "Locked"},
1265 { 267264, "Exists"},
1266 { 267265, "ID Exists"},
1267 { 267266, "No IDs"},
1268 { 267267, "DB Failed"},
1269 { 267268, "No such entry"},
1270 { 267269, "Permission denied"},
1271 { 267270, "Not group"},
1272 { 267271, "Not user"},
1273 { 267272, "Bad name"},
1274 { 267273, "Bad argument"},
1275 { 267274, "No more"},
1276 { 267275, "Bad DB"},
1277 { 267276, "Group empty"},
1278 { 267277, "Inconsistent"},
1279 { 267278, "DB Address"},
1280 { 267279, "Too many"},
1281 { 267280, "No memory"},
1284 { 363520, "ID Exists"},
1285 { 363521, "IO Error"},
1286 { 363522, "Name Exists"},
1287 { 363523, "Create Failed"},
1288 { 363524, "Entry Not Found"},
1290 { 363526, "Entry Deleted"},
1291 { 363527, "Bad Name"},
1292 { 363528, "Bad Index"},
1293 { 363529, "Bad Volume Type"},
1294 { 363530, "Bad Partition"},
1295 { 363531, "Bad Server"},
1296 { 363532, "Bad Replicate Server"},
1297 { 363533, "No Replicate Server"},
1298 { 363534, "Duplicate Replicate Server"},
1299 { 363535, "ReadWrite Volume Not Found"},
1300 { 363536, "Bad Reference Count"},
1301 { 363537, "Size Exceeded"},
1302 { 363538, "Bad Entry"},
1303 { 363539, "Bad Volume ID Bump"},
1304 { 363540, "Already has edit"},
1305 { 363541, "Entry Locked"},
1306 { 363542, "Bad Volume Operation"},
1307 { 363543, "Bad Rel Lock Type"},
1308 { 363544, "Rerelease"},
1309 { 363545, "Bad Server"},
1310 { 363546, "Permission Denied"},
1311 { 363547, "Out of Memory"},
1313 /* Volume server errors */
1314 { 1492325120, "Release error"},
1315 { 1492325121, "No op"},
1316 { 1492325122, "Read dump error"},
1317 { 1492325123, "Dump error"},
1318 { 1492325124, "Attach error"},
1319 { 1492325125, "Illegal partition"},
1320 { 1492325126, "Detach error"},
1321 { 1492325127, "Bad access"},
1322 { 1492325128, "VLDB error"},
1323 { 1492325129, "Bad Name"},
1324 { 1492325130, "Volume moved"},
1325 { 1492325131, "Bad operation"},
1326 { 1492325132, "Bad release"},
1327 { 1492325133, "Volume busy"},
1328 { 1492325134, "No memory"},
1329 { 1492325135, "No volume"},
1330 { 1492325136, "Multiple RW volumes"},
1331 { 1492325137, "Failed operation"},
1333 /* add more of these errors to decode the errcode responses */
1336 static value_string_ext afs_errors_ext
= VALUE_STRING_EXT_INIT(afs_errors
);
1338 static const value_string port_types
[] = {
1339 { AFS_PORT_FS
, "File Server" },
1340 { AFS_PORT_CB
, "Callback Server" },
1341 { AFS_PORT_PROT
, "Protection Server" },
1342 { AFS_PORT_VLDB
, "Volume Location Database Server" },
1343 { AFS_PORT_KAUTH
, "Kerberos Authentication Server" },
1344 { AFS_PORT_VOL
, "Volume Server" },
1345 { AFS_PORT_ERROR
, "Error Server" },
1346 { AFS_PORT_BOS
, "BOS Server" },
1347 { AFS_PORT_UPDATE
, "Update? Server" },
1348 { AFS_PORT_RMTSYS
, "Rmtsys? Server" },
1349 { AFS_PORT_BACKUP
, "Backup Server" },
1350 { AFS_PORT_BUTC
, "Backup Tape Controller" },
1353 static value_string_ext port_types_ext
= VALUE_STRING_EXT_INIT(port_types
);
1355 static const value_string port_types_short
[] = {
1356 { AFS_PORT_FS
, "FS" },
1357 { AFS_PORT_CB
, "CB" },
1358 { AFS_PORT_PROT
, "PROT" },
1359 { AFS_PORT_VLDB
, "VLDB" },
1360 { AFS_PORT_KAUTH
, "KAUTH" },
1361 { AFS_PORT_VOL
, "VOL" },
1362 { AFS_PORT_ERROR
, "ERR" },
1363 { AFS_PORT_BOS
, "BOS" },
1364 { AFS_PORT_UPDATE
, "UPD" },
1365 { AFS_PORT_RMTSYS
, "RMT" },
1366 { AFS_PORT_BACKUP
, "BKUP" },
1367 { AFS_PORT_BUTC
, "BUTC" },
1370 static value_string_ext port_types_short_ext
= VALUE_STRING_EXT_INIT(port_types_short
);
1372 static const value_string ubik_lock_types
[] = {
1379 static const value_string xstat_collections
[] = {
1380 { 0, "call counting & info" },
1381 { 1, "performance info" },
1382 { 2, "full performance info" },
1386 static const value_string vice_lock_types
[] = {
1394 static const value_string volume_types
[] = {
1395 { 0, "read-write" },
1398 { 0xffffffff, "any" },
1402 struct afs_request_key
{
1403 uint32_t conversation
, epoch
, cid
, callnumber
;
1407 struct afs_request_val
{
1414 static wmem_map_t
*afs_request_hash
;
1415 static reassembly_table afs_reassembly_table
;
1421 afs_equal(const void *v
, const void *w
)
1423 const struct afs_request_key
*v1
= (const struct afs_request_key
*)v
;
1424 const struct afs_request_key
*v2
= (const struct afs_request_key
*)w
;
1426 if (v1
-> conversation
== v2
-> conversation
&&
1427 v1
-> epoch
== v2
-> epoch
&&
1428 v1
-> cid
== v2
-> cid
&&
1429 v1
-> callnumber
== v2
-> callnumber
) {
1438 afs_hash (const void *v
)
1440 const struct afs_request_key
*key
= (const struct afs_request_key
*)v
;
1443 val
= key
-> conversation
+ key
-> epoch
+ key
-> cid
+ key
-> callnumber
;
1449 * Here is a helper routine for adding an AFS acl to the proto tree
1450 * This is to be used with FS packets only
1452 * An AFS ACL is a string that has the following format:
1454 * <positive> <negative>
1458 * "positive" and "negative" are integers which contain the number of
1459 * positive and negative ACL's in the string. The uid/aclbits pair are
1460 * ASCII strings containing the UID/PTS record and a ascii number
1461 * representing a logical OR of all the ACL permission bits
1466 * sscanf is probably quite dangerous if we run outside the packet.
1468 * Should this just scan the string itself, rather than using "sscanf()"?
1470 #define GETSTR (tvb_format_text(wmem_packet_scope(),tvb,ptvcursor_current_offset(cursor),tvb_captured_length_remaining(tvb,ptvcursor_current_offset(cursor))))
1473 dissect_acl(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
)
1475 int old_offset
= ptvcursor_current_offset(cursor
), offset
;
1477 int i
, n
, pos
, neg
, acl
;
1478 proto_tree
* tree
= ptvcursor_tree(cursor
);
1479 tvbuff_t
* tvb
= ptvcursor_tvbuff(cursor
);
1480 char user
[128] = "[Unknown]"; /* Be sure to adjust sscanf()s below if length is changed... */
1482 bytes
= tvb_get_ntohl(tvb
, ptvcursor_current_offset(cursor
));
1483 ptvcursor_add(cursor
, hf_afs_fs_acl_datasize
, 4, ENC_BIG_ENDIAN
);
1485 if (sscanf(GETSTR
, "%d %n", &pos
, &n
) != 1) {
1486 /* does not matter what we return, if this fails,
1487 * we can't dissect anything else in the packet either.
1491 proto_tree_add_uint(tree
, hf_afs_fs_acl_count_positive
, tvb
,
1492 ptvcursor_current_offset(cursor
), n
, pos
);
1493 ptvcursor_advance(cursor
, n
);
1495 if (sscanf(GETSTR
, "%d %n", &neg
, &n
) != 1) {
1498 proto_tree_add_uint(tree
, hf_afs_fs_acl_count_negative
, tvb
,
1499 ptvcursor_current_offset(cursor
), n
, neg
);
1500 ptvcursor_advance(cursor
, n
);
1503 * This wacky order preserves the order used by the "fs" command
1505 offset
= ptvcursor_current_offset(cursor
);
1506 for (i
= 0; i
< pos
; i
++) {
1507 if (sscanf(GETSTR
, "%127s %d %n", user
, &acl
, &n
) != 2) {
1510 ACLOUT(user
,1,acl
,n
);
1513 for (i
= 0; i
< neg
; i
++) {
1514 if (sscanf(GETSTR
, "%127s %d %n", user
, &acl
, &n
) != 2) {
1517 ACLOUT(user
,0,acl
,n
);
1519 if (offset
>= old_offset
+bytes
) {
1526 * Here are the helper dissection routines
1530 dissect_fs_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
1532 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
1536 case 130: /* fetch data */
1537 OUT_FS_AFSFetchStatus(cursor
, "Status");
1538 OUT_FS_AFSCallBack(cursor
);
1539 OUT_FS_AFSVolSync(cursor
);
1540 ptvcursor_add(cursor
, hf_afs_fs_data
, -1, ENC_NA
);
1542 case 131: /* fetch acl */
1543 dissect_acl(cursor
, rxinfo
);
1544 OUT_FS_AFSFetchStatus(cursor
, "Status");
1545 OUT_FS_AFSVolSync(cursor
);
1547 case 132: /* Fetch status */
1548 OUT_FS_AFSFetchStatus(cursor
, "Status");
1549 OUT_FS_AFSCallBack(cursor
);
1550 OUT_FS_AFSVolSync(cursor
);
1552 case 133: /* Store data */
1553 case 134: /* Store ACL */
1554 case 135: /* Store status */
1555 case 136: /* Remove file */
1556 OUT_FS_AFSFetchStatus(cursor
, "Status");
1557 OUT_FS_AFSVolSync(cursor
);
1559 case 137: /* create file */
1560 case 141: /* make dir */
1561 case 161: /* lookup */
1562 case 163: /* dfs symlink */
1563 OUT_FS_AFSFid(cursor
, (opcode
== 137)? "New File" : ((opcode
== 141)? "New Directory" : "File"));
1564 OUT_FS_AFSFetchStatus(cursor
, "File Status");
1565 OUT_FS_AFSFetchStatus(cursor
, "Directory Status");
1566 OUT_FS_AFSCallBack(cursor
);
1567 OUT_FS_AFSVolSync(cursor
);
1569 case 138: /* rename */
1570 OUT_FS_AFSFetchStatus(cursor
, "Old Directory Status");
1571 OUT_FS_AFSFetchStatus(cursor
, "New Directory Status");
1572 OUT_FS_AFSVolSync(cursor
);
1574 case 139: /* symlink */
1575 OUT_FS_AFSFid(cursor
, "Symlink");
1577 case 140: /* link */
1578 OUT_FS_AFSFetchStatus(cursor
, "Link Status");
1580 case 142: /* rmdir */
1581 OUT_FS_AFSFetchStatus(cursor
, "Directory Status");
1582 OUT_FS_AFSVolSync(cursor
);
1584 case 143: /* old set lock */
1585 case 144: /* old extend lock */
1586 case 145: /* old release lock */
1587 case 147: /* give up callbacks */
1588 case 150: /* set volume status */
1589 case 152: /* check token */
1590 /* nothing returned */
1592 case 146: /* get statistics */
1593 /* OUT_FS_ViceStatistics(); */
1595 case 148: /* get volume info */
1596 case 154: /* n-get-volume-info */
1597 /* OUT_FS_VolumeInfo(); */
1599 case 149: /* get volume status */
1600 /* OUT_FS_AFSFetchVolumeStatus(); */
1601 OUT_RXString(cursor
, hf_afs_fs_volname
);
1602 OUT_RXString(cursor
, hf_afs_fs_offlinemsg
);
1603 OUT_RXString(cursor
, hf_afs_fs_motd
);
1605 case 151: /* root volume */
1606 OUT_RXString(cursor
, hf_afs_fs_volname
);
1608 case 153: /* get time */
1609 OUT_TIMESTAMP(cursor
, hf_afs_fs_timestamp
);
1611 case 155: /* bulk status */
1612 OUT_RXArray32(OUT_FS_AFSFetchStatus(cursor
, "Status"));
1613 ptvcursor_advance(cursor
, 4); /* skip */
1614 OUT_RXArray32(OUT_FS_AFSCallBack(cursor
));
1615 OUT_FS_AFSVolSync(cursor
);
1617 case 156: /* set lock */
1618 case 157: /* extend lock */
1619 case 158: /* release lock */
1620 OUT_FS_AFSVolSync(cursor
);
1622 case 159: /* x-stats-version */
1623 ptvcursor_add(cursor
, hf_afs_fs_xstats_version
, 4, ENC_BIG_ENDIAN
);
1625 case 160: /* get xstats */
1626 ptvcursor_add(cursor
, hf_afs_fs_xstats_version
, 4, ENC_BIG_ENDIAN
);
1627 OUT_TIMESECS(cursor
, hf_afs_fs_xstats_timestamp
);
1628 /* OUT_FS_AFS_CollData(); */
1630 case 162: /* flush cps */
1631 ptvcursor_add(cursor
, hf_afs_fs_cps_spare2
, 4, ENC_BIG_ENDIAN
);
1632 ptvcursor_add(cursor
, hf_afs_fs_cps_spare3
, 4, ENC_BIG_ENDIAN
);
1634 case 65536: /* inline bulk status */
1635 OUT_RXArray32(OUT_FS_AFSFetchStatus(cursor
, "Status"));
1636 OUT_RXArray32(OUT_FS_AFSCallBack(cursor
));
1637 OUT_FS_AFSVolSync(cursor
);
1641 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
1643 ptvcursor_add(cursor
, hf_afs_fs_errcode
, 4, ENC_BIG_ENDIAN
);
1648 dissect_fs_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
1650 ptvcursor_advance(cursor
, 4); /* skip the opcode */
1654 case 130: /* Fetch data */
1655 OUT_FS_AFSFid(cursor
, "Source");
1656 ptvcursor_add(cursor
, hf_afs_fs_offset
, 4, ENC_BIG_ENDIAN
);
1657 ptvcursor_add(cursor
, hf_afs_fs_length
, 4, ENC_BIG_ENDIAN
);
1659 case 131: /* Fetch ACL */
1660 OUT_FS_AFSFid(cursor
, "Target");
1662 case 132: /* Fetch Status */
1663 OUT_FS_AFSFid(cursor
, "Target");
1665 case 133: /* Store Data */
1666 OUT_FS_AFSFid(cursor
, "Destination");
1667 OUT_FS_AFSStoreStatus(cursor
, "Status");
1668 ptvcursor_add(cursor
, hf_afs_fs_offset
, 4, ENC_BIG_ENDIAN
);
1669 ptvcursor_add(cursor
, hf_afs_fs_length
, 4, ENC_BIG_ENDIAN
);
1670 ptvcursor_add(cursor
, hf_afs_fs_flength
, 4, ENC_BIG_ENDIAN
);
1671 ptvcursor_add(cursor
, hf_afs_fs_data
, -1, ENC_NA
);
1673 case 134: /* Store ACL */
1674 OUT_FS_AFSFid(cursor
, "Target");
1675 dissect_acl(cursor
, rxinfo
);
1677 case 135: /* Store Status */
1678 OUT_FS_AFSFid(cursor
, "Target");
1679 OUT_FS_AFSStoreStatus(cursor
, "Status");
1681 case 136: /* Remove File */
1682 OUT_FS_AFSFid(cursor
, "Remove File");
1683 OUT_RXString(cursor
, hf_afs_fs_name
);
1685 case 137: /* Create File */
1686 OUT_FS_AFSFid(cursor
, "Target");
1687 OUT_RXString(cursor
, hf_afs_fs_name
);
1688 OUT_FS_AFSStoreStatus(cursor
, "Status");
1690 case 138: /* Rename file */
1691 OUT_FS_AFSFid(cursor
, "Old");
1692 OUT_RXString(cursor
, hf_afs_fs_oldname
);
1693 OUT_FS_AFSFid(cursor
, "New");
1694 OUT_RXString(cursor
, hf_afs_fs_newname
);
1696 case 139: /* Symlink */
1697 OUT_FS_AFSFid(cursor
, "File");
1698 OUT_RXString(cursor
, hf_afs_fs_symlink_name
);
1699 OUT_RXString(cursor
, hf_afs_fs_symlink_content
);
1700 OUT_FS_AFSStoreStatus(cursor
, "Status");
1702 case 140: /* Link */
1703 OUT_FS_AFSFid(cursor
, "Link To (New File)");
1704 OUT_RXString(cursor
, hf_afs_fs_name
);
1705 OUT_FS_AFSFid(cursor
, "Link From (Old File)");
1707 case 141: /* Make dir */
1708 OUT_FS_AFSFid(cursor
, "Target");
1709 OUT_RXString(cursor
, hf_afs_fs_name
);
1710 OUT_FS_AFSStoreStatus(cursor
, "Status");
1712 case 142: /* Remove dir */
1713 OUT_FS_AFSFid(cursor
, "Target");
1714 OUT_RXString(cursor
, hf_afs_fs_name
);
1716 case 143: /* Old Set Lock */
1717 OUT_FS_AFSFid(cursor
, "Target");
1718 ptvcursor_add(cursor
, hf_afs_fs_vicelocktype
, 4, ENC_BIG_ENDIAN
);
1719 OUT_FS_AFSVolSync(cursor
);
1721 case 144: /* Old Extend Lock */
1722 OUT_FS_AFSFid(cursor
, "Target");
1723 OUT_FS_AFSVolSync(cursor
);
1725 case 145: /* Old Release Lock */
1726 OUT_FS_AFSFid(cursor
, "Target");
1727 OUT_FS_AFSVolSync(cursor
);
1729 case 146: /* Get statistics */
1732 case 147: /* Give up callbacks */
1733 OUT_RXArray32(OUT_FS_AFSFid(cursor
, "Target"));
1734 OUT_RXArray32(OUT_FS_AFSCallBack(cursor
));
1736 case 148: /* Get vol info */
1737 OUT_RXString(cursor
, hf_afs_fs_volname
);
1739 case 149: /* Get vol stats */
1740 ptvcursor_add(cursor
, hf_afs_fs_volid
, 4, ENC_BIG_ENDIAN
);
1742 case 150: /* Set vol stats */
1743 ptvcursor_add(cursor
, hf_afs_fs_volid
, 4, ENC_BIG_ENDIAN
);
1744 /* OUT_FS_AFSStoreVolumeStatus(); */
1745 OUT_RXString(cursor
, hf_afs_fs_volname
);
1746 OUT_RXString(cursor
, hf_afs_fs_offlinemsg
);
1747 OUT_RXString(cursor
, hf_afs_fs_motd
);
1749 case 151: /* get root volume */
1752 case 152: /* check token */
1753 ptvcursor_add(cursor
, hf_afs_fs_viceid
, 4, ENC_BIG_ENDIAN
);
1754 /* Output an AFS Token - might just be bytes though */
1755 OUT_RXStringV(cursor
, hf_afs_fs_token
, 1024);
1757 case 153: /* get time */
1760 case 154: /* new get vol info */
1761 OUT_RXString(cursor
, hf_afs_fs_volname
);
1763 case 155: /* bulk stat */
1764 OUT_RXArray32(OUT_FS_AFSFid(cursor
, "Target"));
1766 case 156: /* Set Lock */
1767 OUT_FS_AFSFid(cursor
, "Target");
1768 ptvcursor_add(cursor
, hf_afs_fs_vicelocktype
, 4, ENC_BIG_ENDIAN
);
1770 case 157: /* Extend Lock */
1771 OUT_FS_AFSFid(cursor
, "Target");
1773 case 158: /* Release Lock */
1774 OUT_FS_AFSFid(cursor
, "Target");
1776 case 159: /* xstats version */
1779 case 160: /* get xstats */
1780 ptvcursor_add(cursor
, hf_afs_fs_xstats_clientversion
, 4, ENC_BIG_ENDIAN
);
1781 ptvcursor_add(cursor
, hf_afs_fs_xstats_collnumber
, 4, ENC_BIG_ENDIAN
);
1783 case 161: /* lookup */
1784 OUT_FS_AFSFid(cursor
, "Target");
1785 OUT_RXString(cursor
, hf_afs_fs_name
);
1787 case 162: /* flush cps */
1788 OUT_RXArray8(cursor
, hf_afs_fs_viceid
, 4, ENC_BIG_ENDIAN
);
1789 OUT_RXArray8(cursor
, hf_afs_fs_ipaddr
, 4, ENC_BIG_ENDIAN
);
1790 ptvcursor_add(cursor
, hf_afs_fs_cps_spare1
, 4, ENC_BIG_ENDIAN
);
1792 case 163: /* dfs symlink */
1793 OUT_FS_AFSFid(cursor
, "Target");
1794 OUT_RXString(cursor
, hf_afs_fs_symlink_name
);
1795 OUT_RXString(cursor
, hf_afs_fs_symlink_content
);
1796 OUT_FS_AFSStoreStatus(cursor
, "Symlink Status");
1798 case 220: /* residencycmd */
1799 OUT_FS_AFSFid(cursor
, "Target");
1800 /* need residency inputs here */
1802 case 65536: /* inline bulk status */
1803 OUT_RXArray32(OUT_FS_AFSFid(cursor
, "Target"));
1805 case 65537: /* fetch-data-64 */
1806 OUT_FS_AFSFid(cursor
, "Target");
1807 ptvcursor_add(cursor
, hf_afs_fs_offset64
, 8, ENC_BIG_ENDIAN
);
1808 ptvcursor_add(cursor
, hf_afs_fs_length64
, 8, ENC_BIG_ENDIAN
);
1809 /* need more here */
1811 case 65538: /* store-data-64 */
1812 OUT_FS_AFSFid(cursor
, "Target");
1813 OUT_FS_AFSStoreStatus(cursor
, "Status");
1814 ptvcursor_add(cursor
, hf_afs_fs_offset64
, 8, ENC_BIG_ENDIAN
);
1815 ptvcursor_add(cursor
, hf_afs_fs_length64
, 8, ENC_BIG_ENDIAN
);
1816 ptvcursor_add(cursor
, hf_afs_fs_flength64
, 8, ENC_BIG_ENDIAN
);
1817 /* need residency inputs here */
1819 case 65539: /* give up all cbs */
1821 case 65540: /* get capabilities */
1830 dissect_bos_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
1832 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
1836 case 80: /* create bnode */
1839 case 81: /* delete bnode */
1842 case 82: /* set status */
1845 case 83: /* get status */
1846 ptvcursor_add(cursor
, hf_afs_bos_status
, 4, ENC_BIG_ENDIAN
);
1847 OUT_RXString(cursor
, hf_afs_bos_statusdesc
);
1849 case 84: /* enumerate instance */
1850 OUT_RXString(cursor
, hf_afs_bos_instance
);
1852 case 85: /* get instance info */
1853 OUT_RXString(cursor
, hf_afs_bos_type
);
1854 ptvcursor_advance(cursor
, 4*10);
1856 case 86: /* get instance parm */
1857 OUT_RXString(cursor
, hf_afs_bos_parm
);
1859 case 87: /* add siperuser */
1862 case 88: /* delete superuser */
1865 case 89: /* list superusers */
1866 OUT_RXString(cursor
, hf_afs_bos_user
);
1868 case 90: /* list keys */
1869 ptvcursor_add(cursor
, hf_afs_bos_kvno
, 4, ENC_BIG_ENDIAN
);
1870 ptvcursor_add(cursor
, hf_afs_bos_key
, 8, ENC_NA
);
1871 OUT_BOS_KEYINFO(cursor
);
1873 case 91: /* add key */
1876 case 92: /* delete key */
1879 case 93: /* set cell name */
1882 case 94: /* get cell name */
1883 OUT_RXString(cursor
, hf_afs_bos_cell
);
1885 case 95: /* get cell host */
1886 OUT_RXString(cursor
, hf_afs_bos_host
);
1888 case 96: /* add cell host */
1891 case 97: /* delete cell host */
1894 case 98: /* set tstatus */
1897 case 99: /* shutdown all */
1900 case 100: /* restart all */
1903 case 101: /* startup all */
1906 case 102: /* set noauth flag */
1909 case 103: /* rebozo */
1912 case 104: /* restart */
1915 case 105: /* install */
1918 case 106: /* uninstall */
1921 case 107: /* get dates */
1922 OUT_TIMESECS(cursor
, hf_afs_bos_newtime
);
1923 OUT_TIMESECS(cursor
, hf_afs_bos_baktime
);
1924 OUT_TIMESECS(cursor
, hf_afs_bos_oldtime
);
1926 case 108: /* exec */
1929 case 109: /* prune */
1932 case 110: /* set restart time */
1935 case 111: /* get restart time */
1936 ptvcursor_advance(cursor
, 12);
1938 case 112: /* get log */
1939 /* need to make this dump a big string somehow */
1940 ptvcursor_add(cursor
, hf_afs_bos_data
, -1, ENC_NA
);
1942 case 113: /* wait all */
1945 case 114: /* get instance strings */
1946 OUT_RXString(cursor
, hf_afs_bos_error
);
1947 OUT_RXString(cursor
, hf_afs_bos_spare1
);
1948 OUT_RXString(cursor
, hf_afs_bos_spare2
);
1949 OUT_RXString(cursor
, hf_afs_bos_spare3
);
1953 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
1955 ptvcursor_add(cursor
, hf_afs_bos_errcode
, 4, ENC_BIG_ENDIAN
);
1960 dissect_bos_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
1962 ptvcursor_advance(cursor
, 4); /* skip the opcode */
1966 case 80: /* create b node */
1967 OUT_RXString(cursor
, hf_afs_bos_type
);
1968 OUT_RXString(cursor
, hf_afs_bos_instance
);
1969 OUT_RXString(cursor
, hf_afs_bos_parm
);
1970 OUT_RXString(cursor
, hf_afs_bos_parm
);
1971 OUT_RXString(cursor
, hf_afs_bos_parm
);
1972 OUT_RXString(cursor
, hf_afs_bos_parm
);
1973 OUT_RXString(cursor
, hf_afs_bos_parm
);
1974 OUT_RXString(cursor
, hf_afs_bos_parm
);
1976 case 81: /* delete b node */
1977 OUT_RXString(cursor
, hf_afs_bos_instance
);
1979 case 82: /* set status */
1980 OUT_RXString(cursor
, hf_afs_bos_instance
);
1981 ptvcursor_add(cursor
, hf_afs_bos_status
, 4, ENC_BIG_ENDIAN
);
1983 case 83: /* get status */
1984 OUT_RXString(cursor
, hf_afs_bos_instance
);
1986 case 84: /* enumerate instance */
1987 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
1989 case 85: /* get instance info */
1990 OUT_RXString(cursor
, hf_afs_bos_instance
);
1992 case 86: /* get instance parm */
1993 OUT_RXString(cursor
, hf_afs_bos_instance
);
1994 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
1996 case 87: /* add super user */
1997 OUT_RXString(cursor
, hf_afs_bos_user
);
1999 case 88: /* delete super user */
2000 OUT_RXString(cursor
, hf_afs_bos_user
);
2002 case 89: /* list super users */
2003 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2005 case 90: /* list keys */
2006 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2008 case 91: /* add key */
2009 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2010 ptvcursor_add(cursor
, hf_afs_bos_key
, 8, ENC_NA
);
2012 case 92: /* delete key */
2013 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2015 case 93: /* set cell name */
2016 OUT_RXString(cursor
, hf_afs_bos_content
);
2018 case 95: /* set cell host */
2019 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2021 case 96: /* add cell host */
2022 OUT_RXString(cursor
, hf_afs_bos_content
);
2024 case 97: /* delete cell host */
2025 OUT_RXString(cursor
, hf_afs_bos_content
);
2027 case 98: /* set t status */
2028 OUT_RXString(cursor
, hf_afs_bos_content
);
2029 ptvcursor_add(cursor
, hf_afs_bos_status
, 4, ENC_BIG_ENDIAN
);
2031 case 99: /* shutdown all */
2034 case 100: /* restart all */
2037 case 101: /* startup all */
2040 case 102: /* set no-auth flag */
2041 ptvcursor_add(cursor
, hf_afs_bos_flags
, 4, ENC_BIG_ENDIAN
);
2043 case 103: /* re-bozo? */
2046 case 104: /* restart */
2047 OUT_RXString(cursor
, hf_afs_bos_instance
);
2049 case 105: /* install */
2050 OUT_RXString(cursor
, hf_afs_bos_path
);
2051 ptvcursor_add(cursor
, hf_afs_bos_size
, 4, ENC_BIG_ENDIAN
);
2052 ptvcursor_add(cursor
, hf_afs_bos_flags
, 4, ENC_BIG_ENDIAN
);
2053 ptvcursor_add(cursor
, hf_afs_bos_date
, 4, ENC_BIG_ENDIAN
);
2055 case 106: /* uninstall */
2056 OUT_RXString(cursor
, hf_afs_bos_path
);
2058 case 107: /* get dates */
2059 OUT_RXString(cursor
, hf_afs_bos_path
);
2061 case 108: /* exec */
2062 OUT_RXString(cursor
, hf_afs_bos_cmd
);
2064 case 109: /* prune */
2065 ptvcursor_add(cursor
, hf_afs_bos_flags
, 4, ENC_BIG_ENDIAN
);
2067 case 110: /* set restart time */
2068 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2069 ptvcursor_advance(cursor
, 12);
2071 case 111: /* get restart time */
2072 ptvcursor_add(cursor
, hf_afs_bos_num
, 4, ENC_BIG_ENDIAN
);
2074 case 112: /* get log */
2075 OUT_RXString(cursor
, hf_afs_bos_file
);
2077 case 113: /* wait all */
2080 case 114: /* get instance strings */
2081 OUT_RXString(cursor
, hf_afs_bos_content
);
2090 dissect_vol_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
2092 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2097 /* should loop here maybe */
2098 ptvcursor_add(cursor
, hf_afs_vol_count
, 4, ENC_BIG_ENDIAN
);
2099 OUT_RXStringV(cursor
, hf_afs_vol_name
, 32); /* not sure on */
2103 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2105 ptvcursor_add(cursor
, hf_afs_vol_errcode
, 4, ENC_BIG_ENDIAN
);
2110 dissect_vol_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2112 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2116 case 121: /* list one vol */
2117 ptvcursor_add(cursor
, hf_afs_vol_count
, 4, ENC_BIG_ENDIAN
);
2118 ptvcursor_add(cursor
, hf_afs_vol_id
, 4, ENC_BIG_ENDIAN
);
2127 dissect_kauth_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
2129 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2135 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2137 ptvcursor_add(cursor
, hf_afs_kauth_errcode
, 4, ENC_BIG_ENDIAN
);
2142 dissect_kauth_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2144 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2148 case 1: /* authenticate old */
2149 case 21: /* authenticate */
2150 case 22: /* authenticate v2 */
2151 case 2: /* change pw */
2152 case 5: /* set fields */
2153 case 6: /* create user */
2154 case 7: /* delete user */
2155 case 8: /* get entry */
2156 case 14: /* unlock */
2157 case 15: /* lock status */
2158 OUT_RXString(cursor
, hf_afs_kauth_princ
);
2159 OUT_RXString(cursor
, hf_afs_kauth_realm
);
2160 ptvcursor_add(cursor
, hf_afs_kauth_data
, -1, ENC_NA
);
2162 case 3: /* getticket-old */
2163 case 23: /* getticket */
2164 OUT_KAUTH_GetTicket(cursor
);
2166 case 4: /* set pass */
2167 OUT_RXString(cursor
, hf_afs_kauth_princ
);
2168 OUT_RXString(cursor
, hf_afs_kauth_realm
);
2169 ptvcursor_add(cursor
, hf_afs_kauth_kvno
, 4, ENC_BIG_ENDIAN
);
2171 case 12: /* get pass */
2172 OUT_RXString(cursor
, hf_afs_kauth_name
);
2181 dissect_cb_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
2183 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2186 case 65538: /* get-capabilites */
2187 OUT_CM_INTERFACES(cursor
);
2188 OUT_CM_CAPABILITIES(cursor
);
2192 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2194 ptvcursor_add(cursor
, hf_afs_cb_errcode
, 4, ENC_BIG_ENDIAN
);
2199 dissect_cb_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2201 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2205 case 204: /* callback */
2206 OUT_RXArray32(OUT_CB_AFSFid(cursor
, "Target"));
2207 OUT_RXArray32(OUT_CB_AFSCallBack(cursor
));
2216 dissect_prot_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
2218 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2222 case 504: /* name to id */
2224 unsigned int i
, size
;
2226 size
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2227 ptvcursor_add(cursor
, hf_afs_prot_count
, 4, ENC_BIG_ENDIAN
);
2229 for (i
=0; i
<size
; i
++)
2231 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2235 case 505: /* id to name */
2237 unsigned int i
, size
;
2239 size
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2240 ptvcursor_add(cursor
, hf_afs_prot_count
, 4, ENC_BIG_ENDIAN
);
2242 for (i
=0; i
<size
; i
++)
2244 OUT_RXStringV(cursor
, hf_afs_prot_name
, PRNAMEMAX
);
2248 case 508: /* get cps */
2249 case 514: /* list elements */
2250 case 517: /* list owned */
2251 case 518: /* get cps2 */
2252 case 519: /* get host cps */
2254 unsigned int i
, size
;
2256 size
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2257 ptvcursor_add(cursor
, hf_afs_prot_count
, 4, ENC_BIG_ENDIAN
);
2259 for (i
=0; i
<size
; i
++)
2261 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2265 case 510: /* list max */
2266 ptvcursor_add(cursor
, hf_afs_prot_maxuid
, 4, ENC_BIG_ENDIAN
);
2267 ptvcursor_add(cursor
, hf_afs_prot_maxgid
, 4, ENC_BIG_ENDIAN
);
2271 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2273 ptvcursor_add(cursor
, hf_afs_prot_errcode
, 4, ENC_BIG_ENDIAN
);
2278 dissect_prot_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2280 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2284 case 500: /* new user */
2285 OUT_RXString(cursor
, hf_afs_prot_name_uint_string
);
2286 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2287 ptvcursor_add(cursor
, hf_afs_prot_oldid
, 4, ENC_BIG_ENDIAN
);
2289 case 501: /* where is it */
2290 case 506: /* delete */
2291 case 508: /* get cps */
2292 case 512: /* list entry */
2293 case 514: /* list elements */
2294 case 517: /* list owned */
2295 case 519: /* get host cps */
2296 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2298 case 502: /* dump entry */
2299 ptvcursor_add(cursor
, hf_afs_prot_pos
, 4, ENC_BIG_ENDIAN
);
2301 case 503: /* add to group */
2302 case 507: /* remove from group */
2303 case 515: /* is a member of? */
2304 ptvcursor_add(cursor
, hf_afs_prot_uid
, 4, ENC_BIG_ENDIAN
);
2305 ptvcursor_add(cursor
, hf_afs_prot_gid
, 4, ENC_BIG_ENDIAN
);
2307 case 504: /* name to id */
2309 unsigned int i
, size
;
2311 size
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2312 ptvcursor_add(cursor
, hf_afs_prot_count
, 4, ENC_BIG_ENDIAN
);
2313 for (i
=0; i
<size
; i
++)
2315 OUT_RXStringV(cursor
, hf_afs_prot_name
,PRNAMEMAX
);
2319 case 505: /* id to name */
2321 unsigned int i
, size
;
2323 size
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2324 ptvcursor_add(cursor
, hf_afs_prot_count
, 4, ENC_BIG_ENDIAN
);
2326 for (i
=0; i
<size
; i
++)
2328 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2332 case 509: /* new entry */
2333 OUT_RXString(cursor
, hf_afs_prot_name_uint_string
);
2334 ptvcursor_add(cursor
, hf_afs_prot_flag
, 4, ENC_BIG_ENDIAN
);
2335 ptvcursor_add(cursor
, hf_afs_prot_oldid
, 4, ENC_BIG_ENDIAN
);
2337 case 511: /* set max */
2338 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2339 ptvcursor_add(cursor
, hf_afs_prot_flag
, 4, ENC_BIG_ENDIAN
);
2341 case 513: /* change entry */
2342 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2343 OUT_RXString(cursor
, hf_afs_prot_name_uint_string
);
2344 ptvcursor_add(cursor
, hf_afs_prot_oldid
, 4, ENC_BIG_ENDIAN
);
2345 ptvcursor_add(cursor
, hf_afs_prot_newid
, 4, ENC_BIG_ENDIAN
);
2347 case 520: /* update entry */
2348 ptvcursor_add(cursor
, hf_afs_prot_id
, 4, ENC_BIG_ENDIAN
);
2349 OUT_RXString(cursor
, hf_afs_prot_name_uint_string
);
2358 dissect_vldb_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
)
2360 static int * const vldb_flags
[] = {
2361 &hf_afs_vldb_flags_rwexists
,
2362 &hf_afs_vldb_flags_roexists
,
2363 &hf_afs_vldb_flags_bkexists
,
2364 &hf_afs_vldb_flags_dfsfileset
,
2368 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2372 case 510: /* list entry */
2373 ptvcursor_add(cursor
, hf_afs_vldb_count
, 4, ENC_BIG_ENDIAN
);
2374 ptvcursor_add(cursor
, hf_afs_vldb_nextindex
, 4, ENC_BIG_ENDIAN
);
2376 case 503: /* get entry by id */
2377 case 504: /* get entry by name */
2381 OUT_RXStringV(cursor
, hf_afs_vldb_name
, VLNAMEMAX
);
2382 ptvcursor_advance(cursor
, 4);
2383 nservers
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2384 ptvcursor_add(cursor
, hf_afs_vldb_numservers
, 4, ENC_BIG_ENDIAN
);
2389 ptvcursor_add(cursor
, hf_afs_vldb_server
, 4, ENC_BIG_ENDIAN
);
2393 ptvcursor_advance(cursor
, 4);
2398 char *part
= wmem_strdup(wmem_packet_scope(), "/vicepa");
2399 j
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2400 if ( i
<nservers
&& j
<=25 )
2402 part
[6] = 'a' + (char) j
;
2403 proto_tree_add_string(ptvcursor_tree(cursor
), hf_afs_vldb_partition
, ptvcursor_tvbuff(cursor
),
2404 ptvcursor_current_offset(cursor
), 4, part
);
2406 ptvcursor_advance(cursor
, 4);
2408 ptvcursor_advance(cursor
, 8*4);
2409 ptvcursor_add(cursor
, hf_afs_vldb_rwvol
, 4, ENC_BIG_ENDIAN
);
2410 ptvcursor_add(cursor
, hf_afs_vldb_rovol
, 4, ENC_BIG_ENDIAN
);
2411 ptvcursor_add(cursor
, hf_afs_vldb_bkvol
, 4, ENC_BIG_ENDIAN
);
2412 ptvcursor_add(cursor
, hf_afs_vldb_clonevol
, 4, ENC_BIG_ENDIAN
);
2413 proto_tree_add_bitmask(ptvcursor_tree(cursor
), ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
), hf_afs_vldb_flags
,
2414 ett_afs_vldb_flags
, vldb_flags
, ENC_BIG_ENDIAN
);
2415 ptvcursor_advance(cursor
, 4);
2418 case 505: /* get new volume id */
2419 ptvcursor_add(cursor
, hf_afs_vldb_id
, 4, ENC_BIG_ENDIAN
);
2421 case 521: /* list entry */
2422 case 529: /* list entry U */
2423 ptvcursor_add(cursor
, hf_afs_vldb_count
, 4, ENC_BIG_ENDIAN
);
2424 ptvcursor_add(cursor
, hf_afs_vldb_nextindex
, 4, ENC_BIG_ENDIAN
);
2426 case 518: /* get entry by id n */
2427 case 519: /* get entry by name N */
2431 OUT_RXStringV(cursor
, hf_afs_vldb_name
, VLNAMEMAX
);
2432 nservers
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2433 ptvcursor_add(cursor
, hf_afs_vldb_numservers
, 4, ENC_BIG_ENDIAN
);
2434 for (i
=0; i
<13; i
++)
2438 ptvcursor_add(cursor
, hf_afs_vldb_server
, 4, ENC_BIG_ENDIAN
);
2442 ptvcursor_advance(cursor
, 4);
2445 for (i
=0; i
<13; i
++)
2447 char *part
= wmem_strdup(wmem_packet_scope(), "/vicepa");
2448 j
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2449 if ( i
<nservers
&& j
<=25 )
2451 part
[6] = 'a' + (char) j
;
2452 proto_tree_add_string(ptvcursor_tree(cursor
), hf_afs_vldb_partition
, ptvcursor_tvbuff(cursor
),
2453 ptvcursor_current_offset(cursor
), 4, part
);
2455 ptvcursor_advance(cursor
, 4);
2457 ptvcursor_advance(cursor
, 13*4);
2458 ptvcursor_add(cursor
, hf_afs_vldb_rwvol
, 4, ENC_BIG_ENDIAN
);
2459 ptvcursor_add(cursor
, hf_afs_vldb_rovol
, 4, ENC_BIG_ENDIAN
);
2460 ptvcursor_add(cursor
, hf_afs_vldb_bkvol
, 4, ENC_BIG_ENDIAN
);
2463 case 526: /* get entry by id u */
2464 case 527: /* get entry by name u */
2468 OUT_RXStringV(cursor
, hf_afs_vldb_name
, VLNAMEMAX
);
2469 nservers
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2470 ptvcursor_add(cursor
, hf_afs_vldb_numservers
, 4, ENC_BIG_ENDIAN
);
2471 for (i
=0; i
<13; i
++)
2475 ptvcursor_add(cursor
, hf_afs_vldb_serveruuid
, 4*11, ENC_NA
);
2479 ptvcursor_advance(cursor
, 4*11);
2482 for (i
=0; i
<13; i
++)
2486 ptvcursor_add(cursor
, hf_afs_vldb_serveruniq
, 4, ENC_BIG_ENDIAN
);
2490 ptvcursor_advance(cursor
, 4);
2493 for (i
=0; i
<13; i
++)
2495 char *part
= wmem_strdup(wmem_packet_scope(), "/vicepa");
2496 j
= tvb_get_ntohl(ptvcursor_tvbuff(cursor
), ptvcursor_current_offset(cursor
));
2497 if ( i
<nservers
&& j
<=25 )
2499 part
[6] = 'a' + (char) j
;
2500 proto_tree_add_string(ptvcursor_tree(cursor
), hf_afs_vldb_partition
, ptvcursor_tvbuff(cursor
),
2501 ptvcursor_current_offset(cursor
), 4, part
);
2503 ptvcursor_advance(cursor
, 4);
2505 for (i
=0; i
<13; i
++)
2509 ptvcursor_add(cursor
, hf_afs_vldb_serverflags
, 4, ENC_BIG_ENDIAN
);
2513 ptvcursor_advance(cursor
, 4);
2516 ptvcursor_add(cursor
, hf_afs_vldb_rwvol
, 4, ENC_BIG_ENDIAN
);
2517 ptvcursor_add(cursor
, hf_afs_vldb_rovol
, 4, ENC_BIG_ENDIAN
);
2518 ptvcursor_add(cursor
, hf_afs_vldb_bkvol
, 4, ENC_BIG_ENDIAN
);
2519 ptvcursor_add(cursor
, hf_afs_vldb_clonevol
, 4, ENC_BIG_ENDIAN
);
2520 ptvcursor_add(cursor
, hf_afs_vldb_flags
, 4, ENC_BIG_ENDIAN
);
2521 ptvcursor_add(cursor
, hf_afs_vldb_spare1
, 4, ENC_BIG_ENDIAN
);
2522 ptvcursor_add(cursor
, hf_afs_vldb_spare2
, 4, ENC_BIG_ENDIAN
);
2523 ptvcursor_add(cursor
, hf_afs_vldb_spare3
, 4, ENC_BIG_ENDIAN
);
2524 ptvcursor_add(cursor
, hf_afs_vldb_spare4
, 4, ENC_BIG_ENDIAN
);
2525 ptvcursor_add(cursor
, hf_afs_vldb_spare5
, 4, ENC_BIG_ENDIAN
);
2526 ptvcursor_add(cursor
, hf_afs_vldb_spare6
, 4, ENC_BIG_ENDIAN
);
2527 ptvcursor_add(cursor
, hf_afs_vldb_spare7
, 4, ENC_BIG_ENDIAN
);
2528 ptvcursor_add(cursor
, hf_afs_vldb_spare8
, 4, ENC_BIG_ENDIAN
);
2529 ptvcursor_add(cursor
, hf_afs_vldb_spare9
, 4, ENC_BIG_ENDIAN
);
2534 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2536 ptvcursor_add(cursor
, hf_afs_vldb_errcode
, 4, ENC_BIG_ENDIAN
);
2541 dissect_vldb_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2543 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2547 case 501: /* create new volume */
2548 case 517: /* create entry N */
2549 OUT_RXStringV(cursor
, hf_afs_vldb_name
, VLNAMEMAX
);
2551 case 502: /* delete entry */
2552 case 503: /* get entry by id */
2553 case 507: /* update entry */
2554 case 508: /* set lock */
2555 case 509: /* release lock */
2556 case 518: /* get entry by id */
2557 ptvcursor_add(cursor
, hf_afs_vldb_id
, 4, ENC_BIG_ENDIAN
);
2558 ptvcursor_add(cursor
, hf_afs_vldb_type
, 4, ENC_BIG_ENDIAN
);
2560 case 504: /* get entry by name */
2561 case 519: /* get entry by name N */
2562 case 524: /* update entry by name */
2563 case 527: /* get entry by name U */
2564 OUT_RXString(cursor
, hf_afs_vldb_name_uint_string
);
2566 case 505: /* get new vol id */
2567 ptvcursor_add(cursor
, hf_afs_vldb_bump
, 4, ENC_BIG_ENDIAN
);
2569 case 506: /* replace entry */
2570 case 520: /* replace entry N */
2571 ptvcursor_add(cursor
, hf_afs_vldb_id
, 4, ENC_BIG_ENDIAN
);
2572 ptvcursor_add(cursor
, hf_afs_vldb_type
, 4, ENC_BIG_ENDIAN
);
2573 OUT_RXStringV(cursor
, hf_afs_vldb_name
, VLNAMEMAX
);
2575 case 510: /* list entry */
2576 case 521: /* list entry N */
2577 ptvcursor_add(cursor
, hf_afs_vldb_index
, 4, ENC_BIG_ENDIAN
);
2579 case 532: /* regaddr */
2580 ptvcursor_add(cursor
, hf_afs_vldb_serveruuid
, 4*11, ENC_NA
);
2581 ptvcursor_add(cursor
, hf_afs_vldb_spare1
, 4, ENC_BIG_ENDIAN
);
2582 OUT_RXArray32(ptvcursor_add(cursor
, hf_afs_vldb_serverip
, 4, ENC_BIG_ENDIAN
));
2591 dissect_ubik_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2595 case 10000: /* vote-beacon */
2597 case 10001: /* vote-debug-old */
2598 OUT_UBIK_DebugOld(cursor
);
2600 case 10002: /* vote-sdebug-old */
2601 OUT_UBIK_SDebugOld(cursor
);
2603 case 10003: /* vote-get syncsite */
2605 case 10004: /* vote-debug */
2606 OUT_UBIK_DebugOld(cursor
);
2607 OUT_UBIK_InterfaceAddrs(cursor
);
2609 case 10005: /* vote-sdebug */
2610 OUT_UBIK_SDebugOld(cursor
);
2611 OUT_UBIK_InterfaceAddrs(cursor
);
2613 case 10006: /* vote-xdebug */
2614 OUT_UBIK_DebugOld(cursor
);
2615 OUT_UBIK_InterfaceAddrs(cursor
);
2616 ptvcursor_add(cursor
, hf_afs_ubik_isclone
, 4, ENC_BIG_ENDIAN
);
2618 case 10007: /* vote-xsdebug */
2619 OUT_UBIK_SDebugOld(cursor
);
2620 OUT_UBIK_InterfaceAddrs(cursor
);
2621 ptvcursor_add(cursor
, hf_afs_ubik_isclone
, 4, ENC_BIG_ENDIAN
);
2623 case 20000: /* disk-begin */
2625 case 20004: /* get version */
2626 OUT_UBIKVERSION(cursor
, "DB Version");
2628 case 20010: /* disk-probe */
2630 case 20012: /* disk-interfaceaddr */
2631 OUT_UBIK_InterfaceAddrs(cursor
);
2637 dissect_ubik_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode
)
2639 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2643 case 10000: /* vote-beacon */
2644 ptvcursor_add(cursor
, hf_afs_ubik_state
, 4, ENC_BIG_ENDIAN
);
2645 OUT_TIMESECS(cursor
, hf_afs_ubik_votestart
);
2646 OUT_UBIKVERSION(cursor
, "DB Version");
2647 OUT_UBIKVERSION(cursor
, "TID");
2649 case 10001: /* vote-debug-old */
2651 case 10002: /* vote-sdebug-old */
2652 ptvcursor_add(cursor
, hf_afs_ubik_site
, 4, ENC_BIG_ENDIAN
);
2654 case 10003: /* vote-get sync site */
2655 ptvcursor_add(cursor
, hf_afs_ubik_site
, 4, ENC_BIG_ENDIAN
);
2657 case 10004: /* vote-debug */
2658 case 10005: /* vote-sdebug */
2659 ptvcursor_add(cursor
, hf_afs_ubik_site
, 4, ENC_BIG_ENDIAN
);
2661 case 20000: /* disk-begin */
2662 OUT_UBIKVERSION(cursor
, "TID");
2664 case 20001: /* disk-commit */
2665 OUT_UBIKVERSION(cursor
, "TID");
2667 case 20002: /* disk-lock */
2668 OUT_UBIKVERSION(cursor
, "TID");
2669 ptvcursor_add(cursor
, hf_afs_ubik_file
, 4, ENC_BIG_ENDIAN
);
2670 ptvcursor_add(cursor
, hf_afs_ubik_pos
, 4, ENC_BIG_ENDIAN
);
2671 ptvcursor_add(cursor
, hf_afs_ubik_length
, 4, ENC_BIG_ENDIAN
);
2672 ptvcursor_add(cursor
, hf_afs_ubik_locktype
, 4, ENC_BIG_ENDIAN
);
2674 case 20003: /* disk-write */
2675 OUT_UBIKVERSION(cursor
, "TID");
2676 ptvcursor_add(cursor
, hf_afs_ubik_file
, 4, ENC_BIG_ENDIAN
);
2677 ptvcursor_add(cursor
, hf_afs_ubik_pos
, 4, ENC_BIG_ENDIAN
);
2679 case 20004: /* disk-get version */
2681 case 20005: /* disk-get file */
2682 ptvcursor_add(cursor
, hf_afs_ubik_file
, 4, ENC_BIG_ENDIAN
);
2684 case 20006: /* disk-send file */
2685 ptvcursor_add(cursor
, hf_afs_ubik_file
, 4, ENC_BIG_ENDIAN
);
2686 ptvcursor_add(cursor
, hf_afs_ubik_length
, 4, ENC_BIG_ENDIAN
);
2687 OUT_UBIKVERSION(cursor
, "DB Version");
2689 case 20007: /* disk-abort */
2690 case 20008: /* disk-release locks */
2691 case 20010: /* disk-probe */
2693 case 20009: /* disk-truncate */
2694 OUT_UBIKVERSION(cursor
, "TID");
2695 ptvcursor_add(cursor
, hf_afs_ubik_file
, 4, ENC_BIG_ENDIAN
);
2696 ptvcursor_add(cursor
, hf_afs_ubik_length
, 4, ENC_BIG_ENDIAN
);
2698 case 20011: /* disk-writev */
2699 OUT_UBIKVERSION(cursor
, "TID");
2701 case 20012: /* disk-interfaceaddr */
2702 OUT_UBIK_InterfaceAddrs(cursor
);
2704 case 20013: /* disk-set version */
2705 OUT_UBIKVERSION(cursor
, "TID");
2706 OUT_UBIKVERSION(cursor
, "Old DB Version");
2707 OUT_UBIKVERSION(cursor
, "New DB Version");
2716 dissect_backup_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode _U_
)
2718 if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2720 ptvcursor_add(cursor
, hf_afs_backup_errcode
, 4, ENC_BIG_ENDIAN
);
2725 dissect_backup_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode _U_
)
2727 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2732 dissect_butc_reply(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode _U_
)
2734 if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2736 ptvcursor_add(cursor
, hf_afs_butc_errcode
, 4, ENC_BIG_ENDIAN
);
2741 dissect_butc_request(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo _U_
, int opcode _U_
)
2743 ptvcursor_advance(cursor
, 4); /* skip the opcode */
2746 * Dissection routines
2750 dissect_afs(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
2752 struct rxinfo
*rxinfo
= (struct rxinfo
*)data
;
2754 conversation_t
*conversation
;
2755 struct afs_request_key request_key
, *new_request_key
;
2756 struct afs_request_val
*request_val
=NULL
;
2757 proto_tree
*afs_tree
, *afs_op_tree
, *ti
;
2758 proto_item
*hidden_item
;
2759 int port
, node
, typenode
, opcode
;
2760 value_string_ext
*vals_ext
;
2763 uint8_t save_fragmented
;
2764 int reassembled
= 0;
2765 ptvcursor_t
*cursor
;
2767 void (*dissector
)(ptvcursor_t
*cursor
, struct rxinfo
*rxinfo
, int opcode
);
2769 /* Reject the packet if data is NULL */
2773 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "AFS (RX)");
2774 col_clear(pinfo
->cinfo
, COL_INFO
);
2776 reply
= (rxinfo
->flags
& RX_CLIENT_INITIATED
) == 0;
2777 port
= ((reply
== 0) ? pinfo
->destport
: pinfo
->srcport
);
2780 * Find out what conversation this packet is part of.
2781 * XXX - this should really be done by the transport-layer protocol,
2782 * although for connectionless transports, we may not want to do that
2783 * unless we know some higher-level protocol will want it - or we
2784 * may want to do it, so you can say e.g. "show only the packets in
2785 * this UDP 'connection'".
2787 * Note that we don't have to worry about the direction this packet
2788 * was going - the conversation code handles that for us, treating
2789 * packets from A:X to B:Y as being part of the same conversation as
2790 * packets from B:Y to A:X.
2792 conversation
= find_or_create_conversation(pinfo
);
2794 request_key
.conversation
= conversation
->conv_index
;
2795 request_key
.service
= rxinfo
->serviceid
;
2796 request_key
.epoch
= rxinfo
->epoch
;
2797 request_key
.cid
= rxinfo
->cid
;
2798 request_key
.callnumber
= rxinfo
->callnumber
;
2800 request_val
= (struct afs_request_val
*) wmem_map_lookup(
2801 afs_request_hash
, &request_key
);
2803 /* only allocate a new hash element when it's a request */
2805 if(!pinfo
->fd
->visited
){
2806 if ( !request_val
&& !reply
) {
2807 new_request_key
= wmem_new(wmem_file_scope(), struct afs_request_key
);
2808 *new_request_key
= request_key
;
2810 request_val
= wmem_new(wmem_file_scope(), struct afs_request_val
);
2811 request_val
-> opcode
= tvb_get_ntohl(tvb
, offset
);
2812 request_val
-> req_num
= pinfo
->num
;
2813 request_val
-> rep_num
= 0;
2814 request_val
-> req_time
= pinfo
->abs_ts
;
2816 wmem_map_insert(afs_request_hash
, new_request_key
,
2819 if( request_val
&& reply
) {
2820 request_val
-> rep_num
= pinfo
->num
;
2824 if ( request_val
) {
2825 opcode
= request_val
->opcode
;
2835 typenode
= hf_afs_fs
;
2836 node
= hf_afs_fs_opcode
;
2837 vals_ext
= &fs_req_ext
;
2838 dissector
= reply
? dissect_fs_reply
: dissect_fs_request
;
2841 typenode
= hf_afs_cb
;
2842 node
= hf_afs_cb_opcode
;
2843 vals_ext
= &cb_req_ext
;
2844 dissector
= reply
? dissect_cb_reply
: dissect_cb_request
;
2847 typenode
= hf_afs_prot
;
2848 node
= hf_afs_prot_opcode
;
2849 vals_ext
= &prot_req_ext
;
2850 dissector
= reply
? dissect_prot_reply
: dissect_prot_request
;
2853 typenode
= hf_afs_vldb
;
2854 node
= hf_afs_vldb_opcode
;
2855 vals_ext
= &vldb_req_ext
;
2856 dissector
= reply
? dissect_vldb_reply
: dissect_vldb_request
;
2858 case AFS_PORT_KAUTH
:
2859 typenode
= hf_afs_kauth
;
2860 node
= hf_afs_kauth_opcode
;
2861 vals_ext
= &kauth_req_ext
;
2862 dissector
= reply
? dissect_kauth_reply
: dissect_kauth_request
;
2865 typenode
= hf_afs_vol
;
2866 node
= hf_afs_vol_opcode
;
2867 vals_ext
= &vol_req_ext
;
2868 dissector
= reply
? dissect_vol_reply
: dissect_vol_request
;
2870 case AFS_PORT_ERROR
:
2871 typenode
= hf_afs_error
;
2872 node
= hf_afs_error_opcode
;
2873 /* dissector = reply ? dissect_error_reply : dissect_error_request; */
2876 typenode
= hf_afs_bos
;
2877 node
= hf_afs_bos_opcode
;
2878 vals_ext
= &bos_req_ext
;
2879 dissector
= reply
? dissect_bos_reply
: dissect_bos_request
;
2881 case AFS_PORT_UPDATE
:
2882 typenode
= hf_afs_update
;
2883 node
= hf_afs_update_opcode
;
2884 vals_ext
= &update_req_ext
;
2885 /* dissector = reply ? dissect_update_reply : dissect_update_request; */
2887 case AFS_PORT_RMTSYS
:
2888 typenode
= hf_afs_rmtsys
;
2889 node
= hf_afs_rmtsys_opcode
;
2890 vals_ext
= &rmtsys_req_ext
;
2891 /* dissector = reply ? dissect_rmtsys_reply : dissect_rmtsys_request; */
2893 case AFS_PORT_BACKUP
:
2894 typenode
= hf_afs_backup
;
2895 node
= hf_afs_backup_opcode
;
2896 vals_ext
= &backup_req_ext
;
2897 dissector
= reply
? dissect_backup_reply
: dissect_backup_request
;
2900 if (port
>= AFS_PORT_BUTC
) {
2901 typenode
= hf_afs_butc
;
2902 node
= hf_afs_butc_opcode
;
2903 vals_ext
= &butc_req_ext
;
2904 dissector
= reply
? dissect_butc_reply
: dissect_butc_request
;
2909 if ( (opcode
>= VOTE_LOW
&& opcode
<= VOTE_HIGH
) ||
2910 (opcode
>= DISK_LOW
&& opcode
<= DISK_HIGH
) ) {
2911 typenode
= hf_afs_ubik
;
2912 node
= hf_afs_ubik_opcode
;
2913 vals_ext
= &ubik_req_ext
;
2914 dissector
= reply
? dissect_ubik_reply
: dissect_ubik_request
;
2918 if ( VALID_OPCODE(opcode
) ) {
2920 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s%s %s: %s (%d)",
2921 typenode
== hf_afs_ubik
? "UBIK-" : "",
2922 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
2923 reply
? "Reply" : "Request",
2924 val_to_str_ext(opcode
, vals_ext
, "Unknown(%d)"), opcode
);
2926 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s%s %s: Unknown(%d)",
2927 typenode
== hf_afs_ubik
? "UBIK-" : "",
2928 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
2929 reply
? "Reply" : "Request",
2933 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Encrypted %s %s",
2934 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
2935 reply
? "Reply" : "Request"
2939 ti
= proto_tree_add_item(tree
, proto_afs
, tvb
, offset
,
2940 tvb_reported_length_remaining(tvb
, offset
),
2942 afs_tree
= proto_item_add_subtree(ti
, ett_afs
);
2944 save_fragmented
= pinfo
->fragmented
;
2945 if( (afs_defragment
&& (!(rxinfo
->flags
& RX_LAST_PACKET
) || rxinfo
->seq
> 1 ))) { /* Fragmented */
2946 tvbuff_t
* new_tvb
= NULL
;
2947 fragment_head
* frag_msg
= NULL
;
2948 uint32_t afs_seqid
= rxinfo
->callnumber
^ rxinfo
->cid
;
2949 pinfo
->fragmented
= true;
2951 frag_msg
= fragment_add_seq_check(&afs_reassembly_table
,
2952 tvb
, offset
, pinfo
, afs_seqid
, NULL
,
2953 rxinfo
->seq
-1, tvb_captured_length_remaining(tvb
, offset
),
2954 ! ( rxinfo
->flags
& RX_LAST_PACKET
) );
2956 new_tvb
= process_reassembled_data( tvb
, offset
, pinfo
, "Reassembled RX", frag_msg
,
2957 &afs_frag_items
, NULL
, afs_tree
);
2962 col_append_str(pinfo
->cinfo
, COL_INFO
, " [AFS reassembled]");
2964 col_set_str(pinfo
->cinfo
, COL_INFO
, "[AFS segment of a reassembled PDU]");
2965 return tvb_captured_length(tvb
);
2968 pinfo
->fragmented
= save_fragmented
;
2971 proto_tree_add_uint_format_value(afs_tree
, hf_afs_service
, tvb
, 0, 0,
2972 opcode
, "%s%s%s %s",
2973 VALID_OPCODE(opcode
) ? "" : "Encrypted ",
2974 typenode
== hf_afs_ubik
? "UBIK - " : "",
2975 val_to_str_ext(port
, &port_types_ext
, "Unknown(%d)"),
2976 reply
? "Reply" : "Request");
2978 if( request_val
&& !reply
&& request_val
->rep_num
) {
2979 proto_tree_add_uint_format(afs_tree
, hf_afs_repframe
,
2980 tvb
, 0, 0, request_val
->rep_num
,
2981 "The reply to this request is in frame %u",
2982 request_val
->rep_num
);
2984 if( request_val
&& reply
&& request_val
->rep_num
) {
2985 proto_tree_add_uint_format(afs_tree
, hf_afs_reqframe
,
2986 tvb
, 0, 0, request_val
->req_num
,
2987 "This is a reply to a request in frame %u",
2988 request_val
->req_num
);
2989 nstime_delta(&delta_ts
, &pinfo
->abs_ts
, &request_val
->req_time
);
2990 proto_tree_add_time(afs_tree
, hf_afs_time
, tvb
, offset
, 0,
2995 if ( VALID_OPCODE(opcode
) ) {
2996 /* until we do cache, can't handle replies */
2998 if ( !reply
&& node
!= 0 ) {
2999 if ( rxinfo
->seq
== 1 || reassembled
)
3001 ti
= proto_tree_add_uint(afs_tree
,
3002 node
, tvb
, offset
, 4, opcode
);
3004 ti
= proto_tree_add_uint(afs_tree
,
3005 node
, tvb
, 0, 0, opcode
);
3007 afs_op_tree
= proto_item_add_subtree(ti
, ett_afs_op
);
3008 } else if ( reply
&& node
!= 0 ) {
3009 /* the opcode isn't in this packet */
3010 ti
= proto_tree_add_uint(afs_tree
,
3011 node
, tvb
, 0, 0, opcode
);
3012 afs_op_tree
= proto_item_add_subtree(ti
, ett_afs_op
);
3014 afs_op_tree
= proto_tree_add_subtree(afs_tree
, tvb
, 0, 0, ett_afs_op
, &ti
, "Operation: Unknown");
3017 if ( typenode
!= 0 ) {
3018 /* indicate the type of request */
3019 hidden_item
= proto_tree_add_boolean(afs_tree
, typenode
, tvb
, offset
, 0, 1);
3020 proto_item_set_hidden(hidden_item
);
3023 /* Process the packet according to what service it is */
3024 /* Only for first packet in an rx data stream or the full reassembled stream */
3025 if ( dissector
&& ( rxinfo
->seq
== 1 || reassembled
) ) {
3026 cursor
= ptvcursor_new(pinfo
->pool
, afs_op_tree
, tvb
, offset
);
3027 (*dissector
)(cursor
, rxinfo
, opcode
);
3032 /* if it's the last packet, and it's a reply, remove opcode
3034 /* ignoring for now, I'm not sure how the chunk deallocation works */
3035 if ( rxinfo
->flags
& RX_LAST_PACKET
&& reply
){
3039 return tvb_captured_length(tvb
);
3043 * Registration code for registering the protocol and fields
3047 proto_register_afs(void)
3049 static hf_register_info hf
[] = {
3050 { &hf_afs_fs
, { "File Server", "afs.fs",
3051 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3052 { &hf_afs_cb
, { "Callback", "afs.cb",
3053 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3054 { &hf_afs_prot
, { "Protection", "afs.prot",
3055 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Protection Server", HFILL
}},
3056 { &hf_afs_vldb
, { "VLDB", "afs.vldb",
3057 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Volume Location Database Server", HFILL
}},
3058 { &hf_afs_kauth
, { "KAuth", "afs.kauth",
3059 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Kerberos Auth Server", HFILL
}},
3060 { &hf_afs_vol
, { "Volume Server", "afs.vol",
3061 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3062 { &hf_afs_error
, { "Error", "afs.error",
3063 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3064 { &hf_afs_bos
, { "BOS", "afs.bos",
3065 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Basic Oversee Server", HFILL
}},
3066 { &hf_afs_update
, { "Update", "afs.update",
3067 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Update Server", HFILL
}},
3068 { &hf_afs_rmtsys
, { "Rmtsys", "afs.rmtsys",
3069 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3070 { &hf_afs_ubik
, { "Ubik", "afs.ubik",
3071 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3072 { &hf_afs_backup
, { "Backup", "afs.backup",
3073 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Backup Server", HFILL
}},
3074 { &hf_afs_butc
, { "BackupTC", "afs.butc",
3075 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Backup Tape Controller", HFILL
}},
3076 { &hf_afs_service
, { "Service", "afs.service",
3077 FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
3078 { &hf_afs_fs_opcode
, { "Operation", "afs.fs.opcode",
3079 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3080 &fs_req_ext
, 0, NULL
, HFILL
}},
3081 { &hf_afs_cb_opcode
, { "Operation", "afs.cb.opcode",
3082 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3083 &cb_req_ext
, 0, NULL
, HFILL
}},
3084 { &hf_afs_prot_opcode
, { "Operation", "afs.prot.opcode",
3085 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3086 &prot_req_ext
, 0, NULL
, HFILL
}},
3087 { &hf_afs_vldb_opcode
, { "Operation", "afs.vldb.opcode",
3088 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3089 &vldb_req_ext
, 0, NULL
, HFILL
}},
3090 { &hf_afs_kauth_opcode
, { "Operation", "afs.kauth.opcode",
3091 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3092 &kauth_req_ext
, 0, NULL
, HFILL
}},
3093 { &hf_afs_vol_opcode
, { "Operation", "afs.vol.opcode",
3094 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3095 &vol_req_ext
, 0, NULL
, HFILL
}},
3096 { &hf_afs_bos_opcode
, { "Operation", "afs.bos.opcode",
3097 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3098 &bos_req_ext
, 0, NULL
, HFILL
}},
3099 { &hf_afs_update_opcode
, { "Operation", "afs.update.opcode",
3100 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3101 &update_req_ext
, 0, NULL
, HFILL
}},
3102 { &hf_afs_rmtsys_opcode
, { "Operation", "afs.rmtsys.opcode",
3103 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3104 &rmtsys_req_ext
, 0, NULL
, HFILL
}},
3106 { &hf_afs_error_opcode
, { "Operation", "afs.error.opcode",
3107 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3108 { &hf_afs_backup_opcode
, { "Operation", "afs.backup.opcode",
3109 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3110 &backup_req_ext
, 0, NULL
, HFILL
}},
3111 { &hf_afs_butc_opcode
, { "Operation", "afs.butc.opcode",
3112 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3113 &butc_req_ext
, 0, NULL
, HFILL
}},
3114 { &hf_afs_ubik_opcode
, { "Operation", "afs.ubik.opcode",
3115 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3116 &ubik_req_ext
, 0, NULL
, HFILL
}},
3119 /* File Server Fields */
3120 { &hf_afs_fs_fid_volume
, { "FileID (Volume)", "afs.fs.fid.volume",
3121 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Volume)", HFILL
}},
3122 { &hf_afs_fs_fid_vnode
, { "FileID (VNode)", "afs.fs.fid.vnode",
3123 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (VNode)", HFILL
}},
3124 { &hf_afs_fs_fid_uniqifier
, { "FileID (Uniqifier)", "afs.fs.fid.uniq",
3125 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Uniqifier)", HFILL
}},
3126 { &hf_afs_fs_offset
, { "Offset", "afs.fs.offset",
3127 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3128 { &hf_afs_fs_length
, { "Length", "afs.fs.length",
3129 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3130 { &hf_afs_fs_flength
, { "FLength", "afs.fs.flength",
3131 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3132 { &hf_afs_fs_offset64
, { "Offset64", "afs.fs.offset64",
3133 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3134 { &hf_afs_fs_length64
, { "Length64", "afs.fs.length64",
3135 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3136 { &hf_afs_fs_flength64
, { "FLength64", "afs.fs.flength64",
3137 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3138 { &hf_afs_fs_errcode
, { "Error Code", "afs.fs.errcode",
3139 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3140 { &hf_afs_fs_data
, { "Data", "afs.fs.data",
3141 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3142 { &hf_afs_fs_token
, { "Token", "afs.fs.token",
3143 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3144 { &hf_afs_fs_oldname
, { "Old Name", "afs.fs.oldname",
3145 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3146 { &hf_afs_fs_newname
, { "New Name", "afs.fs.newname",
3147 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3148 { &hf_afs_fs_name
, { "Name", "afs.fs.name",
3149 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3150 { &hf_afs_fs_symlink_name
, { "Symlink Name", "afs.fs.symlink.name",
3151 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3152 { &hf_afs_fs_symlink_content
, { "Symlink Content", "afs.fs.symlink.content",
3153 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3154 { &hf_afs_fs_volid
, { "Volume ID", "afs.fs.volid",
3155 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3156 { &hf_afs_fs_volname
, { "Volume Name", "afs.fs.volname",
3157 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3158 { &hf_afs_fs_timestamp
, { "Timestamp", "afs.fs.timestamp",
3159 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3160 { &hf_afs_fs_offlinemsg
, { "Offline Message", "afs.fs.offlinemsg",
3161 FT_UINT_STRING
, BASE_NONE
, 0, 0, "Volume Name", HFILL
}},
3162 { &hf_afs_fs_motd
, { "Message of the Day", "afs.fs.motd",
3163 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3164 { &hf_afs_fs_xstats_version
, { "XStats Version", "afs.fs.xstats.version",
3165 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3166 { &hf_afs_fs_xstats_clientversion
, { "Client Version", "afs.fs.xstats.clientversion",
3167 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3168 { &hf_afs_fs_xstats_collnumber
, { "Collection Number", "afs.fs.xstats.collnumber",
3169 FT_UINT32
, BASE_DEC
, VALS(xstat_collections
), 0, NULL
, HFILL
}},
3170 { &hf_afs_fs_xstats_timestamp
, { "XStats Timestamp", "afs.fs.xstats.timestamp",
3171 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3172 { &hf_afs_fs_cps_spare1
, { "CPS Spare1", "afs.fs.cps.spare1",
3173 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3174 { &hf_afs_fs_cps_spare2
, { "CPS Spare2", "afs.fs.cps.spare2",
3175 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3176 { &hf_afs_fs_cps_spare3
, { "CPS Spare3", "afs.fs.cps.spare3",
3177 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3178 { &hf_afs_fs_vicelocktype
, { "Vice Lock Type", "afs.fs.vicelocktype",
3179 FT_UINT32
, BASE_DEC
, VALS(vice_lock_types
), 0, NULL
, HFILL
}},
3180 /* XXX - is this an IP address? */
3181 { &hf_afs_fs_viceid
, { "Vice ID", "afs.fs.viceid",
3182 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3183 { &hf_afs_fs_ipaddr
, { "IP Addr", "afs.fs.ipaddr",
3184 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3186 { &hf_afs_fs_status_mask
, { "Mask", "afs.fs.status.mask",
3187 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3188 { &hf_afs_fs_status_mask_setmodtime
, { "Set Modification Time", "afs.fs.status.mask.setmodtime",
3189 FT_BOOLEAN
, 32, 0, 0x00000001, NULL
, HFILL
}},
3190 { &hf_afs_fs_status_mask_setowner
, { "Set Owner", "afs.fs.status.mask.setowner",
3191 FT_BOOLEAN
, 32, 0, 0x00000002, NULL
, HFILL
}},
3192 { &hf_afs_fs_status_mask_setgroup
, { "Set Group", "afs.fs.status.mask.setgroup",
3193 FT_BOOLEAN
, 32, 0, 0x00000004, NULL
, HFILL
}},
3194 { &hf_afs_fs_status_mask_setmode
, { "Set Mode", "afs.fs.status.mask.setmode",
3195 FT_BOOLEAN
, 32, 0, 0x00000008, NULL
, HFILL
}},
3196 { &hf_afs_fs_status_mask_setsegsize
, { "Set Segment Size", "afs.fs.status.mask.setsegsize",
3197 FT_BOOLEAN
, 32, 0, 0x00000010, NULL
, HFILL
}},
3198 { &hf_afs_fs_status_mask_fsync
, { "FSync", "afs.fs.status.mask.fsync",
3199 FT_BOOLEAN
, 32, 0, 0x00000400, NULL
, HFILL
}},
3201 { &hf_afs_fs_status_clientmodtime
, { "Client Modification Time", "afs.fs.status.clientmodtime",
3202 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3203 { &hf_afs_fs_status_servermodtime
, { "Server Modification Time", "afs.fs.status.servermodtime",
3204 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3205 { &hf_afs_fs_status_owner
, { "Owner", "afs.fs.status.owner",
3206 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3207 { &hf_afs_fs_status_group
, { "Group", "afs.fs.status.group",
3208 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3209 { &hf_afs_fs_status_mode
, { "Unix Mode", "afs.fs.status.mode",
3210 FT_UINT32
, BASE_OCT
, 0, 0, NULL
, HFILL
}},
3211 { &hf_afs_fs_status_segsize
, { "Segment Size", "afs.fs.status.segsize",
3212 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3213 { &hf_afs_fs_status_interfaceversion
, { "Interface Version", "afs.fs.status.interfaceversion",
3214 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3215 { &hf_afs_fs_status_filetype
, { "File Type", "afs.fs.status.filetype",
3216 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3217 { &hf_afs_fs_status_author
, { "Author", "afs.fs.status.author",
3218 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3219 { &hf_afs_fs_status_calleraccess
, { "Caller Access", "afs.fs.status.calleraccess",
3220 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3221 { &hf_afs_fs_status_anonymousaccess
, { "Anonymous Access", "afs.fs.status.anonymousaccess",
3222 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3223 { &hf_afs_fs_status_parentvnode
, { "Parent VNode", "afs.fs.status.parentvnode",
3224 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3225 { &hf_afs_fs_status_parentunique
, { "Parent Unique", "afs.fs.status.parentunique",
3226 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3227 { &hf_afs_fs_status_dataversion
, { "Data Version", "afs.fs.status.dataversion",
3228 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3229 { &hf_afs_fs_status_dataversionhigh
, { "Data Version (High)", "afs.fs.status.dataversionhigh",
3230 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3231 { &hf_afs_fs_status_linkcount
, { "Link Count", "afs.fs.status.linkcount",
3232 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3233 { &hf_afs_fs_status_spare2
, { "Spare 2", "afs.fs.status.spare2",
3234 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3235 { &hf_afs_fs_status_spare3
, { "Spare 3", "afs.fs.status.spare3",
3236 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3237 { &hf_afs_fs_status_spare4
, { "Spare 4", "afs.fs.status.spare4",
3238 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3239 { &hf_afs_fs_status_synccounter
, { "Sync Counter", "afs.fs.status.synccounter",
3240 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3241 { &hf_afs_fs_status_length
, { "Length", "afs.fs.status.length",
3242 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3245 { &hf_afs_fs_volsync_spare1
, { "Volume Creation Timestamp", "afs.fs.volsync.spare1",
3246 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3247 { &hf_afs_fs_volsync_spare2
, { "Spare 2", "afs.fs.volsync.spare2",
3248 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3249 { &hf_afs_fs_volsync_spare3
, { "Spare 3", "afs.fs.volsync.spare3",
3250 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3251 { &hf_afs_fs_volsync_spare4
, { "Spare 4", "afs.fs.volsync.spare4",
3252 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3253 { &hf_afs_fs_volsync_spare5
, { "Spare 5", "afs.fs.volsync.spare5",
3254 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3255 { &hf_afs_fs_volsync_spare6
, { "Spare 6", "afs.fs.volsync.spare6",
3256 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3259 { &hf_afs_fs_acl_count_positive
, {
3260 "ACL Count (Positive)", "afs.fs.acl.count.positive",
3261 FT_UINT32
, BASE_DEC
, 0, 0, "Number of Positive ACLs", HFILL
}},
3262 { &hf_afs_fs_acl_count_negative
, {
3263 "ACL Count (Negative)", "afs.fs.acl.count.negative",
3264 FT_UINT32
, BASE_DEC
, 0, 0, "Number of Negative ACLs", HFILL
}},
3265 { &hf_afs_fs_acl_datasize
, {
3266 "ACL Size", "afs.fs.acl.datasize",
3267 FT_UINT32
, BASE_DEC
, 0, 0, "ACL Data Size", HFILL
}},
3268 { &hf_afs_fs_acl_entity
, {
3269 "Entity (User/Group)", "afs.fs.acl.entity",
3270 FT_STRING
, BASE_NONE
, 0, 0, "ACL Entity (User/Group)", HFILL
}},
3271 { &hf_afs_fs_acl_r
, {
3272 "_R_ead", "afs.fs.acl.r",
3273 FT_BOOLEAN
, 8, 0, PRSFS_READ
, "Read", HFILL
}},
3274 { &hf_afs_fs_acl_l
, {
3275 "_L_ookup", "afs.fs.acl.l",
3276 FT_BOOLEAN
, 8, 0, PRSFS_LOOKUP
, "Lookup", HFILL
}},
3277 { &hf_afs_fs_acl_i
, {
3278 "_I_nsert", "afs.fs.acl.i",
3279 FT_BOOLEAN
, 8, 0, PRSFS_INSERT
, "Insert", HFILL
}},
3280 { &hf_afs_fs_acl_d
, { "_D_elete", "afs.fs.acl.d",
3281 FT_BOOLEAN
, 8, 0, PRSFS_DELETE
, "Delete", HFILL
}},
3282 { &hf_afs_fs_acl_w
, { "_W_rite", "afs.fs.acl.w",
3283 FT_BOOLEAN
, 8, 0, PRSFS_WRITE
, "Write", HFILL
}},
3284 { &hf_afs_fs_acl_k
, { "_L_ock", "afs.fs.acl.k",
3285 FT_BOOLEAN
, 8, 0, PRSFS_LOCK
, "Lock", HFILL
}},
3286 { &hf_afs_fs_acl_a
, { "_A_dminister", "afs.fs.acl.a",
3287 FT_BOOLEAN
, 8, 0, PRSFS_ADMINISTER
, "Administer", HFILL
}},
3289 { &hf_afs_fs_callback_version
, { "Version", "afs.fs.callback.version",
3290 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3291 { &hf_afs_fs_callback_expires
, { "Expires", "afs.fs.callback.expires",
3292 FT_RELATIVE_TIME
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3293 { &hf_afs_fs_callback_type
, { "Type", "afs.fs.callback.type",
3294 FT_UINT32
, BASE_DEC
, VALS(cb_types
), 0, NULL
, HFILL
}},
3296 /* BOS Server Fields */
3297 { &hf_afs_bos_errcode
, { "Error Code", "afs.bos.errcode",
3298 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3299 { &hf_afs_bos_type
, { "Type", "afs.bos.type",
3300 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3301 { &hf_afs_bos_content
, { "Content", "afs.bos.content",
3302 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3303 { &hf_afs_bos_data
, { "Data", "afs.bos.data",
3304 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3305 { &hf_afs_bos_path
, { "Path", "afs.bos.path",
3306 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3307 { &hf_afs_bos_parm
, { "Parm", "afs.bos.parm",
3308 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3309 { &hf_afs_bos_error
, { "Error", "afs.bos.error",
3310 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3311 { &hf_afs_bos_spare1
, { "Spare1", "afs.bos.spare1",
3312 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3313 { &hf_afs_bos_spare2
, { "Spare2", "afs.bos.spare2",
3314 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3315 { &hf_afs_bos_spare3
, { "Spare3", "afs.bos.spare3",
3316 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3317 { &hf_afs_bos_file
, { "File", "afs.bos.file",
3318 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3319 { &hf_afs_bos_cmd
, { "Command", "afs.bos.cmd",
3320 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3321 { &hf_afs_bos_key
, { "Key", "afs.bos.key",
3322 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3323 { &hf_afs_bos_user
, { "User", "afs.bos.user",
3324 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3325 { &hf_afs_bos_instance
, { "Instance", "afs.bos.instance",
3326 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3327 { &hf_afs_bos_status
, { "Status", "afs.bos.status",
3328 FT_INT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3329 { &hf_afs_bos_statusdesc
, { "Status Description", "afs.bos.statusdesc",
3330 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3331 { &hf_afs_bos_num
, { "Number", "afs.bos.number",
3332 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3333 { &hf_afs_bos_size
, { "Size", "afs.bos.size",
3334 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3335 { &hf_afs_bos_flags
, { "Flags", "afs.bos.flags",
3336 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3337 { &hf_afs_bos_date
, { "Date", "afs.bos.date",
3338 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3339 { &hf_afs_bos_kvno
, { "Key Version Number", "afs.bos.kvno",
3340 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3341 { &hf_afs_bos_cell
, { "Cell", "afs.bos.cell",
3342 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3343 { &hf_afs_bos_host
, { "Host", "afs.bos.host",
3344 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3345 { &hf_afs_bos_newtime
, { "New Time", "afs.bos.newtime",
3346 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3347 { &hf_afs_bos_baktime
, { "Backup Time", "afs.bos.baktime",
3348 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3349 { &hf_afs_bos_oldtime
, { "Old Time", "afs.bos.oldtime",
3350 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3351 { &hf_afs_bos_keymodtime
, { "Key Modification Time", "afs.bos.keymodtime",
3352 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3353 { &hf_afs_bos_keychecksum
, { "Key Checksum", "afs.bos.keychecksum",
3354 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3355 { &hf_afs_bos_keyspare2
, { "Key Spare 2", "afs.bos.keyspare2",
3356 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3359 /* KAUTH Server Fields */
3360 { &hf_afs_kauth_errcode
, { "Error Code", "afs.kauth.errcode",
3361 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3362 { &hf_afs_kauth_princ
, { "Principal", "afs.kauth.princ",
3363 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3364 { &hf_afs_kauth_realm
, { "Realm", "afs.kauth.realm",
3365 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3366 { &hf_afs_kauth_domain
, { "Domain", "afs.kauth.domain",
3367 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3368 { &hf_afs_kauth_name
, { "Name", "afs.kauth.name",
3369 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3370 { &hf_afs_kauth_data
, { "Data", "afs.kauth.data",
3371 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3372 { &hf_afs_kauth_kvno
, { "Key Version Number", "afs.kauth.kvno",
3373 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3375 /* VOL Server Fields */
3376 { &hf_afs_vol_errcode
, { "Error Code", "afs.vol.errcode",
3377 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3378 { &hf_afs_vol_id
, { "Volume ID", "afs.vol.id",
3379 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3380 { &hf_afs_vol_count
, { "Volume Count", "afs.vol.count",
3381 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3382 { &hf_afs_vol_name
, { "Volume Name", "afs.vol.name",
3383 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3385 /* VLDB Server Fields */
3386 { &hf_afs_vldb_errcode
, { "Error Code", "afs.vldb.errcode",
3387 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3388 { &hf_afs_vldb_type
, { "Volume Type", "afs.vldb.type",
3389 FT_UINT32
, BASE_HEX
, VALS(volume_types
), 0, NULL
, HFILL
}},
3390 { &hf_afs_vldb_id
, { "Volume ID", "afs.vldb.id",
3391 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3392 { &hf_afs_vldb_bump
, { "Bumped Volume ID", "afs.vldb.bump",
3393 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3394 { &hf_afs_vldb_index
, { "Volume Index", "afs.vldb.index",
3395 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3396 { &hf_afs_vldb_count
, { "Volume Count", "afs.vldb.count",
3397 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3398 { &hf_afs_vldb_numservers
, { "Number of Servers", "afs.vldb.numservers",
3399 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3400 { &hf_afs_vldb_nextindex
, { "Next Volume Index", "afs.vldb.nextindex",
3401 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3402 { &hf_afs_vldb_rovol
, { "Read-Only Volume ID", "afs.vldb.rovol",
3403 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3404 { &hf_afs_vldb_rwvol
, { "Read-Write Volume ID", "afs.vldb.rwvol",
3405 FT_UINT32
, BASE_DEC
, 0, 0, "Read-Only Volume ID", HFILL
}},
3406 { &hf_afs_vldb_bkvol
, { "Backup Volume ID", "afs.vldb.bkvol",
3407 FT_UINT32
, BASE_DEC
, 0, 0, "Read-Only Volume ID", HFILL
}},
3408 { &hf_afs_vldb_clonevol
, { "Clone Volume ID", "afs.vldb.clonevol",
3409 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3410 { &hf_afs_vldb_name
, { "Volume Name", "afs.vldb.name",
3411 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3412 { &hf_afs_vldb_name_uint_string
, { "Volume Name", "afs.vldb.name",
3413 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3414 { &hf_afs_vldb_partition
, { "Partition", "afs.vldb.partition",
3415 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3416 { &hf_afs_vldb_server
, { "Server", "afs.vldb.server",
3417 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3418 { &hf_afs_vldb_serveruuid
, { "Server UUID", "afs.vldb.serveruuid",
3419 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3420 { &hf_afs_vldb_serveruniq
, { "Server Unique Address", "afs.vldb.serveruniq",
3421 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3422 { &hf_afs_vldb_serverflags
, { "Server Flags", "afs.vldb.serverflags",
3423 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3424 { &hf_afs_vldb_serverip
, { "Server IP", "afs.vldb.serverip",
3425 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3426 { &hf_afs_vldb_flags
, { "Flags", "afs.vldb.flags",
3427 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3429 { &hf_afs_vldb_flags_rwexists
, { "Read/Write Exists", "afs.vldb.flags.rwexists",
3430 FT_BOOLEAN
, 32, 0, 0x00001000, NULL
, HFILL
}},
3431 { &hf_afs_vldb_flags_roexists
, { "Read-Only Exists", "afs.vldb.flags.roexists",
3432 FT_BOOLEAN
, 32, 0, 0x00002000, NULL
, HFILL
}},
3433 { &hf_afs_vldb_flags_bkexists
, { "Backup Exists", "afs.vldb.flags.bkexists",
3434 FT_BOOLEAN
, 32, 0, 0x00004000, NULL
, HFILL
}},
3435 { &hf_afs_vldb_flags_dfsfileset
, { "DFS Fileset", "afs.vldb.flags.dfsfileset",
3436 FT_BOOLEAN
, 32, 0, 0x00008000, NULL
, HFILL
}},
3438 { &hf_afs_vldb_spare1
, { "Spare 1", "afs.vldb.spare1",
3439 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3440 { &hf_afs_vldb_spare2
, { "Spare 2", "afs.vldb.spare2",
3441 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3442 { &hf_afs_vldb_spare3
, { "Spare 3", "afs.vldb.spare3",
3443 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3444 { &hf_afs_vldb_spare4
, { "Spare 4", "afs.vldb.spare4",
3445 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3446 { &hf_afs_vldb_spare5
, { "Spare 5", "afs.vldb.spare5",
3447 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3448 { &hf_afs_vldb_spare6
, { "Spare 6", "afs.vldb.spare6",
3449 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3450 { &hf_afs_vldb_spare7
, { "Spare 7", "afs.vldb.spare7",
3451 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3452 { &hf_afs_vldb_spare8
, { "Spare 8", "afs.vldb.spare8",
3453 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3454 { &hf_afs_vldb_spare9
, { "Spare 9", "afs.vldb.spare9",
3455 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3457 /* BACKUP Server Fields */
3458 { &hf_afs_backup_errcode
, { "Error Code", "afs.backup.errcode",
3459 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3460 { &hf_afs_butc_errcode
, { "Error Code", "afs.butc.errcode",
3461 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3463 /* CB Server Fields */
3464 { &hf_afs_cb_errcode
, { "Error Code", "afs.cb.errcode",
3465 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3466 { &hf_afs_cb_callback_version
, { "Version", "afs.cb.callback.version",
3467 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3468 { &hf_afs_cb_callback_expires
, { "Expires", "afs.cb.callback.expires",
3469 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3470 { &hf_afs_cb_callback_type
, { "Type", "afs.cb.callback.type",
3471 FT_UINT32
, BASE_DEC
, VALS(cb_types
), 0, NULL
, HFILL
}},
3472 { &hf_afs_cb_fid_volume
, { "FileID (Volume)", "afs.cb.fid.volume",
3473 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Volume)", HFILL
}},
3474 { &hf_afs_cb_fid_vnode
, { "FileID (VNode)", "afs.cb.fid.vnode",
3475 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (VNode)", HFILL
}},
3476 { &hf_afs_cb_fid_uniqifier
, { "FileID (Uniqifier)", "afs.cb.fid.uniq",
3477 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Uniqifier)", HFILL
}},
3480 { &hf_afs_cm_uuid
, { "UUID", "afs.cm.uuid",
3481 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3482 { &hf_afs_cm_numint
, { "Number of Interfaces", "afs.cm.numint",
3483 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3484 { &hf_afs_cm_ipaddr
, { "IP Address", "afs.cm.ipaddr",
3485 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3486 { &hf_afs_cm_netmask
, { "Netmask", "afs.cm.netmask",
3487 FT_IPv4
, BASE_NETMASK
, 0, 0, NULL
, HFILL
}},
3488 { &hf_afs_cm_mtu
, { "MTU", "afs.cm.mtu",
3489 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3491 { &hf_afs_cm_numcap
, { "Number of Capability Words", "afs.cm.numcap",
3492 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3493 { &hf_afs_cm_capabilities
, { "Capabilities", "afs.cm.capabilities",
3494 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3495 { &hf_afs_cm_cap_errortrans
, { "ERRORTRANS", "afs.cm.capabilities.errortrans",
3496 FT_BOOLEAN
, 32, 0, 0x00000001, NULL
, HFILL
}},
3498 /* PROT Server Fields */
3499 { &hf_afs_prot_errcode
, { "Error Code", "afs.prot.errcode",
3500 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3501 { &hf_afs_prot_name
, { "Name", "afs.prot.name",
3502 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3503 { &hf_afs_prot_name_uint_string
, { "Name", "afs.prot.name",
3504 FT_UINT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3505 { &hf_afs_prot_id
, { "ID", "afs.prot.id",
3506 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3507 { &hf_afs_prot_oldid
, { "Old ID", "afs.prot.oldid",
3508 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3509 { &hf_afs_prot_newid
, { "New ID", "afs.prot.newid",
3510 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3511 { &hf_afs_prot_gid
, { "Group ID", "afs.prot.gid",
3512 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3513 { &hf_afs_prot_uid
, { "User ID", "afs.prot.uid",
3514 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3515 { &hf_afs_prot_count
, { "Count", "afs.prot.count",
3516 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3517 { &hf_afs_prot_maxgid
, { "Maximum Group ID", "afs.prot.maxgid",
3518 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3519 { &hf_afs_prot_maxuid
, { "Maximum User ID", "afs.prot.maxuid",
3520 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3521 { &hf_afs_prot_pos
, { "Position", "afs.prot.pos",
3522 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3523 { &hf_afs_prot_flag
, { "Flag", "afs.prot.flag",
3524 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3528 { &hf_afs_ubik_errcode
, { "Error Code", "afs.ubik.errcode",
3529 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3531 { &hf_afs_ubik_state
, { "State", "afs.ubik.state",
3532 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3533 { &hf_afs_ubik_version_epoch
, { "Epoch", "afs.ubik.version.epoch",
3534 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3535 { &hf_afs_ubik_version_counter
, { "Counter", "afs.ubik.version.counter",
3536 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3537 { &hf_afs_ubik_votestart
, { "Vote Started", "afs.ubik.votestart",
3538 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3540 { &hf_afs_ubik_voteend
, { "Vote Ends", "afs.ubik.voteend",
3541 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3543 { &hf_afs_ubik_file
, { "File", "afs.ubik.file",
3544 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3545 { &hf_afs_ubik_pos
, { "Position", "afs.ubik.position",
3546 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3547 { &hf_afs_ubik_length
, { "Length", "afs.ubik.length",
3548 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3549 { &hf_afs_ubik_locktype
, { "Lock Type", "afs.ubik.locktype",
3550 FT_UINT32
, BASE_DEC
, VALS(ubik_lock_types
), 0, NULL
, HFILL
}},
3552 { &hf_afs_ubik_votetype
, { "Vote Type", "afs.ubik.votetype",
3553 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3555 { &hf_afs_ubik_site
, { "Site", "afs.ubik.site",
3556 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3557 { &hf_afs_ubik_interface
, { "Interface Address", "afs.ubik.interface",
3558 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3559 { &hf_afs_ubik_null_addresses
, { "Null Interface Addresses", "afs.ubik.null_addresses",
3560 FT_NONE
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3562 { &hf_afs_ubik_now
, { "Now", "afs.ubik.now",
3563 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3564 { &hf_afs_ubik_lastyestime
, { "Last Yes Time", "afs.ubik.lastyesttime",
3565 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3566 { &hf_afs_ubik_lastyeshost
, { "Last Yes Host", "afs.ubik.lastyeshost",
3567 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3568 { &hf_afs_ubik_lastyesstate
, { "Last Yes State", "afs.ubik.lastyesstate",
3569 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3570 { &hf_afs_ubik_lastyesclaim
, { "Last Yes Claim", "afs.ubik.lastyesclaim",
3571 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3572 { &hf_afs_ubik_lowesthost
, { "Lowest Host", "afs.ubik.lowesthost",
3573 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3574 { &hf_afs_ubik_lowesttime
, { "Lowest Time", "afs.ubik.lowesttime",
3575 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3576 { &hf_afs_ubik_synchost
, { "Sync Host", "afs.ubik.synchost",
3577 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3578 { &hf_afs_ubik_addr
, { "Address", "afs.ubik.addr",
3579 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3580 { &hf_afs_ubik_synctime
, { "Sync Time", "afs.ubik.synctime",
3581 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3582 { &hf_afs_ubik_lastvotetime
, { "Last Vote Time", "afs.ubik.lastvotetime",
3583 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3584 { &hf_afs_ubik_lastbeaconsent
, { "Last Beacon Sent", "afs.ubik.lastbeaconsent",
3585 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3586 { &hf_afs_ubik_lastvote
, { "Last Vote", "afs.ubik.lastvote",
3587 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3588 { &hf_afs_ubik_currentdb
, { "Current DB", "afs.ubik.currentdb",
3589 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3590 { &hf_afs_ubik_up
, { "Up", "afs.ubik.up",
3591 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3592 { &hf_afs_ubik_beaconsincedown
, { "Beacon Since Down", "afs.ubik.beaconsincedown",
3593 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3594 { &hf_afs_ubik_amsyncsite
, { "Am Sync Site", "afs.ubik.amsyncsite",
3595 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3596 { &hf_afs_ubik_syncsiteuntil
, { "Sync Site Until", "afs.ubik.syncsiteuntil",
3597 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3598 { &hf_afs_ubik_nservers
, { "Number of Servers", "afs.ubik.nservers",
3599 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3600 { &hf_afs_ubik_lockedpages
, { "Locked Pages", "afs.ubik.lockedpages",
3601 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3602 { &hf_afs_ubik_writelockedpages
, { "Write Locked Pages", "afs.ubik.writelockedpages",
3603 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3604 { &hf_afs_ubik_activewrite
, { "Active Write", "afs.ubik.activewrite",
3605 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3606 { &hf_afs_ubik_tidcounter
, { "TID Counter", "afs.ubik.tidcounter",
3607 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3608 { &hf_afs_ubik_anyreadlocks
, { "Any Read Locks", "afs.ubik.anyreadlocks",
3609 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3610 { &hf_afs_ubik_anywritelocks
, { "Any Write Locks", "afs.ubik.anywritelocks",
3611 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3612 { &hf_afs_ubik_recoverystate
, { "Recovery State", "afs.ubik.recoverystate",
3613 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3614 { &hf_afs_ubik_currenttrans
, { "Current Transaction", "afs.ubik.currenttran",
3615 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3616 { &hf_afs_ubik_writetrans
, { "Write Transaction", "afs.ubik.writetran",
3617 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3618 { &hf_afs_ubik_epochtime
, { "Epoch Time", "afs.ubik.epochtime",
3619 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3620 { &hf_afs_ubik_isclone
, { "Is Clone", "afs.ubik.isclone",
3621 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3622 { &hf_afs_reqframe
, { "Request Frame", "afs.reqframe",
3623 FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST
), 0, NULL
, HFILL
}},
3624 { &hf_afs_repframe
, { "Reply Frame", "afs.repframe",
3625 FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE
), 0, NULL
, HFILL
}},
3626 { &hf_afs_time
, { "Time from request", "afs.time",
3627 FT_RELATIVE_TIME
, BASE_NONE
, NULL
, 0, "Time between Request and Reply for AFS calls", HFILL
}},
3629 {&hf_afs_fragments
, {"Message fragments", "afs.fragments",
3630 FT_NONE
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3631 {&hf_afs_fragment
, {"Message fragment", "afs.fragment",
3632 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3633 {&hf_afs_fragment_overlap
, {"Message fragment overlap", "afs.fragment.overlap",
3634 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3635 {&hf_afs_fragment_overlap_conflicts
, {"Message fragment overlapping with conflicting data", "afs.fragment.overlap.conflicts",
3636 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3637 {&hf_afs_fragment_multiple_tails
, {"Message has multiple tail fragments", "afs.fragment.multiple_tails",
3638 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3639 {&hf_afs_fragment_too_long_fragment
, {"Message fragment too long", "afs.fragment.too_long_fragment",
3640 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3641 {&hf_afs_fragment_error
, {"Message defragmentation error", "afs.fragment.error",
3642 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3643 {&hf_afs_fragment_count
, {"Message fragment count", "afs.fragment.count",
3644 FT_UINT32
, BASE_DEC
, NULL
, 0x00, NULL
, HFILL
} },
3645 {&hf_afs_reassembled_in
, {"Reassembled in", "afs.reassembled.in",
3646 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3647 {&hf_afs_reassembled_length
, {"Reassembled length", "afs.reassembled.length",
3648 FT_UINT32
, BASE_DEC
, NULL
, 0x00, NULL
, HFILL
} },
3651 static int *ett
[] = {
3659 &ett_afs_status_mask
,
3661 &ett_afs_volumeinfo
,
3663 &ett_afs_vldb_flags
,
3666 &ett_afs_cm_interfaces
,
3667 &ett_afs_cm_capabilities
,
3670 module_t
*afs_module
;
3672 proto_afs
= proto_register_protocol("Andrew File System (AFS)",
3674 proto_register_field_array(proto_afs
, hf
, array_length(hf
));
3675 proto_register_subtree_array(ett
, array_length(ett
));
3677 reassembly_table_register(&afs_reassembly_table
,
3678 &addresses_reassembly_table_functions
);
3680 afs_request_hash
= wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), afs_hash
, afs_equal
);
3682 afs_module
= prefs_register_protocol(proto_afs
, NULL
);
3683 prefs_register_bool_preference(afs_module
, "defragment",
3684 "Reassemble fragmented AFS PDUs",
3685 "Whether fragmented AFS PDUs should be reassembled", &afs_defragment
);
3687 register_dissector("afs", dissect_afs
, proto_afs
);
3692 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3697 * indent-tabs-mode: t
3700 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
3701 * :indentSize=8:tabSize=8:noTabs=false: