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.29 2001/04/02 19:10:06 nneul Exp $
13 * Ethereal - Network traffic analyzer
14 * By Gerald Combs <gerald@zing.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #ifdef HAVE_SYS_TYPES_H
41 # include <sys/types.h>
44 #ifdef HAVE_NETINET_IN_H
45 # include <netinet/in.h>
51 #include "conversation.h"
54 #include "packet-rx.h"
55 #include "packet-afs.h"
56 #include "packet-afs-defs.h"
57 #include "packet-afs-macros.h"
59 #define VALID_OPCODE(opcode) ((opcode >= OPCODE_LOW && opcode <= OPCODE_HIGH) || \
60 (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \
61 (opcode >= DISK_LOW && opcode <= DISK_HIGH))
63 int afs_packet_init_count = 100;
65 struct afs_request_key {
66 guint32 conversation, callnumber;
70 struct afs_request_val {
74 GHashTable *afs_request_hash = NULL;
75 GMemChunk *afs_request_keys = NULL;
76 GMemChunk *afs_request_vals = NULL;
81 * Dissector prototypes
83 static void dissect_fs_request(const u_char *pd,
84 int offset, frame_data *fd, proto_tree *tree, int opcode);
85 static void dissect_fs_reply(const u_char *pd,
86 int offset, frame_data *fd, proto_tree *tree, int opcode);
87 static void dissect_cb_request(const u_char *pd,
88 int offset, frame_data *fd, proto_tree *tree, int opcode);
89 static void dissect_cb_reply(const u_char *pd,
90 int offset, frame_data *fd, proto_tree *tree, int opcode);
91 static void dissect_bos_request(const u_char *pd,
92 int offset, frame_data *fd, proto_tree *tree, int opcode);
93 static void dissect_bos_reply(const u_char *pd,
94 int offset, frame_data *fd, proto_tree *tree, int opcode);
95 static void dissect_vol_request(const u_char *pd,
96 int offset, frame_data *fd, proto_tree *tree, int opcode);
97 static void dissect_vol_reply(const u_char *pd,
98 int offset, frame_data *fd, proto_tree *tree, int opcode);
99 static void dissect_ubik_request(const u_char *pd,
100 int offset, frame_data *fd, proto_tree *tree, int opcode);
101 static void dissect_ubik_reply(const u_char *pd,
102 int offset, frame_data *fd, proto_tree *tree, int opcode);
103 static void dissect_kauth_request(const u_char *pd,
104 int offset, frame_data *fd, proto_tree *tree, int opcode);
105 static void dissect_kauth_reply(const u_char *pd,
106 int offset, frame_data *fd, proto_tree *tree, int opcode);
107 static void dissect_prot_request(const u_char *pd,
108 int offset, frame_data *fd, proto_tree *tree, int opcode);
109 static void dissect_prot_reply(const u_char *pd,
110 int offset, frame_data *fd, proto_tree *tree, int opcode);
111 static void dissect_vldb_request(const u_char *pd,
112 int offset, frame_data *fd, proto_tree *tree, int opcode);
113 static void dissect_vldb_reply(const u_char *pd,
114 int offset, frame_data *fd, proto_tree *tree, int opcode);
115 static void dissect_backup_request(const u_char *pd,
116 int offset, frame_data *fd, proto_tree *tree, int opcode);
117 static void dissect_backup_reply(const u_char *pd,
118 int offset, frame_data *fd, proto_tree *tree, int opcode);
125 afs_equal(gconstpointer v, gconstpointer w)
127 struct afs_request_key *v1 = (struct afs_request_key *)v;
128 struct afs_request_key *v2 = (struct afs_request_key *)w;
130 if (v1 -> conversation == v2 -> conversation &&
131 v1 -> service == v2 -> service &&
132 v1 -> callnumber == v2 -> callnumber ) {
141 afs_hash (gconstpointer v)
143 struct afs_request_key *key = (struct afs_request_key *)v;
146 val = key -> conversation + key -> service + key -> callnumber;
152 * Protocol initialization
155 afs_init_protocol(void)
157 if (afs_request_hash)
158 g_hash_table_destroy(afs_request_hash);
159 if (afs_request_keys)
160 g_mem_chunk_destroy(afs_request_keys);
161 if (afs_request_vals)
162 g_mem_chunk_destroy(afs_request_vals);
164 afs_request_hash = g_hash_table_new(afs_hash, afs_equal);
165 afs_request_keys = g_mem_chunk_new("afs_request_keys",
166 sizeof(struct afs_request_key),
167 afs_packet_init_count * sizeof(struct afs_request_key),
169 afs_request_vals = g_mem_chunk_new("afs_request_vals",
170 sizeof(struct afs_request_val),
171 afs_packet_init_count * sizeof(struct afs_request_val),
178 * Dissection routines
182 dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
184 proto_tree *afs_tree, *afs_op_tree, *ti;
185 struct rx_header *rxh;
186 struct afs_header *afsh;
187 int port, node, typenode, opcode;
188 value_string const *vals;
191 conversation_t *conversation;
192 struct afs_request_key request_key, *new_request_key;
193 struct afs_request_val *request_val;
194 void (*dissector)(const u_char *pd, int offset,
195 frame_data *fd, proto_tree *tree, int opcode);
197 OLD_CHECK_DISPLAY_AS_DATA(proto_afs, pd, offset, fd, tree);
199 /* get at least a full packet structure */
200 if ( !BYTES_ARE_IN_FRAME(offset, sizeof(struct rx_header)) )
203 if (check_col(fd, COL_PROTOCOL))
204 col_set_str(fd, COL_PROTOCOL, "AFS (RX)");
206 rxh = (struct rx_header *) &pd[offset];
207 doffset = offset + sizeof(struct rx_header);
208 afsh = (struct afs_header *) &pd[doffset];
210 reply = (rxh->flags & RX_CLIENT_INITIATED) == 0;
211 port = ((reply == 0) ? pi.destport : pi.srcport );
214 * Find out what conversation this packet is part of.
215 * XXX - this should really be done by the transport-layer protocol,
216 * although for connectionless transports, we may not want to do that
217 * unless we know some higher-level protocol will want it - or we
218 * may want to do it, so you can say e.g. "show only the packets in
219 * this UDP 'connection'".
221 * Note that we don't have to worry about the direction this packet
222 * was going - the conversation code handles that for us, treating
223 * packets from A:X to B:Y as being part of the same conversation as
224 * packets from B:Y to A:X.
226 conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
227 pi.srcport, pi.destport, 0);
228 if (conversation == NULL) {
229 /* It's not part of any conversation - create a new one. */
230 conversation = conversation_new(&pi.src, &pi.dst, pi.ptype,
231 pi.srcport, pi.destport, NULL, 0);
234 request_key.conversation = conversation->index;
235 request_key.service = pntohs(&rxh->serviceId);
236 request_key.callnumber = pntohl(&rxh->callNumber);
238 request_val = (struct afs_request_val *) g_hash_table_lookup(
239 afs_request_hash, &request_key);
241 /* only allocate a new hash element when it's a request */
243 if ( !request_val && !reply)
245 new_request_key = g_mem_chunk_alloc(afs_request_keys);
246 *new_request_key = request_key;
248 request_val = g_mem_chunk_alloc(afs_request_vals);
249 request_val -> opcode = pntohl(&afsh->opcode);
251 g_hash_table_insert(afs_request_hash, new_request_key,
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;
332 if ( (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) ||
333 (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;
341 if ( VALID_OPCODE(opcode) )
345 if (check_col(fd, COL_INFO))
346 col_add_fstr(fd, COL_INFO, "%s%s %s: %s (%d)",
347 typenode == hf_afs_ubik ? "UBIK-" : "",
348 val_to_str(port, port_types_short, "Unknown(%d)"),
349 reply ? "Reply" : "Request",
350 val_to_str(opcode, vals, "Unknown(%d)"), opcode);
354 if (check_col(fd, COL_INFO))
355 col_add_fstr(fd, COL_INFO, "%s%s %s: Unknown(%d)",
356 typenode == hf_afs_ubik ? "UBIK-" : "",
357 val_to_str(port, port_types_short, "Unknown(%d)"),
358 reply ? "Reply" : "Request",
364 if (check_col(fd, COL_INFO))
365 col_add_fstr(fd, COL_INFO, "Encrypted %s %s",
366 val_to_str(port, port_types_short, "Unknown(%d)"),
367 reply ? "Reply" : "Request"
372 ti = proto_tree_add_item(tree, proto_afs, NullTVB, doffset, END_OF_FRAME, FALSE);
373 afs_tree = proto_item_add_subtree(ti, ett_afs);
375 if ( !BYTES_ARE_IN_FRAME(offset, sizeof(struct rx_header) +
376 sizeof(struct afs_header)) &&
377 typenode != hf_afs_ubik )
379 proto_tree_add_text(afs_tree, NullTVB, doffset, END_OF_FRAME,
380 "Service: %s%s%s %s (Truncated)",
381 VALID_OPCODE(opcode) ? "" : "Encrypted ",
382 typenode == hf_afs_ubik ? "UBIK - " : "",
383 val_to_str(port, port_types, "Unknown(%d)"),
384 reply ? "Reply" : "Request");
389 proto_tree_add_text(afs_tree, NullTVB, doffset, END_OF_FRAME,
390 "Service: %s%s%s %s",
391 VALID_OPCODE(opcode) ? "" : "Encrypted ",
392 typenode == hf_afs_ubik ? "UBIK - " : "",
393 val_to_str(port, port_types, "Unknown(%d)"),
394 reply ? "Reply" : "Request");
397 if ( VALID_OPCODE(opcode) )
399 /* until we do cache, can't handle replies */
401 if ( !reply && node != 0 )
403 ti = proto_tree_add_uint(afs_tree,
404 node, NullTVB, doffset, 4, opcode);
406 else if ( reply && node != 0 )
408 /* the opcode isn't in this packet */
409 ti = proto_tree_add_uint(afs_tree,
410 node, NullTVB, doffset, 0, opcode);
414 ti = proto_tree_add_text(afs_tree, NullTVB,
415 doffset, 0, "Operation: Unknown");
418 /* Add the subtree for this particular service */
419 afs_op_tree = proto_item_add_subtree(ti, ett_afs_op);
423 /* indicate the type of request */
424 proto_tree_add_boolean_hidden(afs_tree, typenode, NullTVB, doffset, 0, 1);
427 /* Process the packet according to what service it is */
430 (*dissector)(pd,offset,fd,afs_op_tree,opcode);
435 /* if it's the last packet, and it's a reply, remove opcode
437 /* ignoring for now, I'm not sure how the chunk deallocation works */
438 if ( rxh->flags & RX_LAST_PACKET && reply )
446 * Here is a helper routine for adding an AFS acl to the proto tree
447 * This is to be used with FS packets only
449 * An AFS ACL is a string that has the following format:
451 * <positive> <negative>
455 * "positive" and "negative" are integers which contain the number of
456 * positive and negative ACL's in the string. The uid/aclbits pair are
457 * ASCII strings containing the UID/PTS record and and a ascii number
458 * representing a logical OR of all the ACL permission bits
461 static void dissect_acl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
467 char user[128]; /* Be sure to adjust sscanf()s below if length is changed... */
473 TRUNC(sizeof(guint32));
474 bytes = pntohl(&pd[curoffset]);
475 OUT_UINT(hf_afs_fs_acl_datasize);
480 eoff = curoffset+bytes;
485 if (sscanf((char *) s, "%d %n", &pos, &n) != 1)
489 proto_tree_add_uint(tree, hf_afs_fs_acl_count_positive, NullTVB, curoffset, n, pos);
492 if (sscanf((char *) s, "%d %n", &neg, &n) != 1)
496 proto_tree_add_uint(tree, hf_afs_fs_acl_count_negative, NullTVB, curoffset, n, neg);
501 * This wacky order preserves the order used by the "fs" command
504 for (i = 0; i < pos; i++) {
505 if (sscanf((char *) s, "%127s %d %n", user, &acl, &n) != 2)
508 ACLOUT(user,1,acl,n);
513 for (i = 0; i < neg; i++) {
514 if (sscanf((char *) s, "%127s %d %n", user, &acl, &n) != 2)
517 ACLOUT(user,0,acl,n);
525 * Here are the helper dissection routines
529 dissect_fs_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
531 struct rx_header *rxh;
533 int doffset, curoffset;
536 rxh = (struct rx_header *) &pd[offset];
537 data = (char *)rxh + sizeof(struct rx_header);
538 doffset = offset + sizeof(struct rx_header);
541 seq = pntohl(&rxh->seq);
543 if ( rxh->type == RX_PACKET_TYPE_DATA )
547 case 130: /* fetch data */
548 if ( seq == 1 ) /* only on first packet */
550 OUT_FS_AFSFetchStatus("Status");
551 OUT_FS_AFSCallBack();
554 OUT_BYTES_ALL(hf_afs_fs_data);
556 case 131: /* fetch acl */
557 dissect_acl(pd,curoffset,fd,tree);
558 OUT_FS_AFSFetchStatus("Status");
561 case 132: /* Fetch status */
562 OUT_FS_AFSFetchStatus("Status");
563 OUT_FS_AFSCallBack();
566 case 133: /* Store data */
567 case 134: /* Store ACL */
568 case 135: /* Store status */
569 case 136: /* Remove file */
570 OUT_FS_AFSFetchStatus("Status");
573 case 137: /* create file */
574 case 141: /* make dir */
575 case 161: /* lookup */
576 case 163: /* dfs symlink */
577 OUT_FS_AFSFid((opcode == 137)? "New File" : ((opcode == 141)? "New Directory" : "File"));
578 OUT_FS_AFSFetchStatus("File Status");
579 OUT_FS_AFSFetchStatus("Directory Status");
580 OUT_FS_AFSCallBack();
583 case 138: /* rename */
584 OUT_FS_AFSFetchStatus("Old Directory Status");
585 OUT_FS_AFSFetchStatus("New Directory Status");
588 case 139: /* symlink */
589 OUT_FS_AFSFid("Symlink");
591 OUT_FS_AFSFetchStatus("Symlink Status");
592 case 142: /* rmdir */
593 OUT_FS_AFSFetchStatus("Directory Status");
596 case 143: /* old set lock */
597 case 144: /* old extend lock */
598 case 145: /* old release lock */
599 case 147: /* give up callbacks */
600 case 150: /* set volume status */
601 case 152: /* check token */
602 /* nothing returned */
604 case 146: /* get statistics */
605 OUT_FS_ViceStatistics();
607 case 148: /* get volume info */
608 case 154: /* n-get-volume-info */
611 case 149: /* get volume status */
612 OUT_FS_AFSFetchVolumeStatus();
613 OUT_STRING(hf_afs_fs_volname);
614 OUT_STRING(hf_afs_fs_offlinemsg);
615 OUT_STRING(hf_afs_fs_motd);
617 case 151: /* root volume */
618 OUT_STRING(hf_afs_fs_volname);
620 case 153: /* get time */
621 OUT_TIMESTAMP(hf_afs_fs_timestamp);
623 case 155: /* bulk status */
624 OUT_FS_AFSBulkStats();
628 case 156: /* set lock */
629 case 157: /* extend lock */
630 case 158: /* release lock */
633 case 159: /* x-stats-version */
634 OUT_UINT(hf_afs_fs_xstats_version);
636 case 160: /* get xstats */
637 OUT_UINT(hf_afs_fs_xstats_version);
638 OUT_DATE(hf_afs_fs_xstats_timestamp);
639 OUT_FS_AFS_CollData();
641 case 162: /* flush cps */
642 OUT_UINT(hf_afs_fs_cps_spare2);
643 OUT_UINT(hf_afs_fs_cps_spare3);
647 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
649 OUT_UINT(hf_afs_fs_errcode);
654 dissect_fs_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
656 struct rx_header *rxh;
658 int doffset, curoffset;
660 rxh = (struct rx_header *) &pd[offset];
661 data = (char *)rxh + sizeof(struct rx_header);
662 doffset = offset + sizeof(struct rx_header);
669 case 130: /* Fetch data */
670 OUT_FS_AFSFid("Source");
671 OUT_UINT(hf_afs_fs_offset);
672 OUT_UINT(hf_afs_fs_length);
674 case 131: /* Fetch ACL */
675 OUT_FS_AFSFid("Target");
677 case 132: /* Fetch Status */
678 OUT_FS_AFSFid("Target");
680 case 133: /* Store Data */
681 OUT_FS_AFSFid("Destination");
682 OUT_FS_AFSStoreStatus("Status");
683 OUT_UINT(hf_afs_fs_offset);
684 OUT_UINT(hf_afs_fs_length);
685 OUT_UINT(hf_afs_fs_flength);
687 case 134: /* Store ACL */
688 OUT_FS_AFSFid("Target");
689 dissect_acl(pd,curoffset,fd,tree);
691 case 135: /* Store Status */
692 OUT_FS_AFSFid("Target");
693 OUT_FS_AFSStoreStatus("Status");
695 case 136: /* Remove File */
696 OUT_FS_AFSFid("Remove File");
697 OUT_STRING(hf_afs_fs_name);
699 case 137: /* Create File */
700 OUT_FS_AFSFid("Target");
701 OUT_STRING(hf_afs_fs_name);
702 OUT_FS_AFSStoreStatus("Status");
704 case 138: /* Rename file */
705 OUT_FS_AFSFid("Old");
706 OUT_STRING(hf_afs_fs_oldname);
707 OUT_FS_AFSFid("New");
708 OUT_STRING(hf_afs_fs_newname);
710 case 139: /* Symlink */
711 OUT_FS_AFSFid("File");
712 OUT_STRING(hf_afs_fs_symlink_name);
713 OUT_STRING(hf_afs_fs_symlink_content);
714 OUT_FS_AFSStoreStatus("Status");
717 OUT_FS_AFSFid("Link To (New File)");
718 OUT_STRING(hf_afs_fs_name);
719 OUT_FS_AFSFid("Link From (Old File)");
721 case 141: /* Make dir */
722 OUT_FS_AFSFid("Target");
723 OUT_STRING(hf_afs_fs_name);
724 OUT_FS_AFSStoreStatus("Status");
726 case 142: /* Remove dir */
727 OUT_FS_AFSFid("Target");
728 OUT_STRING(hf_afs_fs_name);
730 case 143: /* Old Set Lock */
731 OUT_FS_AFSFid("Target");
732 OUT_UINT(hf_afs_fs_vicelocktype);
735 case 144: /* Old Extend Lock */
736 OUT_FS_AFSFid("Target");
739 case 145: /* Old Release Lock */
740 OUT_FS_AFSFid("Target");
743 case 146: /* Get statistics */
746 case 147: /* Give up callbacks */
750 case 148: /* Get vol info */
751 OUT_STRING(hf_afs_fs_volname);
753 case 149: /* Get vol stats */
754 OUT_UINT(hf_afs_fs_volid);
756 case 150: /* Set vol stats */
757 OUT_UINT(hf_afs_fs_volid);
758 OUT_FS_AFSStoreVolumeStatus();
759 OUT_STRING(hf_afs_fs_volname);
760 OUT_STRING(hf_afs_fs_offlinemsg);
761 OUT_STRING(hf_afs_fs_motd);
763 case 151: /* get root volume */
766 case 152: /* check token */
767 OUT_UINT(hf_afs_fs_viceid);
770 case 153: /* get time */
773 case 154: /* new get vol info */
774 OUT_STRING(hf_afs_fs_volname);
776 case 155: /* bulk stat */
779 case 156: /* Set Lock */
780 OUT_FS_AFSFid("Target");
781 OUT_UINT(hf_afs_fs_vicelocktype);
783 case 157: /* Extend Lock */
784 OUT_FS_AFSFid("Target");
786 case 158: /* Release Lock */
787 OUT_FS_AFSFid("Target");
789 case 159: /* xstats version */
792 case 160: /* get xstats */
793 OUT_UINT(hf_afs_fs_xstats_clientversion);
794 OUT_UINT(hf_afs_fs_xstats_collnumber);
796 case 161: /* lookup */
797 OUT_FS_AFSFid("Target");
798 OUT_STRING(hf_afs_fs_name);
800 case 162: /* flush cps */
803 OUT_UINT(hf_afs_fs_cps_spare1);
805 case 163: /* dfs symlink */
806 OUT_FS_AFSFid("Target");
807 OUT_STRING(hf_afs_fs_symlink_name);
808 OUT_STRING(hf_afs_fs_symlink_content);
809 OUT_FS_AFSStoreStatus("Symlink Status");
818 dissect_bos_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
820 struct rx_header *rxh;
822 int doffset, curoffset;
824 rxh = (struct rx_header *) &pd[offset];
825 data = (char *)rxh + sizeof(struct rx_header);
826 doffset = offset + sizeof(struct rx_header);
829 if ( rxh->type == RX_PACKET_TYPE_DATA )
833 case 80: /* create bnode */
836 case 81: /* delete bnode */
839 case 82: /* set status */
842 case 83: /* get status */
843 OUT_INT(hf_afs_bos_status);
844 OUT_STRING(hf_afs_bos_statusdesc);
846 case 84: /* enumerate instance */
847 OUT_STRING(hf_afs_bos_instance);
849 case 85: /* get instance info */
850 OUT_STRING(hf_afs_bos_type);
853 case 86: /* get instance parm */
854 OUT_STRING(hf_afs_bos_parm);
856 case 87: /* add siperuser */
859 case 88: /* delete superuser */
862 case 89: /* list superusers */
863 OUT_STRING(hf_afs_bos_user);
865 case 90: /* list keys */
866 OUT_UINT(hf_afs_bos_kvno);
870 case 91: /* add key */
873 case 92: /* delete key */
876 case 93: /* set cell name */
879 case 94: /* get cell name */
880 OUT_STRING(hf_afs_bos_cell);
882 case 95: /* get cell host */
883 OUT_STRING(hf_afs_bos_host);
885 case 96: /* add cell host */
888 case 97: /* delete cell host */
891 case 98: /* set tstatus */
894 case 99: /* shutdown all */
897 case 100: /* restart all */
900 case 101: /* startup all */
903 case 102: /* set noauth flag */
906 case 103: /* rebozo */
909 case 104: /* restart */
912 case 105: /* install */
915 case 106: /* uninstall */
918 case 107: /* get dates */
919 OUT_DATE(hf_afs_bos_newtime);
920 OUT_DATE(hf_afs_bos_baktime);
921 OUT_DATE(hf_afs_bos_oldtime);
926 case 109: /* prune */
929 case 110: /* set restart time */
932 case 111: /* get restart time */
935 case 112: /* get log */
936 /* need to make this dump a big string somehow */
937 OUT_BYTES_ALL(hf_afs_bos_data);
939 case 113: /* wait all */
942 case 114: /* get instance strings */
943 OUT_STRING(hf_afs_bos_error);
944 OUT_STRING(hf_afs_bos_spare1);
945 OUT_STRING(hf_afs_bos_spare2);
946 OUT_STRING(hf_afs_bos_spare3);
950 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
952 OUT_UINT(hf_afs_bos_errcode);
957 dissect_bos_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
959 struct rx_header *rxh;
961 int doffset, curoffset;
963 rxh = (struct rx_header *) &pd[offset];
964 data = (char *)rxh + sizeof(struct rx_header);
965 doffset = offset + sizeof(struct rx_header);
972 case 80: /* create b node */
973 OUT_STRING(hf_afs_bos_type);
974 OUT_STRING(hf_afs_bos_instance);
975 OUT_STRING(hf_afs_bos_parm);
976 OUT_STRING(hf_afs_bos_parm);
977 OUT_STRING(hf_afs_bos_parm);
978 OUT_STRING(hf_afs_bos_parm);
979 OUT_STRING(hf_afs_bos_parm);
980 OUT_STRING(hf_afs_bos_parm);
982 case 81: /* delete b node */
983 OUT_STRING(hf_afs_bos_instance);
985 case 82: /* set status */
986 OUT_STRING(hf_afs_bos_instance);
987 OUT_UINT(hf_afs_bos_status);
989 case 83: /* get status */
990 OUT_STRING(hf_afs_bos_instance);
992 case 84: /* enumerate instance */
993 OUT_UINT(hf_afs_bos_num);
995 case 85: /* get instance info */
996 OUT_STRING(hf_afs_bos_instance);
998 case 86: /* get instance parm */
999 OUT_STRING(hf_afs_bos_instance);
1000 OUT_UINT(hf_afs_bos_num);
1002 case 87: /* add super user */
1003 OUT_STRING(hf_afs_bos_user);
1005 case 88: /* delete super user */
1006 OUT_STRING(hf_afs_bos_user);
1008 case 89: /* list super users */
1009 OUT_UINT(hf_afs_bos_num);
1011 case 90: /* list keys */
1012 OUT_UINT(hf_afs_bos_num);
1014 case 91: /* add key */
1015 OUT_UINT(hf_afs_bos_num);
1018 case 92: /* delete key */
1019 OUT_UINT(hf_afs_bos_num);
1021 case 93: /* set cell name */
1022 OUT_STRING(hf_afs_bos_content);
1024 case 95: /* set cell host */
1025 OUT_UINT(hf_afs_bos_num);
1027 case 96: /* add cell host */
1028 OUT_STRING(hf_afs_bos_content);
1030 case 97: /* delete cell host */
1031 OUT_STRING(hf_afs_bos_content);
1033 case 98: /* set t status */
1034 OUT_STRING(hf_afs_bos_content);
1035 OUT_UINT(hf_afs_bos_status);
1037 case 99: /* shutdown all */
1040 case 100: /* restart all */
1043 case 101: /* startup all */
1046 case 102: /* set no-auth flag */
1047 OUT_UINT(hf_afs_bos_flags);
1049 case 103: /* re-bozo? */
1052 case 104: /* restart */
1053 OUT_STRING(hf_afs_bos_instance);
1055 case 105: /* install */
1056 OUT_STRING(hf_afs_bos_path);
1057 OUT_UINT(hf_afs_bos_size);
1058 OUT_UINT(hf_afs_bos_flags);
1059 OUT_UINT(hf_afs_bos_date);
1061 case 106: /* uninstall */
1062 OUT_STRING(hf_afs_bos_path);
1064 case 107: /* get dates */
1065 OUT_STRING(hf_afs_bos_path);
1067 case 108: /* exec */
1068 OUT_STRING(hf_afs_bos_cmd);
1070 case 109: /* prune */
1071 OUT_UINT(hf_afs_bos_flags);
1073 case 110: /* set restart time */
1074 OUT_UINT(hf_afs_bos_num);
1077 case 111: /* get restart time */
1078 OUT_UINT(hf_afs_bos_num);
1080 case 112: /* get log */
1081 OUT_STRING(hf_afs_bos_file);
1083 case 113: /* wait all */
1086 case 114: /* get instance strings */
1087 OUT_STRING(hf_afs_bos_content);
1096 dissect_vol_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1098 struct rx_header *rxh;
1099 unsigned char *data;
1100 int doffset, curoffset;
1102 rxh = (struct rx_header *) &pd[offset];
1103 data = (char *)rxh + sizeof(struct rx_header);
1104 doffset = offset + sizeof(struct rx_header);
1105 curoffset = doffset;
1107 if ( rxh->type == RX_PACKET_TYPE_DATA )
1112 /* should loop here maybe */
1113 OUT_UINT(hf_afs_vol_count);
1114 VECOUT(hf_afs_vol_name, 32); /* not sure on */
1118 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1120 OUT_UINT(hf_afs_vol_errcode);
1125 dissect_vol_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1127 struct rx_header *rxh;
1128 unsigned char *data;
1129 int doffset, curoffset;
1131 rxh = (struct rx_header *) &pd[offset];
1132 data = (char *)rxh + sizeof(struct rx_header);
1133 doffset = offset + sizeof(struct rx_header);
1134 curoffset = doffset;
1140 case 121: /* list one vol */
1141 OUT_UINT(hf_afs_vol_count);
1142 OUT_UINT(hf_afs_vol_id);
1151 dissect_kauth_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1153 struct rx_header *rxh;
1154 unsigned char *data;
1155 int doffset, curoffset;
1157 rxh = (struct rx_header *) &pd[offset];
1158 data = (char *)rxh + sizeof(struct rx_header);
1159 doffset = offset + sizeof(struct rx_header);
1160 curoffset = doffset;
1162 if ( rxh->type == RX_PACKET_TYPE_DATA )
1168 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1170 OUT_UINT(hf_afs_kauth_errcode);
1175 dissect_kauth_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1177 struct rx_header *rxh;
1178 unsigned char *data;
1179 int doffset, curoffset;
1181 rxh = (struct rx_header *) &pd[offset];
1182 data = (char *)rxh + sizeof(struct rx_header);
1183 doffset = offset + sizeof(struct rx_header);
1184 curoffset = doffset;
1190 case 1: /* authenticate old */
1191 case 21: /* authenticate */
1192 case 22: /* authenticate v2 */
1193 case 2: /* change pw */
1194 case 5: /* set fields */
1195 case 6: /* create user */
1196 case 7: /* delete user */
1197 case 8: /* get entry */
1198 case 14: /* unlock */
1199 case 15: /* lock status */
1200 OUT_STRING(hf_afs_kauth_princ);
1201 OUT_STRING(hf_afs_kauth_realm);
1202 OUT_BYTES_ALL(hf_afs_kauth_data);
1204 case 3: /* getticket-old */
1205 case 23: /* getticket */
1206 OUT_UINT(hf_afs_kauth_kvno);
1207 OUT_STRING(hf_afs_kauth_domain);
1208 OUT_STRING(hf_afs_kauth_data);
1209 OUT_STRING(hf_afs_kauth_princ);
1210 OUT_STRING(hf_afs_kauth_realm);
1212 case 4: /* set pass */
1213 OUT_STRING(hf_afs_kauth_princ);
1214 OUT_STRING(hf_afs_kauth_realm);
1215 OUT_UINT(hf_afs_kauth_kvno);
1217 case 12: /* get pass */
1218 OUT_STRING(hf_afs_kauth_name);
1227 dissect_cb_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1229 struct rx_header *rxh;
1230 unsigned char *data;
1231 int doffset, curoffset;
1233 rxh = (struct rx_header *) &pd[offset];
1234 data = (char *)rxh + sizeof(struct rx_header);
1235 doffset = offset + sizeof(struct rx_header);
1236 curoffset = doffset;
1238 if ( rxh->type == RX_PACKET_TYPE_DATA )
1244 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1246 OUT_UINT(hf_afs_cb_errcode);
1251 dissect_cb_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1253 struct rx_header *rxh;
1254 unsigned char *data;
1255 int doffset, curoffset;
1257 rxh = (struct rx_header *) &pd[offset];
1258 data = (char *)rxh + sizeof(struct rx_header);
1259 doffset = offset + sizeof(struct rx_header);
1260 curoffset = doffset;
1266 case 204: /* callback */
1275 OUT_CB_AFSFid("Target");
1282 OUT_CB_AFSCallBack();
1292 dissect_prot_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1294 struct rx_header *rxh;
1295 unsigned char *data;
1296 int doffset, curoffset;
1298 rxh = (struct rx_header *) &pd[offset];
1299 data = (char *)rxh + sizeof(struct rx_header);
1300 doffset = offset + sizeof(struct rx_header);
1301 curoffset = doffset;
1303 if ( rxh->type == RX_PACKET_TYPE_DATA )
1307 case 504: /* name to id */
1313 OUT_UINT(hf_afs_prot_count);
1317 OUT_UINT(hf_afs_prot_id);
1321 case 505: /* id to name */
1327 OUT_UINT(hf_afs_prot_count);
1331 VECOUT(hf_afs_prot_name, PRNAMEMAX);
1335 case 508: /* get cps */
1336 case 514: /* list elements */
1337 case 517: /* list owned */
1338 case 518: /* get cps2 */
1339 case 519: /* get host cps */
1345 OUT_UINT(hf_afs_prot_count);
1349 OUT_UINT(hf_afs_prot_id);
1353 case 510: /* list max */
1354 OUT_UINT(hf_afs_prot_maxuid);
1355 OUT_UINT(hf_afs_prot_maxgid);
1359 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1361 OUT_UINT(hf_afs_prot_errcode);
1366 dissect_prot_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1368 struct rx_header *rxh;
1369 unsigned char *data;
1370 int doffset, curoffset;
1372 rxh = (struct rx_header *) &pd[offset];
1373 data = (char *)rxh + sizeof(struct rx_header);
1374 doffset = offset + sizeof(struct rx_header);
1375 curoffset = doffset;
1381 case 500: /* new user */
1382 OUT_STRING(hf_afs_prot_name);
1383 OUT_UINT(hf_afs_prot_id);
1384 OUT_UINT(hf_afs_prot_oldid);
1386 case 501: /* where is it */
1387 case 506: /* delete */
1388 case 508: /* get cps */
1389 case 512: /* list entry */
1390 case 514: /* list elements */
1391 case 517: /* list owned */
1392 case 519: /* get host cps */
1393 OUT_UINT(hf_afs_prot_id);
1395 case 502: /* dump entry */
1396 OUT_UINT(hf_afs_prot_pos);
1398 case 503: /* add to group */
1399 case 507: /* remove from group */
1400 case 515: /* is a member of? */
1401 OUT_UINT(hf_afs_prot_uid);
1402 OUT_UINT(hf_afs_prot_gid);
1404 case 504: /* name to id */
1410 OUT_UINT(hf_afs_prot_count);
1414 VECOUT(hf_afs_prot_name,PRNAMEMAX);
1418 case 505: /* id to name */
1424 OUT_UINT(hf_afs_prot_count);
1428 OUT_UINT(hf_afs_prot_id);
1432 case 509: /* new entry */
1433 OUT_STRING(hf_afs_prot_name);
1434 OUT_UINT(hf_afs_prot_flag);
1435 OUT_UINT(hf_afs_prot_oldid);
1437 case 511: /* set max */
1438 OUT_UINT(hf_afs_prot_id);
1439 OUT_UINT(hf_afs_prot_flag);
1441 case 513: /* change entry */
1442 OUT_UINT(hf_afs_prot_id);
1443 OUT_STRING(hf_afs_prot_name);
1444 OUT_UINT(hf_afs_prot_oldid);
1445 OUT_UINT(hf_afs_prot_newid);
1447 case 520: /* update entry */
1448 OUT_UINT(hf_afs_prot_id);
1449 OUT_STRING(hf_afs_prot_name);
1458 dissect_vldb_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1460 struct rx_header *rxh;
1461 unsigned char *data;
1462 int doffset, curoffset;
1464 rxh = (struct rx_header *) &pd[offset];
1465 data = (char *)rxh + sizeof(struct rx_header);
1466 doffset = offset + sizeof(struct rx_header);
1467 curoffset = doffset;
1469 if ( rxh->type == RX_PACKET_TYPE_DATA )
1473 case 510: /* list entry */
1474 OUT_UINT(hf_afs_vldb_count);
1475 OUT_UINT(hf_afs_vldb_nextindex);
1477 case 503: /* get entry by id */
1478 case 504: /* get entry by name */
1481 VECOUT(hf_afs_vldb_name, VLNAMEMAX);
1483 nservers = GETINT();
1484 OUT_UINT(hf_afs_vldb_numservers);
1489 OUT_IP(hf_afs_vldb_server);
1501 strcpy(part, "/vicepa");
1502 if ( i<nservers && j<=25 )
1504 part[6] = 'a' + (char) j;
1505 proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
1506 curoffset, 4, part);
1510 SKIP(8 * sizeof(guint32));
1511 OUT_UINT(hf_afs_vldb_rwvol);
1512 OUT_UINT(hf_afs_vldb_rovol);
1513 OUT_UINT(hf_afs_vldb_bkvol);
1516 case 505: /* get new volume id */
1517 OUT_UINT(hf_afs_vldb_id);
1519 case 521: /* list entry */
1520 case 529: /* list entry U */
1521 OUT_UINT(hf_afs_vldb_count);
1522 OUT_UINT(hf_afs_vldb_nextindex);
1524 case 518: /* get entry by id n */
1525 case 519: /* get entry by name N */
1528 VECOUT(hf_afs_vldb_name, VLNAMEMAX);
1530 nservers = GETINT();
1531 OUT_UINT(hf_afs_vldb_numservers);
1532 for (i=0; i<13; i++)
1536 OUT_IP(hf_afs_vldb_server);
1543 for (i=0; i<13; i++)
1548 strcpy(part, "/vicepa");
1549 if ( i<nservers && j<=25 )
1551 part[6] = 'a' + (char) j;
1552 proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
1553 curoffset, 4, part);
1557 SKIP(13 * sizeof(guint32));
1558 OUT_UINT(hf_afs_vldb_rwvol);
1559 OUT_UINT(hf_afs_vldb_rovol);
1560 OUT_UINT(hf_afs_vldb_bkvol);
1563 case 526: /* get entry by id u */
1564 case 527: /* get entry by name u */
1567 VECOUT(hf_afs_vldb_name, VLNAMEMAX);
1569 nservers = GETINT();
1570 OUT_UINT(hf_afs_vldb_numservers);
1571 for (i=0; i<13; i++)
1575 OUT_BYTES(hf_afs_vldb_serveruuid, 11*sizeof(guint32));
1579 SKIP(11*sizeof(guint32));
1582 for (i=0; i<13; i++)
1587 strcpy(part, "/vicepa");
1588 if ( i<nservers && j<=25 )
1590 part[6] = 'a' + (char) j;
1591 proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
1592 curoffset, 4, part);
1596 SKIP(13 * sizeof(guint32));
1597 OUT_UINT(hf_afs_vldb_rwvol);
1598 OUT_UINT(hf_afs_vldb_rovol);
1599 OUT_UINT(hf_afs_vldb_bkvol);
1604 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1606 OUT_UINT(hf_afs_vldb_errcode);
1611 dissect_vldb_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1613 struct rx_header *rxh;
1614 unsigned char *data;
1615 int doffset, curoffset;
1617 rxh = (struct rx_header *) &pd[offset];
1618 data = (char *)rxh + sizeof(struct rx_header);
1619 doffset = offset + sizeof(struct rx_header);
1620 curoffset = doffset;
1626 case 501: /* create new volume */
1627 case 517: /* create entry N */
1628 VECOUT(hf_afs_vldb_name, VLNAMEMAX);
1630 case 502: /* delete entry */
1631 case 503: /* get entry by id */
1632 case 507: /* update entry */
1633 case 508: /* set lock */
1634 case 509: /* release lock */
1635 case 518: /* get entry by id */
1636 OUT_UINT(hf_afs_vldb_id);
1637 OUT_UINT(hf_afs_vldb_type);
1639 case 504: /* get entry by name */
1640 case 519: /* get entry by name N */
1641 case 524: /* update entry by name */
1642 case 527: /* get entry by name U */
1643 OUT_STRING(hf_afs_vldb_name);
1645 case 505: /* get new vol id */
1646 OUT_UINT(hf_afs_vldb_bump);
1648 case 506: /* replace entry */
1649 case 520: /* replace entry N */
1650 OUT_UINT(hf_afs_vldb_id);
1651 OUT_UINT(hf_afs_vldb_type);
1652 VECOUT(hf_afs_vldb_name, VLNAMEMAX);
1654 case 510: /* list entry */
1655 case 521: /* list entry N */
1656 OUT_UINT(hf_afs_vldb_index);
1665 dissect_ubik_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1667 struct rx_header *rxh;
1668 unsigned char *data;
1669 int doffset, curoffset;
1671 rxh = (struct rx_header *) &pd[offset];
1672 data = (char *)rxh + sizeof(struct rx_header);
1673 doffset = offset + sizeof(struct rx_header);
1674 curoffset = doffset;
1678 case 10000: /* vote-beacon */
1680 case 10001: /* vote-debug-old */
1681 OUT_UBIK_DebugOld();
1683 case 10002: /* vote-sdebug-old */
1684 OUT_UBIK_SDebugOld();
1686 case 10003: /* vote-get syncsite */
1688 case 10004: /* vote-debug */
1689 OUT_UBIK_DebugOld();
1690 OUT_UBIK_InterfaceAddrs();
1692 case 10005: /* vote-sdebug */
1693 OUT_UBIK_SDebugOld();
1694 OUT_UBIK_InterfaceAddrs();
1696 case 10006: /* vote-xdebug */
1697 OUT_UBIK_DebugOld();
1698 OUT_UBIK_InterfaceAddrs();
1699 OUT_UINT(hf_afs_ubik_isclone);
1701 case 10007: /* vote-xsdebug */
1702 OUT_UBIK_SDebugOld();
1703 OUT_UBIK_InterfaceAddrs();
1704 OUT_UINT(hf_afs_ubik_isclone);
1706 case 20000: /* disk-begin */
1708 case 20004: /* get version */
1709 OUT_UBIKVERSION("DB Version");
1711 case 20010: /* disk-probe */
1713 case 20012: /* disk-interfaceaddr */
1714 OUT_UBIK_InterfaceAddrs();
1720 dissect_ubik_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1722 struct rx_header *rxh;
1723 unsigned char *data;
1724 int doffset, curoffset;
1726 rxh = (struct rx_header *) &pd[offset];
1727 data = (char *)rxh + sizeof(struct rx_header);
1728 doffset = offset + sizeof(struct rx_header);
1729 curoffset = doffset;
1735 case 10000: /* vote-beacon */
1736 OUT_UINT(hf_afs_ubik_state);
1737 OUT_DATE(hf_afs_ubik_votestart);
1738 OUT_UBIKVERSION("DB Version");
1739 OUT_UBIKVERSION("TID");
1741 case 10001: /* vote-debug-old */
1743 case 10002: /* vote-sdebug-old */
1744 OUT_UINT(hf_afs_ubik_site);
1746 case 10003: /* vote-get sync site */
1747 OUT_IP(hf_afs_ubik_site);
1749 case 10004: /* vote-debug */
1750 case 10005: /* vote-sdebug */
1751 OUT_IP(hf_afs_ubik_site);
1753 case 20000: /* disk-begin */
1754 OUT_UBIKVERSION("TID");
1756 case 20001: /* disk-commit */
1757 OUT_UBIKVERSION("TID");
1759 case 20002: /* disk-lock */
1760 OUT_UBIKVERSION("TID");
1761 OUT_UINT(hf_afs_ubik_file);
1762 OUT_UINT(hf_afs_ubik_pos);
1763 OUT_UINT(hf_afs_ubik_length);
1764 OUT_UINT(hf_afs_ubik_locktype);
1766 case 20003: /* disk-write */
1767 OUT_UBIKVERSION("TID");
1768 OUT_UINT(hf_afs_ubik_file);
1769 OUT_UINT(hf_afs_ubik_pos);
1771 case 20004: /* disk-get version */
1773 case 20005: /* disk-get file */
1774 OUT_UINT(hf_afs_ubik_file);
1776 case 20006: /* disk-send file */
1777 OUT_UINT(hf_afs_ubik_file);
1778 OUT_UINT(hf_afs_ubik_length);
1779 OUT_UBIKVERSION("DB Version");
1781 case 20007: /* disk-abort */
1782 case 20008: /* disk-release locks */
1783 case 20010: /* disk-probe */
1785 case 20009: /* disk-truncate */
1786 OUT_UBIKVERSION("TID");
1787 OUT_UINT(hf_afs_ubik_file);
1788 OUT_UINT(hf_afs_ubik_length);
1790 case 20011: /* disk-writev */
1791 OUT_UBIKVERSION("TID");
1793 case 20012: /* disk-interfaceaddr */
1794 OUT_UBIK_InterfaceAddrs();
1796 case 20013: /* disk-set version */
1797 OUT_UBIKVERSION("TID");
1798 OUT_UBIKVERSION("Old DB Version");
1799 OUT_UBIKVERSION("New DB Version");
1808 dissect_backup_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1810 struct rx_header *rxh;
1811 unsigned char *data;
1812 int doffset, curoffset;
1814 rxh = (struct rx_header *) &pd[offset];
1815 data = (char *)rxh + sizeof(struct rx_header);
1816 doffset = offset + sizeof(struct rx_header);
1817 curoffset = doffset;
1819 if ( rxh->type == RX_PACKET_TYPE_DATA )
1825 else if ( rxh->type == RX_PACKET_TYPE_ABORT )
1827 OUT_UINT(hf_afs_backup_errcode);
1832 dissect_backup_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int opcode)
1834 struct rx_header *rxh;
1835 unsigned char *data;
1836 int doffset, curoffset;
1838 rxh = (struct rx_header *) &pd[offset];
1839 data = (char *)rxh + sizeof(struct rx_header);
1840 doffset = offset + sizeof(struct rx_header);
1841 curoffset = doffset;
1851 * Registration code for registering the protocol and fields
1855 proto_register_afs(void)
1857 static hf_register_info hf[] = {
1858 #include "packet-afs-register-info.h"
1860 static gint *ett[] = {
1868 &ett_afs_status_mask,
1870 &ett_afs_volumeinfo,
1874 proto_afs = proto_register_protocol("Andrew File System (AFS)",
1876 proto_register_field_array(proto_afs, hf, array_length(hf));
1877 proto_register_subtree_array(ett, array_length(ett));
1878 register_init_routine(&afs_init_protocol);