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.54 2003/03/05 09:52:22 sahlberg 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 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,
373 "Service: %s%s%s %s",
374 VALID_OPCODE(opcode) ? "" : "Encrypted ",
375 typenode == hf_afs_ubik ? "UBIK - " : "",
376 val_to_str(port, port_types, "Unknown(%d)"),
377 reply ? "Reply" : "Request");
379 if( request_val && !reply && request_val->rep_num) {
380 proto_tree_add_uint_format(afs_tree, hf_afs_repframe,
381 tvb, 0, 0, request_val->rep_num,
382 "The reply to this request is in frame %u",
383 request_val->rep_num);
385 if( request_val && reply && request_val->rep_num) {
386 proto_tree_add_uint_format(afs_tree, hf_afs_reqframe,
387 tvb, 0, 0, request_val->req_num,
388 "This is a reply to a request in frame %u",
389 request_val->req_num);
390 ns.secs= pinfo->fd->abs_secs-request_val->req_time.secs;
391 ns.nsecs=pinfo->fd->abs_usecs*1000-request_val->req_time.nsecs;
393 ns.nsecs+=1000000000;
396 proto_tree_add_time(afs_tree, hf_afs_time, tvb, offset, 0,
401 if ( VALID_OPCODE(opcode) ) {
402 /* until we do cache, can't handle replies */
404 if ( !reply && node != 0 ) {
405 if ( rxinfo->seq == 1 )
407 ti = proto_tree_add_uint(afs_tree,
408 node, tvb, offset, 4, opcode);
410 ti = proto_tree_add_uint(afs_tree,
411 node, tvb, offset, 0, opcode);
413 } else if ( reply && node != 0 ) {
414 /* the opcode isn't in this packet */
415 ti = proto_tree_add_uint(afs_tree,
416 node, tvb, offset, 0, opcode);
418 ti = proto_tree_add_text(afs_tree, tvb,
419 offset, 0, "Operation: Unknown");
422 /* Add the subtree for this particular service */
423 afs_op_tree = proto_item_add_subtree(ti, ett_afs_op);
426 if ( typenode != 0 ) {
427 /* indicate the type of request */
428 proto_tree_add_boolean_hidden(afs_tree, typenode, tvb, offset, 0, 1);
431 /* Process the packet according to what service it is */
433 (*dissector)(tvb, rxinfo, afs_op_tree, offset, opcode);
438 /* if it's the last packet, and it's a reply, remove opcode
440 /* ignoring for now, I'm not sure how the chunk deallocation works */
441 if ( rxinfo->flags & RX_LAST_PACKET && reply ){
448 * Here is a helper routine for adding an AFS acl to the proto tree
449 * This is to be used with FS packets only
451 * An AFS ACL is a string that has the following format:
453 * <positive> <negative>
457 * "positive" and "negative" are integers which contain the number of
458 * positive and negative ACL's in the string. The uid/aclbits pair are
459 * ASCII strings containing the UID/PTS record and and a ascii number
460 * representing a logical OR of all the ACL permission bits
465 * sscanf is probably quite dangerous if we run outside the packet.
467 * "GETSTR" doesn't guarantee that the resulting string is
470 * Should this just scan the string itself, rather than using "sscanf()"?
473 dissect_acl(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset)
477 int i, n, pos, neg, acl;
478 char user[128]; /* Be sure to adjust sscanf()s below if length is changed... */
481 bytes = tvb_get_ntohl(tvb, offset);
482 OUT_UINT(hf_afs_fs_acl_datasize);
485 if (sscanf(GETSTR, "%d %n", &pos, &n) != 1) {
486 /* does not matter what we return, if this fails,
487 * we cant dissect anything else in the packet either.
491 proto_tree_add_uint(tree, hf_afs_fs_acl_count_positive, tvb,
496 if (sscanf(GETSTR, "%d %n", &neg, &n) != 1) {
499 proto_tree_add_uint(tree, hf_afs_fs_acl_count_negative, tvb,
504 * This wacky order preserves the order used by the "fs" command
506 for (i = 0; i < pos; i++) {
507 if (sscanf(GETSTR, "%127s %d %n", user, &acl, &n) != 2) {
510 ACLOUT(user,1,acl,n);
513 for (i = 0; i < neg; i++) {
514 if (sscanf(GETSTR, "%127s %d %n", user, &acl, &n) != 2) {
517 ACLOUT(user,0,acl,n);
519 if (offset >= old_offset+bytes ) {
528 * Here are the helper dissection routines
532 dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
534 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
538 case 130: /* fetch data */
539 /* only on first packet */
540 if ( rxinfo->seq == 1 )
542 OUT_FS_AFSFetchStatus("Status");
543 OUT_FS_AFSCallBack();
546 OUT_BYTES_ALL(hf_afs_fs_data);
548 case 131: /* fetch acl */
549 offset = dissect_acl(tvb, rxinfo, tree, offset);
550 OUT_FS_AFSFetchStatus("Status");
553 case 132: /* Fetch status */
554 OUT_FS_AFSFetchStatus("Status");
555 OUT_FS_AFSCallBack();
558 case 133: /* Store data */
559 case 134: /* Store ACL */
560 case 135: /* Store status */
561 case 136: /* Remove file */
562 OUT_FS_AFSFetchStatus("Status");
565 case 137: /* create file */
566 case 141: /* make dir */
567 case 161: /* lookup */
568 case 163: /* dfs symlink */
569 OUT_FS_AFSFid((opcode == 137)? "New File" : ((opcode == 141)? "New Directory" : "File"));
570 OUT_FS_AFSFetchStatus("File Status");
571 OUT_FS_AFSFetchStatus("Directory Status");
572 OUT_FS_AFSCallBack();
575 case 138: /* rename */
576 OUT_FS_AFSFetchStatus("Old Directory Status");
577 OUT_FS_AFSFetchStatus("New Directory Status");
580 case 139: /* symlink */
581 OUT_FS_AFSFid("Symlink");
583 OUT_FS_AFSFetchStatus("Symlink Status");
584 case 142: /* rmdir */
585 OUT_FS_AFSFetchStatus("Directory Status");
588 case 143: /* old set lock */
589 case 144: /* old extend lock */
590 case 145: /* old release lock */
591 case 147: /* give up callbacks */
592 case 150: /* set volume status */
593 case 152: /* check token */
594 /* nothing returned */
596 case 146: /* get statistics */
597 OUT_FS_ViceStatistics();
599 case 148: /* get volume info */
600 case 154: /* n-get-volume-info */
603 case 149: /* get volume status */
604 OUT_FS_AFSFetchVolumeStatus();
605 OUT_RXString(hf_afs_fs_volname);
606 OUT_RXString(hf_afs_fs_offlinemsg);
607 OUT_RXString(hf_afs_fs_motd);
609 case 151: /* root volume */
610 OUT_RXString(hf_afs_fs_volname);
612 case 153: /* get time */
613 OUT_TIMESTAMP(hf_afs_fs_timestamp);
615 case 155: /* bulk status */
616 OUT_FS_AFSBulkStats();
621 case 156: /* set lock */
622 case 157: /* extend lock */
623 case 158: /* release lock */
626 case 159: /* x-stats-version */
627 OUT_UINT(hf_afs_fs_xstats_version);
629 case 160: /* get xstats */
630 OUT_UINT(hf_afs_fs_xstats_version);
631 OUT_TIMESECS(hf_afs_fs_xstats_timestamp);
632 OUT_FS_AFS_CollData();
634 case 162: /* flush cps */
635 OUT_UINT(hf_afs_fs_cps_spare2);
636 OUT_UINT(hf_afs_fs_cps_spare3);
640 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
642 OUT_UINT(hf_afs_fs_errcode);
647 dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
649 /* skip the opcode if this is the first packet in the stream */
650 if ( rxinfo->seq == 1 )
652 offset += 4; /* skip the opcode */
657 case 130: /* Fetch data */
658 OUT_FS_AFSFid("Source");
659 OUT_UINT(hf_afs_fs_offset);
660 OUT_UINT(hf_afs_fs_length);
662 case 131: /* Fetch ACL */
663 OUT_FS_AFSFid("Target");
665 case 132: /* Fetch Status */
666 OUT_FS_AFSFid("Target");
668 case 133: /* Store Data */
669 if ( rxinfo->seq == 1 )
671 OUT_FS_AFSFid("Destination");
672 OUT_FS_AFSStoreStatus("Status");
673 OUT_UINT(hf_afs_fs_offset);
674 OUT_UINT(hf_afs_fs_length);
675 OUT_UINT(hf_afs_fs_flength);
677 OUT_BYTES_ALL(hf_afs_fs_data);
679 case 134: /* Store ACL */
680 OUT_FS_AFSFid("Target");
681 offset = dissect_acl(tvb, rxinfo, tree, offset);
683 case 135: /* Store Status */
684 OUT_FS_AFSFid("Target");
685 OUT_FS_AFSStoreStatus("Status");
687 case 136: /* Remove File */
688 OUT_FS_AFSFid("Remove File");
689 OUT_RXString(hf_afs_fs_name);
691 case 137: /* Create File */
692 OUT_FS_AFSFid("Target");
693 OUT_RXString(hf_afs_fs_name);
694 OUT_FS_AFSStoreStatus("Status");
696 case 138: /* Rename file */
697 OUT_FS_AFSFid("Old");
698 OUT_RXString(hf_afs_fs_oldname);
699 OUT_FS_AFSFid("New");
700 OUT_RXString(hf_afs_fs_newname);
702 case 139: /* Symlink */
703 OUT_FS_AFSFid("File");
704 OUT_RXString(hf_afs_fs_symlink_name);
705 OUT_RXString(hf_afs_fs_symlink_content);
706 OUT_FS_AFSStoreStatus("Status");
709 OUT_FS_AFSFid("Link To (New File)");
710 OUT_RXString(hf_afs_fs_name);
711 OUT_FS_AFSFid("Link From (Old File)");
713 case 141: /* Make dir */
714 OUT_FS_AFSFid("Target");
715 OUT_RXString(hf_afs_fs_name);
716 OUT_FS_AFSStoreStatus("Status");
718 case 142: /* Remove dir */
719 OUT_FS_AFSFid("Target");
720 OUT_RXString(hf_afs_fs_name);
722 case 143: /* Old Set Lock */
723 OUT_FS_AFSFid("Target");
724 OUT_UINT(hf_afs_fs_vicelocktype);
727 case 144: /* Old Extend Lock */
728 OUT_FS_AFSFid("Target");
731 case 145: /* Old Release Lock */
732 OUT_FS_AFSFid("Target");
735 case 146: /* Get statistics */
738 case 147: /* Give up callbacks */
742 case 148: /* Get vol info */
743 OUT_RXString(hf_afs_fs_volname);
745 case 149: /* Get vol stats */
746 OUT_UINT(hf_afs_fs_volid);
748 case 150: /* Set vol stats */
749 OUT_UINT(hf_afs_fs_volid);
750 OUT_FS_AFSStoreVolumeStatus();
751 OUT_RXString(hf_afs_fs_volname);
752 OUT_RXString(hf_afs_fs_offlinemsg);
753 OUT_RXString(hf_afs_fs_motd);
755 case 151: /* get root volume */
758 case 152: /* check token */
759 OUT_UINT(hf_afs_fs_viceid);
762 case 153: /* get time */
765 case 154: /* new get vol info */
766 OUT_RXString(hf_afs_fs_volname);
768 case 155: /* bulk stat */
771 case 156: /* Set Lock */
772 OUT_FS_AFSFid("Target");
773 OUT_UINT(hf_afs_fs_vicelocktype);
775 case 157: /* Extend Lock */
776 OUT_FS_AFSFid("Target");
778 case 158: /* Release Lock */
779 OUT_FS_AFSFid("Target");
781 case 159: /* xstats version */
784 case 160: /* get xstats */
785 OUT_UINT(hf_afs_fs_xstats_clientversion);
786 OUT_UINT(hf_afs_fs_xstats_collnumber);
788 case 161: /* lookup */
789 OUT_FS_AFSFid("Target");
790 OUT_RXString(hf_afs_fs_name);
792 case 162: /* flush cps */
795 OUT_UINT(hf_afs_fs_cps_spare1);
797 case 163: /* dfs symlink */
798 OUT_FS_AFSFid("Target");
799 OUT_RXString(hf_afs_fs_symlink_name);
800 OUT_RXString(hf_afs_fs_symlink_content);
801 OUT_FS_AFSStoreStatus("Symlink Status");
810 dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
812 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
816 case 80: /* create bnode */
819 case 81: /* delete bnode */
822 case 82: /* set status */
825 case 83: /* get status */
826 OUT_INT(hf_afs_bos_status);
827 OUT_RXString(hf_afs_bos_statusdesc);
829 case 84: /* enumerate instance */
830 OUT_RXString(hf_afs_bos_instance);
832 case 85: /* get instance info */
833 OUT_RXString(hf_afs_bos_type);
836 case 86: /* get instance parm */
837 OUT_RXString(hf_afs_bos_parm);
839 case 87: /* add siperuser */
842 case 88: /* delete superuser */
845 case 89: /* list superusers */
846 OUT_RXString(hf_afs_bos_user);
848 case 90: /* list keys */
849 OUT_UINT(hf_afs_bos_kvno);
853 case 91: /* add key */
856 case 92: /* delete key */
859 case 93: /* set cell name */
862 case 94: /* get cell name */
863 OUT_RXString(hf_afs_bos_cell);
865 case 95: /* get cell host */
866 OUT_RXString(hf_afs_bos_host);
868 case 96: /* add cell host */
871 case 97: /* delete cell host */
874 case 98: /* set tstatus */
877 case 99: /* shutdown all */
880 case 100: /* restart all */
883 case 101: /* startup all */
886 case 102: /* set noauth flag */
889 case 103: /* rebozo */
892 case 104: /* restart */
895 case 105: /* install */
898 case 106: /* uninstall */
901 case 107: /* get dates */
902 OUT_TIMESECS(hf_afs_bos_newtime);
903 OUT_TIMESECS(hf_afs_bos_baktime);
904 OUT_TIMESECS(hf_afs_bos_oldtime);
909 case 109: /* prune */
912 case 110: /* set restart time */
915 case 111: /* get restart time */
918 case 112: /* get log */
919 /* need to make this dump a big string somehow */
920 OUT_BYTES_ALL(hf_afs_bos_data);
922 case 113: /* wait all */
925 case 114: /* get instance strings */
926 OUT_RXString(hf_afs_bos_error);
927 OUT_RXString(hf_afs_bos_spare1);
928 OUT_RXString(hf_afs_bos_spare2);
929 OUT_RXString(hf_afs_bos_spare3);
933 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
935 OUT_UINT(hf_afs_bos_errcode);
940 dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
942 offset += 4; /* skip the opcode */
946 case 80: /* create b node */
947 OUT_RXString(hf_afs_bos_type);
948 OUT_RXString(hf_afs_bos_instance);
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);
954 OUT_RXString(hf_afs_bos_parm);
956 case 81: /* delete b node */
957 OUT_RXString(hf_afs_bos_instance);
959 case 82: /* set status */
960 OUT_RXString(hf_afs_bos_instance);
961 OUT_INT(hf_afs_bos_status);
963 case 83: /* get status */
964 OUT_RXString(hf_afs_bos_instance);
966 case 84: /* enumerate instance */
967 OUT_UINT(hf_afs_bos_num);
969 case 85: /* get instance info */
970 OUT_RXString(hf_afs_bos_instance);
972 case 86: /* get instance parm */
973 OUT_RXString(hf_afs_bos_instance);
974 OUT_UINT(hf_afs_bos_num);
976 case 87: /* add super user */
977 OUT_RXString(hf_afs_bos_user);
979 case 88: /* delete super user */
980 OUT_RXString(hf_afs_bos_user);
982 case 89: /* list super users */
983 OUT_UINT(hf_afs_bos_num);
985 case 90: /* list keys */
986 OUT_UINT(hf_afs_bos_num);
988 case 91: /* add key */
989 OUT_UINT(hf_afs_bos_num);
992 case 92: /* delete key */
993 OUT_UINT(hf_afs_bos_num);
995 case 93: /* set cell name */
996 OUT_RXString(hf_afs_bos_content);
998 case 95: /* set cell host */
999 OUT_UINT(hf_afs_bos_num);
1001 case 96: /* add cell host */
1002 OUT_RXString(hf_afs_bos_content);
1004 case 97: /* delete cell host */
1005 OUT_RXString(hf_afs_bos_content);
1007 case 98: /* set t status */
1008 OUT_RXString(hf_afs_bos_content);
1009 OUT_INT(hf_afs_bos_status);
1011 case 99: /* shutdown all */
1014 case 100: /* restart all */
1017 case 101: /* startup all */
1020 case 102: /* set no-auth flag */
1021 OUT_UINT(hf_afs_bos_flags);
1023 case 103: /* re-bozo? */
1026 case 104: /* restart */
1027 OUT_RXString(hf_afs_bos_instance);
1029 case 105: /* install */
1030 OUT_RXString(hf_afs_bos_path);
1031 OUT_UINT(hf_afs_bos_size);
1032 OUT_UINT(hf_afs_bos_flags);
1033 OUT_UINT(hf_afs_bos_date);
1035 case 106: /* uninstall */
1036 OUT_RXString(hf_afs_bos_path);
1038 case 107: /* get dates */
1039 OUT_RXString(hf_afs_bos_path);
1041 case 108: /* exec */
1042 OUT_RXString(hf_afs_bos_cmd);
1044 case 109: /* prune */
1045 OUT_UINT(hf_afs_bos_flags);
1047 case 110: /* set restart time */
1048 OUT_UINT(hf_afs_bos_num);
1051 case 111: /* get restart time */
1052 OUT_UINT(hf_afs_bos_num);
1054 case 112: /* get log */
1055 OUT_RXString(hf_afs_bos_file);
1057 case 113: /* wait all */
1060 case 114: /* get instance strings */
1061 OUT_RXString(hf_afs_bos_content);
1070 dissect_vol_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1072 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1077 /* should loop here maybe */
1078 OUT_UINT(hf_afs_vol_count);
1079 OUT_RXStringV(hf_afs_vol_name, 32); /* not sure on */
1083 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1085 OUT_UINT(hf_afs_vol_errcode);
1090 dissect_vol_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1092 offset += 4; /* skip the opcode */
1096 case 121: /* list one vol */
1097 OUT_UINT(hf_afs_vol_count);
1098 OUT_UINT(hf_afs_vol_id);
1107 dissect_kauth_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1109 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1115 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1117 OUT_UINT(hf_afs_kauth_errcode);
1122 dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1124 offset += 4; /* skip the opcode */
1128 case 1: /* authenticate old */
1129 case 21: /* authenticate */
1130 case 22: /* authenticate v2 */
1131 case 2: /* change pw */
1132 case 5: /* set fields */
1133 case 6: /* create user */
1134 case 7: /* delete user */
1135 case 8: /* get entry */
1136 case 14: /* unlock */
1137 case 15: /* lock status */
1138 OUT_RXString(hf_afs_kauth_princ);
1139 OUT_RXString(hf_afs_kauth_realm);
1140 OUT_BYTES_ALL(hf_afs_kauth_data);
1142 case 3: /* getticket-old */
1143 case 23: /* getticket */
1144 OUT_KAUTH_GetTicket();
1146 case 4: /* set pass */
1147 OUT_RXString(hf_afs_kauth_princ);
1148 OUT_RXString(hf_afs_kauth_realm);
1149 OUT_UINT(hf_afs_kauth_kvno);
1151 case 12: /* get pass */
1152 OUT_RXString(hf_afs_kauth_name);
1161 dissect_cb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1163 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1169 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1171 OUT_UINT(hf_afs_cb_errcode);
1176 dissect_cb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1178 offset += 4; /* skip the opcode */
1182 case 204: /* callback */
1186 j = tvb_get_ntohl(tvb, offset);
1191 OUT_CB_AFSFid("Target");
1194 j = tvb_get_ntohl(tvb, offset);
1198 OUT_CB_AFSCallBack();
1208 dissect_prot_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1210 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1214 case 504: /* name to id */
1218 j = tvb_get_ntohl(tvb, offset);
1219 OUT_UINT(hf_afs_prot_count);
1223 OUT_UINT(hf_afs_prot_id);
1227 case 505: /* id to name */
1231 j = tvb_get_ntohl(tvb, offset);
1232 OUT_UINT(hf_afs_prot_count);
1236 OUT_RXStringV(hf_afs_prot_name, PRNAMEMAX);
1240 case 508: /* get cps */
1241 case 514: /* list elements */
1242 case 517: /* list owned */
1243 case 518: /* get cps2 */
1244 case 519: /* get host cps */
1248 j = tvb_get_ntohl(tvb, offset);
1249 OUT_UINT(hf_afs_prot_count);
1253 OUT_UINT(hf_afs_prot_id);
1257 case 510: /* list max */
1258 OUT_UINT(hf_afs_prot_maxuid);
1259 OUT_UINT(hf_afs_prot_maxgid);
1263 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1265 OUT_UINT(hf_afs_prot_errcode);
1270 dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1272 offset += 4; /* skip the opcode */
1276 case 500: /* new user */
1277 OUT_RXString(hf_afs_prot_name);
1278 OUT_UINT(hf_afs_prot_id);
1279 OUT_UINT(hf_afs_prot_oldid);
1281 case 501: /* where is it */
1282 case 506: /* delete */
1283 case 508: /* get cps */
1284 case 512: /* list entry */
1285 case 514: /* list elements */
1286 case 517: /* list owned */
1287 case 519: /* get host cps */
1288 OUT_UINT(hf_afs_prot_id);
1290 case 502: /* dump entry */
1291 OUT_UINT(hf_afs_prot_pos);
1293 case 503: /* add to group */
1294 case 507: /* remove from group */
1295 case 515: /* is a member of? */
1296 OUT_UINT(hf_afs_prot_uid);
1297 OUT_UINT(hf_afs_prot_gid);
1299 case 504: /* name to id */
1303 j = tvb_get_ntohl(tvb, offset);
1304 OUT_UINT(hf_afs_prot_count);
1308 OUT_RXStringV(hf_afs_prot_name,PRNAMEMAX);
1312 case 505: /* id to name */
1316 j = tvb_get_ntohl(tvb, offset);
1317 OUT_UINT(hf_afs_prot_count);
1321 OUT_UINT(hf_afs_prot_id);
1325 case 509: /* new entry */
1326 OUT_RXString(hf_afs_prot_name);
1327 OUT_UINT(hf_afs_prot_flag);
1328 OUT_UINT(hf_afs_prot_oldid);
1330 case 511: /* set max */
1331 OUT_UINT(hf_afs_prot_id);
1332 OUT_UINT(hf_afs_prot_flag);
1334 case 513: /* change entry */
1335 OUT_UINT(hf_afs_prot_id);
1336 OUT_RXString(hf_afs_prot_name);
1337 OUT_UINT(hf_afs_prot_oldid);
1338 OUT_UINT(hf_afs_prot_newid);
1340 case 520: /* update entry */
1341 OUT_UINT(hf_afs_prot_id);
1342 OUT_RXString(hf_afs_prot_name);
1351 dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1353 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1357 case 510: /* list entry */
1358 OUT_UINT(hf_afs_vldb_count);
1359 OUT_UINT(hf_afs_vldb_nextindex);
1361 case 503: /* get entry by id */
1362 case 504: /* get entry by name */
1365 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1367 nservers = tvb_get_ntohl(tvb, offset);
1368 OUT_UINT(hf_afs_vldb_numservers);
1373 OUT_IP(hf_afs_vldb_server);
1383 j = tvb_get_ntohl(tvb, offset);
1384 strcpy(part, "/vicepa");
1385 if ( i<nservers && j<=25 )
1387 part[6] = 'a' + (char) j;
1388 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1393 SKIP(8 * sizeof(guint32));
1394 OUT_UINT(hf_afs_vldb_rwvol);
1395 OUT_UINT(hf_afs_vldb_rovol);
1396 OUT_UINT(hf_afs_vldb_bkvol);
1397 OUT_UINT(hf_afs_vldb_clonevol);
1401 case 505: /* get new volume id */
1402 OUT_UINT(hf_afs_vldb_id);
1404 case 521: /* list entry */
1405 case 529: /* list entry U */
1406 OUT_UINT(hf_afs_vldb_count);
1407 OUT_UINT(hf_afs_vldb_nextindex);
1409 case 518: /* get entry by id n */
1410 case 519: /* get entry by name N */
1413 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1414 nservers = tvb_get_ntohl(tvb, offset);
1415 OUT_UINT(hf_afs_vldb_numservers);
1416 for (i=0; i<13; i++)
1420 OUT_IP(hf_afs_vldb_server);
1427 for (i=0; i<13; i++)
1430 j = tvb_get_ntohl(tvb, offset);
1431 strcpy(part, "/vicepa");
1432 if ( i<nservers && j<=25 )
1434 part[6] = 'a' + (char) j;
1435 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1440 SKIP(13 * sizeof(guint32));
1441 OUT_UINT(hf_afs_vldb_rwvol);
1442 OUT_UINT(hf_afs_vldb_rovol);
1443 OUT_UINT(hf_afs_vldb_bkvol);
1446 case 526: /* get entry by id u */
1447 case 527: /* get entry by name u */
1450 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1451 nservers = tvb_get_ntohl(tvb, offset);
1452 OUT_UINT(hf_afs_vldb_numservers);
1453 for (i=0; i<13; i++)
1457 OUT_UUID(hf_afs_vldb_serveruuid);
1464 for (i=0; i<13; i++)
1468 OUT_UINT(hf_afs_vldb_serveruniq);
1472 SKIP(sizeof(guint32));
1475 for (i=0; i<13; i++)
1478 j = tvb_get_ntohl(tvb, offset);
1479 strcpy(part, "/vicepa");
1480 if ( i<nservers && j<=25 )
1482 part[6] = 'a' + (char) j;
1483 proto_tree_add_string(tree, hf_afs_vldb_partition, tvb,
1488 for (i=0; i<13; i++)
1492 OUT_UINT(hf_afs_vldb_serverflags);
1496 SKIP(sizeof(guint32));
1499 OUT_UINT(hf_afs_vldb_rwvol);
1500 OUT_UINT(hf_afs_vldb_rovol);
1501 OUT_UINT(hf_afs_vldb_bkvol);
1502 OUT_UINT(hf_afs_vldb_clonevol);
1503 OUT_UINT(hf_afs_vldb_flags);
1504 OUT_UINT(hf_afs_vldb_spare1);
1505 OUT_UINT(hf_afs_vldb_spare2);
1506 OUT_UINT(hf_afs_vldb_spare3);
1507 OUT_UINT(hf_afs_vldb_spare4);
1508 OUT_UINT(hf_afs_vldb_spare5);
1509 OUT_UINT(hf_afs_vldb_spare6);
1510 OUT_UINT(hf_afs_vldb_spare7);
1511 OUT_UINT(hf_afs_vldb_spare8);
1512 OUT_UINT(hf_afs_vldb_spare9);
1517 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1519 OUT_UINT(hf_afs_vldb_errcode);
1524 dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1526 offset += 4; /* skip the opcode */
1530 case 501: /* create new volume */
1531 case 517: /* create entry N */
1532 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1534 case 502: /* delete entry */
1535 case 503: /* get entry by id */
1536 case 507: /* update entry */
1537 case 508: /* set lock */
1538 case 509: /* release lock */
1539 case 518: /* get entry by id */
1540 OUT_UINT(hf_afs_vldb_id);
1541 OUT_UINT(hf_afs_vldb_type);
1543 case 504: /* get entry by name */
1544 case 519: /* get entry by name N */
1545 case 524: /* update entry by name */
1546 case 527: /* get entry by name U */
1547 OUT_RXString(hf_afs_vldb_name);
1549 case 505: /* get new vol id */
1550 OUT_UINT(hf_afs_vldb_bump);
1552 case 506: /* replace entry */
1553 case 520: /* replace entry N */
1554 OUT_UINT(hf_afs_vldb_id);
1555 OUT_UINT(hf_afs_vldb_type);
1556 OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
1558 case 510: /* list entry */
1559 case 521: /* list entry N */
1560 OUT_UINT(hf_afs_vldb_index);
1562 case 532: /* regaddr */
1563 OUT_UUID(hf_afs_vldb_serveruuid);
1564 OUT_UINT(hf_afs_vldb_spare1);
1565 OUT_VLDB_BulkAddr();
1574 dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1578 case 10000: /* vote-beacon */
1580 case 10001: /* vote-debug-old */
1581 OUT_UBIK_DebugOld();
1583 case 10002: /* vote-sdebug-old */
1584 OUT_UBIK_SDebugOld();
1586 case 10003: /* vote-get syncsite */
1588 case 10004: /* vote-debug */
1589 OUT_UBIK_DebugOld();
1590 OUT_UBIK_InterfaceAddrs();
1592 case 10005: /* vote-sdebug */
1593 OUT_UBIK_SDebugOld();
1594 OUT_UBIK_InterfaceAddrs();
1596 case 10006: /* vote-xdebug */
1597 OUT_UBIK_DebugOld();
1598 OUT_UBIK_InterfaceAddrs();
1599 OUT_UINT(hf_afs_ubik_isclone);
1601 case 10007: /* vote-xsdebug */
1602 OUT_UBIK_SDebugOld();
1603 OUT_UBIK_InterfaceAddrs();
1604 OUT_UINT(hf_afs_ubik_isclone);
1606 case 20000: /* disk-begin */
1608 case 20004: /* get version */
1609 OUT_UBIKVERSION("DB Version");
1611 case 20010: /* disk-probe */
1613 case 20012: /* disk-interfaceaddr */
1614 OUT_UBIK_InterfaceAddrs();
1620 dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
1622 offset += 4; /* skip the opcode */
1626 case 10000: /* vote-beacon */
1627 OUT_UINT(hf_afs_ubik_state);
1628 OUT_TIMESECS(hf_afs_ubik_votestart);
1629 OUT_UBIKVERSION("DB Version");
1630 OUT_UBIKVERSION("TID");
1632 case 10001: /* vote-debug-old */
1634 case 10002: /* vote-sdebug-old */
1635 OUT_UINT(hf_afs_ubik_site);
1637 case 10003: /* vote-get sync site */
1638 OUT_IP(hf_afs_ubik_site);
1640 case 10004: /* vote-debug */
1641 case 10005: /* vote-sdebug */
1642 OUT_IP(hf_afs_ubik_site);
1644 case 20000: /* disk-begin */
1645 OUT_UBIKVERSION("TID");
1647 case 20001: /* disk-commit */
1648 OUT_UBIKVERSION("TID");
1650 case 20002: /* disk-lock */
1651 OUT_UBIKVERSION("TID");
1652 OUT_UINT(hf_afs_ubik_file);
1653 OUT_UINT(hf_afs_ubik_pos);
1654 OUT_UINT(hf_afs_ubik_length);
1655 OUT_UINT(hf_afs_ubik_locktype);
1657 case 20003: /* disk-write */
1658 OUT_UBIKVERSION("TID");
1659 OUT_UINT(hf_afs_ubik_file);
1660 OUT_UINT(hf_afs_ubik_pos);
1662 case 20004: /* disk-get version */
1664 case 20005: /* disk-get file */
1665 OUT_UINT(hf_afs_ubik_file);
1667 case 20006: /* disk-send file */
1668 OUT_UINT(hf_afs_ubik_file);
1669 OUT_UINT(hf_afs_ubik_length);
1670 OUT_UBIKVERSION("DB Version");
1672 case 20007: /* disk-abort */
1673 case 20008: /* disk-release locks */
1674 case 20010: /* disk-probe */
1676 case 20009: /* disk-truncate */
1677 OUT_UBIKVERSION("TID");
1678 OUT_UINT(hf_afs_ubik_file);
1679 OUT_UINT(hf_afs_ubik_length);
1681 case 20011: /* disk-writev */
1682 OUT_UBIKVERSION("TID");
1684 case 20012: /* disk-interfaceaddr */
1685 OUT_UBIK_InterfaceAddrs();
1687 case 20013: /* disk-set version */
1688 OUT_UBIKVERSION("TID");
1689 OUT_UBIKVERSION("Old DB Version");
1690 OUT_UBIKVERSION("New DB Version");
1699 dissect_backup_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
1701 if ( rxinfo->type == RX_PACKET_TYPE_DATA )
1707 else if ( rxinfo->type == RX_PACKET_TYPE_ABORT )
1709 OUT_UINT(hf_afs_backup_errcode);
1714 dissect_backup_request(tvbuff_t *tvb _U_, struct rxinfo *rxinfo _U_, proto_tree *tree _U_, int offset, int opcode)
1716 offset += 4; /* skip the opcode */
1724 * Registration code for registering the protocol and fields
1728 proto_register_afs(void)
1730 static hf_register_info hf[] = {
1731 #include "packet-afs-register-info.h"
1733 static gint *ett[] = {
1741 &ett_afs_status_mask,
1743 &ett_afs_volumeinfo,
1745 &ett_afs_vldb_flags,
1748 proto_afs = proto_register_protocol("Andrew File System (AFS)",
1750 proto_register_field_array(proto_afs, hf, array_length(hf));
1751 proto_register_subtree_array(ett, array_length(ett));
1752 register_init_routine(&afs_init_protocol);
1754 register_dissector("afs", dissect_afs, proto_afs);