2 * Routines for AFS packet dissection
3 * Copyright 1999, Nathan Neulinger <nneul@umr.edu>
4 * Based on routines from tcpdump patches by
5 * Ken Hornstein <kenh@cmf.nrl.navy.mil>
6 * Portions based on information retrieved from the RX definitions
7 * in Arla, the free AFS client at http://www.stacken.kth.se/project/arla/
8 * Portions based on information/specs retrieved from the OpenAFS sources at
9 * www.openafs.org, Copyright IBM.
11 * $Id: packet-afs.c,v 1.56 2004/01/19 18:36:32 jmayer Exp $
13 * Ethereal - Network traffic analyzer
14 * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 #include <epan/packet.h>
43 #include <epan/conversation.h>
44 #include <epan/resolv.h>
46 #include "packet-rx.h"
47 #include "packet-afs.h"
48 #include "packet-afs-defs.h"
49 #include "packet-afs-macros.h"
51 #define GETSTR ((const char *)tvb_get_ptr(tvb,offset,tvb_ensure_length_remaining(tvb,offset)))
53 #define VALID_OPCODE(opcode) ((opcode >= OPCODE_LOW && opcode <= OPCODE_HIGH) || \
54 (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \
55 (opcode >= DISK_LOW && opcode <= DISK_HIGH))
57 static int afs_packet_init_count = 100;
59 struct afs_request_key {
60 guint32 conversation, callnumber;
64 struct afs_request_val {
71 static GHashTable *afs_request_hash = NULL;
72 static GMemChunk *afs_request_keys = NULL;
73 static GMemChunk *afs_request_vals = NULL;
78 * Dissector prototypes
80 static int dissect_acl(tvbuff_t *tvb, struct rxinfo *rxinfo,
81 proto_tree *tree, int offset);
82 static void dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
83 proto_tree *tree, int offset, int opcode);
84 static void dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
85 proto_tree *tree, int offset, int opcode);
86 static void dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
87 proto_tree *tree, int offset, int opcode);
88 static void dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
89 proto_tree *tree, int offset, int opcode);
90 static void dissect_vol_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
91 proto_tree *tree, int offset, int opcode);
92 static void dissect_vol_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
93 proto_tree *tree, int offset, int opcode);
94 static void dissect_kauth_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
95 proto_tree *tree, int offset, int opcode);
96 static void dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
97 proto_tree *tree, int offset, int opcode);
98 static void dissect_cb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
99 proto_tree *tree, int offset, int opcode);
100 static void dissect_cb_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
101 proto_tree *tree, int offset, int opcode);
102 static void dissect_prot_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
103 proto_tree *tree, int offset, int opcode);
104 static void dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
105 proto_tree *tree, int offset, int opcode);
106 static void dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
107 proto_tree *tree, int offset, int opcode);
108 static void dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
109 proto_tree *tree, int offset, int opcode);
110 static void dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
111 proto_tree *tree, int offset, int opcode);
112 static void dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
113 proto_tree *tree, int offset, int opcode);
114 static void dissect_backup_reply(tvbuff_t *tvb, struct rxinfo *rxinfo,
115 proto_tree *tree, int offset, int opcode);
116 static void dissect_backup_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
117 proto_tree *tree, int offset, int opcode);
123 afs_equal(gconstpointer v, gconstpointer w)
125 const struct afs_request_key *v1 = (const struct afs_request_key *)v;
126 const struct afs_request_key *v2 = (const struct afs_request_key *)w;
128 if (v1 -> conversation == v2 -> conversation &&
129 v1 -> service == v2 -> service &&
130 v1 -> callnumber == v2 -> callnumber ) {
139 afs_hash (gconstpointer v)
141 const struct afs_request_key *key = (const struct afs_request_key *)v;
144 val = key -> conversation + key -> service + key -> callnumber;
150 * Protocol initialization
153 afs_init_protocol(void)
155 if (afs_request_hash)
156 g_hash_table_destroy(afs_request_hash);
157 if (afs_request_keys)
158 g_mem_chunk_destroy(afs_request_keys);
159 if (afs_request_vals)
160 g_mem_chunk_destroy(afs_request_vals);
162 afs_request_hash = g_hash_table_new(afs_hash, afs_equal);
163 afs_request_keys = g_mem_chunk_new("afs_request_keys",
164 sizeof(struct afs_request_key),
165 afs_packet_init_count * sizeof(struct afs_request_key),
167 afs_request_vals = g_mem_chunk_new("afs_request_vals",
168 sizeof(struct afs_request_val),
169 afs_packet_init_count * sizeof(struct afs_request_val),
176 * Dissection routines
180 dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
182 struct rxinfo *rxinfo = pinfo->private_data;
184 conversation_t *conversation;
185 struct afs_request_key request_key, *new_request_key;
186 struct afs_request_val *request_val=NULL;
187 proto_tree *afs_tree, *afs_op_tree, *ti;
188 int port, node, typenode, opcode;
189 value_string const *vals;
193 void (*dissector)(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode);
196 if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
197 col_set_str(pinfo->cinfo, COL_PROTOCOL, "AFS (RX)");
199 if (check_col(pinfo->cinfo, COL_INFO)) {
200 col_clear(pinfo->cinfo, COL_INFO);
203 reply = (rxinfo->flags & RX_CLIENT_INITIATED) == 0;
204 port = ((reply == 0) ? pinfo->destport : pinfo->srcport );
207 * Find out what conversation this packet is part of.
208 * XXX - this should really be done by the transport-layer protocol,
209 * although for connectionless transports, we may not want to do that
210 * unless we know some higher-level protocol will want it - or we
211 * may want to do it, so you can say e.g. "show only the packets in
212 * this UDP 'connection'".
214 * Note that we don't have to worry about the direction this packet
215 * was going - the conversation code handles that for us, treating
216 * packets from A:X to B:Y as being part of the same conversation as
217 * packets from B:Y to A:X.
219 conversation = find_conversation(&pinfo->src, &pinfo->dst, pinfo->ptype,
220 pinfo->srcport, pinfo->destport, 0);
221 if (conversation == NULL) {
222 /* It's not part of any conversation - create a new one. */
223 conversation = conversation_new(&pinfo->src, &pinfo->dst,
224 pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
227 request_key.conversation = conversation->index;
228 request_key.service = rxinfo->serviceid;
229 request_key.callnumber = rxinfo->callnumber;
231 request_val = (struct afs_request_val *) g_hash_table_lookup(
232 afs_request_hash, &request_key);
234 /* only allocate a new hash element when it's a request */
236 if(!pinfo->fd->flags.visited){
237 if ( !request_val && !reply) {
238 new_request_key = g_mem_chunk_alloc(afs_request_keys);
239 *new_request_key = request_key;
241 request_val = g_mem_chunk_alloc(afs_request_vals);
242 request_val -> opcode = tvb_get_ntohl(tvb, offset);
243 request_val -> req_num = pinfo->fd->num;
244 request_val -> rep_num = 0;
245 request_val -> req_time.secs=pinfo->fd->abs_secs;
246 request_val -> req_time.nsecs=pinfo->fd->abs_usecs*1000;
248 g_hash_table_insert(afs_request_hash, new_request_key,
251 if( request_val && reply ) {
252 request_val -> rep_num = pinfo->fd->num;
257 opcode = request_val->opcode;
267 typenode = hf_afs_fs;
268 node = hf_afs_fs_opcode;
270 dissector = reply ? dissect_fs_reply : dissect_fs_request;
273 typenode = hf_afs_cb;
274 node = hf_afs_cb_opcode;
276 dissector = reply ? dissect_cb_reply : dissect_cb_request;
279 typenode = hf_afs_prot;
280 node = hf_afs_prot_opcode;
282 dissector = reply ? dissect_prot_reply : dissect_prot_request;
285 typenode = hf_afs_vldb;
286 node = hf_afs_vldb_opcode;
288 dissector = reply ? dissect_vldb_reply : dissect_vldb_request;
291 typenode = hf_afs_kauth;
292 node = hf_afs_kauth_opcode;
294 dissector = reply ? dissect_kauth_reply : dissect_kauth_request;
297 typenode = hf_afs_vol;
298 node = hf_afs_vol_opcode;
300 dissector = reply ? dissect_vol_reply : dissect_vol_request;
303 typenode = hf_afs_error;
304 node = hf_afs_error_opcode;
305 /* dissector = reply ? dissect_error_reply : dissect_error_request; */
308 typenode = hf_afs_bos;
309 node = hf_afs_bos_opcode;
311 dissector = reply ? dissect_bos_reply : dissect_bos_request;
313 case AFS_PORT_UPDATE:
314 typenode = hf_afs_update;
315 node = hf_afs_update_opcode;
317 /* dissector = reply ? dissect_update_reply : dissect_update_request; */
319 case AFS_PORT_RMTSYS:
320 typenode = hf_afs_rmtsys;
321 node = hf_afs_rmtsys_opcode;
323 /* dissector = reply ? dissect_rmtsys_reply : dissect_rmtsys_request; */
325 case AFS_PORT_BACKUP:
326 typenode = hf_afs_backup;
327 node = hf_afs_backup_opcode;
329 dissector = reply ? dissect_backup_reply : dissect_backup_request;
333 if ( (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) ||
334 (opcode >= DISK_LOW && opcode <= DISK_HIGH) ) {
335 typenode = hf_afs_ubik;
336 node = hf_afs_ubik_opcode;
338 dissector = reply ? dissect_ubik_reply : dissect_ubik_request;
342 if ( VALID_OPCODE(opcode) ) {
344 if (check_col(pinfo->cinfo, COL_INFO))
345 col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: %s (%d)",
346 typenode == hf_afs_ubik ? "UBIK-" : "",
347 val_to_str(port, port_types_short, "Unknown(%d)"),
348 reply ? "Reply" : "Request",
349 val_to_str(opcode, vals, "Unknown(%d)"), opcode);
351 if (check_col(pinfo->cinfo, COL_INFO))
352 col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s %s: Unknown(%d)",
353 typenode == hf_afs_ubik ? "UBIK-" : "",
354 val_to_str(port, port_types_short, "Unknown(%d)"),
355 reply ? "Reply" : "Request",
359 if (check_col(pinfo->cinfo, COL_INFO))
360 col_add_fstr(pinfo->cinfo, COL_INFO, "Encrypted %s %s",
361 val_to_str(port, port_types_short, "Unknown(%d)"),
362 reply ? "Reply" : "Request"
367 ti = proto_tree_add_item(tree, proto_afs, tvb, offset, -1,
369 afs_tree = proto_item_add_subtree(ti, ett_afs);
371 proto_tree_add_text(afs_tree, tvb, 0, 0,
372 "Service: %s%s%s %s",
373 VALID_OPCODE(opcode) ? "" : "Encrypted ",
374 typenode == hf_afs_ubik ? "UBIK - " : "",
375 val_to_str(port, port_types, "Unknown(%d)"),
376 reply ? "Reply" : "Request");
378 if( request_val && !reply && request_val->rep_num) {
379 proto_tree_add_uint_format(afs_tree, hf_afs_repframe,
380 tvb, 0, 0, request_val->rep_num,
381 "The reply to this request is in frame %u",
382 request_val->rep_num);
384 if( request_val && reply && request_val->rep_num) {
385 proto_tree_add_uint_format(afs_tree, hf_afs_reqframe,
386 tvb, 0, 0, request_val->req_num,
387 "This is a reply to a request in frame %u",
388 request_val->req_num);
389 ns.secs= pinfo->fd->abs_secs-request_val->req_time.secs;
390 ns.nsecs=pinfo->fd->abs_usecs*1000-request_val->req_time.nsecs;
392 ns.nsecs+=1000000000;
395 proto_tree_add_time(afs_tree, hf_afs_time, tvb, offset, 0,
400 if ( VALID_OPCODE(opcode) ) {
401 /* until we do cache, can't handle replies */
403 if ( !reply && node != 0 ) {
404 if ( rxinfo->seq == 1 )
406 ti = proto_tree_add_uint(afs_tree,
407 node, tvb, offset, 4, opcode);
409 ti = proto_tree_add_uint(afs_tree,
410 node, tvb, 0, 0, opcode);
412 } else if ( reply && node != 0 ) {
413 /* the opcode isn't in this packet */
414 ti = proto_tree_add_uint(afs_tree,
415 node, tvb, 0, 0, opcode);
417 ti = proto_tree_add_text(afs_tree, tvb,
418 0, 0, "Operation: Unknown");
421 /* Add the subtree for this particular service */
422 afs_op_tree = proto_item_add_subtree(ti, ett_afs_op);
425 if ( typenode != 0 ) {
426 /* indicate the type of request */
427 proto_tree_add_boolean_hidden(afs_tree, typenode, tvb, offset, 0, 1);
430 /* Process the packet according to what service it is */
432 (*dissector)(tvb, rxinfo, afs_op_tree, offset, opcode);
437 /* if it's the last packet, and it's a reply, remove opcode
439 /* ignoring for now, I'm not sure how the chunk deallocation works */
440 if ( rxinfo->flags & RX_LAST_PACKET && reply ){
447 * Here is a helper routine for adding an AFS acl to the proto tree
448 * This is to be used with FS packets only
450 * An AFS ACL is a string that has the following format:
452 * <positive> <negative>
456 * "positive" and "negative" are integers which contain the number of
457 * positive and negative ACL's in the string. The uid/aclbits pair are
458 * ASCII strings containing the UID/PTS record and and a ascii number
459 * representing a logical OR of all the ACL permission bits
464 * sscanf is probably quite dangerous if we run outside the packet.
466 * "GETSTR" doesn't guarantee that the resulting string is
469 * Should this just scan the string itself, rather than using "sscanf()"?
472 dissect_acl(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset)
476 int i, n, pos, neg, acl;
477 char user[128]; /* Be sure to adjust sscanf()s below if length is changed... */
480 bytes = tvb_get_ntohl(tvb, offset);
481 OUT_UINT(hf_afs_fs_acl_datasize);
484 if (sscanf(GETSTR, "%d %n", &pos, &n) != 1) {
485 /* does not matter what we return, if this fails,
486 * we cant dissect anything else in the packet either.
490 proto_tree_add_uint(tree, hf_afs_fs_acl_count_positive, tvb,
495 if (sscanf(GETSTR, "%d %n", &neg, &n) != 1) {
498 proto_tree_add_uint(tree, hf_afs_fs_acl_count_negative, tvb,
503 * This wacky order preserves the order used by the "fs" command
505 for (i = 0; i < pos; i++) {
506 if (sscanf(GETSTR, "%127s %d %n", user, &acl, &n) != 2) {
509 ACLOUT(user,1,acl,n);
512 for (i = 0; i < neg; i++) {
513 if (sscanf(GETSTR, "%127s %d %n", user, &acl, &n) != 2) {
516 ACLOUT(user,0,acl,n);
518 if (offset >= old_offset+bytes ) {
527 * Here are the helper dissection routines
531 dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
533 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
537 case 130: /* fetch data */
538 /* only on first packet */
539 if ( rxinfo->seq == 1 )
541 OUT_FS_AFSFetchStatus("Status");
542 OUT_FS_AFSCallBack();
545 OUT_BYTES_ALL(hf_afs_fs_data);
547 case 131: /* fetch acl */
548 offset = dissect_acl(tvb, rxinfo, tree, offset);
549 OUT_FS_AFSFetchStatus("Status");
552 case 132: /* Fetch status */
553 OUT_FS_AFSFetchStatus("Status");
554 OUT_FS_AFSCallBack();
557 case 133: /* Store data */
558 case 134: /* Store ACL */
559 case 135: /* Store status */
560 case 136: /* Remove file */
561 OUT_FS_AFSFetchStatus("Status");
564 case 137: /* create file */
565 case 141: /* make dir */
566 case 161: /* lookup */
567 case 163: /* dfs symlink */
568 OUT_FS_AFSFid((opcode == 137)? "New File" : ((opcode == 141)? "New Directory" : "File"));
569 OUT_FS_AFSFetchStatus("File Status");
570 OUT_FS_AFSFetchStatus("Directory Status");
571 OUT_FS_AFSCallBack();
574 case 138: /* rename */
575 OUT_FS_AFSFetchStatus("Old Directory Status");
576 OUT_FS_AFSFetchStatus("New Directory Status");
579 case 139: /* symlink */
580 OUT_FS_AFSFid("Symlink");
582 OUT_FS_AFSFetchStatus("Symlink Status");
583 case 142: /* rmdir */
584 OUT_FS_AFSFetchStatus("Directory Status");
587 case 143: /* old set lock */
588 case 144: /* old extend lock */
589 case 145: /* old release lock */
590 case 147: /* give up callbacks */
591 case 150: /* set volume status */
592 case 152: /* check token */
593 /* nothing returned */
595 case 146: /* get statistics */
596 OUT_FS_ViceStatistics();
598 case 148: /* get volume info */
599 case 154: /* n-get-volume-info */
602 case 149: /* get volume status */
603 OUT_FS_AFSFetchVolumeStatus();
604 OUT_RXString(hf_afs_fs_volname);
605 OUT_RXString(hf_afs_fs_offlinemsg);
606 OUT_RXString(hf_afs_fs_motd);
608 case 151: /* root volume */
609 OUT_RXString(hf_afs_fs_volname);
611 case 153: /* get time */
612 OUT_TIMESTAMP(hf_afs_fs_timestamp);
614 case 155: /* bulk status */
615 OUT_FS_AFSBulkStats();
620 case 156: /* set lock */
621 case 157: /* extend lock */
622 case 158: /* release lock */
625 case 159: /* x-stats-version */
626 OUT_UINT(hf_afs_fs_xstats_version);
628 case 160: /* get xstats */
629 OUT_UINT(hf_afs_fs_xstats_version);
630 OUT_TIMESECS(hf_afs_fs_xstats_timestamp);
631 OUT_FS_AFS_CollData();
633 case 162: /* flush cps */
634 OUT_UINT(hf_afs_fs_cps_spare2);
635 OUT_UINT(hf_afs_fs_cps_spare3);
639 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
641 OUT_UINT(hf_afs_fs_errcode);
646 dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
648 /* skip the opcode if this is the first packet in the stream */
649 if ( rxinfo->seq == 1 )
651 offset += 4; /* skip the opcode */
656 case 130: /* Fetch data */
657 OUT_FS_AFSFid("Source");
658 OUT_UINT(hf_afs_fs_offset);
659 OUT_UINT(hf_afs_fs_length);
661 case 131: /* Fetch ACL */
662 OUT_FS_AFSFid("Target");
664 case 132: /* Fetch Status */
665 OUT_FS_AFSFid("Target");
667 case 133: /* Store Data */
668 if ( rxinfo->seq == 1 )
670 OUT_FS_AFSFid("Destination");
671 OUT_FS_AFSStoreStatus("Status");
672 OUT_UINT(hf_afs_fs_offset);
673 OUT_UINT(hf_afs_fs_length);
674 OUT_UINT(hf_afs_fs_flength);
676 OUT_BYTES_ALL(hf_afs_fs_data);
678 case 134: /* Store ACL */
679 OUT_FS_AFSFid("Target");
680 offset = dissect_acl(tvb, rxinfo, tree, offset);
682 case 135: /* Store Status */
683 OUT_FS_AFSFid("Target");
684 OUT_FS_AFSStoreStatus("Status");
686 case 136: /* Remove File */
687 OUT_FS_AFSFid("Remove File");
688 OUT_RXString(hf_afs_fs_name);
690 case 137: /* Create File */
691 OUT_FS_AFSFid("Target");
692 OUT_RXString(hf_afs_fs_name);
693 OUT_FS_AFSStoreStatus("Status");
695 case 138: /* Rename file */
696 OUT_FS_AFSFid("Old");
697 OUT_RXString(hf_afs_fs_oldname);
698 OUT_FS_AFSFid("New");
699 OUT_RXString(hf_afs_fs_newname);
701 case 139: /* Symlink */
702 OUT_FS_AFSFid("File");
703 OUT_RXString(hf_afs_fs_symlink_name);
704 OUT_RXString(hf_afs_fs_symlink_content);
705 OUT_FS_AFSStoreStatus("Status");
708 OUT_FS_AFSFid("Link To (New File)");
709 OUT_RXString(hf_afs_fs_name);
710 OUT_FS_AFSFid("Link From (Old File)");
712 case 141: /* Make dir */
713 OUT_FS_AFSFid("Target");
714 OUT_RXString(hf_afs_fs_name);
715 OUT_FS_AFSStoreStatus("Status");
717 case 142: /* Remove dir */
718 OUT_FS_AFSFid("Target");
719 OUT_RXString(hf_afs_fs_name);
721 case 143: /* Old Set Lock */
722 OUT_FS_AFSFid("Target");
723 OUT_UINT(hf_afs_fs_vicelocktype);
726 case 144: /* Old Extend Lock */
727 OUT_FS_AFSFid("Target");
730 case 145: /* Old Release Lock */
731 OUT_FS_AFSFid("Target");
734 case 146: /* Get statistics */
737 case 147: /* Give up callbacks */
741 case 148: /* Get vol info */
742 OUT_RXString(hf_afs_fs_volname);
744 case 149: /* Get vol stats */
745 OUT_UINT(hf_afs_fs_volid);
747 case 150: /* Set vol stats */
748 OUT_UINT(hf_afs_fs_volid);
749 OUT_FS_AFSStoreVolumeStatus();
750 OUT_RXString(hf_afs_fs_volname);
751 OUT_RXString(hf_afs_fs_offlinemsg);
752 OUT_RXString(hf_afs_fs_motd);
754 case 151: /* get root volume */
757 case 152: /* check token */
758 OUT_UINT(hf_afs_fs_viceid);
761 case 153: /* get time */
764 case 154: /* new get vol info */
765 OUT_RXString(hf_afs_fs_volname);
767 case 155: /* bulk stat */
770 case 156: /* Set Lock */
771 OUT_FS_AFSFid("Target");
772 OUT_UINT(hf_afs_fs_vicelocktype);
774 case 157: /* Extend Lock */
775 OUT_FS_AFSFid("Target");
777 case 158: /* Release Lock */
778 OUT_FS_AFSFid("Target");
780 case 159: /* xstats version */
783 case 160: /* get xstats */
784 OUT_UINT(hf_afs_fs_xstats_clientversion);
785 OUT_UINT(hf_afs_fs_xstats_collnumber);
787 case 161: /* lookup */
788 OUT_FS_AFSFid("Target");
789 OUT_RXString(hf_afs_fs_name);
791 case 162: /* flush cps */
794 OUT_UINT(hf_afs_fs_cps_spare1);
796 case 163: /* dfs symlink */
797 OUT_FS_AFSFid("Target");
798 OUT_RXString(hf_afs_fs_symlink_name);
799 OUT_RXString(hf_afs_fs_symlink_content);
800 OUT_FS_AFSStoreStatus("Symlink Status");
809 dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
811 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
815 case 80: /* create bnode */
818 case 81: /* delete bnode */
821 case 82: /* set status */
824 case 83: /* get status */
825 OUT_INT(hf_afs_bos_status);
826 OUT_RXString(hf_afs_bos_statusdesc);
828 case 84: /* enumerate instance */
829 OUT_RXString(hf_afs_bos_instance);
831 case 85: /* get instance info */
832 OUT_RXString(hf_afs_bos_type);
835 case 86: /* get instance parm */
836 OUT_RXString(hf_afs_bos_parm);
838 case 87: /* add siperuser */
841 case 88: /* delete superuser */
844 case 89: /* list superusers */
845 OUT_RXString(hf_afs_bos_user);
847 case 90: /* list keys */
848 OUT_UINT(hf_afs_bos_kvno);
852 case 91: /* add key */
855 case 92: /* delete key */
858 case 93: /* set cell name */
861 case 94: /* get cell name */
862 OUT_RXString(hf_afs_bos_cell);
864 case 95: /* get cell host */
865 OUT_RXString(hf_afs_bos_host);
867 case 96: /* add cell host */
870 case 97: /* delete cell host */
873 case 98: /* set tstatus */
876 case 99: /* shutdown all */
879 case 100: /* restart all */
882 case 101: /* startup all */
885 case 102: /* set noauth flag */
888 case 103: /* rebozo */
891 case 104: /* restart */
894 case 105: /* install */
897 case 106: /* uninstall */
900 case 107: /* get dates */
901 OUT_TIMESECS(hf_afs_bos_newtime);
902 OUT_TIMESECS(hf_afs_bos_baktime);
903 OUT_TIMESECS(hf_afs_bos_oldtime);
908 case 109: /* prune */
911 case 110: /* set restart time */
914 case 111: /* get restart time */
917 case 112: /* get log */
918 /* need to make this dump a big string somehow */
919 OUT_BYTES_ALL(hf_afs_bos_data);
921 case 113: /* wait all */
924 case 114: /* get instance strings */
925 OUT_RXString(hf_afs_bos_error);
926 OUT_RXString(hf_afs_bos_spare1);
927 OUT_RXString(hf_afs_bos_spare2);
928 OUT_RXString(hf_afs_bos_spare3);
932 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
934 OUT_UINT(hf_afs_bos_errcode);
939 dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
941 offset += 4; /* skip the opcode */
945 case 80: /* create b node */
946 OUT_RXString(hf_afs_bos_type);
947 OUT_RXString(hf_afs_bos_instance);
948 OUT_RXString(hf_afs_bos_parm);
949 OUT_RXString(hf_afs_bos_parm);
950 OUT_RXString(hf_afs_bos_parm);
951 OUT_RXString(hf_afs_bos_parm);
952 OUT_RXString(hf_afs_bos_parm);
953 OUT_RXString(hf_afs_bos_parm);
955 case 81: /* delete b node */
956 OUT_RXString(hf_afs_bos_instance);
958 case 82: /* set status */
959 OUT_RXString(hf_afs_bos_instance);
960 OUT_INT(hf_afs_bos_status);
962 case 83: /* get status */
963 OUT_RXString(hf_afs_bos_instance);
965 case 84: /* enumerate instance */
966 OUT_UINT(hf_afs_bos_num);
968 case 85: /* get instance info */
969 OUT_RXString(hf_afs_bos_instance);
971 case 86: /* get instance parm */
972 OUT_RXString(hf_afs_bos_instance);
973 OUT_UINT(hf_afs_bos_num);
975 case 87: /* add super user */
976 OUT_RXString(hf_afs_bos_user);
978 case 88: /* delete super user */
979 OUT_RXString(hf_afs_bos_user);
981 case 89: /* list super users */
982 OUT_UINT(hf_afs_bos_num);
984 case 90: /* list keys */
985 OUT_UINT(hf_afs_bos_num);
987 case 91: /* add key */
988 OUT_UINT(hf_afs_bos_num);
991 case 92: /* delete key */
992 OUT_UINT(hf_afs_bos_num);
994 case 93: /* set cell name */
995 OUT_RXString(hf_afs_bos_content);
997 case 95: /* set cell host */
998 OUT_UINT(hf_afs_bos_num);
1000 case 96: /* add cell host */
1001 OUT_RXString(hf_afs_bos_content);
1003 case 97: /* delete cell host */
1004 OUT_RXString(hf_afs_bos_content);
1006 case 98: /* set t status */
1007 OUT_RXString(hf_afs_bos_content);
1008 OUT_INT(hf_afs_bos_status);
1010 case 99: /* shutdown all */
1013 case 100: /* restart all */
1016 case 101: /* startup all */
1019 case 102: /* set no-auth flag */
1020 OUT_UINT(hf_afs_bos_flags);
1022 case 103: /* re-bozo? */
1025 case 104: /* restart */
1026 OUT_RXString(hf_afs_bos_instance);
1028 case 105: /* install */
1029 OUT_RXString(hf_afs_bos_path);
1030 OUT_UINT(hf_afs_bos_size);
1031 OUT_UINT(hf_afs_bos_flags);
1032 OUT_UINT(hf_afs_bos_date);
1034 case 106: /* uninstall */
1035 OUT_RXString(hf_afs_bos_path);
1037 case 107: /* get dates */
1038 OUT_RXString(hf_afs_bos_path);
1040 case 108: /* exec */
1041 OUT_RXString(hf_afs_bos_cmd);
1043 case 109: /* prune */
1044 OUT_UINT(hf_afs_bos_flags);
1046 case 110: /* set restart time */
1047 OUT_UINT(hf_afs_bos_num);
1050 case 111: /* get restart time */
1051 OUT_UINT(hf_afs_bos_num);
1053 case 112: /* get log */
1054 OUT_RXString(hf_afs_bos_file);
1056 case 113: /* wait all */
1059 case 114: /* get instance strings */
1060 OUT_RXString(hf_afs_bos_content);
1069 dissect_vol_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1071 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1076 /* should loop here maybe */
1077 OUT_UINT(hf_afs_vol_count);
1078 OUT_RXStringV(hf_afs_vol_name, 32); /* not sure on */
1082 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1084 OUT_UINT(hf_afs_vol_errcode);
1089 dissect_vol_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1091 offset += 4; /* skip the opcode */
1095 case 121: /* list one vol */
1096 OUT_UINT(hf_afs_vol_count);
1097 OUT_UINT(hf_afs_vol_id);
1106 dissect_kauth_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1108 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1114 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1116 OUT_UINT(hf_afs_kauth_errcode);
1121 dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1123 offset += 4; /* skip the opcode */
1127 case 1: /* authenticate old */
1128 case 21: /* authenticate */
1129 case 22: /* authenticate v2 */
1130 case 2: /* change pw */
1131 case 5: /* set fields */
1132 case 6: /* create user */
1133 case 7: /* delete user */
1134 case 8: /* get entry */
1135 case 14: /* unlock */
1136 case 15: /* lock status */
1137 OUT_RXString(hf_afs_kauth_princ);
1138 OUT_RXString(hf_afs_kauth_realm);
1139 OUT_BYTES_ALL(hf_afs_kauth_data);
1141 case 3: /* getticket-old */
1142 case 23: /* getticket */
1143 OUT_KAUTH_GetTicket();
1145 case 4: /* set pass */
1146 OUT_RXString(hf_afs_kauth_princ);
1147 OUT_RXString(hf_afs_kauth_realm);
1148 OUT_UINT(hf_afs_kauth_kvno);
1150 case 12: /* get pass */
1151 OUT_RXString(hf_afs_kauth_name);
1160 dissect_cb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1162 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1168 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1170 OUT_UINT(hf_afs_cb_errcode);
1175 dissect_cb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1177 offset += 4; /* skip the opcode */
1181 case 204: /* callback */
1185 j = tvb_get_ntohl(tvb, offset);
1190 OUT_CB_AFSFid("Target");
1193 j = tvb_get_ntohl(tvb, offset);
1197 OUT_CB_AFSCallBack();
1207 dissect_prot_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1209 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1213 case 504: /* name to id */
1217 j = tvb_get_ntohl(tvb, offset);
1218 OUT_UINT(hf_afs_prot_count);
1222 OUT_UINT(hf_afs_prot_id);
1226 case 505: /* id to name */
1230 j = tvb_get_ntohl(tvb, offset);
1231 OUT_UINT(hf_afs_prot_count);
1235 OUT_RXStringV(hf_afs_prot_name, PRNAMEMAX);
1239 case 508: /* get cps */
1240 case 514: /* list elements */
1241 case 517: /* list owned */
1242 case 518: /* get cps2 */
1243 case 519: /* get host cps */
1247 j = tvb_get_ntohl(tvb, offset);
1248 OUT_UINT(hf_afs_prot_count);
1252 OUT_UINT(hf_afs_prot_id);
1256 case 510: /* list max */
1257 OUT_UINT(hf_afs_prot_maxuid);
1258 OUT_UINT(hf_afs_prot_maxgid);
1262 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1264 OUT_UINT(hf_afs_prot_errcode);
1269 dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1271 offset += 4; /* skip the opcode */
1275 case 500: /* new user */
1276 OUT_RXString(hf_afs_prot_name);
1277 OUT_UINT(hf_afs_prot_id);
1278 OUT_UINT(hf_afs_prot_oldid);
1280 case 501: /* where is it */
1281 case 506: /* delete */
1282 case 508: /* get cps */
1283 case 512: /* list entry */
1284 case 514: /* list elements */
1285 case 517: /* list owned */
1286 case 519: /* get host cps */
1287 OUT_UINT(hf_afs_prot_id);
1289 case 502: /* dump entry */
1290 OUT_UINT(hf_afs_prot_pos);
1292 case 503: /* add to group */
1293 case 507: /* remove from group */
1294 case 515: /* is a member of? */
1295 OUT_UINT(hf_afs_prot_uid);
1296 OUT_UINT(hf_afs_prot_gid);
1298 case 504: /* name to id */
1302 j = tvb_get_ntohl(tvb, offset);
1303 OUT_UINT(hf_afs_prot_count);
1307 OUT_RXStringV(hf_afs_prot_name,PRNAMEMAX);
1311 case 505: /* id to name */
1315 j = tvb_get_ntohl(tvb, offset);
1316 OUT_UINT(hf_afs_prot_count);
1320 OUT_UINT(hf_afs_prot_id);
1324 case 509: /* new entry */
1325 OUT_RXString(hf_afs_prot_name);
1326 OUT_UINT(hf_afs_prot_flag);
1327 OUT_UINT(hf_afs_prot_oldid);
1329 case 511: /* set max */
1330 OUT_UINT(hf_afs_prot_id);
1331 OUT_UINT(hf_afs_prot_flag);
1333 case 513: /* change entry */
1334 OUT_UINT(hf_afs_prot_id);
1335 OUT_RXString(hf_afs_prot_name);
1336 OUT_UINT(hf_afs_prot_oldid);
1337 OUT_UINT(hf_afs_prot_newid);
1339 case 520: /* update entry */
1340 OUT_UINT(hf_afs_prot_id);
1341 OUT_RXString(hf_afs_prot_name);
1350 dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1352 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1356 case 510: /* list entry */
1357 OUT_UINT(hf_afs_vldb_count);
1358 OUT_UINT(hf_afs_vldb_nextindex);
1360 case 503: /* get entry by id */
1361 case 504: /* get entry by name */
1364 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1366 nservers = tvb_get_ntohl(tvb, offset);
1367 OUT_UINT(hf_afs_vldb_numservers);
1372 OUT_IP(hf_afs_vldb_server);
1382 j = tvb_get_ntohl(tvb, offset);
1383 strcpy(part, "/vicepa");
1384 if ( i<nservers && j<=25 )
1386 part[6] = 'a' + (char) j;
1387 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1392 SKIP(8 * sizeof(guint32));
1393 OUT_UINT(hf_afs_vldb_rwvol);
1394 OUT_UINT(hf_afs_vldb_rovol);
1395 OUT_UINT(hf_afs_vldb_bkvol);
1396 OUT_UINT(hf_afs_vldb_clonevol);
1400 case 505: /* get new volume id */
1401 OUT_UINT(hf_afs_vldb_id);
1403 case 521: /* list entry */
1404 case 529: /* list entry U */
1405 OUT_UINT(hf_afs_vldb_count);
1406 OUT_UINT(hf_afs_vldb_nextindex);
1408 case 518: /* get entry by id n */
1409 case 519: /* get entry by name N */
1412 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1413 nservers = tvb_get_ntohl(tvb, offset);
1414 OUT_UINT(hf_afs_vldb_numservers);
1415 for (i=0; i<13; i++)
1419 OUT_IP(hf_afs_vldb_server);
1426 for (i=0; i<13; i++)
1429 j = tvb_get_ntohl(tvb, offset);
1430 strcpy(part, "/vicepa");
1431 if ( i<nservers && j<=25 )
1433 part[6] = 'a' + (char) j;
1434 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1439 SKIP(13 * sizeof(guint32));
1440 OUT_UINT(hf_afs_vldb_rwvol);
1441 OUT_UINT(hf_afs_vldb_rovol);
1442 OUT_UINT(hf_afs_vldb_bkvol);
1445 case 526: /* get entry by id u */
1446 case 527: /* get entry by name u */
1449 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1450 nservers = tvb_get_ntohl(tvb, offset);
1451 OUT_UINT(hf_afs_vldb_numservers);
1452 for (i=0; i<13; i++)
1456 OUT_UUID(hf_afs_vldb_serveruuid);
1463 for (i=0; i<13; i++)
1467 OUT_UINT(hf_afs_vldb_serveruniq);
1471 SKIP(sizeof(guint32));
1474 for (i=0; i<13; i++)
1477 j = tvb_get_ntohl(tvb, offset);
1478 strcpy(part, "/vicepa");
1479 if ( i<nservers && j<=25 )
1481 part[6] = 'a' + (char) j;
1482 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1487 for (i=0; i<13; i++)
1491 OUT_UINT(hf_afs_vldb_serverflags);
1495 SKIP(sizeof(guint32));
1498 OUT_UINT(hf_afs_vldb_rwvol);
1499 OUT_UINT(hf_afs_vldb_rovol);
1500 OUT_UINT(hf_afs_vldb_bkvol);
1501 OUT_UINT(hf_afs_vldb_clonevol);
1502 OUT_UINT(hf_afs_vldb_flags);
1503 OUT_UINT(hf_afs_vldb_spare1);
1504 OUT_UINT(hf_afs_vldb_spare2);
1505 OUT_UINT(hf_afs_vldb_spare3);
1506 OUT_UINT(hf_afs_vldb_spare4);
1507 OUT_UINT(hf_afs_vldb_spare5);
1508 OUT_UINT(hf_afs_vldb_spare6);
1509 OUT_UINT(hf_afs_vldb_spare7);
1510 OUT_UINT(hf_afs_vldb_spare8);
1511 OUT_UINT(hf_afs_vldb_spare9);
1516 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1518 OUT_UINT(hf_afs_vldb_errcode);
1523 dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1525 offset += 4; /* skip the opcode */
1529 case 501: /* create new volume */
1530 case 517: /* create entry N */
1531 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1533 case 502: /* delete entry */
1534 case 503: /* get entry by id */
1535 case 507: /* update entry */
1536 case 508: /* set lock */
1537 case 509: /* release lock */
1538 case 518: /* get entry by id */
1539 OUT_UINT(hf_afs_vldb_id);
1540 OUT_UINT(hf_afs_vldb_type);
1542 case 504: /* get entry by name */
1543 case 519: /* get entry by name N */
1544 case 524: /* update entry by name */
1545 case 527: /* get entry by name U */
1546 OUT_RXString(hf_afs_vldb_name);
1548 case 505: /* get new vol id */
1549 OUT_UINT(hf_afs_vldb_bump);
1551 case 506: /* replace entry */
1552 case 520: /* replace entry N */
1553 OUT_UINT(hf_afs_vldb_id);
1554 OUT_UINT(hf_afs_vldb_type);
1555 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1557 case 510: /* list entry */
1558 case 521: /* list entry N */
1559 OUT_UINT(hf_afs_vldb_index);
1561 case 532: /* regaddr */
1562 OUT_UUID(hf_afs_vldb_serveruuid);
1563 OUT_UINT(hf_afs_vldb_spare1);
1564 OUT_VLDB_BulkAddr();
1573 dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1577 case 10000: /* vote-beacon */
1579 case 10001: /* vote-debug-old */
1580 OUT_UBIK_DebugOld();
1582 case 10002: /* vote-sdebug-old */
1583 OUT_UBIK_SDebugOld();
1585 case 10003: /* vote-get syncsite */
1587 case 10004: /* vote-debug */
1588 OUT_UBIK_DebugOld();
1589 OUT_UBIK_InterfaceAddrs();
1591 case 10005: /* vote-sdebug */
1592 OUT_UBIK_SDebugOld();
1593 OUT_UBIK_InterfaceAddrs();
1595 case 10006: /* vote-xdebug */
1596 OUT_UBIK_DebugOld();
1597 OUT_UBIK_InterfaceAddrs();
1598 OUT_UINT(hf_afs_ubik_isclone);
1600 case 10007: /* vote-xsdebug */
1601 OUT_UBIK_SDebugOld();
1602 OUT_UBIK_InterfaceAddrs();
1603 OUT_UINT(hf_afs_ubik_isclone);
1605 case 20000: /* disk-begin */
1607 case 20004: /* get version */
1608 OUT_UBIKVERSION("DB Version");
1610 case 20010: /* disk-probe */
1612 case 20012: /* disk-interfaceaddr */
1613 OUT_UBIK_InterfaceAddrs();
1619 dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1621 offset += 4; /* skip the opcode */
1625 case 10000: /* vote-beacon */
1626 OUT_UINT(hf_afs_ubik_state);
1627 OUT_TIMESECS(hf_afs_ubik_votestart);
1628 OUT_UBIKVERSION("DB Version");
1629 OUT_UBIKVERSION("TID");
1631 case 10001: /* vote-debug-old */
1633 case 10002: /* vote-sdebug-old */
1634 OUT_UINT(hf_afs_ubik_site);
1636 case 10003: /* vote-get sync site */
1637 OUT_IP(hf_afs_ubik_site);
1639 case 10004: /* vote-debug */
1640 case 10005: /* vote-sdebug */
1641 OUT_IP(hf_afs_ubik_site);
1643 case 20000: /* disk-begin */
1644 OUT_UBIKVERSION("TID");
1646 case 20001: /* disk-commit */
1647 OUT_UBIKVERSION("TID");
1649 case 20002: /* disk-lock */
1650 OUT_UBIKVERSION("TID");
1651 OUT_UINT(hf_afs_ubik_file);
1652 OUT_UINT(hf_afs_ubik_pos);
1653 OUT_UINT(hf_afs_ubik_length);
1654 OUT_UINT(hf_afs_ubik_locktype);
1656 case 20003: /* disk-write */
1657 OUT_UBIKVERSION("TID");
1658 OUT_UINT(hf_afs_ubik_file);
1659 OUT_UINT(hf_afs_ubik_pos);
1661 case 20004: /* disk-get version */
1663 case 20005: /* disk-get file */
1664 OUT_UINT(hf_afs_ubik_file);
1666 case 20006: /* disk-send file */
1667 OUT_UINT(hf_afs_ubik_file);
1668 OUT_UINT(hf_afs_ubik_length);
1669 OUT_UBIKVERSION("DB Version");
1671 case 20007: /* disk-abort */
1672 case 20008: /* disk-release locks */
1673 case 20010: /* disk-probe */
1675 case 20009: /* disk-truncate */
1676 OUT_UBIKVERSION("TID");
1677 OUT_UINT(hf_afs_ubik_file);
1678 OUT_UINT(hf_afs_ubik_length);
1680 case 20011: /* disk-writev */
1681 OUT_UBIKVERSION("TID");
1683 case 20012: /* disk-interfaceaddr */
1684 OUT_UBIK_InterfaceAddrs();
1686 case 20013: /* disk-set version */
1687 OUT_UBIKVERSION("TID");
1688 OUT_UBIKVERSION("Old DB Version");
1689 OUT_UBIKVERSION("New DB Version");
1698 dissect_backup_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1700 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1706 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1708 OUT_UINT(hf_afs_backup_errcode);
1713 dissect_backup_request(tvbuff_t *tvb _U_, struct rxinfo *rxinfo _U_, proto_tree *tree _U_, int offset, int opcode)
1715 offset += 4; /* skip the opcode */
1723 * Registration code for registering the protocol and fields
1727 proto_register_afs(void)
1729 static hf_register_info hf[] = {
1730 #include "packet-afs-register-info.h"
1732 static gint *ett[] = {
1740 &ett_afs_status_mask,
1742 &ett_afs_volumeinfo,
1744 &ett_afs_vldb_flags,
1747 proto_afs = proto_register_protocol("Andrew File System (AFS)",
1749 proto_register_field_array(proto_afs, hf, array_length(hf));
1750 proto_register_subtree_array(ett, array_length(ett));
1751 register_init_routine(&afs_init_protocol);
1753 register_dissector("afs", dissect_afs, proto_afs);