Removed trailing whitespaces from .h and .c files using the
[obnox/wireshark/wip.git] / packet-afs.c
index 04485c4310f67ea6cea61125a0ad6fb39fea4f2b..d19ad71d046be5a06d89e853a99ff29c86992f10 100644 (file)
@@ -8,7 +8,7 @@
  * Portions based on information/specs retrieved from the OpenAFS sources at
  *   www.openafs.org, Copyright IBM. 
  *
- * $Id: packet-afs.c,v 1.41 2002/02/01 04:34:14 gram Exp $
+ * $Id: packet-afs.c,v 1.48 2002/08/02 23:35:46 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 
 #include <stdio.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
@@ -62,7 +54,7 @@
                (opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \
                (opcode >= DISK_LOW && opcode <= DISK_HIGH))
 
-int afs_packet_init_count = 100;
+static int afs_packet_init_count = 100;
 
 struct afs_request_key {
   guint32 conversation, callnumber;
@@ -73,9 +65,9 @@ struct afs_request_val {
   guint32 opcode;
 };
 
-GHashTable *afs_request_hash = NULL;
-GMemChunk *afs_request_keys = NULL;
-GMemChunk *afs_request_vals = NULL;
+static GHashTable *afs_request_hash = NULL;
+static GMemChunk *afs_request_keys = NULL;
+static GMemChunk *afs_request_vals = NULL;
 
 
 
@@ -429,9 +421,18 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
  * ASCII strings containing the UID/PTS record and and a ascii number
  * representing a logical OR of all the ACL permission bits
  */
-/* FIXME: sscanf is probably quite dangerous if we run outside the packet. */
+/*
+ * XXX - FIXME:
+ *
+ *     sscanf is probably quite dangerous if we run outside the packet.
+ *
+ *     "GETSTR" doesn't guarantee that the resulting string is
+ *     null-terminated.
+ *
+ * Should this just scan the string itself, rather than using "sscanf()"?
+ */
 static int 
-dissect_acl(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset)
+dissect_acl(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset)
 {
        int old_offset;
        gint32 bytes;
@@ -565,12 +566,12 @@ dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int off
                                break;
                        case 149: /* get volume status */
                                OUT_FS_AFSFetchVolumeStatus();
-                               OUT_STRING(hf_afs_fs_volname);
-                               OUT_STRING(hf_afs_fs_offlinemsg);
-                               OUT_STRING(hf_afs_fs_motd);
+                               OUT_RXString(hf_afs_fs_volname);
+                               OUT_RXString(hf_afs_fs_offlinemsg);
+                               OUT_RXString(hf_afs_fs_motd);
                                break;
                        case 151: /* root volume */
-                               OUT_STRING(hf_afs_fs_volname);
+                               OUT_RXString(hf_afs_fs_volname);
                                break;
                        case 153: /* get time */
                                OUT_TIMESTAMP(hf_afs_fs_timestamp);
@@ -649,38 +650,38 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        break;
                case 136: /* Remove File */
                        OUT_FS_AFSFid("Remove File");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        break;
                case 137: /* Create File */
                        OUT_FS_AFSFid("Target");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        OUT_FS_AFSStoreStatus("Status");
                        break;
                case 138: /* Rename file */
                        OUT_FS_AFSFid("Old");
-                       OUT_STRING(hf_afs_fs_oldname);
+                       OUT_RXString(hf_afs_fs_oldname);
                        OUT_FS_AFSFid("New");
-                       OUT_STRING(hf_afs_fs_newname);
+                       OUT_RXString(hf_afs_fs_newname);
                        break;
                case 139: /* Symlink */
                        OUT_FS_AFSFid("File");
-                       OUT_STRING(hf_afs_fs_symlink_name);
-                       OUT_STRING(hf_afs_fs_symlink_content);
+                       OUT_RXString(hf_afs_fs_symlink_name);
+                       OUT_RXString(hf_afs_fs_symlink_content);
                        OUT_FS_AFSStoreStatus("Status");
                        break;
                case 140: /* Link */
                        OUT_FS_AFSFid("Link To (New File)");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        OUT_FS_AFSFid("Link From (Old File)");
                        break;
                case 141: /* Make dir */
                        OUT_FS_AFSFid("Target");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        OUT_FS_AFSStoreStatus("Status");
                        break;
                case 142: /* Remove dir */
                        OUT_FS_AFSFid("Target");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        break;
                case 143: /* Old Set Lock */
                        OUT_FS_AFSFid("Target");
@@ -703,7 +704,7 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        OUT_FS_AFSCBs();
                        break;
                case 148: /* Get vol info */
-                       OUT_STRING(hf_afs_fs_volname);
+                       OUT_RXString(hf_afs_fs_volname);
                        break;
                case 149: /* Get vol stats */
                        OUT_UINT(hf_afs_fs_volid);
@@ -711,9 +712,9 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                case 150: /* Set vol stats */
                        OUT_UINT(hf_afs_fs_volid);
                        OUT_FS_AFSStoreVolumeStatus();
-                       OUT_STRING(hf_afs_fs_volname);
-                       OUT_STRING(hf_afs_fs_offlinemsg);
-                       OUT_STRING(hf_afs_fs_motd);
+                       OUT_RXString(hf_afs_fs_volname);
+                       OUT_RXString(hf_afs_fs_offlinemsg);
+                       OUT_RXString(hf_afs_fs_motd);
                        break;
                case 151: /* get root volume */
                        /* no params */
@@ -726,7 +727,7 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        /* no params */
                        break;
                case 154: /* new get vol info */
-                       OUT_STRING(hf_afs_fs_volname);
+                       OUT_RXString(hf_afs_fs_volname);
                        break;
                case 155: /* bulk stat */
                        OUT_FS_AFSCBFids();
@@ -750,7 +751,7 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        break;
                case 161: /* lookup */
                        OUT_FS_AFSFid("Target");
-                       OUT_STRING(hf_afs_fs_name);
+                       OUT_RXString(hf_afs_fs_name);
                        break;
                case 162: /* flush cps */
                        OUT_FS_ViceIds();
@@ -759,8 +760,8 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        break;
                case 163: /* dfs symlink */
                        OUT_FS_AFSFid("Target");
-                       OUT_STRING(hf_afs_fs_symlink_name);
-                       OUT_STRING(hf_afs_fs_symlink_content);
+                       OUT_RXString(hf_afs_fs_symlink_name);
+                       OUT_RXString(hf_afs_fs_symlink_content);
                        OUT_FS_AFSStoreStatus("Symlink Status");
                        break;
        }
@@ -787,17 +788,17 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
                                break;
                        case 83: /* get status */
                                OUT_INT(hf_afs_bos_status);
-                               OUT_STRING(hf_afs_bos_statusdesc);
+                               OUT_RXString(hf_afs_bos_statusdesc);
                                break;
                        case 84: /* enumerate instance */
-                               OUT_STRING(hf_afs_bos_instance);
+                               OUT_RXString(hf_afs_bos_instance);
                                break;
                        case 85: /* get instance info */
-                               OUT_STRING(hf_afs_bos_type);
+                               OUT_RXString(hf_afs_bos_type);
                                OUT_BOS_STATUS();
                                break;
                        case 86: /* get instance parm */
-                               OUT_STRING(hf_afs_bos_parm);
+                               OUT_RXString(hf_afs_bos_parm);
                                break;
                        case 87: /* add siperuser */
                                /* no output */
@@ -806,7 +807,7 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
                                /* no output */
                                break;
                        case 89: /* list superusers */
-                               OUT_STRING(hf_afs_bos_user);
+                               OUT_RXString(hf_afs_bos_user);
                                break;
                        case 90: /* list keys */
                                OUT_UINT(hf_afs_bos_kvno);
@@ -823,10 +824,10 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
                                /* no output */
                                break;
                        case 94: /* get cell name */
-                               OUT_STRING(hf_afs_bos_cell);
+                               OUT_RXString(hf_afs_bos_cell);
                                break;
                        case 95: /* get cell host */
-                               OUT_STRING(hf_afs_bos_host);
+                               OUT_RXString(hf_afs_bos_host);
                                break;
                        case 96: /* add cell host */
                                /* no output */
@@ -886,10 +887,10 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
                                /* no output */
                                break;
                        case 114: /* get instance strings */
-                               OUT_STRING(hf_afs_bos_error);
-                               OUT_STRING(hf_afs_bos_spare1);
-                               OUT_STRING(hf_afs_bos_spare2);
-                               OUT_STRING(hf_afs_bos_spare3);
+                               OUT_RXString(hf_afs_bos_error);
+                               OUT_RXString(hf_afs_bos_spare1);
+                               OUT_RXString(hf_afs_bos_spare2);
+                               OUT_RXString(hf_afs_bos_spare3);
                                break;
                }
        }
@@ -900,47 +901,47 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
 }
 
 static void
-dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
        switch ( opcode )
        {
                case 80: /* create b node */
-                       OUT_STRING(hf_afs_bos_type);
-                       OUT_STRING(hf_afs_bos_instance);
-                       OUT_STRING(hf_afs_bos_parm);
-                       OUT_STRING(hf_afs_bos_parm);
-                       OUT_STRING(hf_afs_bos_parm);
-                       OUT_STRING(hf_afs_bos_parm);
-                       OUT_STRING(hf_afs_bos_parm);
-                       OUT_STRING(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_type);
+                       OUT_RXString(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_parm);
+                       OUT_RXString(hf_afs_bos_parm);
                        break;
                case 81: /* delete b node */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        break;
                case 82: /* set status */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        OUT_UINT(hf_afs_bos_status);
                        break;
                case 83: /* get status */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        break;
                case 84: /* enumerate instance */
                        OUT_UINT(hf_afs_bos_num);
                        break;
                case 85: /* get instance info */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        break;
                case 86: /* get instance parm */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        OUT_UINT(hf_afs_bos_num);
                        break;
                case 87: /* add super user */
-                       OUT_STRING(hf_afs_bos_user);
+                       OUT_RXString(hf_afs_bos_user);
                        break;
                case 88: /* delete super user */
-                       OUT_STRING(hf_afs_bos_user);
+                       OUT_RXString(hf_afs_bos_user);
                        break;
                case 89: /* list super users */
                        OUT_UINT(hf_afs_bos_num);
@@ -956,19 +957,19 @@ dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                        OUT_UINT(hf_afs_bos_num);
                        break;
                case 93: /* set cell name */
-                       OUT_STRING(hf_afs_bos_content);
+                       OUT_RXString(hf_afs_bos_content);
                        break;
                case 95: /* set cell host */
                        OUT_UINT(hf_afs_bos_num);
                        break;
                case 96: /* add cell host */
-                       OUT_STRING(hf_afs_bos_content);
+                       OUT_RXString(hf_afs_bos_content);
                        break;
                case 97: /* delete cell host */
-                       OUT_STRING(hf_afs_bos_content);
+                       OUT_RXString(hf_afs_bos_content);
                        break;
                case 98: /* set t status */
-                       OUT_STRING(hf_afs_bos_content);
+                       OUT_RXString(hf_afs_bos_content);
                        OUT_UINT(hf_afs_bos_status);
                        break;
                case 99: /* shutdown all */
@@ -987,22 +988,22 @@ dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                        /* no params */
                        break;
                case 104: /* restart */
-                       OUT_STRING(hf_afs_bos_instance);
+                       OUT_RXString(hf_afs_bos_instance);
                        break;
                case 105: /* install */
-                       OUT_STRING(hf_afs_bos_path);
+                       OUT_RXString(hf_afs_bos_path);
                        OUT_UINT(hf_afs_bos_size);
                        OUT_UINT(hf_afs_bos_flags);
                        OUT_UINT(hf_afs_bos_date);
                        break;
                case 106: /* uninstall */
-                       OUT_STRING(hf_afs_bos_path);
+                       OUT_RXString(hf_afs_bos_path);
                        break;
                case 107: /* get dates */
-                       OUT_STRING(hf_afs_bos_path);
+                       OUT_RXString(hf_afs_bos_path);
                        break;
                case 108: /* exec */
-                       OUT_STRING(hf_afs_bos_cmd);
+                       OUT_RXString(hf_afs_bos_cmd);
                        break;
                case 109: /* prune */
                        OUT_UINT(hf_afs_bos_flags);
@@ -1015,13 +1016,13 @@ dissect_bos_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                        OUT_UINT(hf_afs_bos_num);
                        break;
                case 112: /* get log */
-                       OUT_STRING(hf_afs_bos_file);
+                       OUT_RXString(hf_afs_bos_file);
                        break;
                case 113: /* wait all */
                        /* no params */
                        break;
                case 114: /* get instance strings */
-                       OUT_STRING(hf_afs_bos_content);
+                       OUT_RXString(hf_afs_bos_content);
                        break;
        }
 }
@@ -1039,7 +1040,7 @@ dissect_vol_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
                        case 121:
                                /* should loop here maybe */
                                OUT_UINT(hf_afs_vol_count);
-                               VECOUT(hf_afs_vol_name, 32); /* not sure on  */
+                               OUT_RXStringV(hf_afs_vol_name, 32); /* not sure on  */
                                break;
                }
        }
@@ -1050,7 +1051,7 @@ dissect_vol_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
 }
 
 static void
-dissect_vol_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_vol_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1082,7 +1083,7 @@ dissect_kauth_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
 }
 
 static void
-dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1098,25 +1099,25 @@ dissect_kauth_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, in
                case 8: /* get entry */
                case 14: /* unlock */
                case 15: /* lock status */
-                       OUT_STRING(hf_afs_kauth_princ);
-                       OUT_STRING(hf_afs_kauth_realm);
+                       OUT_RXString(hf_afs_kauth_princ);
+                       OUT_RXString(hf_afs_kauth_realm);
                        OUT_BYTES_ALL(hf_afs_kauth_data);
                        break;
                case 3: /* getticket-old */
                case 23: /* getticket */
                        OUT_UINT(hf_afs_kauth_kvno);
-                       OUT_STRING(hf_afs_kauth_domain);
-                       OUT_STRING(hf_afs_kauth_data);
-                       OUT_STRING(hf_afs_kauth_princ);
-                       OUT_STRING(hf_afs_kauth_realm);
+                       OUT_RXString(hf_afs_kauth_domain);
+                       OUT_BYTES_ALL(hf_afs_kauth_data);
+                       OUT_RXString(hf_afs_kauth_princ);
+                       OUT_RXString(hf_afs_kauth_realm);
                        break;
                case 4: /* set pass */
-                       OUT_STRING(hf_afs_kauth_princ);
-                       OUT_STRING(hf_afs_kauth_realm);
+                       OUT_RXString(hf_afs_kauth_princ);
+                       OUT_RXString(hf_afs_kauth_realm);
                        OUT_UINT(hf_afs_kauth_kvno);
                        break;
                case 12: /* get pass */
-                       OUT_STRING(hf_afs_kauth_name);
+                       OUT_RXString(hf_afs_kauth_name);
                        break;
        }
 }
@@ -1140,7 +1141,7 @@ dissect_cb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int off
 }
 
 static void
-dissect_cb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_cb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1200,7 +1201,7 @@ dissect_prot_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
 
                                        for (i=0; i<j; i++)
                                        {
-                                               VECOUT(hf_afs_prot_name, PRNAMEMAX);
+                                               OUT_RXStringV(hf_afs_prot_name, PRNAMEMAX);
                                        }
                                }
                                break;
@@ -1234,14 +1235,14 @@ dissect_prot_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
 }
 
 static void
-dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
        switch ( opcode )
        {
                case 500: /* new user */
-                       OUT_STRING(hf_afs_prot_name);
+                       OUT_RXString(hf_afs_prot_name);
                        OUT_UINT(hf_afs_prot_id);
                        OUT_UINT(hf_afs_prot_oldid);
                        break;
@@ -1272,7 +1273,7 @@ dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
 
                                for (i=0; i<j; i++)
                                {
-                                       VECOUT(hf_afs_prot_name,PRNAMEMAX);
+                                       OUT_RXStringV(hf_afs_prot_name,PRNAMEMAX);
                                }
                        }
                        break;
@@ -1290,7 +1291,7 @@ dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                        }
                        break;
                case 509: /* new entry */
-                       OUT_STRING(hf_afs_prot_name);
+                       OUT_RXString(hf_afs_prot_name);
                        OUT_UINT(hf_afs_prot_flag);
                        OUT_UINT(hf_afs_prot_oldid);
                        break;
@@ -1300,13 +1301,13 @@ dissect_prot_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                        break;
                case 513: /* change entry */
                        OUT_UINT(hf_afs_prot_id);
-                       OUT_STRING(hf_afs_prot_name);
+                       OUT_RXString(hf_afs_prot_name);
                        OUT_UINT(hf_afs_prot_oldid);
                        OUT_UINT(hf_afs_prot_newid);
                        break;
                case 520: /* update entry */
                        OUT_UINT(hf_afs_prot_id);
-                       OUT_STRING(hf_afs_prot_name);
+                       OUT_RXString(hf_afs_prot_name);
                        break;
        }
 }
@@ -1329,7 +1330,8 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        case 504: /* get entry by name */
                                {
                                        int nservers,i,j;
-                                       VECOUT(hf_afs_vldb_name, VLNAMEMAX);
+                                       OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
+                                       SKIP(4);
                                        nservers = tvb_get_ntohl(tvb, offset);
                                        OUT_UINT(hf_afs_vldb_numservers);
                                        for (i=0; i<8; i++)
@@ -1360,6 +1362,8 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                                        OUT_UINT(hf_afs_vldb_rwvol);
                                        OUT_UINT(hf_afs_vldb_rovol);
                                        OUT_UINT(hf_afs_vldb_bkvol);
+                                       OUT_UINT(hf_afs_vldb_clonevol);
+                                       OUT_VLDB_Flags();
                                }
                                break;
                        case 505: /* get new volume id */
@@ -1374,7 +1378,7 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        case 519: /* get entry by name N */
                                {
                                        int nservers,i,j;
-                                       VECOUT(hf_afs_vldb_name, VLNAMEMAX);
+                                       OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
                                        nservers = tvb_get_ntohl(tvb, offset);
                                        OUT_UINT(hf_afs_vldb_numservers);
                                        for (i=0; i<13; i++)
@@ -1411,18 +1415,18 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        case 527: /* get entry by name u */
                                {
                                        int nservers,i,j;
-                                       VECOUT(hf_afs_vldb_name, VLNAMEMAX);
+                                       OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
                                        nservers = tvb_get_ntohl(tvb, offset);
                                        OUT_UINT(hf_afs_vldb_numservers);
                                        for (i=0; i<13; i++)
                                        {
                                                if ( i<nservers )
                                                {
-                                                       OUT_BYTES(hf_afs_vldb_serveruuid, 11*sizeof(guint32));
+                                                       OUT_UUID(hf_afs_vldb_serveruuid);
                                                }
                                                else
                                                {
-                                                       SKIP(11*sizeof(guint32));
+                                                       SKIP_UUID();
                                                }
                                        }
                                        for (i=0; i<13; i++)
@@ -1485,7 +1489,7 @@ dissect_vldb_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
 }
 
 static void
-dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1493,7 +1497,7 @@ dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
        {
                case 501: /* create new volume */
                case 517: /* create entry N */
-                       VECOUT(hf_afs_vldb_name, VLNAMEMAX);
+                       OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
                        break;
                case 502: /* delete entry */
                case 503: /* get entry by id */
@@ -1508,7 +1512,7 @@ dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                case 519: /* get entry by name N */
                case 524: /* update entry by name */
                case 527: /* get entry by name U */
-                       OUT_STRING(hf_afs_vldb_name);
+                       OUT_RXString(hf_afs_vldb_name);
                        break;
                case 505: /* get new vol id */
                        OUT_UINT(hf_afs_vldb_bump);
@@ -1517,12 +1521,17 @@ dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
                case 520: /* replace entry N */
                        OUT_UINT(hf_afs_vldb_id);
                        OUT_UINT(hf_afs_vldb_type);
-                       VECOUT(hf_afs_vldb_name, VLNAMEMAX);
+                       OUT_RXStringV(hf_afs_vldb_name, VLNAMEMAX);
                        break;
                case 510: /* list entry */
                case 521: /* list entry N */
                        OUT_UINT(hf_afs_vldb_index);
                        break;
+               case 532: /* regaddr */
+                       OUT_UUID(hf_afs_vldb_serveruuid);
+                       OUT_UINT(hf_afs_vldb_spare1);
+                       OUT_VLDB_BulkAddr();
+                       break;
        }
 }
 
@@ -1530,7 +1539,7 @@ dissect_vldb_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
  * UBIK Helpers
  */
 static void
-dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        switch ( opcode )
        {
@@ -1576,7 +1585,7 @@ dissect_ubik_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
 }
 
 static void
-dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1670,7 +1679,7 @@ dissect_backup_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int
 }
 
 static void
-dissect_backup_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
+dissect_backup_request(tvbuff_t *tvb _U_, struct rxinfo *rxinfo _U_, proto_tree *tree _U_, int offset, int opcode)
 {
        offset += 4;  /* skip the opcode */
 
@@ -1701,6 +1710,7 @@ proto_register_afs(void)
                &ett_afs_volsync,
                &ett_afs_volumeinfo,
                &ett_afs_vicestat,
+               &ett_afs_vldb_flags,
        };
 
        proto_afs = proto_register_protocol("Andrew File System (AFS)",