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.
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * Copied from packet-tftp.c
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
41 #include <epan/packet.h>
42 #include <epan/conversation.h>
43 #include <epan/addr_resolv.h>
44 #include <epan/wmem/wmem.h>
45 #include <epan/strutil.h>
46 #include <epan/reassemble.h>
48 #include "packet-rx.h"
50 /* Forward declarations */
51 void proto_register_afs(void);
53 #define AFS_PORT_FS 7000
54 #define AFS_PORT_CB 7001
55 #define AFS_PORT_PROT 7002
56 #define AFS_PORT_VLDB 7003
57 #define AFS_PORT_KAUTH 7004
58 #define AFS_PORT_VOL 7005
59 #define AFS_PORT_ERROR 7006 /* Doesn't seem to be used */
60 #define AFS_PORT_BOS 7007
61 #define AFS_PORT_UPDATE 7008
62 #define AFS_PORT_RMTSYS 7009
63 #define AFS_PORT_BACKUP 7021
66 #define AFSNAMEMAX 256
70 #define AFSOPAQUEMAX 1024
76 #define BOSNAMEMAX 256
78 #define PRSFS_READ 1 /* Read files */
79 #define PRSFS_WRITE 2 /* Write files */
80 #define PRSFS_INSERT 4 /* Insert files into a directory */
81 #define PRSFS_LOOKUP 8 /* Lookup files into a directory */
82 #define PRSFS_DELETE 16 /* Delete files */
83 #define PRSFS_LOCK 32 /* Lock files */
84 #define PRSFS_ADMINISTER 64 /* Change ACL's */
86 #define CB_TYPE_EXCLUSIVE 1
87 #define CB_TYPE_SHARED 2
88 #define CB_TYPE_DROPPED 3
91 #define OPCODE_HIGH 66000 /* arbitrary, is just a fuzzy check for encrypted traffic */
92 #define VOTE_LOW 10000
93 #define VOTE_HIGH 10007
94 #define DISK_LOW 20000
95 #define DISK_HIGH 20013
97 #define FILE_TYPE_FILE 1
98 #define FILE_TYPE_DIR 2
99 #define FILE_TYPE_LINK 3
115 guint32 InterfaceVersion
;
122 guint32 CallerAccess
;
123 guint32 AnonymousAccess
;
124 guint32 UnixModeBits
;
126 guint32 ParentUnique
;
128 guint32 ClientModTime
;
129 guint32 ServerModTime
;
138 struct afs_volumeinfo
{
165 static int proto_afs
= -1;
166 static int hf_afs_fs
= -1;
167 static int hf_afs_cb
= -1;
168 static int hf_afs_prot
= -1;
169 static int hf_afs_vldb
= -1;
170 static int hf_afs_kauth
= -1;
171 static int hf_afs_vol
= -1;
172 static int hf_afs_error
= -1;
173 static int hf_afs_bos
= -1;
174 static int hf_afs_update
= -1;
175 static int hf_afs_rmtsys
= -1;
176 static int hf_afs_ubik
= -1;
177 static int hf_afs_backup
= -1;
179 static int hf_afs_fs_opcode
= -1;
180 static int hf_afs_cb_opcode
= -1;
181 static int hf_afs_prot_opcode
= -1;
182 static int hf_afs_vldb_opcode
= -1;
183 static int hf_afs_kauth_opcode
= -1;
184 static int hf_afs_vol_opcode
= -1;
185 static int hf_afs_error_opcode
= -1;
186 static int hf_afs_bos_opcode
= -1;
187 static int hf_afs_update_opcode
= -1;
188 static int hf_afs_rmtsys_opcode
= -1;
189 static int hf_afs_ubik_opcode
= -1;
190 static int hf_afs_backup_opcode
= -1;
192 static int hf_afs_fs_fid_volume
= -1;
193 static int hf_afs_fs_fid_vnode
= -1;
194 static int hf_afs_fs_fid_uniqifier
= -1;
195 static int hf_afs_fs_offset
= -1;
196 static int hf_afs_fs_length
= -1;
197 static int hf_afs_fs_flength
= -1;
198 static int hf_afs_fs_offset64
= -1;
199 static int hf_afs_fs_length64
= -1;
200 static int hf_afs_fs_flength64
= -1;
201 static int hf_afs_fs_errcode
= -1;
202 static int hf_afs_fs_data
= -1;
203 static int hf_afs_fs_name
= -1;
204 static int hf_afs_fs_oldname
= -1;
205 static int hf_afs_fs_newname
= -1;
206 static int hf_afs_fs_symlink_name
= -1;
207 static int hf_afs_fs_symlink_content
= -1;
208 static int hf_afs_fs_volid
= -1;
209 static int hf_afs_fs_volname
= -1;
210 static int hf_afs_fs_timestamp
= -1;
211 static int hf_afs_fs_offlinemsg
= -1;
212 static int hf_afs_fs_motd
= -1;
213 static int hf_afs_fs_xstats_version
= -1;
214 static int hf_afs_fs_xstats_timestamp
= -1;
215 static int hf_afs_fs_xstats_clientversion
= -1;
216 static int hf_afs_fs_xstats_collnumber
= -1;
217 static int hf_afs_fs_cps_spare1
= -1;
218 static int hf_afs_fs_cps_spare2
= -1;
219 static int hf_afs_fs_cps_spare3
= -1;
220 static int hf_afs_fs_vicelocktype
= -1;
221 static int hf_afs_fs_viceid
= -1;
222 static int hf_afs_fs_ipaddr
= -1;
223 static int hf_afs_fs_token
= -1;
225 static int hf_afs_fs_status_anonymousaccess
= -1;
226 static int hf_afs_fs_status_author
= -1;
227 static int hf_afs_fs_status_calleraccess
= -1;
228 static int hf_afs_fs_status_clientmodtime
= -1;
229 static int hf_afs_fs_status_dataversion
= -1;
230 static int hf_afs_fs_status_dataversionhigh
= -1;
231 static int hf_afs_fs_status_filetype
= -1;
232 static int hf_afs_fs_status_group
= -1;
233 static int hf_afs_fs_status_interfaceversion
= -1;
234 static int hf_afs_fs_status_length
= -1;
235 static int hf_afs_fs_status_linkcount
= -1;
236 static int hf_afs_fs_status_mask
= -1;
237 static int hf_afs_fs_status_mask_fsync
= -1;
238 static int hf_afs_fs_status_mask_setgroup
= -1;
239 static int hf_afs_fs_status_mask_setmode
= -1;
240 static int hf_afs_fs_status_mask_setmodtime
= -1;
241 static int hf_afs_fs_status_mask_setowner
= -1;
242 static int hf_afs_fs_status_mask_setsegsize
= -1;
243 static int hf_afs_fs_status_mode
= -1;
244 static int hf_afs_fs_status_owner
= -1;
245 static int hf_afs_fs_status_parentunique
= -1;
246 static int hf_afs_fs_status_parentvnode
= -1;
247 static int hf_afs_fs_status_segsize
= -1;
248 static int hf_afs_fs_status_servermodtime
= -1;
249 static int hf_afs_fs_status_spare2
= -1;
250 static int hf_afs_fs_status_spare3
= -1;
251 static int hf_afs_fs_status_spare4
= -1;
252 static int hf_afs_fs_status_synccounter
= -1;
254 static int hf_afs_fs_volsync_spare1
= -1;
255 static int hf_afs_fs_volsync_spare2
= -1;
256 static int hf_afs_fs_volsync_spare3
= -1;
257 static int hf_afs_fs_volsync_spare4
= -1;
258 static int hf_afs_fs_volsync_spare5
= -1;
259 static int hf_afs_fs_volsync_spare6
= -1;
261 static int hf_afs_fs_acl_datasize
= -1;
262 static int hf_afs_fs_acl_count_negative
= -1;
263 static int hf_afs_fs_acl_count_positive
= -1;
264 static int hf_afs_fs_acl_entity
= -1;
265 static int hf_afs_fs_acl_r
= -1;
266 static int hf_afs_fs_acl_l
= -1;
267 static int hf_afs_fs_acl_i
= -1;
268 static int hf_afs_fs_acl_d
= -1;
269 static int hf_afs_fs_acl_w
= -1;
270 static int hf_afs_fs_acl_k
= -1;
271 static int hf_afs_fs_acl_a
= -1;
273 static int hf_afs_fs_callback_version
= -1;
274 static int hf_afs_fs_callback_expires
= -1;
275 static int hf_afs_fs_callback_type
= -1;
277 static int hf_afs_bos_errcode
= -1;
278 static int hf_afs_bos_type
= -1;
279 static int hf_afs_bos_instance
= -1;
280 static int hf_afs_bos_status
= -1;
281 static int hf_afs_bos_statusdesc
= -1;
282 static int hf_afs_bos_num
= -1;
283 static int hf_afs_bos_size
= -1;
284 static int hf_afs_bos_flags
= -1;
285 static int hf_afs_bos_date
= -1;
286 static int hf_afs_bos_content
= -1;
287 static int hf_afs_bos_user
= -1;
288 static int hf_afs_bos_key
= -1;
289 static int hf_afs_bos_path
= -1;
290 static int hf_afs_bos_file
= -1;
291 static int hf_afs_bos_cmd
= -1;
292 static int hf_afs_bos_error
= -1;
293 static int hf_afs_bos_spare1
= -1;
294 static int hf_afs_bos_spare2
= -1;
295 static int hf_afs_bos_spare3
= -1;
296 static int hf_afs_bos_parm
= -1;
297 static int hf_afs_bos_kvno
= -1;
298 static int hf_afs_bos_cell
= -1;
299 static int hf_afs_bos_host
= -1;
300 static int hf_afs_bos_newtime
= -1;
301 static int hf_afs_bos_baktime
= -1;
302 static int hf_afs_bos_oldtime
= -1;
303 static int hf_afs_bos_data
= -1;
304 static int hf_afs_bos_keymodtime
= -1;
305 static int hf_afs_bos_keychecksum
= -1;
306 static int hf_afs_bos_keyspare2
= -1;
308 static int hf_afs_vldb_errcode
= -1;
309 static int hf_afs_vldb_name
= -1;
310 static int hf_afs_vldb_id
= -1;
311 static int hf_afs_vldb_type
= -1;
312 static int hf_afs_vldb_bump
= -1;
313 static int hf_afs_vldb_index
= -1;
314 static int hf_afs_vldb_nextindex
= -1;
315 static int hf_afs_vldb_count
= -1;
316 static int hf_afs_vldb_numservers
= -1;
317 static int hf_afs_vldb_server
= -1;
318 static int hf_afs_vldb_serveruuid
= -1;
319 static int hf_afs_vldb_serveruniq
= -1;
320 static int hf_afs_vldb_serverflags
= -1;
321 static int hf_afs_vldb_serverip
= -1;
322 static int hf_afs_vldb_partition
= -1;
323 static int hf_afs_vldb_rovol
= -1;
324 static int hf_afs_vldb_rwvol
= -1;
325 static int hf_afs_vldb_bkvol
= -1;
326 static int hf_afs_vldb_clonevol
= -1;
327 static int hf_afs_vldb_flags
= -1;
328 static int hf_afs_vldb_flags_rwexists
= -1;
329 static int hf_afs_vldb_flags_roexists
= -1;
330 static int hf_afs_vldb_flags_bkexists
= -1;
331 static int hf_afs_vldb_flags_dfsfileset
= -1;
333 static int hf_afs_vldb_spare1
= -1;
334 static int hf_afs_vldb_spare2
= -1;
335 static int hf_afs_vldb_spare3
= -1;
336 static int hf_afs_vldb_spare4
= -1;
337 static int hf_afs_vldb_spare5
= -1;
338 static int hf_afs_vldb_spare6
= -1;
339 static int hf_afs_vldb_spare7
= -1;
340 static int hf_afs_vldb_spare8
= -1;
341 static int hf_afs_vldb_spare9
= -1;
343 static int hf_afs_kauth_errcode
= -1;
344 static int hf_afs_kauth_princ
= -1;
345 static int hf_afs_kauth_realm
= -1;
346 static int hf_afs_kauth_domain
= -1;
347 static int hf_afs_kauth_kvno
= -1;
348 static int hf_afs_kauth_name
= -1;
349 static int hf_afs_kauth_data
= -1;
351 static int hf_afs_vol_errcode
= -1;
352 static int hf_afs_vol_count
= -1;
353 static int hf_afs_vol_id
= -1;
354 static int hf_afs_vol_name
= -1;
356 static int hf_afs_cb_errcode
= -1;
357 static int hf_afs_cb_callback_version
= -1;
358 static int hf_afs_cb_callback_type
= -1;
359 static int hf_afs_cb_callback_expires
= -1;
360 static int hf_afs_cb_fid_volume
= -1;
361 static int hf_afs_cb_fid_vnode
= -1;
362 static int hf_afs_cb_fid_uniqifier
= -1;
364 static int hf_afs_cm_uuid
= -1;
365 static int hf_afs_cm_numint
= -1;
366 static int hf_afs_cm_ipaddr
= -1;
367 static int hf_afs_cm_netmask
= -1;
368 static int hf_afs_cm_mtu
= -1;
369 static int hf_afs_cm_numcap
= -1;
370 static int hf_afs_cm_capabilities
= -1;
371 static int hf_afs_cm_cap_errortrans
= -1;
373 static int hf_afs_prot_errcode
= -1;
374 static int hf_afs_prot_name
= -1;
375 static int hf_afs_prot_id
= -1;
376 static int hf_afs_prot_count
= -1;
377 static int hf_afs_prot_oldid
= -1;
378 static int hf_afs_prot_newid
= -1;
379 static int hf_afs_prot_pos
= -1;
380 static int hf_afs_prot_flag
= -1;
381 static int hf_afs_prot_uid
= -1;
382 static int hf_afs_prot_gid
= -1;
383 static int hf_afs_prot_maxuid
= -1;
384 static int hf_afs_prot_maxgid
= -1;
386 static int hf_afs_backup_errcode
= -1;
388 /* static int hf_afs_ubik_errcode = -1; */
389 static int hf_afs_ubik_version_epoch
= -1;
390 static int hf_afs_ubik_version_counter
= -1;
391 static int hf_afs_ubik_votestart
= -1;
392 static int hf_afs_ubik_state
= -1;
393 static int hf_afs_ubik_site
= -1;
394 static int hf_afs_ubik_interface
= -1;
395 static int hf_afs_ubik_file
= -1;
396 static int hf_afs_ubik_pos
= -1;
397 static int hf_afs_ubik_length
= -1;
398 static int hf_afs_ubik_locktype
= -1;
399 /* static int hf_afs_ubik_voteend = -1; */
400 /* static int hf_afs_ubik_votetype = -1; */
402 static int hf_afs_ubik_now
= -1;
403 static int hf_afs_ubik_lastyestime
= -1;
404 static int hf_afs_ubik_lastyeshost
= -1;
405 static int hf_afs_ubik_lastyesstate
= -1;
406 static int hf_afs_ubik_lastyesclaim
= -1;
407 static int hf_afs_ubik_lowesthost
= -1;
408 static int hf_afs_ubik_lowesttime
= -1;
409 static int hf_afs_ubik_synchost
= -1;
410 static int hf_afs_ubik_synctime
= -1;
411 static int hf_afs_ubik_amsyncsite
= -1;
412 static int hf_afs_ubik_syncsiteuntil
= -1;
413 static int hf_afs_ubik_nservers
= -1;
414 static int hf_afs_ubik_lockedpages
= -1;
415 static int hf_afs_ubik_writelockedpages
= -1;
416 static int hf_afs_ubik_activewrite
= -1;
417 static int hf_afs_ubik_tidcounter
= -1;
418 static int hf_afs_ubik_anyreadlocks
= -1;
419 static int hf_afs_ubik_anywritelocks
= -1;
420 static int hf_afs_ubik_recoverystate
= -1;
421 static int hf_afs_ubik_currenttrans
= -1;
422 static int hf_afs_ubik_writetrans
= -1;
423 static int hf_afs_ubik_epochtime
= -1;
424 static int hf_afs_ubik_isclone
= -1;
425 static int hf_afs_ubik_addr
= -1;
426 static int hf_afs_ubik_lastvotetime
= -1;
427 static int hf_afs_ubik_lastbeaconsent
= -1;
428 static int hf_afs_ubik_lastvote
= -1;
429 static int hf_afs_ubik_currentdb
= -1;
430 static int hf_afs_ubik_beaconsincedown
= -1;
431 static int hf_afs_ubik_up
= -1;
432 static int hf_afs_repframe
= -1;
433 static int hf_afs_reqframe
= -1;
434 static int hf_afs_time
= -1;
436 static int hf_afs_fragments
= -1;
437 static int hf_afs_fragment
= -1;
438 static int hf_afs_fragment_overlap
= -1;
439 static int hf_afs_fragment_overlap_conflicts
= -1;
440 static int hf_afs_fragment_multiple_tails
= -1;
441 static int hf_afs_fragment_too_long_fragment
= -1;
442 static int hf_afs_fragment_error
= -1;
443 static int hf_afs_fragment_count
= -1;
444 static int hf_afs_reassembled_in
= -1;
445 static int hf_afs_reassembled_length
= -1;
447 static gint ett_afs
= -1;
448 static gint ett_afs_op
= -1;
449 static gint ett_afs_acl
= -1;
450 static gint ett_afs_fid
= -1;
451 static gint ett_afs_callback
= -1;
452 static gint ett_afs_ubikver
= -1;
453 static gint ett_afs_status
= -1;
454 static gint ett_afs_status_mask
= -1;
455 static gint ett_afs_volsync
= -1;
456 static gint ett_afs_volumeinfo
= -1;
457 static gint ett_afs_vicestat
= -1;
458 static gint ett_afs_vldb_flags
= -1;
460 static gint ett_afs_fragment
= -1;
461 static gint ett_afs_fragments
= -1;
462 static gint ett_afs_cm_interfaces
= -1;
463 static gint ett_afs_cm_capabilities
= -1;
465 static const fragment_items afs_frag_items
= {
466 /* Fragment subtrees */
469 /* Fragment fields */
472 &hf_afs_fragment_overlap
,
473 &hf_afs_fragment_overlap_conflicts
,
474 &hf_afs_fragment_multiple_tails
,
475 &hf_afs_fragment_too_long_fragment
,
476 &hf_afs_fragment_error
,
477 &hf_afs_fragment_count
,
478 /* Reassembled in field */
479 &hf_afs_reassembled_in
,
480 /* Reassembled length field */
481 &hf_afs_reassembled_length
,
482 /* Reassembled data field */
490 * Macros for helper dissection routines
492 * The macros are here to save on coding. They assume that
493 * the current offset is in 'offset', and that the offset
494 * should be incremented after performing the macro's operation.
498 /* Output a unsigned integer, stored into field 'field'
499 Assumes it is in network byte order, converts to host before using */
500 #define OUT_UINT(field) \
501 proto_tree_add_uint(tree, field, tvb, offset, 4, tvb_get_ntohl(tvb, offset)); \
504 /* Output a unsigned integer, stored into field 'field'
505 Assumes it is in network byte order, converts to host before using */
506 #define OUT_INT(field) \
507 proto_tree_add_int(tree, field, tvb, offset, 4, tvb_get_ntohl(tvb, offset)); \
510 /* Output a unsigned integer, stored into field 'field'
511 Assumes it is in network byte order, converts to host before using */
512 #define OUT_UINT64(field) \
513 proto_tree_add_item(tree, field, tvb, offset, 8, ENC_BIG_ENDIAN); \
516 /* Output a unsigned integer, stored into field 'field'
517 Assumes it is in network byte order, converts to host before using */
518 #define OUT_INT64(field) \
519 proto_tree_add_item(tree, field, tvb, offset, 8, ENC_BIG_ENDIAN); \
522 /* Output a unsigned integer, stored into field 'field'
523 Assumes it is in network byte order, converts to host before using,
524 Note - does not increment offset, so can be used repeatedly for bitfields */
525 #define DISP_UINT(field) \
526 proto_tree_add_uint(tree,field,tvb,offset,4,tvb_get_ntohl(tvb, offset));
528 /* Output an IPv4 address, stored into field 'field' */
529 #define OUT_IP(field) \
530 proto_tree_add_ipv4(tree,field,tvb,offset,4,\
531 tvb_get_letohl(tvb, offset));\
534 /* Output a simple rx array */
535 #define OUT_RXArray8(func) \
538 j = tvb_get_guint8(tvb, offset); \
540 for (i=0; i<j; i++) { \
545 /* Output a simple rx array */
546 #define OUT_RXArray32(func) \
549 j = tvb_get_ntohl(tvb, offset); \
551 for (i=0; i<j; i++) { \
556 /* Output a UNIX seconds/microseconds timestamp, after converting to an
558 #define OUT_TIMESTAMP(field) \
560 ts.secs = tvb_get_ntohl(tvb, offset); \
561 ts.nsecs = tvb_get_ntohl(tvb, offset+4)*1000; \
562 proto_tree_add_time(tree,field, tvb,offset,2*4,&ts); \
566 /* Output a seconds-only time value, after converting to an nstime_t;
567 this can be an absolute time as a UNIX time-since-epoch, or a
568 relative time in seconds */
569 #define OUT_TIMESECS(field) \
571 ts.secs = tvb_get_ntohl(tvb, offset); \
573 proto_tree_add_time(tree,field, tvb,offset,4,&ts); \
577 /* Output a rx style string, up to a maximum length first
578 4 bytes - length, then char data */
579 #define OUT_RXString(field) \
580 { guint32 i_orxs,len_orxs; \
581 i_orxs = tvb_get_ntohl(tvb, offset); \
582 len_orxs = ((i_orxs+4-1)/4)*4 + 4; \
583 proto_tree_add_item(tree, field, tvb, offset+4, i_orxs, \
585 offset += len_orxs; \
588 /* Output a fixed length vectorized string (each char is a 32 bit int) */
589 #define OUT_RXStringV(field, length) \
590 { char tmp_orxsv[length+1]; \
591 int i_orxsv,soff_orxsv; \
592 soff_orxsv = offset;\
593 for (i_orxsv=0; i_orxsv<length; i_orxsv++)\
595 tmp_orxsv[i_orxsv] = (char) tvb_get_ntohl(tvb, offset);\
598 tmp_orxsv[length] = '\0';\
599 proto_tree_add_string(tree, field, tvb, soff_orxsv, length*4, tmp_orxsv);\
603 /* Output a callback */
604 #define OUT_FS_AFSCallBack() \
605 { proto_tree *save, *ti; \
606 ti = proto_tree_add_text(tree, tvb, offset, 3*4, "Callback"); \
608 tree = proto_item_add_subtree(ti, ett_afs_callback); \
609 OUT_UINT(hf_afs_fs_callback_version); \
610 OUT_TIMESECS(hf_afs_fs_callback_expires); \
611 OUT_UINT(hf_afs_fs_callback_type); \
615 /* Output cache manager interfaces */
616 #define OUT_CM_INTERFACES() \
617 { proto_tree *save, *ti; \
619 unsigned int maxint, numint; \
621 numint = tvb_get_ntohl(tvb, offset); \
622 ti = proto_tree_add_text(tree, tvb, offset, 4+11*4+3*32*4, "Interfaces"); \
624 tree = proto_item_add_subtree(ti, ett_afs_cm_interfaces); \
625 OUT_UINT(hf_afs_cm_numint); \
626 OUT_UUID(hf_afs_cm_uuid); \
627 for ( i=0; i<numint; i++ ) { \
628 OUT_IP(hf_afs_cm_ipaddr); \
630 offset += 4*(maxint-numint); \
631 for ( i=0; i<numint; i++ ) { \
632 OUT_IP(hf_afs_cm_netmask); \
634 offset += 4*(maxint-numint); \
635 for ( i=0; i<numint; i++ ) { \
636 OUT_UINT(hf_afs_cm_mtu); \
638 offset += 4*(maxint-numint); \
642 /* Output CM capabilities */
643 #define OUT_CM_CAPABILITIES() \
644 { proto_tree *save, *ti; \
645 unsigned int numcap; \
646 guint32 capabilities; \
647 numcap = tvb_get_ntohl(tvb, offset); \
648 ti = proto_tree_add_text(tree, tvb, offset, 4+numcap*4, "Capabilities"); \
650 tree = proto_item_add_subtree(ti, ett_afs_cm_capabilities); \
651 OUT_UINT(hf_afs_cm_numcap); \
652 capabilities = tvb_get_ntohl(tvb, offset); \
653 ti = proto_tree_add_uint(tree, hf_afs_cm_capabilities, tvb, offset, \
655 proto_tree_add_boolean(tree, hf_afs_cm_cap_errortrans, \
656 tvb,offset,4, capabilities); \
661 /* Output a callback */
662 #define OUT_CB_AFSCallBack() \
663 { proto_tree *save, *ti; \
664 ti = proto_tree_add_text(tree, tvb, offset, 3*4, "Callback"); \
666 tree = proto_item_add_subtree(ti, ett_afs_callback); \
667 OUT_UINT(hf_afs_cb_callback_version); \
668 OUT_TIMESECS(hf_afs_cb_callback_expires); \
669 OUT_UINT(hf_afs_cb_callback_type); \
673 /* Output a File ID */
674 #define OUT_FS_AFSFid(label) \
675 { proto_tree *save, *ti; \
676 ti = proto_tree_add_text(tree, tvb, offset, 3*4, \
677 "FileID (%s)", label); \
679 tree = proto_item_add_subtree(ti, ett_afs_fid); \
680 OUT_UINT(hf_afs_fs_fid_volume); \
681 OUT_UINT(hf_afs_fs_fid_vnode); \
682 OUT_UINT(hf_afs_fs_fid_uniqifier); \
686 /* Output a Status mask */
687 #define OUT_FS_STATUSMASK() \
688 { proto_tree *save_ofsm, *ti_ofsm; \
690 mask_ofsm = tvb_get_ntohl(tvb, offset); \
691 ti_ofsm = proto_tree_add_uint(tree, hf_afs_fs_status_mask, tvb, offset, \
694 tree = proto_item_add_subtree(ti_ofsm, ett_afs_status_mask); \
695 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_setmodtime, \
696 tvb,offset,4, mask_ofsm); \
697 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_setowner, \
698 tvb,offset,4, mask_ofsm); \
699 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_setgroup, \
700 tvb,offset,4, mask_ofsm); \
701 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_setmode, \
702 tvb,offset,4, mask_ofsm); \
703 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_setsegsize, \
704 tvb,offset,4, mask_ofsm); \
705 proto_tree_add_boolean(tree, hf_afs_fs_status_mask_fsync, \
706 tvb,offset,4, mask_ofsm); \
711 /* Output vldb flags */
712 #define OUT_VLDB_Flags() \
713 { proto_tree *save, *ti; \
715 flags = tvb_get_ntohl(tvb, offset); \
716 ti = proto_tree_add_uint(tree, hf_afs_vldb_flags, tvb, offset, \
719 tree = proto_item_add_subtree(ti, ett_afs_vldb_flags); \
720 proto_tree_add_boolean(tree, hf_afs_vldb_flags_rwexists, \
721 tvb,offset,4, flags); \
722 proto_tree_add_boolean(tree, hf_afs_vldb_flags_roexists, \
723 tvb,offset,4, flags); \
724 proto_tree_add_boolean(tree, hf_afs_vldb_flags_bkexists, \
725 tvb,offset,4, flags); \
726 proto_tree_add_boolean(tree, hf_afs_vldb_flags_dfsfileset, \
727 tvb,offset,4, flags); \
734 /* Output a File ID */
735 #define OUT_CB_AFSFid(label) \
736 { proto_tree *save, *ti; \
737 ti = proto_tree_add_text(tree, tvb, offset, 3*4, \
738 "FileID (%s)", label); \
740 tree = proto_item_add_subtree(ti, ett_afs_fid); \
741 OUT_UINT(hf_afs_cb_fid_volume); \
742 OUT_UINT(hf_afs_cb_fid_vnode); \
743 OUT_UINT(hf_afs_cb_fid_uniqifier); \
747 /* Output a StoreStatus */
748 #define OUT_FS_AFSStoreStatus(label) \
749 { proto_tree *save, *ti; \
750 ti = proto_tree_add_text(tree, tvb, offset, 6*4, \
753 tree = proto_item_add_subtree(ti, ett_afs_status); \
754 OUT_FS_STATUSMASK(); \
755 OUT_TIMESECS(hf_afs_fs_status_clientmodtime); \
756 OUT_UINT(hf_afs_fs_status_owner); \
757 OUT_UINT(hf_afs_fs_status_group); \
758 OUT_UINT(hf_afs_fs_status_mode); \
759 OUT_UINT(hf_afs_fs_status_segsize); \
763 /* Output a FetchStatus */
764 #define OUT_FS_AFSFetchStatus(label) \
765 { proto_tree *save, *ti; \
766 ti = proto_tree_add_text(tree, tvb, offset, 21*4, \
769 tree = proto_item_add_subtree(ti, ett_afs_status); \
770 OUT_UINT(hf_afs_fs_status_interfaceversion); \
771 OUT_UINT(hf_afs_fs_status_filetype); \
772 OUT_UINT(hf_afs_fs_status_linkcount); \
773 OUT_UINT(hf_afs_fs_status_length); \
774 OUT_UINT(hf_afs_fs_status_dataversion); \
775 OUT_UINT(hf_afs_fs_status_author); \
776 OUT_UINT(hf_afs_fs_status_owner); \
777 OUT_UINT(hf_afs_fs_status_calleraccess); \
778 OUT_UINT(hf_afs_fs_status_anonymousaccess); \
779 OUT_UINT(hf_afs_fs_status_mode); \
780 OUT_UINT(hf_afs_fs_status_parentvnode); \
781 OUT_UINT(hf_afs_fs_status_parentunique); \
782 OUT_UINT(hf_afs_fs_status_segsize); \
783 OUT_TIMESECS(hf_afs_fs_status_clientmodtime); \
784 OUT_TIMESECS(hf_afs_fs_status_servermodtime); \
785 OUT_UINT(hf_afs_fs_status_group); \
786 OUT_UINT(hf_afs_fs_status_synccounter); \
787 OUT_UINT(hf_afs_fs_status_dataversionhigh); \
788 OUT_UINT(hf_afs_fs_status_spare2); \
789 OUT_UINT(hf_afs_fs_status_spare3); \
790 OUT_UINT(hf_afs_fs_status_spare4); \
794 /* Output a VolSync */
795 #define OUT_FS_AFSVolSync() \
796 { proto_tree *save, *ti; \
797 ti = proto_tree_add_text(tree, tvb, offset, 6*4, \
800 tree = proto_item_add_subtree(ti, ett_afs_volsync); \
801 OUT_TIMESECS(hf_afs_fs_volsync_spare1); \
802 OUT_UINT(hf_afs_fs_volsync_spare2); \
803 OUT_UINT(hf_afs_fs_volsync_spare3); \
804 OUT_UINT(hf_afs_fs_volsync_spare4); \
805 OUT_UINT(hf_afs_fs_volsync_spare5); \
806 OUT_UINT(hf_afs_fs_volsync_spare6); \
810 /* Output a AFSCBFids */
811 #define OUT_FS_AFSCBFids() \
812 OUT_RXArray32(OUT_FS_AFSFid("Target"));
814 /* Output a ViceIds */
815 #define OUT_FS_ViceIds() \
816 OUT_RXArray8(OUT_UINT(hf_afs_fs_viceid));
818 /* Output a IPAddrs */
819 #define OUT_FS_IPAddrs() \
820 OUT_RXArray8(OUT_IP(hf_afs_fs_ipaddr));
822 /* Output a AFSCBs */
823 #define OUT_FS_AFSCBs() \
824 OUT_RXArray32(OUT_FS_AFSCallBack());
826 /* Output a AFSBulkStats */
827 #define OUT_FS_AFSBulkStats() \
828 OUT_RXArray32(OUT_FS_AFSFetchStatus("Status"));
830 /* Output a AFSFetchVolumeStatus */
831 #define OUT_FS_AFSFetchVolumeStatus()
833 /* Output a AFSStoreVolumeStatus */
834 #define OUT_FS_AFSStoreVolumeStatus()
836 /* Output a ViceStatistics structure */
837 #define OUT_FS_ViceStatistics()
839 /* Output a AFS_CollData structure */
840 #define OUT_FS_AFS_CollData()
842 /* Output a VolumeInfo structure */
843 #define OUT_FS_VolumeInfo()
845 /* Output an AFS Token - might just be bytes though */
846 #define OUT_FS_AFSTOKEN() OUT_RXStringV(hf_afs_fs_token, 1024)
848 /* Output a AFS acl */
849 #define ACLOUT(who, positive, acl, bytes) \
850 { proto_tree *save, *ti; \
855 if ( acl & PRSFS_READ ) g_strlcat(tmp, "r", 10); \
856 if ( acl & PRSFS_LOOKUP ) g_strlcat(tmp, "l", 10); \
857 if ( acl & PRSFS_INSERT ) g_strlcat(tmp, "i", 10); \
858 if ( acl & PRSFS_DELETE ) g_strlcat(tmp, "d", 10); \
859 if ( acl & PRSFS_WRITE ) g_strlcat(tmp, "w", 10); \
860 if ( acl & PRSFS_LOCK ) g_strlcat(tmp, "k", 10); \
861 if ( acl & PRSFS_ADMINISTER ) g_strlcat(tmp, "a", 10); \
862 ti = proto_tree_add_text(tree, tvb, offset, bytes, \
864 who, tmp, positive ? "" : " (negative)"); \
866 tree = proto_item_add_subtree(ti, ett_afs_acl); \
867 proto_tree_add_string(tree,hf_afs_fs_acl_entity, tvb,offset,(int)strlen(who), who);\
868 tmpoffset = offset + (int)strlen(who) + 1; \
869 acllen = bytes - (int)strlen(who) - 1; \
870 proto_tree_add_boolean(tree,hf_afs_fs_acl_r, tvb,tmpoffset,acllen,acl);\
871 proto_tree_add_boolean(tree,hf_afs_fs_acl_l, tvb,tmpoffset,acllen,acl);\
872 proto_tree_add_boolean(tree,hf_afs_fs_acl_i, tvb,tmpoffset,acllen,acl);\
873 proto_tree_add_boolean(tree,hf_afs_fs_acl_d, tvb,tmpoffset,acllen,acl);\
874 proto_tree_add_boolean(tree,hf_afs_fs_acl_w, tvb,tmpoffset,acllen,acl);\
875 proto_tree_add_boolean(tree,hf_afs_fs_acl_k, tvb,tmpoffset,acllen,acl);\
876 proto_tree_add_boolean(tree,hf_afs_fs_acl_a, tvb,tmpoffset,acllen,acl);\
881 #define OUT_UUID(x) \
883 #define SKIP_UUID() \
887 /* Output a bulkaddr */
888 #define OUT_VLDB_BulkAddr() \
889 OUT_RXArray32(OUT_IP(hf_afs_vldb_serverip));
891 /* output a bozo_key */
892 #define OUT_BOS_KEY() \
893 OUT_BYTES(hf_afs_bos_key, 8);
895 /* output a bozo_key */
896 #define OUT_BOS_KEYINFO() \
897 OUT_TIMESTAMP(hf_afs_bos_keymodtime); \
898 OUT_UINT(hf_afs_bos_keychecksum); \
899 OUT_UINT(hf_afs_bos_keyspare2);
901 /* output a bozo_netKTime */
902 #define OUT_BOS_TIME() \
903 SKIP(4); SKIP(2); SKIP(2); SKIP(2); SKIP(2);
905 /* output a bozo_status */
906 #define OUT_BOS_STATUS() \
909 /* output a ubik interface addr array */
910 #define OUT_UBIK_InterfaceAddrs() \
912 unsigned int i,j,seen_null=0; \
913 for (i=0; i<255; i++) { \
914 j = tvb_get_ntohl(tvb, offset); \
916 OUT_IP(hf_afs_ubik_interface); \
919 if ( ! seen_null ) { \
920 proto_tree_add_text(tree, tvb, offset, \
921 tvb_length_remaining(tvb, offset), \
922 "Null Interface Addresses"); \
930 #define OUT_UBIK_DebugOld() \
932 OUT_TIMESECS(hf_afs_ubik_now); \
933 OUT_TIMESECS(hf_afs_ubik_lastyestime); \
934 OUT_IP(hf_afs_ubik_lastyeshost); \
935 OUT_UINT(hf_afs_ubik_lastyesstate); \
936 OUT_TIMESECS(hf_afs_ubik_lastyesclaim); \
937 OUT_IP(hf_afs_ubik_lowesthost); \
938 OUT_TIMESECS(hf_afs_ubik_lowesttime); \
939 OUT_IP(hf_afs_ubik_synchost); \
940 OUT_TIMESECS(hf_afs_ubik_synctime); \
941 OUT_UBIKVERSION("Sync Version"); \
942 OUT_UBIKVERSION("Sync TID"); \
943 OUT_UINT(hf_afs_ubik_amsyncsite); \
944 OUT_TIMESECS(hf_afs_ubik_syncsiteuntil); \
945 OUT_UINT(hf_afs_ubik_nservers); \
946 OUT_UINT(hf_afs_ubik_lockedpages); \
947 OUT_UINT(hf_afs_ubik_writelockedpages); \
948 OUT_UBIKVERSION("Local Version"); \
949 OUT_UINT(hf_afs_ubik_activewrite); \
950 OUT_UINT(hf_afs_ubik_tidcounter); \
951 OUT_UINT(hf_afs_ubik_anyreadlocks); \
952 OUT_UINT(hf_afs_ubik_anywritelocks); \
953 OUT_UINT(hf_afs_ubik_recoverystate); \
954 OUT_UINT(hf_afs_ubik_currenttrans); \
955 OUT_UINT(hf_afs_ubik_writetrans); \
956 OUT_TIMESECS(hf_afs_ubik_epochtime); \
959 #define OUT_UBIK_SDebugOld() \
961 OUT_IP(hf_afs_ubik_addr); \
962 OUT_TIMESECS(hf_afs_ubik_lastvotetime); \
963 OUT_TIMESECS(hf_afs_ubik_lastbeaconsent); \
964 OUT_UINT(hf_afs_ubik_lastvote); \
965 OUT_UBIKVERSION("Remote Version"); \
966 OUT_UINT(hf_afs_ubik_currentdb); \
967 OUT_UINT(hf_afs_ubik_beaconsincedown); \
968 OUT_UINT(hf_afs_ubik_up); \
971 /* Skip a certain number of bytes */
972 #define SKIP(bytes) \
975 /* Raw data - to end of frame */
976 #define OUT_BYTES_ALL(field) OUT_BYTES(field, tvb_length_remaining(tvb,offset))
979 #define OUT_BYTES(field, bytes) \
980 proto_tree_add_item(tree, field, tvb, offset, bytes, ENC_NA);\
985 /* Skip the opcode */
986 #define SKIP_OPCODE() \
991 /* Output a UBIK version code */
992 #define OUT_UBIKVERSION(label) \
993 { proto_tree *save, *ti; \
994 unsigned int epoch,counter; \
996 epoch = tvb_get_ntohl(tvb, offset); \
998 counter = tvb_get_ntohl(tvb, offset); \
1002 ti = proto_tree_add_text(tree, tvb, offset-8, 8, \
1003 "UBIK Version (%s): %u.%u", label, epoch, counter ); \
1005 tree = proto_item_add_subtree(ti, ett_afs_ubikver); \
1007 proto_tree_add_time(tree,hf_afs_ubik_version_epoch, tvb,offset-8, \
1010 proto_tree_add_text(tree, tvb, offset-8, \
1012 proto_tree_add_uint(tree,hf_afs_ubik_version_counter, tvb,offset-4, \
1017 /* Output a kauth getticket request */
1018 #define OUT_KAUTH_GetTicket() \
1021 OUT_UINT(hf_afs_kauth_kvno); \
1022 OUT_RXString(hf_afs_kauth_domain); \
1023 len = tvb_get_ntohl(tvb, offset); \
1025 OUT_BYTES(hf_afs_kauth_data, len); \
1026 OUT_RXString(hf_afs_kauth_princ); \
1027 OUT_RXString(hf_afs_kauth_realm); \
1030 #define GETSTR (tvb_format_text(tvb,offset,tvb_length_remaining(tvb,offset)))
1032 #define VALID_OPCODE(opcode) ((opcode >= OPCODE_LOW && opcode <= OPCODE_HIGH) || \
1033 (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \
1034 (opcode >= DISK_LOW && opcode <= DISK_HIGH))
1036 static const value_string fs_req
[] = {
1037 { 130, "fetch-data" },
1038 { 131, "fetch-acl" },
1039 { 132, "fetch-status" },
1040 { 133, "store-data" },
1041 { 134, "store-acl" },
1042 { 135, "store-status" },
1043 { 136, "remove-file" },
1044 { 137, "create-file" },
1050 { 143, "old-set-lock" },
1051 { 144, "old-extend-lock" },
1052 { 145, "old-release-lock" },
1053 { 146, "get-stats" },
1054 { 147, "give-up-callbacks" },
1055 { 148, "get-volume-info" },
1056 { 149, "get-volume-status" },
1057 { 150, "set-volume-status" },
1058 { 151, "get-root-volume" },
1059 { 152, "check-token" },
1060 { 153, "get-time" },
1061 { 154, "nget-volume-info" },
1062 { 155, "bulk-status" },
1063 { 156, "set-lock" },
1064 { 157, "extend-lock" },
1065 { 158, "release-lock" },
1066 { 159, "xstats-version" },
1067 { 160, "get-xstats" },
1068 { 161, "dfs-lookup" },
1069 { 162, "dfs-flushcps" },
1070 { 163, "dfs-symlink" },
1071 { 220, "residency" },
1072 { 65536, "inline-bulk-status" },
1073 { 65537, "fetch-data-64" },
1074 { 65538, "store-data-64" },
1075 { 65539, "give-up-all-callbacks" },
1076 { 65540, "get-capabilities" },
1079 static value_string_ext fs_req_ext
= VALUE_STRING_EXT_INIT(fs_req
);
1081 static const value_string cb_req
[] = {
1082 { 204, "callback" },
1083 { 205, "init-callback-state" },
1085 { 207, "get-lock" },
1087 { 209, "xstats-version" },
1088 { 210, "get-xstats" },
1089 { 211, "init-callback-state2" },
1090 { 212, "who-are-you" },
1091 { 213, "init-callback-state3" },
1092 { 214, "probeuuid" },
1093 { 215, "get-server-prefs" },
1094 { 216, "get-cellservdb" },
1095 { 217, "get-local-cell" },
1096 { 218, "get-cache-config" },
1097 { 65536, "get-ce-64" },
1098 { 65537, "get-cell-by-num" },
1099 { 65538, "get-capabilities" },
1102 static value_string_ext cb_req_ext
= VALUE_STRING_EXT_INIT(cb_req
);
1104 static const value_string prot_req
[] = {
1105 { 500, "new-user" },
1106 { 501, "where-is-it" },
1107 { 502, "dump-entry" },
1108 { 503, "add-to-group" },
1109 { 504, "name-to-id" },
1110 { 505, "id-to-name" },
1112 { 507, "remove-from-group" },
1114 { 509, "new-entry" },
1115 { 510, "list-max" },
1117 { 512, "list-entry" },
1118 { 513, "change-entry" },
1119 { 514, "list-elements" },
1120 { 515, "is-member-of" },
1121 { 516, "set-fld-sentry" },
1122 { 517, "list-owned" },
1123 { 518, "get-cps2" },
1124 { 519, "get-host-cps" },
1125 { 520, "update-entry" },
1126 { 521, "list-entries" },
1129 static value_string_ext prot_req_ext
= VALUE_STRING_EXT_INIT(prot_req
);
1131 static const value_string vldb_req
[] = {
1132 { 501, "create-entry" },
1133 { 502, "delete-entry" },
1134 { 503, "get-entry-by-id" },
1135 { 504, "get-entry-by-name" },
1136 { 505, "get-new-volume-id" },
1137 { 506, "replace-entry" },
1138 { 507, "update-entry" },
1139 { 508, "set-lock" },
1140 { 509, "release-lock" },
1141 { 510, "list-entry" },
1142 { 511, "list-attributes" },
1143 { 512, "linked-list" },
1144 { 513, "get-stats" },
1146 { 515, "get-addrs" },
1147 { 516, "change-addr" },
1148 { 517, "create-entry-n" },
1149 { 518, "get-entry-by-id-n" },
1150 { 519, "get-entry-by-name-n" },
1151 { 520, "replace-entry-n" },
1152 { 521, "list-entry-n" },
1153 { 522, "list-attrib-n" },
1154 { 523, "linked-list-n" },
1155 { 524, "update-entry-by-name" },
1156 { 525, "create-entry-u" },
1157 { 526, "get-entry-by-id-u" },
1158 { 527, "get-entry-by-name-u" },
1159 { 528, "replace-entry-u" },
1160 { 529, "list-entry-u" },
1161 { 530, "list-attrib-u" },
1162 { 531, "linked-list-u" },
1164 { 533, "get-addrs-u" },
1165 { 534, "list-attrib-n2" },
1168 static value_string_ext vldb_req_ext
= VALUE_STRING_EXT_INIT(vldb_req
);
1170 static const value_string kauth_req
[] = {
1173 { 3, "get-ticket-old" },
1175 { 5, "set-fields" },
1176 { 6, "create-user" },
1177 { 7, "delete-user" },
1179 { 9, "list-entry" },
1180 { 10, "get-stats" },
1183 { 13, "get-random-key" },
1185 { 15, "lock-status" },
1186 { 21, "authenticate" },
1187 { 22, "authenticate-v2" },
1188 { 23, "get-ticket" },
1191 static value_string_ext kauth_req_ext
= VALUE_STRING_EXT_INIT(kauth_req
);
1193 static const value_string vol_req
[] = {
1194 { 100, "create-volume" },
1195 { 101, "delete-volume" },
1198 { 104, "end-trans" },
1200 { 106, "set-flags" },
1201 { 107, "get-flags" },
1202 { 108, "trans-create" },
1204 { 110, "get-nth-volume" },
1205 { 111, "set-forwarding" },
1206 { 112, "get-name" },
1207 { 113, "get-status" },
1208 { 114, "sig-restore" },
1209 { 115, "list-partitions" },
1210 { 116, "list-volumes" },
1211 { 117, "set-id-types" },
1213 { 119, "partition-info" },
1215 { 121, "list-one-volume" },
1217 { 123, "set-date" },
1218 { 124, "x-list-volumes" },
1219 { 125, "x-list-one-volume" },
1220 { 126, "set-info" },
1221 { 127, "x-list-partitions" },
1222 { 128, "forward-multiple" },
1223 { 65536, "convert-ro" },
1224 { 65537, "getsize" },
1227 static value_string_ext vol_req_ext
= VALUE_STRING_EXT_INIT(vol_req
);
1229 static const value_string bos_req
[] = {
1230 { 80, "create-bnode" },
1231 { 81, "delete-bnode" },
1232 { 82, "set-status" },
1233 { 83, "get-status" },
1234 { 84, "enumerate-instance" },
1235 { 85, "get-instance-info" },
1236 { 86, "get-instance-parm" },
1237 { 87, "add-superuser" },
1238 { 88, "delete-superuser" },
1239 { 89, "list-superusers" },
1240 { 90, "list-keys" },
1242 { 92, "delete-key" },
1243 { 93, "set-cell-name" },
1244 { 94, "get-cell-name" },
1245 { 95, "get-cell-host" },
1246 { 96, "add-cell-host" },
1247 { 97, "delete-cell-host" },
1248 { 98, "set-t-status" },
1249 { 99, "shutdown-all" },
1250 { 100, "restart-all" },
1251 { 101, "startup-all" },
1252 { 102, "set-noauth-flag" },
1256 { 106, "uninstall" },
1257 { 107, "get-dates" },
1260 { 110, "set-restart-time" },
1261 { 111, "get-restart-time" },
1263 { 113, "wait-all" },
1264 { 114, "get-instance-strings" },
1265 { 115, "get-restricted" },
1266 { 116, "set restricted" },
1269 static value_string_ext bos_req_ext
= VALUE_STRING_EXT_INIT(bos_req
);
1271 static const value_string update_req
[] = {
1272 { 1, "fetch-file" },
1273 { 2, "fetch-info" },
1276 static value_string_ext update_req_ext
= VALUE_STRING_EXT_INIT(update_req
);
1278 static const value_string rmtsys_req
[] = {
1283 static value_string_ext rmtsys_req_ext
= VALUE_STRING_EXT_INIT(rmtsys_req
);
1285 static const value_string backup_req
[] = {
1286 { 100, "perform-dump" },
1287 { 101, "perform-restore" },
1288 { 102, "check-dump" },
1289 { 103, "abort-dump" },
1290 { 104, "wait-for-dump" },
1291 { 105, "end-dump" },
1292 { 106, "get-tm-info" },
1293 { 107, "label-tape" },
1294 { 108, "scan-nodes" },
1295 { 109, "read-label" },
1296 { 110, "scan-dumps" },
1297 { 111, "get-tc-info" },
1298 { 112, "save-database" },
1299 { 113, "restore-database" },
1300 { 114, "get-status" },
1301 { 115, "request-abort" },
1302 { 116, "end-status" },
1303 { 117, "scan-status" },
1304 { 118, "delete-dump" },
1307 static value_string_ext backup_req_ext
= VALUE_STRING_EXT_INIT(backup_req
);
1309 static const value_string ubik_req
[] = {
1310 { 10000, "vote-beacon" },
1311 { 10001, "vote-debug-old" },
1312 { 10002, "vote-sdebug-old" },
1313 { 10003, "vote-getsyncsite" },
1314 { 10004, "vote-debug" },
1315 { 10005, "vote-sdebug" },
1316 { 10006, "vote-xdebug" },
1317 { 10007, "vote-xsdebug" },
1318 { 20000, "disk-begin" },
1319 { 20001, "disk-commit" },
1320 { 20002, "disk-lock" },
1321 { 20003, "disk-write" },
1322 { 20004, "disk-getversion" },
1323 { 20005, "disk-getfile" },
1324 { 20006, "disk-sendfile" },
1325 { 20007, "disk-abort" },
1326 { 20008, "disk-releaselocks" },
1327 { 20009, "disk-truncate" },
1328 { 20010, "disk-probe" },
1329 { 20011, "disk-writev" },
1330 { 20012, "disk-interfaceaddr" },
1331 { 20013, "disk-setversion" },
1334 static value_string_ext ubik_req_ext
= VALUE_STRING_EXT_INIT(ubik_req
);
1336 static const value_string cb_types
[] = {
1337 { CB_TYPE_EXCLUSIVE
, "exclusive" },
1338 { CB_TYPE_SHARED
, "shared" },
1339 { CB_TYPE_DROPPED
, "dropped" },
1343 static const value_string afs_errors
[] = {
1345 { 180480, "Database Inconsistent"},
1346 { 180481, "Exists"},
1348 { 180483, "Create Failed"},
1351 { 180486, "Bad Name"},
1352 { 180487, "Bad Index"},
1353 { 180488, "No auth"},
1354 { 180489, "Answer too long"},
1355 { 180490, "Bad Request"},
1356 { 180491, "Old Interface"},
1357 { 180492, "Bad Argument"},
1358 { 180493, "Bad Command"},
1359 { 180494, "No keys"},
1360 { 180495, "Read PW"},
1361 { 180496, "Bad key"},
1362 { 180497, "Ubik Init"},
1363 { 180498, "Ubik Call"},
1364 { 180499, "Bad Protocol"},
1365 { 180500, "No cells"},
1366 { 180501, "No cell"},
1367 { 180502, "Too many ubiks"},
1368 { 180503, "Too many keys"},
1369 { 180504, "Bad ticket"},
1370 { 180505, "Unknown Key"},
1371 { 180506, "Key Cache Invalid"},
1372 { 180507, "Bad Server"},
1373 { 180508, "Bad User"},
1374 { 180509, "Bad CPW"},
1375 { 180510, "Bad Create"},
1376 { 180511, "No ticket"},
1377 { 180512, "Assoc user"},
1378 { 180513, "Not special"},
1379 { 180514, "Clock skew too great"},
1380 { 180515, "No recursion"},
1381 { 180516, "RX failed"},
1382 { 180517, "Null password"},
1383 { 180518, "Internal error"},
1384 { 180519, "Password expired"},
1385 { 180520, "Reused"},
1386 { 180521, "Too soon"},
1387 { 180522, "Locked"},
1390 { 267264, "Exists"},
1391 { 267265, "ID Exists"},
1392 { 267266, "No IDs"},
1393 { 267267, "DB Failed"},
1394 { 267268, "No such entry"},
1395 { 267269, "Permission denied"},
1396 { 267270, "Not group"},
1397 { 267271, "Not user"},
1398 { 267272, "Bad name"},
1399 { 267273, "Bad argument"},
1400 { 267274, "No more"},
1401 { 267275, "Bad DB"},
1402 { 267276, "Group empty"},
1403 { 267277, "Inconsistent"},
1404 { 267278, "DB Address"},
1405 { 267279, "Too many"},
1406 { 267280, "No memory"},
1409 { 363520, "ID Exists"},
1410 { 363521, "IO Error"},
1411 { 363522, "Name Exists"},
1412 { 363523, "Create Failed"},
1413 { 363524, "Entry Not Found"},
1415 { 363526, "Entry Deleted"},
1416 { 363527, "Bad Name"},
1417 { 363528, "Bad Index"},
1418 { 363529, "Bad Volume Type"},
1419 { 363530, "Bad Partition"},
1420 { 363531, "Bad Server"},
1421 { 363532, "Bad Replicate Server"},
1422 { 363533, "No Replicate Server"},
1423 { 363534, "Duplicate Replicate Server"},
1424 { 363535, "ReadWrite Volume Not Found"},
1425 { 363536, "Bad Reference Count"},
1426 { 363537, "Size Exceeded"},
1427 { 363538, "Bad Entry"},
1428 { 363539, "Bad Volume ID Bump"},
1429 { 363540, "Already has edit"},
1430 { 363541, "Entry Locked"},
1431 { 363542, "Bad Volume Operation"},
1432 { 363543, "Bad Rel Lock Type"},
1433 { 363544, "Rerelease"},
1434 { 363545, "Bad Server"},
1435 { 363546, "Permission Denied"},
1436 { 363547, "Out of Memory"},
1438 /* Volume server errors */
1439 { 1492325120, "Release error"},
1440 { 1492325121, "No op"},
1441 { 1492325122, "Read dump error"},
1442 { 1492325123, "Dump error"},
1443 { 1492325124, "Attach error"},
1444 { 1492325125, "Illegal partition"},
1445 { 1492325126, "Detach error"},
1446 { 1492325127, "Bad access"},
1447 { 1492325128, "VLDB error"},
1448 { 1492325129, "Bad Name"},
1449 { 1492325130, "Volume moved"},
1450 { 1492325131, "Bad operation"},
1451 { 1492325132, "Bad release"},
1452 { 1492325133, "Volume busy"},
1453 { 1492325134, "No memory"},
1454 { 1492325135, "No volume"},
1455 { 1492325136, "Multiple RW volumes"},
1456 { 1492325137, "Failed operation"},
1458 /* add more of these errors to decode the errcode responses */
1461 static value_string_ext afs_errors_ext
= VALUE_STRING_EXT_INIT(afs_errors
);
1463 static const value_string port_types
[] = {
1464 { AFS_PORT_FS
, "File Server" },
1465 { AFS_PORT_CB
, "Callback Server" },
1466 { AFS_PORT_PROT
, "Protection Server" },
1467 { AFS_PORT_VLDB
, "Volume Location Database Server" },
1468 { AFS_PORT_KAUTH
, "Kerberos Authentication Server" },
1469 { AFS_PORT_VOL
, "Volume Server" },
1470 { AFS_PORT_ERROR
, "Error Server" },
1471 { AFS_PORT_BOS
, "BOS Server" },
1472 { AFS_PORT_UPDATE
, "Update? Server" },
1473 { AFS_PORT_RMTSYS
, "Rmtsys? Server" },
1474 { AFS_PORT_BACKUP
, "Backup Server" },
1477 static value_string_ext port_types_ext
= VALUE_STRING_EXT_INIT(port_types
);
1479 static const value_string port_types_short
[] = {
1480 { AFS_PORT_FS
, "FS" },
1481 { AFS_PORT_CB
, "CB" },
1482 { AFS_PORT_PROT
, "PROT" },
1483 { AFS_PORT_VLDB
, "VLDB" },
1484 { AFS_PORT_KAUTH
, "KAUTH" },
1485 { AFS_PORT_VOL
, "VOL" },
1486 { AFS_PORT_ERROR
, "ERR" },
1487 { AFS_PORT_BOS
, "BOS" },
1488 { AFS_PORT_UPDATE
, "UPD" },
1489 { AFS_PORT_RMTSYS
, "RMT" },
1490 { AFS_PORT_BACKUP
, "BKUP" },
1493 static value_string_ext port_types_short_ext
= VALUE_STRING_EXT_INIT(port_types_short
);
1495 static const value_string ubik_lock_types
[] = {
1502 static const value_string xstat_collections
[] = {
1503 { 0, "call counting & info" },
1504 { 1, "performance info" },
1505 { 2, "full performance info" },
1509 static const value_string vice_lock_types
[] = {
1517 static const value_string volume_types
[] = {
1518 { 0, "read-write" },
1521 { 0xffffffff, "any" },
1525 struct afs_request_key
{
1526 guint32 conversation
, epoch
, cid
, callnumber
;
1530 struct afs_request_val
{
1537 static GHashTable
*afs_request_hash
= NULL
;
1539 /*static GHashTable *afs_fragment_table = NULL; */
1540 /*static GHashTable *afs_reassembled_table = NULL; */
1541 static reassembly_table afs_reassembly_table
;
1544 * Dissector prototypes
1546 static int dissect_acl(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1547 proto_tree
*tree
, int offset
);
1548 static void dissect_fs_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1549 proto_tree
*tree
, int offset
, int opcode
);
1550 static void dissect_fs_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1551 proto_tree
*tree
, int offset
, int opcode
);
1552 static void dissect_bos_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1553 proto_tree
*tree
, int offset
, int opcode
);
1554 static void dissect_bos_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1555 proto_tree
*tree
, int offset
, int opcode
);
1556 static void dissect_vol_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1557 proto_tree
*tree
, int offset
, int opcode
);
1558 static void dissect_vol_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1559 proto_tree
*tree
, int offset
, int opcode
);
1560 static void dissect_kauth_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1561 proto_tree
*tree
, int offset
, int opcode
);
1562 static void dissect_kauth_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1563 proto_tree
*tree
, int offset
, int opcode
);
1564 static void dissect_cb_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1565 proto_tree
*tree
, int offset
, int opcode
);
1566 static void dissect_cb_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1567 proto_tree
*tree
, int offset
, int opcode
);
1568 static void dissect_prot_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1569 proto_tree
*tree
, int offset
, int opcode
);
1570 static void dissect_prot_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1571 proto_tree
*tree
, int offset
, int opcode
);
1572 static void dissect_vldb_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1573 proto_tree
*tree
, int offset
, int opcode
);
1574 static void dissect_vldb_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1575 proto_tree
*tree
, int offset
, int opcode
);
1576 static void dissect_ubik_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1577 proto_tree
*tree
, int offset
, int opcode
);
1578 static void dissect_ubik_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1579 proto_tree
*tree
, int offset
, int opcode
);
1580 static void dissect_backup_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1581 proto_tree
*tree
, int offset
, int opcode
);
1582 static void dissect_backup_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
,
1583 proto_tree
*tree
, int offset
, int opcode
);
1589 afs_equal(gconstpointer v
, gconstpointer w
)
1591 const struct afs_request_key
*v1
= (const struct afs_request_key
*)v
;
1592 const struct afs_request_key
*v2
= (const struct afs_request_key
*)w
;
1594 if (v1
-> conversation
== v2
-> conversation
&&
1595 v1
-> epoch
== v2
-> epoch
&&
1596 v1
-> cid
== v2
-> cid
&&
1597 v1
-> callnumber
== v2
-> callnumber
) {
1606 afs_hash (gconstpointer v
)
1608 const struct afs_request_key
*key
= (const struct afs_request_key
*)v
;
1611 val
= key
-> conversation
+ key
-> epoch
+ key
-> cid
+ key
-> callnumber
;
1617 * Protocol initialization
1620 afs_init_protocol(void)
1622 if (afs_request_hash
)
1623 g_hash_table_destroy(afs_request_hash
);
1625 afs_request_hash
= g_hash_table_new(afs_hash
, afs_equal
);
1627 /* fragment_table_init(&afs_fragment_table); */
1628 /* reassembled_table_init(&afs_reassembled_table); */
1629 reassembly_table_init(&afs_reassembly_table
,
1630 &addresses_reassembly_table_functions
);
1636 * Dissection routines
1640 dissect_afs(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1642 struct rxinfo
*rxinfo
= (struct rxinfo
*)data
;
1644 conversation_t
*conversation
;
1645 struct afs_request_key request_key
, *new_request_key
;
1646 struct afs_request_val
*request_val
=NULL
;
1647 proto_tree
*afs_tree
, *afs_op_tree
, *ti
;
1648 proto_item
*hidden_item
;
1649 int port
, node
, typenode
, opcode
;
1650 value_string_ext
*vals_ext
;
1653 guint8 save_fragmented
;
1654 int reassembled
= 0;
1656 void (*dissector
)(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
);
1659 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "AFS (RX)");
1660 col_clear(pinfo
->cinfo
, COL_INFO
);
1662 reply
= (rxinfo
->flags
& RX_CLIENT_INITIATED
) == 0;
1663 port
= ((reply
== 0) ? pinfo
->destport
: pinfo
->srcport
);
1666 * Find out what conversation this packet is part of.
1667 * XXX - this should really be done by the transport-layer protocol,
1668 * although for connectionless transports, we may not want to do that
1669 * unless we know some higher-level protocol will want it - or we
1670 * may want to do it, so you can say e.g. "show only the packets in
1671 * this UDP 'connection'".
1673 * Note that we don't have to worry about the direction this packet
1674 * was going - the conversation code handles that for us, treating
1675 * packets from A:X to B:Y as being part of the same conversation as
1676 * packets from B:Y to A:X.
1678 conversation
= find_or_create_conversation(pinfo
);
1680 request_key
.conversation
= conversation
->index
;
1681 request_key
.service
= rxinfo
->serviceid
;
1682 request_key
.epoch
= rxinfo
->epoch
;
1683 request_key
.cid
= rxinfo
->cid
;
1684 request_key
.callnumber
= rxinfo
->callnumber
;
1686 request_val
= (struct afs_request_val
*) g_hash_table_lookup(
1687 afs_request_hash
, &request_key
);
1689 /* only allocate a new hash element when it's a request */
1691 if(!pinfo
->fd
->flags
.visited
){
1692 if ( !request_val
&& !reply
) {
1693 new_request_key
= wmem_new(wmem_file_scope(), struct afs_request_key
);
1694 *new_request_key
= request_key
;
1696 request_val
= wmem_new(wmem_file_scope(), struct afs_request_val
);
1697 request_val
-> opcode
= tvb_get_ntohl(tvb
, offset
);
1698 request_val
-> req_num
= pinfo
->fd
->num
;
1699 request_val
-> rep_num
= 0;
1700 request_val
-> req_time
= pinfo
->fd
->abs_ts
;
1702 g_hash_table_insert(afs_request_hash
, new_request_key
,
1705 if( request_val
&& reply
) {
1706 request_val
-> rep_num
= pinfo
->fd
->num
;
1710 if ( request_val
) {
1711 opcode
= request_val
->opcode
;
1721 typenode
= hf_afs_fs
;
1722 node
= hf_afs_fs_opcode
;
1723 vals_ext
= &fs_req_ext
;
1724 dissector
= reply
? dissect_fs_reply
: dissect_fs_request
;
1727 typenode
= hf_afs_cb
;
1728 node
= hf_afs_cb_opcode
;
1729 vals_ext
= &cb_req_ext
;
1730 dissector
= reply
? dissect_cb_reply
: dissect_cb_request
;
1733 typenode
= hf_afs_prot
;
1734 node
= hf_afs_prot_opcode
;
1735 vals_ext
= &prot_req_ext
;
1736 dissector
= reply
? dissect_prot_reply
: dissect_prot_request
;
1739 typenode
= hf_afs_vldb
;
1740 node
= hf_afs_vldb_opcode
;
1741 vals_ext
= &vldb_req_ext
;
1742 dissector
= reply
? dissect_vldb_reply
: dissect_vldb_request
;
1744 case AFS_PORT_KAUTH
:
1745 typenode
= hf_afs_kauth
;
1746 node
= hf_afs_kauth_opcode
;
1747 vals_ext
= &kauth_req_ext
;
1748 dissector
= reply
? dissect_kauth_reply
: dissect_kauth_request
;
1751 typenode
= hf_afs_vol
;
1752 node
= hf_afs_vol_opcode
;
1753 vals_ext
= &vol_req_ext
;
1754 dissector
= reply
? dissect_vol_reply
: dissect_vol_request
;
1756 case AFS_PORT_ERROR
:
1757 typenode
= hf_afs_error
;
1758 node
= hf_afs_error_opcode
;
1759 /* dissector = reply ? dissect_error_reply : dissect_error_request; */
1762 typenode
= hf_afs_bos
;
1763 node
= hf_afs_bos_opcode
;
1764 vals_ext
= &bos_req_ext
;
1765 dissector
= reply
? dissect_bos_reply
: dissect_bos_request
;
1767 case AFS_PORT_UPDATE
:
1768 typenode
= hf_afs_update
;
1769 node
= hf_afs_update_opcode
;
1770 vals_ext
= &update_req_ext
;
1771 /* dissector = reply ? dissect_update_reply : dissect_update_request; */
1773 case AFS_PORT_RMTSYS
:
1774 typenode
= hf_afs_rmtsys
;
1775 node
= hf_afs_rmtsys_opcode
;
1776 vals_ext
= &rmtsys_req_ext
;
1777 /* dissector = reply ? dissect_rmtsys_reply : dissect_rmtsys_request; */
1779 case AFS_PORT_BACKUP
:
1780 typenode
= hf_afs_backup
;
1781 node
= hf_afs_backup_opcode
;
1782 vals_ext
= &backup_req_ext
;
1783 dissector
= reply
? dissect_backup_reply
: dissect_backup_request
;
1787 if ( (opcode
>= VOTE_LOW
&& opcode
<= VOTE_HIGH
) ||
1788 (opcode
>= DISK_LOW
&& opcode
<= DISK_HIGH
) ) {
1789 typenode
= hf_afs_ubik
;
1790 node
= hf_afs_ubik_opcode
;
1791 vals_ext
= &ubik_req_ext
;
1792 dissector
= reply
? dissect_ubik_reply
: dissect_ubik_request
;
1796 if ( VALID_OPCODE(opcode
) ) {
1798 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s%s %s: %s (%d)",
1799 typenode
== hf_afs_ubik
? "UBIK-" : "",
1800 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
1801 reply
? "Reply" : "Request",
1802 val_to_str_ext(opcode
, vals_ext
, "Unknown(%d)"), opcode
);
1804 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s%s %s: Unknown(%d)",
1805 typenode
== hf_afs_ubik
? "UBIK-" : "",
1806 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
1807 reply
? "Reply" : "Request",
1811 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Encrypted %s %s",
1812 val_to_str_ext(port
, &port_types_short_ext
, "Unknown(%d)"),
1813 reply
? "Reply" : "Request"
1817 ti
= proto_tree_add_item(tree
, proto_afs
, tvb
, offset
, -1,
1819 afs_tree
= proto_item_add_subtree(ti
, ett_afs
);
1821 save_fragmented
= pinfo
->fragmented
;
1822 if( (! (rxinfo
->flags
& RX_LAST_PACKET
) || rxinfo
->seq
> 1 )) { /* Fragmented */
1823 tvbuff_t
* new_tvb
= NULL
;
1824 fragment_head
* frag_msg
= NULL
;
1825 guint32 afs_seqid
= rxinfo
->callnumber
^ rxinfo
->cid
;
1826 pinfo
->fragmented
= TRUE
;
1828 frag_msg
= fragment_add_seq_check(&afs_reassembly_table
,
1829 tvb
, offset
, pinfo
, afs_seqid
, NULL
,
1830 rxinfo
->seq
-1, tvb_length_remaining(tvb
, offset
),
1831 ! ( rxinfo
->flags
& RX_LAST_PACKET
) );
1833 new_tvb
= process_reassembled_data( tvb
, offset
, pinfo
, "Reassembled RX", frag_msg
,
1834 &afs_frag_items
, NULL
, afs_tree
);
1839 col_append_str(pinfo
->cinfo
, COL_INFO
, " [AFS reassembled]");
1841 col_set_str(pinfo
->cinfo
, COL_INFO
, "[AFS segment of a reassembled PDU]");
1842 return tvb_length(tvb
);
1846 pinfo
->fragmented
= save_fragmented
;
1849 proto_tree_add_text(afs_tree
, tvb
, 0, 0,
1850 "Service: %s%s%s %s",
1851 VALID_OPCODE(opcode
) ? "" : "Encrypted ",
1852 typenode
== hf_afs_ubik
? "UBIK - " : "",
1853 val_to_str_ext(port
, &port_types_ext
, "Unknown(%d)"),
1854 reply
? "Reply" : "Request");
1856 if( request_val
&& !reply
&& request_val
->rep_num
) {
1857 proto_tree_add_uint_format(afs_tree
, hf_afs_repframe
,
1858 tvb
, 0, 0, request_val
->rep_num
,
1859 "The reply to this request is in frame %u",
1860 request_val
->rep_num
);
1862 if( request_val
&& reply
&& request_val
->rep_num
) {
1863 proto_tree_add_uint_format(afs_tree
, hf_afs_reqframe
,
1864 tvb
, 0, 0, request_val
->req_num
,
1865 "This is a reply to a request in frame %u",
1866 request_val
->req_num
);
1867 nstime_delta(&delta_ts
, &pinfo
->fd
->abs_ts
, &request_val
->req_time
);
1868 proto_tree_add_time(afs_tree
, hf_afs_time
, tvb
, offset
, 0,
1873 if ( VALID_OPCODE(opcode
) ) {
1874 /* until we do cache, can't handle replies */
1876 if ( !reply
&& node
!= 0 ) {
1877 if ( rxinfo
->seq
== 1 || reassembled
)
1879 ti
= proto_tree_add_uint(afs_tree
,
1880 node
, tvb
, offset
, 4, opcode
);
1882 ti
= proto_tree_add_uint(afs_tree
,
1883 node
, tvb
, 0, 0, opcode
);
1885 } else if ( reply
&& node
!= 0 ) {
1886 /* the opcode isn't in this packet */
1887 ti
= proto_tree_add_uint(afs_tree
,
1888 node
, tvb
, 0, 0, opcode
);
1890 ti
= proto_tree_add_text(afs_tree
, tvb
,
1891 0, 0, "Operation: Unknown");
1894 /* Add the subtree for this particular service */
1895 afs_op_tree
= proto_item_add_subtree(ti
, ett_afs_op
);
1898 if ( typenode
!= 0 ) {
1899 /* indicate the type of request */
1900 hidden_item
= proto_tree_add_boolean(afs_tree
, typenode
, tvb
, offset
, 0, 1);
1901 PROTO_ITEM_SET_HIDDEN(hidden_item
);
1904 /* Process the packet according to what service it is */
1905 /* Only for first packet in an rx data stream or the full reassembled stream */
1906 if ( dissector
&& ( rxinfo
->seq
== 1 || reassembled
) ) {
1907 (*dissector
)(tvb
, rxinfo
, afs_op_tree
, offset
, opcode
);
1912 /* if it's the last packet, and it's a reply, remove opcode
1914 /* ignoring for now, I'm not sure how the chunk deallocation works */
1915 if ( rxinfo
->flags
& RX_LAST_PACKET
&& reply
){
1919 return tvb_length(tvb
);
1924 * Here is a helper routine for adding an AFS acl to the proto tree
1925 * This is to be used with FS packets only
1927 * An AFS ACL is a string that has the following format:
1929 * <positive> <negative>
1933 * "positive" and "negative" are integers which contain the number of
1934 * positive and negative ACL's in the string. The uid/aclbits pair are
1935 * ASCII strings containing the UID/PTS record and and a ascii number
1936 * representing a logical OR of all the ACL permission bits
1941 * sscanf is probably quite dangerous if we run outside the packet.
1943 * "GETSTR" doesn't guarantee that the resulting string is
1946 * Should this just scan the string itself, rather than using "sscanf()"?
1949 dissect_acl(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
)
1953 int i
, n
, pos
, neg
, acl
;
1954 char user
[128] = "[Unknown]"; /* Be sure to adjust sscanf()s below if length is changed... */
1956 old_offset
= offset
;
1957 bytes
= tvb_get_ntohl(tvb
, offset
);
1958 OUT_UINT(hf_afs_fs_acl_datasize
);
1961 if (sscanf(GETSTR
, "%d %n", &pos
, &n
) != 1) {
1962 /* does not matter what we return, if this fails,
1963 * we cant dissect anything else in the packet either.
1967 proto_tree_add_uint(tree
, hf_afs_fs_acl_count_positive
, tvb
,
1972 if (sscanf(GETSTR
, "%d %n", &neg
, &n
) != 1) {
1975 proto_tree_add_uint(tree
, hf_afs_fs_acl_count_negative
, tvb
,
1980 * This wacky order preserves the order used by the "fs" command
1982 for (i
= 0; i
< pos
; i
++) {
1983 if (sscanf(GETSTR
, "%127s %d %n", user
, &acl
, &n
) != 2) {
1986 ACLOUT(user
,1,acl
,n
);
1989 for (i
= 0; i
< neg
; i
++) {
1990 if (sscanf(GETSTR
, "%127s %d %n", user
, &acl
, &n
) != 2) {
1993 ACLOUT(user
,0,acl
,n
);
1995 if (offset
>= old_offset
+bytes
) {
2004 * Here are the helper dissection routines
2008 dissect_fs_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2010 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2014 case 130: /* fetch data */
2015 OUT_FS_AFSFetchStatus("Status");
2016 OUT_FS_AFSCallBack();
2017 OUT_FS_AFSVolSync();
2018 OUT_BYTES_ALL(hf_afs_fs_data
);
2020 case 131: /* fetch acl */
2021 offset
= dissect_acl(tvb
, rxinfo
, tree
, offset
);
2022 OUT_FS_AFSFetchStatus("Status");
2023 OUT_FS_AFSVolSync();
2025 case 132: /* Fetch status */
2026 OUT_FS_AFSFetchStatus("Status");
2027 OUT_FS_AFSCallBack();
2028 OUT_FS_AFSVolSync();
2030 case 133: /* Store data */
2031 case 134: /* Store ACL */
2032 case 135: /* Store status */
2033 case 136: /* Remove file */
2034 OUT_FS_AFSFetchStatus("Status");
2035 OUT_FS_AFSVolSync();
2037 case 137: /* create file */
2038 case 141: /* make dir */
2039 case 161: /* lookup */
2040 case 163: /* dfs symlink */
2041 OUT_FS_AFSFid((opcode
== 137)? "New File" : ((opcode
== 141)? "New Directory" : "File"));
2042 OUT_FS_AFSFetchStatus("File Status");
2043 OUT_FS_AFSFetchStatus("Directory Status");
2044 OUT_FS_AFSCallBack();
2045 OUT_FS_AFSVolSync();
2047 case 138: /* rename */
2048 OUT_FS_AFSFetchStatus("Old Directory Status");
2049 OUT_FS_AFSFetchStatus("New Directory Status");
2050 OUT_FS_AFSVolSync();
2052 case 139: /* symlink */
2053 OUT_FS_AFSFid("Symlink");
2054 case 140: /* link */
2055 OUT_FS_AFSFetchStatus("Symlink Status");
2056 case 142: /* rmdir */
2057 OUT_FS_AFSFetchStatus("Directory Status");
2058 OUT_FS_AFSVolSync();
2060 case 143: /* old set lock */
2061 case 144: /* old extend lock */
2062 case 145: /* old release lock */
2063 case 147: /* give up callbacks */
2064 case 150: /* set volume status */
2065 case 152: /* check token */
2066 /* nothing returned */
2068 case 146: /* get statistics */
2069 OUT_FS_ViceStatistics();
2071 case 148: /* get volume info */
2072 case 154: /* n-get-volume-info */
2073 OUT_FS_VolumeInfo();
2075 case 149: /* get volume status */
2076 OUT_FS_AFSFetchVolumeStatus();
2077 OUT_RXString(hf_afs_fs_volname
);
2078 OUT_RXString(hf_afs_fs_offlinemsg
);
2079 OUT_RXString(hf_afs_fs_motd
);
2081 case 151: /* root volume */
2082 OUT_RXString(hf_afs_fs_volname
);
2084 case 153: /* get time */
2085 OUT_TIMESTAMP(hf_afs_fs_timestamp
);
2087 case 155: /* bulk status */
2088 OUT_FS_AFSBulkStats();
2091 OUT_FS_AFSVolSync();
2093 case 156: /* set lock */
2094 case 157: /* extend lock */
2095 case 158: /* release lock */
2096 OUT_FS_AFSVolSync();
2098 case 159: /* x-stats-version */
2099 OUT_UINT(hf_afs_fs_xstats_version
);
2101 case 160: /* get xstats */
2102 OUT_UINT(hf_afs_fs_xstats_version
);
2103 OUT_TIMESECS(hf_afs_fs_xstats_timestamp
);
2104 OUT_FS_AFS_CollData();
2106 case 162: /* flush cps */
2107 OUT_UINT(hf_afs_fs_cps_spare2
);
2108 OUT_UINT(hf_afs_fs_cps_spare3
);
2110 case 65536: /* inline bulk status */
2111 OUT_RXArray32(OUT_FS_AFSFetchStatus("Status"));
2112 OUT_RXArray32(OUT_FS_AFSCallBack());
2113 OUT_FS_AFSVolSync();
2117 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2119 OUT_UINT(hf_afs_fs_errcode
);
2124 dissect_fs_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2126 offset
+= 4; /* skip the opcode */
2130 case 130: /* Fetch data */
2131 OUT_FS_AFSFid("Source");
2132 OUT_UINT(hf_afs_fs_offset
);
2133 OUT_UINT(hf_afs_fs_length
);
2135 case 131: /* Fetch ACL */
2136 OUT_FS_AFSFid("Target");
2138 case 132: /* Fetch Status */
2139 OUT_FS_AFSFid("Target");
2141 case 133: /* Store Data */
2142 OUT_FS_AFSFid("Destination");
2143 OUT_FS_AFSStoreStatus("Status");
2144 OUT_UINT(hf_afs_fs_offset
);
2145 OUT_UINT(hf_afs_fs_length
);
2146 OUT_UINT(hf_afs_fs_flength
);
2147 OUT_BYTES_ALL(hf_afs_fs_data
);
2149 case 134: /* Store ACL */
2150 OUT_FS_AFSFid("Target");
2151 /* offset = */ dissect_acl(tvb
, rxinfo
, tree
, offset
);
2153 case 135: /* Store Status */
2154 OUT_FS_AFSFid("Target");
2155 OUT_FS_AFSStoreStatus("Status");
2157 case 136: /* Remove File */
2158 OUT_FS_AFSFid("Remove File");
2159 OUT_RXString(hf_afs_fs_name
);
2161 case 137: /* Create File */
2162 OUT_FS_AFSFid("Target");
2163 OUT_RXString(hf_afs_fs_name
);
2164 OUT_FS_AFSStoreStatus("Status");
2166 case 138: /* Rename file */
2167 OUT_FS_AFSFid("Old");
2168 OUT_RXString(hf_afs_fs_oldname
);
2169 OUT_FS_AFSFid("New");
2170 OUT_RXString(hf_afs_fs_newname
);
2172 case 139: /* Symlink */
2173 OUT_FS_AFSFid("File");
2174 OUT_RXString(hf_afs_fs_symlink_name
);
2175 OUT_RXString(hf_afs_fs_symlink_content
);
2176 OUT_FS_AFSStoreStatus("Status");
2178 case 140: /* Link */
2179 OUT_FS_AFSFid("Link To (New File)");
2180 OUT_RXString(hf_afs_fs_name
);
2181 OUT_FS_AFSFid("Link From (Old File)");
2183 case 141: /* Make dir */
2184 OUT_FS_AFSFid("Target");
2185 OUT_RXString(hf_afs_fs_name
);
2186 OUT_FS_AFSStoreStatus("Status");
2188 case 142: /* Remove dir */
2189 OUT_FS_AFSFid("Target");
2190 OUT_RXString(hf_afs_fs_name
);
2192 case 143: /* Old Set Lock */
2193 OUT_FS_AFSFid("Target");
2194 OUT_UINT(hf_afs_fs_vicelocktype
);
2195 OUT_FS_AFSVolSync();
2197 case 144: /* Old Extend Lock */
2198 OUT_FS_AFSFid("Target");
2199 OUT_FS_AFSVolSync();
2201 case 145: /* Old Release Lock */
2202 OUT_FS_AFSFid("Target");
2203 OUT_FS_AFSVolSync();
2205 case 146: /* Get statistics */
2208 case 147: /* Give up callbacks */
2212 case 148: /* Get vol info */
2213 OUT_RXString(hf_afs_fs_volname
);
2215 case 149: /* Get vol stats */
2216 OUT_UINT(hf_afs_fs_volid
);
2218 case 150: /* Set vol stats */
2219 OUT_UINT(hf_afs_fs_volid
);
2220 OUT_FS_AFSStoreVolumeStatus();
2221 OUT_RXString(hf_afs_fs_volname
);
2222 OUT_RXString(hf_afs_fs_offlinemsg
);
2223 OUT_RXString(hf_afs_fs_motd
);
2225 case 151: /* get root volume */
2228 case 152: /* check token */
2229 OUT_UINT(hf_afs_fs_viceid
);
2232 case 153: /* get time */
2235 case 154: /* new get vol info */
2236 OUT_RXString(hf_afs_fs_volname
);
2238 case 155: /* bulk stat */
2241 case 156: /* Set Lock */
2242 OUT_FS_AFSFid("Target");
2243 OUT_UINT(hf_afs_fs_vicelocktype
);
2245 case 157: /* Extend Lock */
2246 OUT_FS_AFSFid("Target");
2248 case 158: /* Release Lock */
2249 OUT_FS_AFSFid("Target");
2251 case 159: /* xstats version */
2254 case 160: /* get xstats */
2255 OUT_UINT(hf_afs_fs_xstats_clientversion
);
2256 OUT_UINT(hf_afs_fs_xstats_collnumber
);
2258 case 161: /* lookup */
2259 OUT_FS_AFSFid("Target");
2260 OUT_RXString(hf_afs_fs_name
);
2262 case 162: /* flush cps */
2265 OUT_UINT(hf_afs_fs_cps_spare1
);
2267 case 163: /* dfs symlink */
2268 OUT_FS_AFSFid("Target");
2269 OUT_RXString(hf_afs_fs_symlink_name
);
2270 OUT_RXString(hf_afs_fs_symlink_content
);
2271 OUT_FS_AFSStoreStatus("Symlink Status");
2273 case 220: /* residencycmd */
2274 OUT_FS_AFSFid("Target");
2275 /* need residency inputs here */
2277 case 65536: /* inline bulk status */
2280 case 65537: /* fetch-data-64 */
2281 OUT_FS_AFSFid("Target");
2282 OUT_INT64(hf_afs_fs_offset64
);
2283 OUT_INT64(hf_afs_fs_length64
);
2284 /* need more here */
2286 case 65538: /* store-data-64 */
2287 OUT_FS_AFSFid("Target");
2288 OUT_FS_AFSStoreStatus("Status");
2289 OUT_INT64(hf_afs_fs_offset64
);
2290 OUT_INT64(hf_afs_fs_length64
);
2291 OUT_INT64(hf_afs_fs_flength64
);
2292 /* need residency inputs here */
2294 case 65539: /* give up all cbs */
2296 case 65540: /* get capabilities */
2305 dissect_bos_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2307 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2311 case 80: /* create bnode */
2314 case 81: /* delete bnode */
2317 case 82: /* set status */
2320 case 83: /* get status */
2321 OUT_INT(hf_afs_bos_status
);
2322 OUT_RXString(hf_afs_bos_statusdesc
);
2324 case 84: /* enumerate instance */
2325 OUT_RXString(hf_afs_bos_instance
);
2327 case 85: /* get instance info */
2328 OUT_RXString(hf_afs_bos_type
);
2331 case 86: /* get instance parm */
2332 OUT_RXString(hf_afs_bos_parm
);
2334 case 87: /* add siperuser */
2337 case 88: /* delete superuser */
2340 case 89: /* list superusers */
2341 OUT_RXString(hf_afs_bos_user
);
2343 case 90: /* list keys */
2344 OUT_UINT(hf_afs_bos_kvno
);
2348 case 91: /* add key */
2351 case 92: /* delete key */
2354 case 93: /* set cell name */
2357 case 94: /* get cell name */
2358 OUT_RXString(hf_afs_bos_cell
);
2360 case 95: /* get cell host */
2361 OUT_RXString(hf_afs_bos_host
);
2363 case 96: /* add cell host */
2366 case 97: /* delete cell host */
2369 case 98: /* set tstatus */
2372 case 99: /* shutdown all */
2375 case 100: /* restart all */
2378 case 101: /* startup all */
2381 case 102: /* set noauth flag */
2384 case 103: /* rebozo */
2387 case 104: /* restart */
2390 case 105: /* install */
2393 case 106: /* uninstall */
2396 case 107: /* get dates */
2397 OUT_TIMESECS(hf_afs_bos_newtime
);
2398 OUT_TIMESECS(hf_afs_bos_baktime
);
2399 OUT_TIMESECS(hf_afs_bos_oldtime
);
2401 case 108: /* exec */
2404 case 109: /* prune */
2407 case 110: /* set restart time */
2410 case 111: /* get restart time */
2413 case 112: /* get log */
2414 /* need to make this dump a big string somehow */
2415 OUT_BYTES_ALL(hf_afs_bos_data
);
2417 case 113: /* wait all */
2420 case 114: /* get instance strings */
2421 OUT_RXString(hf_afs_bos_error
);
2422 OUT_RXString(hf_afs_bos_spare1
);
2423 OUT_RXString(hf_afs_bos_spare2
);
2424 OUT_RXString(hf_afs_bos_spare3
);
2428 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2430 OUT_UINT(hf_afs_bos_errcode
);
2435 dissect_bos_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
2437 offset
+= 4; /* skip the opcode */
2441 case 80: /* create b node */
2442 OUT_RXString(hf_afs_bos_type
);
2443 OUT_RXString(hf_afs_bos_instance
);
2444 OUT_RXString(hf_afs_bos_parm
);
2445 OUT_RXString(hf_afs_bos_parm
);
2446 OUT_RXString(hf_afs_bos_parm
);
2447 OUT_RXString(hf_afs_bos_parm
);
2448 OUT_RXString(hf_afs_bos_parm
);
2449 OUT_RXString(hf_afs_bos_parm
);
2451 case 81: /* delete b node */
2452 OUT_RXString(hf_afs_bos_instance
);
2454 case 82: /* set status */
2455 OUT_RXString(hf_afs_bos_instance
);
2456 OUT_INT(hf_afs_bos_status
);
2458 case 83: /* get status */
2459 OUT_RXString(hf_afs_bos_instance
);
2461 case 84: /* enumerate instance */
2462 OUT_UINT(hf_afs_bos_num
);
2464 case 85: /* get instance info */
2465 OUT_RXString(hf_afs_bos_instance
);
2467 case 86: /* get instance parm */
2468 OUT_RXString(hf_afs_bos_instance
);
2469 OUT_UINT(hf_afs_bos_num
);
2471 case 87: /* add super user */
2472 OUT_RXString(hf_afs_bos_user
);
2474 case 88: /* delete super user */
2475 OUT_RXString(hf_afs_bos_user
);
2477 case 89: /* list super users */
2478 OUT_UINT(hf_afs_bos_num
);
2480 case 90: /* list keys */
2481 OUT_UINT(hf_afs_bos_num
);
2483 case 91: /* add key */
2484 OUT_UINT(hf_afs_bos_num
);
2487 case 92: /* delete key */
2488 OUT_UINT(hf_afs_bos_num
);
2490 case 93: /* set cell name */
2491 OUT_RXString(hf_afs_bos_content
);
2493 case 95: /* set cell host */
2494 OUT_UINT(hf_afs_bos_num
);
2496 case 96: /* add cell host */
2497 OUT_RXString(hf_afs_bos_content
);
2499 case 97: /* delete cell host */
2500 OUT_RXString(hf_afs_bos_content
);
2502 case 98: /* set t status */
2503 OUT_RXString(hf_afs_bos_content
);
2504 OUT_INT(hf_afs_bos_status
);
2506 case 99: /* shutdown all */
2509 case 100: /* restart all */
2512 case 101: /* startup all */
2515 case 102: /* set no-auth flag */
2516 OUT_UINT(hf_afs_bos_flags
);
2518 case 103: /* re-bozo? */
2521 case 104: /* restart */
2522 OUT_RXString(hf_afs_bos_instance
);
2524 case 105: /* install */
2525 OUT_RXString(hf_afs_bos_path
);
2526 OUT_UINT(hf_afs_bos_size
);
2527 OUT_UINT(hf_afs_bos_flags
);
2528 OUT_UINT(hf_afs_bos_date
);
2530 case 106: /* uninstall */
2531 OUT_RXString(hf_afs_bos_path
);
2533 case 107: /* get dates */
2534 OUT_RXString(hf_afs_bos_path
);
2536 case 108: /* exec */
2537 OUT_RXString(hf_afs_bos_cmd
);
2539 case 109: /* prune */
2540 OUT_UINT(hf_afs_bos_flags
);
2542 case 110: /* set restart time */
2543 OUT_UINT(hf_afs_bos_num
);
2546 case 111: /* get restart time */
2547 OUT_UINT(hf_afs_bos_num
);
2549 case 112: /* get log */
2550 OUT_RXString(hf_afs_bos_file
);
2552 case 113: /* wait all */
2555 case 114: /* get instance strings */
2556 OUT_RXString(hf_afs_bos_content
);
2565 dissect_vol_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2567 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2572 /* should loop here maybe */
2573 OUT_UINT(hf_afs_vol_count
);
2574 OUT_RXStringV(hf_afs_vol_name
, 32); /* not sure on */
2578 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2580 OUT_UINT(hf_afs_vol_errcode
);
2585 dissect_vol_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
2587 offset
+= 4; /* skip the opcode */
2591 case 121: /* list one vol */
2592 OUT_UINT(hf_afs_vol_count
);
2593 OUT_UINT(hf_afs_vol_id
);
2602 dissect_kauth_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2604 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2610 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2612 OUT_UINT(hf_afs_kauth_errcode
);
2617 dissect_kauth_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
2619 offset
+= 4; /* skip the opcode */
2623 case 1: /* authenticate old */
2624 case 21: /* authenticate */
2625 case 22: /* authenticate v2 */
2626 case 2: /* change pw */
2627 case 5: /* set fields */
2628 case 6: /* create user */
2629 case 7: /* delete user */
2630 case 8: /* get entry */
2631 case 14: /* unlock */
2632 case 15: /* lock status */
2633 OUT_RXString(hf_afs_kauth_princ
);
2634 OUT_RXString(hf_afs_kauth_realm
);
2635 OUT_BYTES_ALL(hf_afs_kauth_data
);
2637 case 3: /* getticket-old */
2638 case 23: /* getticket */
2639 OUT_KAUTH_GetTicket();
2641 case 4: /* set pass */
2642 OUT_RXString(hf_afs_kauth_princ
);
2643 OUT_RXString(hf_afs_kauth_realm
);
2644 OUT_UINT(hf_afs_kauth_kvno
);
2646 case 12: /* get pass */
2647 OUT_RXString(hf_afs_kauth_name
);
2656 dissect_cb_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2658 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2661 case 65538: /* get-capabilites */
2662 OUT_CM_INTERFACES();
2663 OUT_CM_CAPABILITIES();
2667 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2669 OUT_UINT(hf_afs_cb_errcode
);
2674 dissect_cb_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
2676 offset
+= 4; /* skip the opcode */
2680 case 204: /* callback */
2684 j
= tvb_get_ntohl(tvb
, offset
);
2689 OUT_CB_AFSFid("Target");
2692 j
= tvb_get_ntohl(tvb
, offset
);
2696 OUT_CB_AFSCallBack();
2706 dissect_prot_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2708 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2712 case 504: /* name to id */
2716 j
= tvb_get_ntohl(tvb
, offset
);
2717 OUT_UINT(hf_afs_prot_count
);
2721 OUT_UINT(hf_afs_prot_id
);
2725 case 505: /* id to name */
2729 j
= tvb_get_ntohl(tvb
, offset
);
2730 OUT_UINT(hf_afs_prot_count
);
2734 OUT_RXStringV(hf_afs_prot_name
, PRNAMEMAX
);
2738 case 508: /* get cps */
2739 case 514: /* list elements */
2740 case 517: /* list owned */
2741 case 518: /* get cps2 */
2742 case 519: /* get host cps */
2746 j
= tvb_get_ntohl(tvb
, offset
);
2747 OUT_UINT(hf_afs_prot_count
);
2751 OUT_UINT(hf_afs_prot_id
);
2755 case 510: /* list max */
2756 OUT_UINT(hf_afs_prot_maxuid
);
2757 OUT_UINT(hf_afs_prot_maxgid
);
2761 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
2763 OUT_UINT(hf_afs_prot_errcode
);
2768 dissect_prot_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
2770 offset
+= 4; /* skip the opcode */
2774 case 500: /* new user */
2775 OUT_RXString(hf_afs_prot_name
);
2776 OUT_UINT(hf_afs_prot_id
);
2777 OUT_UINT(hf_afs_prot_oldid
);
2779 case 501: /* where is it */
2780 case 506: /* delete */
2781 case 508: /* get cps */
2782 case 512: /* list entry */
2783 case 514: /* list elements */
2784 case 517: /* list owned */
2785 case 519: /* get host cps */
2786 OUT_UINT(hf_afs_prot_id
);
2788 case 502: /* dump entry */
2789 OUT_UINT(hf_afs_prot_pos
);
2791 case 503: /* add to group */
2792 case 507: /* remove from group */
2793 case 515: /* is a member of? */
2794 OUT_UINT(hf_afs_prot_uid
);
2795 OUT_UINT(hf_afs_prot_gid
);
2797 case 504: /* name to id */
2801 j
= tvb_get_ntohl(tvb
, offset
);
2802 OUT_UINT(hf_afs_prot_count
);
2806 OUT_RXStringV(hf_afs_prot_name
,PRNAMEMAX
);
2810 case 505: /* id to name */
2814 j
= tvb_get_ntohl(tvb
, offset
);
2815 OUT_UINT(hf_afs_prot_count
);
2819 OUT_UINT(hf_afs_prot_id
);
2823 case 509: /* new entry */
2824 OUT_RXString(hf_afs_prot_name
);
2825 OUT_UINT(hf_afs_prot_flag
);
2826 OUT_UINT(hf_afs_prot_oldid
);
2828 case 511: /* set max */
2829 OUT_UINT(hf_afs_prot_id
);
2830 OUT_UINT(hf_afs_prot_flag
);
2832 case 513: /* change entry */
2833 OUT_UINT(hf_afs_prot_id
);
2834 OUT_RXString(hf_afs_prot_name
);
2835 OUT_UINT(hf_afs_prot_oldid
);
2836 OUT_UINT(hf_afs_prot_newid
);
2838 case 520: /* update entry */
2839 OUT_UINT(hf_afs_prot_id
);
2840 OUT_RXString(hf_afs_prot_name
);
2849 dissect_vldb_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
2851 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
2855 case 510: /* list entry */
2856 OUT_UINT(hf_afs_vldb_count
);
2857 OUT_UINT(hf_afs_vldb_nextindex
);
2859 case 503: /* get entry by id */
2860 case 504: /* get entry by name */
2863 OUT_RXStringV(hf_afs_vldb_name
, VLNAMEMAX
);
2865 nservers
= tvb_get_ntohl(tvb
, offset
);
2866 OUT_UINT(hf_afs_vldb_numservers
);
2871 OUT_IP(hf_afs_vldb_server
);
2881 j
= tvb_get_ntohl(tvb
, offset
);
2882 part
=wmem_strdup(wmem_packet_scope(), "/vicepa");
2883 if ( i
<nservers
&& j
<=25 )
2885 part
[6] = 'a' + (char) j
;
2886 proto_tree_add_string(tree
, hf_afs_vldb_partition
, tvb
,
2892 OUT_UINT(hf_afs_vldb_rwvol
);
2893 OUT_UINT(hf_afs_vldb_rovol
);
2894 OUT_UINT(hf_afs_vldb_bkvol
);
2895 OUT_UINT(hf_afs_vldb_clonevol
);
2899 case 505: /* get new volume id */
2900 OUT_UINT(hf_afs_vldb_id
);
2902 case 521: /* list entry */
2903 case 529: /* list entry U */
2904 OUT_UINT(hf_afs_vldb_count
);
2905 OUT_UINT(hf_afs_vldb_nextindex
);
2907 case 518: /* get entry by id n */
2908 case 519: /* get entry by name N */
2911 OUT_RXStringV(hf_afs_vldb_name
, VLNAMEMAX
);
2912 nservers
= tvb_get_ntohl(tvb
, offset
);
2913 OUT_UINT(hf_afs_vldb_numservers
);
2914 for (i
=0; i
<13; i
++)
2918 OUT_IP(hf_afs_vldb_server
);
2925 for (i
=0; i
<13; i
++)
2928 j
= tvb_get_ntohl(tvb
, offset
);
2929 part
=wmem_strdup(wmem_packet_scope(), "/vicepa");
2930 if ( i
<nservers
&& j
<=25 )
2932 part
[6] = 'a' + (char) j
;
2933 proto_tree_add_string(tree
, hf_afs_vldb_partition
, tvb
,
2939 OUT_UINT(hf_afs_vldb_rwvol
);
2940 OUT_UINT(hf_afs_vldb_rovol
);
2941 OUT_UINT(hf_afs_vldb_bkvol
);
2944 case 526: /* get entry by id u */
2945 case 527: /* get entry by name u */
2948 OUT_RXStringV(hf_afs_vldb_name
, VLNAMEMAX
);
2949 nservers
= tvb_get_ntohl(tvb
, offset
);
2950 OUT_UINT(hf_afs_vldb_numservers
);
2951 for (i
=0; i
<13; i
++)
2955 OUT_UUID(hf_afs_vldb_serveruuid
);
2962 for (i
=0; i
<13; i
++)
2966 OUT_UINT(hf_afs_vldb_serveruniq
);
2973 for (i
=0; i
<13; i
++)
2976 j
= tvb_get_ntohl(tvb
, offset
);
2977 part
=wmem_strdup(wmem_packet_scope(), "/vicepa");
2978 if ( i
<nservers
&& j
<=25 )
2980 part
[6] = 'a' + (char) j
;
2981 proto_tree_add_string(tree
, hf_afs_vldb_partition
, tvb
,
2986 for (i
=0; i
<13; i
++)
2990 OUT_UINT(hf_afs_vldb_serverflags
);
2997 OUT_UINT(hf_afs_vldb_rwvol
);
2998 OUT_UINT(hf_afs_vldb_rovol
);
2999 OUT_UINT(hf_afs_vldb_bkvol
);
3000 OUT_UINT(hf_afs_vldb_clonevol
);
3001 OUT_UINT(hf_afs_vldb_flags
);
3002 OUT_UINT(hf_afs_vldb_spare1
);
3003 OUT_UINT(hf_afs_vldb_spare2
);
3004 OUT_UINT(hf_afs_vldb_spare3
);
3005 OUT_UINT(hf_afs_vldb_spare4
);
3006 OUT_UINT(hf_afs_vldb_spare5
);
3007 OUT_UINT(hf_afs_vldb_spare6
);
3008 OUT_UINT(hf_afs_vldb_spare7
);
3009 OUT_UINT(hf_afs_vldb_spare8
);
3010 OUT_UINT(hf_afs_vldb_spare9
);
3015 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
3017 OUT_UINT(hf_afs_vldb_errcode
);
3022 dissect_vldb_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
3024 offset
+= 4; /* skip the opcode */
3028 case 501: /* create new volume */
3029 case 517: /* create entry N */
3030 OUT_RXStringV(hf_afs_vldb_name
, VLNAMEMAX
);
3032 case 502: /* delete entry */
3033 case 503: /* get entry by id */
3034 case 507: /* update entry */
3035 case 508: /* set lock */
3036 case 509: /* release lock */
3037 case 518: /* get entry by id */
3038 OUT_UINT(hf_afs_vldb_id
);
3039 OUT_UINT(hf_afs_vldb_type
);
3041 case 504: /* get entry by name */
3042 case 519: /* get entry by name N */
3043 case 524: /* update entry by name */
3044 case 527: /* get entry by name U */
3045 OUT_RXString(hf_afs_vldb_name
);
3047 case 505: /* get new vol id */
3048 OUT_UINT(hf_afs_vldb_bump
);
3050 case 506: /* replace entry */
3051 case 520: /* replace entry N */
3052 OUT_UINT(hf_afs_vldb_id
);
3053 OUT_UINT(hf_afs_vldb_type
);
3054 OUT_RXStringV(hf_afs_vldb_name
, VLNAMEMAX
);
3056 case 510: /* list entry */
3057 case 521: /* list entry N */
3058 OUT_UINT(hf_afs_vldb_index
);
3060 case 532: /* regaddr */
3061 OUT_UUID(hf_afs_vldb_serveruuid
);
3062 OUT_UINT(hf_afs_vldb_spare1
);
3063 OUT_VLDB_BulkAddr();
3072 dissect_ubik_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
3076 case 10000: /* vote-beacon */
3078 case 10001: /* vote-debug-old */
3079 OUT_UBIK_DebugOld();
3081 case 10002: /* vote-sdebug-old */
3082 OUT_UBIK_SDebugOld();
3084 case 10003: /* vote-get syncsite */
3086 case 10004: /* vote-debug */
3087 OUT_UBIK_DebugOld();
3088 OUT_UBIK_InterfaceAddrs();
3090 case 10005: /* vote-sdebug */
3091 OUT_UBIK_SDebugOld();
3092 OUT_UBIK_InterfaceAddrs();
3094 case 10006: /* vote-xdebug */
3095 OUT_UBIK_DebugOld();
3096 OUT_UBIK_InterfaceAddrs();
3097 OUT_UINT(hf_afs_ubik_isclone
);
3099 case 10007: /* vote-xsdebug */
3100 OUT_UBIK_SDebugOld();
3101 OUT_UBIK_InterfaceAddrs();
3102 OUT_UINT(hf_afs_ubik_isclone
);
3104 case 20000: /* disk-begin */
3106 case 20004: /* get version */
3107 OUT_UBIKVERSION("DB Version");
3109 case 20010: /* disk-probe */
3111 case 20012: /* disk-interfaceaddr */
3112 OUT_UBIK_InterfaceAddrs();
3118 dissect_ubik_request(tvbuff_t
*tvb
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree
, int offset
, int opcode
)
3120 offset
+= 4; /* skip the opcode */
3124 case 10000: /* vote-beacon */
3125 OUT_UINT(hf_afs_ubik_state
);
3126 OUT_TIMESECS(hf_afs_ubik_votestart
);
3127 OUT_UBIKVERSION("DB Version");
3128 OUT_UBIKVERSION("TID");
3130 case 10001: /* vote-debug-old */
3132 case 10002: /* vote-sdebug-old */
3133 OUT_UINT(hf_afs_ubik_site
);
3135 case 10003: /* vote-get sync site */
3136 OUT_IP(hf_afs_ubik_site
);
3138 case 10004: /* vote-debug */
3139 case 10005: /* vote-sdebug */
3140 OUT_IP(hf_afs_ubik_site
);
3142 case 20000: /* disk-begin */
3143 OUT_UBIKVERSION("TID");
3145 case 20001: /* disk-commit */
3146 OUT_UBIKVERSION("TID");
3148 case 20002: /* disk-lock */
3149 OUT_UBIKVERSION("TID");
3150 OUT_UINT(hf_afs_ubik_file
);
3151 OUT_UINT(hf_afs_ubik_pos
);
3152 OUT_UINT(hf_afs_ubik_length
);
3153 OUT_UINT(hf_afs_ubik_locktype
);
3155 case 20003: /* disk-write */
3156 OUT_UBIKVERSION("TID");
3157 OUT_UINT(hf_afs_ubik_file
);
3158 OUT_UINT(hf_afs_ubik_pos
);
3160 case 20004: /* disk-get version */
3162 case 20005: /* disk-get file */
3163 OUT_UINT(hf_afs_ubik_file
);
3165 case 20006: /* disk-send file */
3166 OUT_UINT(hf_afs_ubik_file
);
3167 OUT_UINT(hf_afs_ubik_length
);
3168 OUT_UBIKVERSION("DB Version");
3170 case 20007: /* disk-abort */
3171 case 20008: /* disk-release locks */
3172 case 20010: /* disk-probe */
3174 case 20009: /* disk-truncate */
3175 OUT_UBIKVERSION("TID");
3176 OUT_UINT(hf_afs_ubik_file
);
3177 OUT_UINT(hf_afs_ubik_length
);
3179 case 20011: /* disk-writev */
3180 OUT_UBIKVERSION("TID");
3182 case 20012: /* disk-interfaceaddr */
3183 OUT_UBIK_InterfaceAddrs();
3185 case 20013: /* disk-set version */
3186 OUT_UBIKVERSION("TID");
3187 OUT_UBIKVERSION("Old DB Version");
3188 OUT_UBIKVERSION("New DB Version");
3197 dissect_backup_reply(tvbuff_t
*tvb
, struct rxinfo
*rxinfo
, proto_tree
*tree
, int offset
, int opcode
)
3199 if ( rxinfo
->type
== RX_PACKET_TYPE_DATA
)
3205 else if ( rxinfo
->type
== RX_PACKET_TYPE_ABORT
)
3207 OUT_UINT(hf_afs_backup_errcode
);
3212 dissect_backup_request(tvbuff_t
*tvb _U_
, struct rxinfo
*rxinfo _U_
, proto_tree
*tree _U_
, int offset _U_
, int opcode
)
3214 /* offset += 4; */ /* skip the opcode */
3222 * Registration code for registering the protocol and fields
3226 proto_register_afs(void)
3228 static hf_register_info hf
[] = {
3229 { &hf_afs_fs
, { "File Server", "afs.fs",
3230 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3231 { &hf_afs_cb
, { "Callback", "afs.cb",
3232 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3233 { &hf_afs_prot
, { "Protection", "afs.prot",
3234 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Protection Server", HFILL
}},
3235 { &hf_afs_vldb
, { "VLDB", "afs.vldb",
3236 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Volume Location Database Server", HFILL
}},
3237 { &hf_afs_kauth
, { "KAuth", "afs.kauth",
3238 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Kerberos Auth Server", HFILL
}},
3239 { &hf_afs_vol
, { "Volume Server", "afs.vol",
3240 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3241 { &hf_afs_error
, { "Error", "afs.error",
3242 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3243 { &hf_afs_bos
, { "BOS", "afs.bos",
3244 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Basic Oversee Server", HFILL
}},
3245 { &hf_afs_update
, { "Update", "afs.update",
3246 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Update Server", HFILL
}},
3247 { &hf_afs_rmtsys
, { "Rmtsys", "afs.rmtsys",
3248 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3249 { &hf_afs_ubik
, { "Ubik", "afs.ubik",
3250 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, NULL
, HFILL
}},
3251 { &hf_afs_backup
, { "Backup", "afs.backup",
3252 FT_BOOLEAN
, BASE_NONE
, 0, 0x0, "Backup Server", HFILL
}},
3254 { &hf_afs_fs_opcode
, { "Operation", "afs.fs.opcode",
3255 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3256 &fs_req_ext
, 0, NULL
, HFILL
}},
3257 { &hf_afs_cb_opcode
, { "Operation", "afs.cb.opcode",
3258 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3259 &cb_req_ext
, 0, NULL
, HFILL
}},
3260 { &hf_afs_prot_opcode
, { "Operation", "afs.prot.opcode",
3261 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3262 &prot_req_ext
, 0, NULL
, HFILL
}},
3263 { &hf_afs_vldb_opcode
, { "Operation", "afs.vldb.opcode",
3264 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3265 &vldb_req_ext
, 0, NULL
, HFILL
}},
3266 { &hf_afs_kauth_opcode
, { "Operation", "afs.kauth.opcode",
3267 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3268 &kauth_req_ext
, 0, NULL
, HFILL
}},
3269 { &hf_afs_vol_opcode
, { "Operation", "afs.vol.opcode",
3270 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3271 &vol_req_ext
, 0, NULL
, HFILL
}},
3272 { &hf_afs_bos_opcode
, { "Operation", "afs.bos.opcode",
3273 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3274 &bos_req_ext
, 0, NULL
, HFILL
}},
3275 { &hf_afs_update_opcode
, { "Operation", "afs.update.opcode",
3276 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3277 &update_req_ext
, 0, NULL
, HFILL
}},
3278 { &hf_afs_rmtsys_opcode
, { "Operation", "afs.rmtsys.opcode",
3279 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3280 &rmtsys_req_ext
, 0, NULL
, HFILL
}},
3282 { &hf_afs_error_opcode
, { "Operation", "afs.error.opcode",
3283 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3284 { &hf_afs_backup_opcode
, { "Operation", "afs.backup.opcode",
3285 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3286 &backup_req_ext
, 0, NULL
, HFILL
}},
3287 { &hf_afs_ubik_opcode
, { "Operation", "afs.ubik.opcode",
3288 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
3289 &ubik_req_ext
, 0, NULL
, HFILL
}},
3292 /* File Server Fields */
3293 { &hf_afs_fs_fid_volume
, { "FileID (Volume)", "afs.fs.fid.volume",
3294 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Volume)", HFILL
}},
3295 { &hf_afs_fs_fid_vnode
, { "FileID (VNode)", "afs.fs.fid.vnode",
3296 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (VNode)", HFILL
}},
3297 { &hf_afs_fs_fid_uniqifier
, { "FileID (Uniqifier)", "afs.fs.fid.uniq",
3298 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Uniqifier)", HFILL
}},
3299 { &hf_afs_fs_offset
, { "Offset", "afs.fs.offset",
3300 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3301 { &hf_afs_fs_length
, { "Length", "afs.fs.length",
3302 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3303 { &hf_afs_fs_flength
, { "FLength", "afs.fs.flength",
3304 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3305 { &hf_afs_fs_offset64
, { "Offset64", "afs.fs.offset64",
3306 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3307 { &hf_afs_fs_length64
, { "Length64", "afs.fs.length64",
3308 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3309 { &hf_afs_fs_flength64
, { "FLength64", "afs.fs.flength64",
3310 FT_UINT64
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3311 { &hf_afs_fs_errcode
, { "Error Code", "afs.fs.errcode",
3312 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3313 { &hf_afs_fs_data
, { "Data", "afs.fs.data",
3314 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3315 { &hf_afs_fs_token
, { "Token", "afs.fs.token",
3316 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3317 { &hf_afs_fs_oldname
, { "Old Name", "afs.fs.oldname",
3318 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3319 { &hf_afs_fs_newname
, { "New Name", "afs.fs.newname",
3320 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3321 { &hf_afs_fs_name
, { "Name", "afs.fs.name",
3322 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3323 { &hf_afs_fs_symlink_name
, { "Symlink Name", "afs.fs.symlink.name",
3324 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3325 { &hf_afs_fs_symlink_content
, { "Symlink Content", "afs.fs.symlink.content",
3326 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3327 { &hf_afs_fs_volid
, { "Volume ID", "afs.fs.volid",
3328 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3329 { &hf_afs_fs_volname
, { "Volume Name", "afs.fs.volname",
3330 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3331 { &hf_afs_fs_timestamp
, { "Timestamp", "afs.fs.timestamp",
3332 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3333 { &hf_afs_fs_offlinemsg
, { "Offline Message", "afs.fs.offlinemsg",
3334 FT_STRING
, BASE_NONE
, 0, 0, "Volume Name", HFILL
}},
3335 { &hf_afs_fs_motd
, { "Message of the Day", "afs.fs.motd",
3336 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3337 { &hf_afs_fs_xstats_version
, { "XStats Version", "afs.fs.xstats.version",
3338 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3339 { &hf_afs_fs_xstats_clientversion
, { "Client Version", "afs.fs.xstats.clientversion",
3340 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3341 { &hf_afs_fs_xstats_collnumber
, { "Collection Number", "afs.fs.xstats.collnumber",
3342 FT_UINT32
, BASE_DEC
, VALS(xstat_collections
), 0, NULL
, HFILL
}},
3343 { &hf_afs_fs_xstats_timestamp
, { "XStats Timestamp", "afs.fs.xstats.timestamp",
3344 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3345 { &hf_afs_fs_cps_spare1
, { "CPS Spare1", "afs.fs.cps.spare1",
3346 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3347 { &hf_afs_fs_cps_spare2
, { "CPS Spare2", "afs.fs.cps.spare2",
3348 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3349 { &hf_afs_fs_cps_spare3
, { "CPS Spare3", "afs.fs.cps.spare3",
3350 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3351 { &hf_afs_fs_vicelocktype
, { "Vice Lock Type", "afs.fs.vicelocktype",
3352 FT_UINT32
, BASE_DEC
, VALS(vice_lock_types
), 0, NULL
, HFILL
}},
3353 /* XXX - is this an IP address? */
3354 { &hf_afs_fs_viceid
, { "Vice ID", "afs.fs.viceid",
3355 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3356 { &hf_afs_fs_ipaddr
, { "IP Addr", "afs.fs.ipaddr",
3357 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3359 { &hf_afs_fs_status_mask
, { "Mask", "afs.fs.status.mask",
3360 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3361 { &hf_afs_fs_status_mask_setmodtime
, { "Set Modification Time", "afs.fs.status.mask.setmodtime",
3362 FT_BOOLEAN
, 32, 0, 0x00000001, NULL
, HFILL
}},
3363 { &hf_afs_fs_status_mask_setowner
, { "Set Owner", "afs.fs.status.mask.setowner",
3364 FT_BOOLEAN
, 32, 0, 0x00000002, NULL
, HFILL
}},
3365 { &hf_afs_fs_status_mask_setgroup
, { "Set Group", "afs.fs.status.mask.setgroup",
3366 FT_BOOLEAN
, 32, 0, 0x00000004, NULL
, HFILL
}},
3367 { &hf_afs_fs_status_mask_setmode
, { "Set Mode", "afs.fs.status.mask.setmode",
3368 FT_BOOLEAN
, 32, 0, 0x00000008, NULL
, HFILL
}},
3369 { &hf_afs_fs_status_mask_setsegsize
, { "Set Segment Size", "afs.fs.status.mask.setsegsize",
3370 FT_BOOLEAN
, 32, 0, 0x00000010, NULL
, HFILL
}},
3371 { &hf_afs_fs_status_mask_fsync
, { "FSync", "afs.fs.status.mask.fsync",
3372 FT_BOOLEAN
, 32, 0, 0x00000400, NULL
, HFILL
}},
3374 { &hf_afs_fs_status_clientmodtime
, { "Client Modification Time", "afs.fs.status.clientmodtime",
3375 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3376 { &hf_afs_fs_status_servermodtime
, { "Server Modification Time", "afs.fs.status.servermodtime",
3377 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3378 { &hf_afs_fs_status_owner
, { "Owner", "afs.fs.status.owner",
3379 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3380 { &hf_afs_fs_status_group
, { "Group", "afs.fs.status.group",
3381 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3382 { &hf_afs_fs_status_mode
, { "Unix Mode", "afs.fs.status.mode",
3383 FT_UINT32
, BASE_OCT
, 0, 0, NULL
, HFILL
}},
3384 { &hf_afs_fs_status_segsize
, { "Segment Size", "afs.fs.status.segsize",
3385 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3386 { &hf_afs_fs_status_interfaceversion
, { "Interface Version", "afs.fs.status.interfaceversion",
3387 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3388 { &hf_afs_fs_status_filetype
, { "File Type", "afs.fs.status.filetype",
3389 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3390 { &hf_afs_fs_status_author
, { "Author", "afs.fs.status.author",
3391 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3392 { &hf_afs_fs_status_calleraccess
, { "Caller Access", "afs.fs.status.calleraccess",
3393 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3394 { &hf_afs_fs_status_anonymousaccess
, { "Anonymous Access", "afs.fs.status.anonymousaccess",
3395 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3396 { &hf_afs_fs_status_parentvnode
, { "Parent VNode", "afs.fs.status.parentvnode",
3397 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3398 { &hf_afs_fs_status_parentunique
, { "Parent Unique", "afs.fs.status.parentunique",
3399 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3400 { &hf_afs_fs_status_dataversion
, { "Data Version", "afs.fs.status.dataversion",
3401 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3402 { &hf_afs_fs_status_dataversionhigh
, { "Data Version (High)", "afs.fs.status.dataversionhigh",
3403 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3404 { &hf_afs_fs_status_linkcount
, { "Link Count", "afs.fs.status.linkcount",
3405 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3406 { &hf_afs_fs_status_spare2
, { "Spare 2", "afs.fs.status.spare2",
3407 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3408 { &hf_afs_fs_status_spare3
, { "Spare 3", "afs.fs.status.spare3",
3409 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3410 { &hf_afs_fs_status_spare4
, { "Spare 4", "afs.fs.status.spare4",
3411 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3412 { &hf_afs_fs_status_synccounter
, { "Sync Counter", "afs.fs.status.synccounter",
3413 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3414 { &hf_afs_fs_status_length
, { "Length", "afs.fs.status.length",
3415 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3418 { &hf_afs_fs_volsync_spare1
, { "Volume Creation Timestamp", "afs.fs.volsync.spare1",
3419 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3420 { &hf_afs_fs_volsync_spare2
, { "Spare 2", "afs.fs.volsync.spare2",
3421 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3422 { &hf_afs_fs_volsync_spare3
, { "Spare 3", "afs.fs.volsync.spare3",
3423 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3424 { &hf_afs_fs_volsync_spare4
, { "Spare 4", "afs.fs.volsync.spare4",
3425 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3426 { &hf_afs_fs_volsync_spare5
, { "Spare 5", "afs.fs.volsync.spare5",
3427 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3428 { &hf_afs_fs_volsync_spare6
, { "Spare 6", "afs.fs.volsync.spare6",
3429 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3432 { &hf_afs_fs_acl_count_positive
, {
3433 "ACL Count (Positive)", "afs.fs.acl.count.positive",
3434 FT_UINT32
, BASE_DEC
, 0, 0, "Number of Positive ACLs", HFILL
}},
3435 { &hf_afs_fs_acl_count_negative
, {
3436 "ACL Count (Negative)", "afs.fs.acl.count.negative",
3437 FT_UINT32
, BASE_DEC
, 0, 0, "Number of Negative ACLs", HFILL
}},
3438 { &hf_afs_fs_acl_datasize
, {
3439 "ACL Size", "afs.fs.acl.datasize",
3440 FT_UINT32
, BASE_DEC
, 0, 0, "ACL Data Size", HFILL
}},
3441 { &hf_afs_fs_acl_entity
, {
3442 "Entity (User/Group)", "afs.fs.acl.entity",
3443 FT_STRING
, BASE_NONE
, 0, 0, "ACL Entity (User/Group)", HFILL
}},
3444 { &hf_afs_fs_acl_r
, {
3445 "_R_ead", "afs.fs.acl.r",
3446 FT_BOOLEAN
, 8, 0, PRSFS_READ
, "Read", HFILL
}},
3447 { &hf_afs_fs_acl_l
, {
3448 "_L_ookup", "afs.fs.acl.l",
3449 FT_BOOLEAN
, 8, 0, PRSFS_LOOKUP
, "Lookup", HFILL
}},
3450 { &hf_afs_fs_acl_i
, {
3451 "_I_nsert", "afs.fs.acl.i",
3452 FT_BOOLEAN
, 8, 0, PRSFS_INSERT
, "Insert", HFILL
}},
3453 { &hf_afs_fs_acl_d
, { "_D_elete", "afs.fs.acl.d",
3454 FT_BOOLEAN
, 8, 0, PRSFS_DELETE
, "Delete", HFILL
}},
3455 { &hf_afs_fs_acl_w
, { "_W_rite", "afs.fs.acl.w",
3456 FT_BOOLEAN
, 8, 0, PRSFS_WRITE
, "Write", HFILL
}},
3457 { &hf_afs_fs_acl_k
, { "_L_ock", "afs.fs.acl.k",
3458 FT_BOOLEAN
, 8, 0, PRSFS_LOCK
, "Lock", HFILL
}},
3459 { &hf_afs_fs_acl_a
, { "_A_dminister", "afs.fs.acl.a",
3460 FT_BOOLEAN
, 8, 0, PRSFS_ADMINISTER
, "Administer", HFILL
}},
3462 { &hf_afs_fs_callback_version
, { "Version", "afs.fs.callback.version",
3463 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3464 { &hf_afs_fs_callback_expires
, { "Expires", "afs.fs.callback.expires",
3465 FT_RELATIVE_TIME
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3466 { &hf_afs_fs_callback_type
, { "Type", "afs.fs.callback.type",
3467 FT_UINT32
, BASE_DEC
, VALS(cb_types
), 0, NULL
, HFILL
}},
3469 /* BOS Server Fields */
3470 { &hf_afs_bos_errcode
, { "Error Code", "afs.bos.errcode",
3471 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3472 { &hf_afs_bos_type
, { "Type", "afs.bos.type",
3473 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3474 { &hf_afs_bos_content
, { "Content", "afs.bos.content",
3475 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3476 { &hf_afs_bos_data
, { "Data", "afs.bos.data",
3477 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3478 { &hf_afs_bos_path
, { "Path", "afs.bos.path",
3479 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3480 { &hf_afs_bos_parm
, { "Parm", "afs.bos.parm",
3481 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3482 { &hf_afs_bos_error
, { "Error", "afs.bos.error",
3483 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3484 { &hf_afs_bos_spare1
, { "Spare1", "afs.bos.spare1",
3485 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3486 { &hf_afs_bos_spare2
, { "Spare2", "afs.bos.spare2",
3487 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3488 { &hf_afs_bos_spare3
, { "Spare3", "afs.bos.spare3",
3489 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3490 { &hf_afs_bos_file
, { "File", "afs.bos.file",
3491 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3492 { &hf_afs_bos_cmd
, { "Command", "afs.bos.cmd",
3493 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3494 { &hf_afs_bos_key
, { "Key", "afs.bos.key",
3495 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3496 { &hf_afs_bos_user
, { "User", "afs.bos.user",
3497 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3498 { &hf_afs_bos_instance
, { "Instance", "afs.bos.instance",
3499 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3500 { &hf_afs_bos_status
, { "Status", "afs.bos.status",
3501 FT_INT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3502 { &hf_afs_bos_statusdesc
, { "Status Description", "afs.bos.statusdesc",
3503 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3504 { &hf_afs_bos_num
, { "Number", "afs.bos.number",
3505 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3506 { &hf_afs_bos_size
, { "Size", "afs.bos.size",
3507 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3508 { &hf_afs_bos_flags
, { "Flags", "afs.bos.flags",
3509 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3510 { &hf_afs_bos_date
, { "Date", "afs.bos.date",
3511 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3512 { &hf_afs_bos_kvno
, { "Key Version Number", "afs.bos.kvno",
3513 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3514 { &hf_afs_bos_cell
, { "Cell", "afs.bos.cell",
3515 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3516 { &hf_afs_bos_host
, { "Host", "afs.bos.host",
3517 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3518 { &hf_afs_bos_newtime
, { "New Time", "afs.bos.newtime",
3519 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3520 { &hf_afs_bos_baktime
, { "Backup Time", "afs.bos.baktime",
3521 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3522 { &hf_afs_bos_oldtime
, { "Old Time", "afs.bos.oldtime",
3523 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3524 { &hf_afs_bos_keymodtime
, { "Key Modification Time", "afs.bos.keymodtime",
3525 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3526 { &hf_afs_bos_keychecksum
, { "Key Checksum", "afs.bos.keychecksum",
3527 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3528 { &hf_afs_bos_keyspare2
, { "Key Spare 2", "afs.bos.keyspare2",
3529 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3532 /* KAUTH Server Fields */
3533 { &hf_afs_kauth_errcode
, { "Error Code", "afs.kauth.errcode",
3534 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3535 { &hf_afs_kauth_princ
, { "Principal", "afs.kauth.princ",
3536 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3537 { &hf_afs_kauth_realm
, { "Realm", "afs.kauth.realm",
3538 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3539 { &hf_afs_kauth_domain
, { "Domain", "afs.kauth.domain",
3540 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3541 { &hf_afs_kauth_name
, { "Name", "afs.kauth.name",
3542 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3543 { &hf_afs_kauth_data
, { "Data", "afs.kauth.data",
3544 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3545 { &hf_afs_kauth_kvno
, { "Key Version Number", "afs.kauth.kvno",
3546 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3548 /* VOL Server Fields */
3549 { &hf_afs_vol_errcode
, { "Error Code", "afs.vol.errcode",
3550 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3551 { &hf_afs_vol_id
, { "Volume ID", "afs.vol.id",
3552 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3553 { &hf_afs_vol_count
, { "Volume Count", "afs.vol.count",
3554 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3555 { &hf_afs_vol_name
, { "Volume Name", "afs.vol.name",
3556 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3558 /* VLDB Server Fields */
3559 { &hf_afs_vldb_errcode
, { "Error Code", "afs.vldb.errcode",
3560 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3561 { &hf_afs_vldb_type
, { "Volume Type", "afs.vldb.type",
3562 FT_UINT32
, BASE_HEX
, VALS(volume_types
), 0, NULL
, HFILL
}},
3563 { &hf_afs_vldb_id
, { "Volume ID", "afs.vldb.id",
3564 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3565 { &hf_afs_vldb_bump
, { "Bumped Volume ID", "afs.vldb.bump",
3566 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3567 { &hf_afs_vldb_index
, { "Volume Index", "afs.vldb.index",
3568 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3569 { &hf_afs_vldb_count
, { "Volume Count", "afs.vldb.count",
3570 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3571 { &hf_afs_vldb_numservers
, { "Number of Servers", "afs.vldb.numservers",
3572 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3573 { &hf_afs_vldb_nextindex
, { "Next Volume Index", "afs.vldb.nextindex",
3574 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3575 { &hf_afs_vldb_rovol
, { "Read-Only Volume ID", "afs.vldb.rovol",
3576 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3577 { &hf_afs_vldb_rwvol
, { "Read-Write Volume ID", "afs.vldb.rwvol",
3578 FT_UINT32
, BASE_DEC
, 0, 0, "Read-Only Volume ID", HFILL
}},
3579 { &hf_afs_vldb_bkvol
, { "Backup Volume ID", "afs.vldb.bkvol",
3580 FT_UINT32
, BASE_DEC
, 0, 0, "Read-Only Volume ID", HFILL
}},
3581 { &hf_afs_vldb_clonevol
, { "Clone Volume ID", "afs.vldb.clonevol",
3582 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3583 { &hf_afs_vldb_name
, { "Volume Name", "afs.vldb.name",
3584 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3585 { &hf_afs_vldb_partition
, { "Partition", "afs.vldb.partition",
3586 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3587 { &hf_afs_vldb_server
, { "Server", "afs.vldb.server",
3588 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3589 { &hf_afs_vldb_serveruuid
, { "Server UUID", "afs.vldb.serveruuid",
3590 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3591 { &hf_afs_vldb_serveruniq
, { "Server Unique Address", "afs.vldb.serveruniq",
3592 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3593 { &hf_afs_vldb_serverflags
, { "Server Flags", "afs.vldb.serverflags",
3594 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3595 { &hf_afs_vldb_serverip
, { "Server IP", "afs.vldb.serverip",
3596 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3597 { &hf_afs_vldb_flags
, { "Flags", "afs.vldb.flags",
3598 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3600 { &hf_afs_vldb_flags_rwexists
, { "Read/Write Exists", "afs.vldb.flags.rwexists",
3601 FT_BOOLEAN
, 32, 0, 0x1000, NULL
, HFILL
}},
3602 { &hf_afs_vldb_flags_roexists
, { "Read-Only Exists", "afs.vldb.flags.roexists",
3603 FT_BOOLEAN
, 32, 0, 0x2000, NULL
, HFILL
}},
3604 { &hf_afs_vldb_flags_bkexists
, { "Backup Exists", "afs.vldb.flags.bkexists",
3605 FT_BOOLEAN
, 32, 0, 0x4000, NULL
, HFILL
}},
3606 { &hf_afs_vldb_flags_dfsfileset
, { "DFS Fileset", "afs.vldb.flags.dfsfileset",
3607 FT_BOOLEAN
, 32, 0, 0x8000, NULL
, HFILL
}},
3609 { &hf_afs_vldb_spare1
, { "Spare 1", "afs.vldb.spare1",
3610 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3611 { &hf_afs_vldb_spare2
, { "Spare 2", "afs.vldb.spare2",
3612 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3613 { &hf_afs_vldb_spare3
, { "Spare 3", "afs.vldb.spare3",
3614 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3615 { &hf_afs_vldb_spare4
, { "Spare 4", "afs.vldb.spare4",
3616 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3617 { &hf_afs_vldb_spare5
, { "Spare 5", "afs.vldb.spare5",
3618 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3619 { &hf_afs_vldb_spare6
, { "Spare 6", "afs.vldb.spare6",
3620 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3621 { &hf_afs_vldb_spare7
, { "Spare 7", "afs.vldb.spare7",
3622 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3623 { &hf_afs_vldb_spare8
, { "Spare 8", "afs.vldb.spare8",
3624 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3625 { &hf_afs_vldb_spare9
, { "Spare 9", "afs.vldb.spare9",
3626 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3628 /* BACKUP Server Fields */
3629 { &hf_afs_backup_errcode
, { "Error Code", "afs.backup.errcode",
3630 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3632 /* CB Server Fields */
3633 { &hf_afs_cb_errcode
, { "Error Code", "afs.cb.errcode",
3634 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3635 { &hf_afs_cb_callback_version
, { "Version", "afs.cb.callback.version",
3636 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3637 { &hf_afs_cb_callback_expires
, { "Expires", "afs.cb.callback.expires",
3638 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3639 { &hf_afs_cb_callback_type
, { "Type", "afs.cb.callback.type",
3640 FT_UINT32
, BASE_DEC
, VALS(cb_types
), 0, NULL
, HFILL
}},
3641 { &hf_afs_cb_fid_volume
, { "FileID (Volume)", "afs.cb.fid.volume",
3642 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Volume)", HFILL
}},
3643 { &hf_afs_cb_fid_vnode
, { "FileID (VNode)", "afs.cb.fid.vnode",
3644 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (VNode)", HFILL
}},
3645 { &hf_afs_cb_fid_uniqifier
, { "FileID (Uniqifier)", "afs.cb.fid.uniq",
3646 FT_UINT32
, BASE_DEC
, 0, 0, "File ID (Uniqifier)", HFILL
}},
3649 { &hf_afs_cm_uuid
, { "UUID", "afs.cm.uuid",
3650 FT_BYTES
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3651 { &hf_afs_cm_numint
, { "Number of Interfaces", "afs.cm.numint",
3652 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3653 { &hf_afs_cm_ipaddr
, { "IP Address", "afs.cm.ipaddr",
3654 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3655 { &hf_afs_cm_netmask
, { "Netmask", "afs.cm.netmask",
3656 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3657 { &hf_afs_cm_mtu
, { "MTU", "afs.cm.mtu",
3658 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3660 { &hf_afs_cm_numcap
, { "Number of Capability Words", "afs.cm.numcap",
3661 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3662 { &hf_afs_cm_capabilities
, { "Capabilities", "afs.cm.capabilities",
3663 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3664 { &hf_afs_cm_cap_errortrans
, { "ERRORTRANS", "afs.cm.capabilities.errortrans",
3665 FT_BOOLEAN
, 32, 0, 0x0001, NULL
, HFILL
}},
3667 /* PROT Server Fields */
3668 { &hf_afs_prot_errcode
, { "Error Code", "afs.prot.errcode",
3669 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3670 { &hf_afs_prot_name
, { "Name", "afs.prot.name",
3671 FT_STRING
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3672 { &hf_afs_prot_id
, { "ID", "afs.prot.id",
3673 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3674 { &hf_afs_prot_oldid
, { "Old ID", "afs.prot.oldid",
3675 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3676 { &hf_afs_prot_newid
, { "New ID", "afs.prot.newid",
3677 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3678 { &hf_afs_prot_gid
, { "Group ID", "afs.prot.gid",
3679 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3680 { &hf_afs_prot_uid
, { "User ID", "afs.prot.uid",
3681 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3682 { &hf_afs_prot_count
, { "Count", "afs.prot.count",
3683 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3684 { &hf_afs_prot_maxgid
, { "Maximum Group ID", "afs.prot.maxgid",
3685 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3686 { &hf_afs_prot_maxuid
, { "Maximum User ID", "afs.prot.maxuid",
3687 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3688 { &hf_afs_prot_pos
, { "Position", "afs.prot.pos",
3689 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3690 { &hf_afs_prot_flag
, { "Flag", "afs.prot.flag",
3691 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3695 { &hf_afs_ubik_errcode
, { "Error Code", "afs.ubik.errcode",
3696 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &afs_errors_ext
, 0, NULL
, HFILL
}},
3698 { &hf_afs_ubik_state
, { "State", "afs.ubik.state",
3699 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3700 { &hf_afs_ubik_version_epoch
, { "Epoch", "afs.ubik.version.epoch",
3701 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3702 { &hf_afs_ubik_version_counter
, { "Counter", "afs.ubik.version.counter",
3703 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3704 { &hf_afs_ubik_votestart
, { "Vote Started", "afs.ubik.votestart",
3705 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3707 { &hf_afs_ubik_voteend
, { "Vote Ends", "afs.ubik.voteend",
3708 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3710 { &hf_afs_ubik_file
, { "File", "afs.ubik.file",
3711 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3712 { &hf_afs_ubik_pos
, { "Position", "afs.ubik.position",
3713 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3714 { &hf_afs_ubik_length
, { "Length", "afs.ubik.length",
3715 FT_UINT32
, BASE_DEC
, 0, 0, NULL
, HFILL
}},
3716 { &hf_afs_ubik_locktype
, { "Lock Type", "afs.ubik.locktype",
3717 FT_UINT32
, BASE_DEC
, VALS(ubik_lock_types
), 0, NULL
, HFILL
}},
3719 { &hf_afs_ubik_votetype
, { "Vote Type", "afs.ubik.votetype",
3720 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3722 { &hf_afs_ubik_site
, { "Site", "afs.ubik.site",
3723 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3724 { &hf_afs_ubik_interface
, { "Interface Address", "afs.ubik.interface",
3725 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3727 { &hf_afs_ubik_now
, { "Now", "afs.ubik.now",
3728 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3729 { &hf_afs_ubik_lastyestime
, { "Last Yes Time", "afs.ubik.lastyesttime",
3730 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3731 { &hf_afs_ubik_lastyeshost
, { "Last Yes Host", "afs.ubik.lastyeshost",
3732 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3733 { &hf_afs_ubik_lastyesstate
, { "Last Yes State", "afs.ubik.lastyesstate",
3734 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3735 { &hf_afs_ubik_lastyesclaim
, { "Last Yes Claim", "afs.ubik.lastyesclaim",
3736 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3737 { &hf_afs_ubik_lowesthost
, { "Lowest Host", "afs.ubik.lowesthost",
3738 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3739 { &hf_afs_ubik_lowesttime
, { "Lowest Time", "afs.ubik.lowesttime",
3740 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3741 { &hf_afs_ubik_synchost
, { "Sync Host", "afs.ubik.synchost",
3742 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3743 { &hf_afs_ubik_addr
, { "Address", "afs.ubik.addr",
3744 FT_IPv4
, BASE_NONE
, 0, 0, NULL
, HFILL
}},
3745 { &hf_afs_ubik_synctime
, { "Sync Time", "afs.ubik.synctime",
3746 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3747 { &hf_afs_ubik_lastvotetime
, { "Last Vote Time", "afs.ubik.lastvotetime",
3748 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3749 { &hf_afs_ubik_lastbeaconsent
, { "Last Beacon Sent", "afs.ubik.lastbeaconsent",
3750 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3751 { &hf_afs_ubik_lastvote
, { "Last Vote", "afs.ubik.lastvote",
3752 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3753 { &hf_afs_ubik_currentdb
, { "Current DB", "afs.ubik.currentdb",
3754 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3755 { &hf_afs_ubik_up
, { "Up", "afs.ubik.up",
3756 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3757 { &hf_afs_ubik_beaconsincedown
, { "Beacon Since Down", "afs.ubik.beaconsincedown",
3758 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3759 { &hf_afs_ubik_amsyncsite
, { "Am Sync Site", "afs.ubik.amsyncsite",
3760 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3761 { &hf_afs_ubik_syncsiteuntil
, { "Sync Site Until", "afs.ubik.syncsiteuntil",
3762 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3763 { &hf_afs_ubik_nservers
, { "Number of Servers", "afs.ubik.nservers",
3764 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3765 { &hf_afs_ubik_lockedpages
, { "Locked Pages", "afs.ubik.lockedpages",
3766 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3767 { &hf_afs_ubik_writelockedpages
, { "Write Locked Pages", "afs.ubik.writelockedpages",
3768 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3769 { &hf_afs_ubik_activewrite
, { "Active Write", "afs.ubik.activewrite",
3770 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3771 { &hf_afs_ubik_tidcounter
, { "TID Counter", "afs.ubik.tidcounter",
3772 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3773 { &hf_afs_ubik_anyreadlocks
, { "Any Read Locks", "afs.ubik.anyreadlocks",
3774 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3775 { &hf_afs_ubik_anywritelocks
, { "Any Write Locks", "afs.ubik.anywritelocks",
3776 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3777 { &hf_afs_ubik_recoverystate
, { "Recovery State", "afs.ubik.recoverystate",
3778 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3779 { &hf_afs_ubik_currenttrans
, { "Current Transaction", "afs.ubik.currenttran",
3780 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3781 { &hf_afs_ubik_writetrans
, { "Write Transaction", "afs.ubik.writetran",
3782 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3783 { &hf_afs_ubik_epochtime
, { "Epoch Time", "afs.ubik.epochtime",
3784 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, 0, 0, NULL
, HFILL
}},
3785 { &hf_afs_ubik_isclone
, { "Is Clone", "afs.ubik.isclone",
3786 FT_UINT32
, BASE_HEX
, 0, 0, NULL
, HFILL
}},
3787 { &hf_afs_reqframe
, { "Request Frame", "afs.reqframe",
3788 FT_FRAMENUM
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
3789 { &hf_afs_repframe
, { "Reply Frame", "afs.repframe",
3790 FT_FRAMENUM
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
3791 { &hf_afs_time
, { "Time from request", "afs.time",
3792 FT_RELATIVE_TIME
, BASE_NONE
, NULL
, 0, "Time between Request and Reply for AFS calls", HFILL
}},
3794 {&hf_afs_fragments
, {"Message fragments", "afs.fragments",
3795 FT_NONE
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3796 {&hf_afs_fragment
, {"Message fragment", "afs.fragment",
3797 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3798 {&hf_afs_fragment_overlap
, {"Message fragment overlap", "afs.fragment.overlap",
3799 FT_BOOLEAN
, 0, NULL
, 0x00, NULL
, HFILL
} },
3800 {&hf_afs_fragment_overlap_conflicts
, {"Message fragment overlapping with conflicting data", "afs.fragment.overlap.conflicts",
3801 FT_BOOLEAN
, 0, NULL
, 0x00, NULL
, HFILL
} },
3802 {&hf_afs_fragment_multiple_tails
, {"Message has multiple tail fragments", "afs.fragment.multiple_tails",
3803 FT_BOOLEAN
, 0, NULL
, 0x00, NULL
, HFILL
} },
3804 {&hf_afs_fragment_too_long_fragment
, {"Message fragment too long", "afs.fragment.too_long_fragment",
3805 FT_BOOLEAN
, 0, NULL
, 0x00, NULL
, HFILL
} },
3806 {&hf_afs_fragment_error
, {"Message defragmentation error", "afs.fragment.error",
3807 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3808 {&hf_afs_fragment_count
, {"Message fragment count", "afs.fragment.count",
3809 FT_UINT32
, BASE_DEC
, NULL
, 0x00, NULL
, HFILL
} },
3810 {&hf_afs_reassembled_in
, {"Reassembled in", "afs.reassembled.in",
3811 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
3812 {&hf_afs_reassembled_length
, {"Reassembled length", "afs.reassembled.length",
3813 FT_UINT32
, BASE_DEC
, NULL
, 0x00, NULL
, HFILL
} },
3816 static gint
*ett
[] = {
3824 &ett_afs_status_mask
,
3826 &ett_afs_volumeinfo
,
3828 &ett_afs_vldb_flags
,
3831 &ett_afs_cm_interfaces
,
3832 &ett_afs_cm_capabilities
,
3835 proto_afs
= proto_register_protocol("Andrew File System (AFS)",
3837 proto_register_field_array(proto_afs
, hf
, array_length(hf
));
3838 proto_register_subtree_array(ett
, array_length(ett
));
3839 register_init_routine(&afs_init_protocol
);
3841 new_register_dissector("afs", dissect_afs
, proto_afs
);
3845 * Editor modelines - http://www.wireshark.org/tools/modelines.html
3850 * indent-tabs-mode: t
3853 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
3854 * :indentSize=8:tabSize=8:noTabs=false: