slight improvements to afs parsing, bulkstatus still needs work
authornneul <nneul@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Jan 2002 21:30:05 +0000 (21:30 +0000)
committernneul <nneul@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Jan 2002 21:30:05 +0000 (21:30 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4569 f5534014-38df-0310-8fa8-9805f1628bb7

packet-afs-macros.h
packet-afs-register-info.h
packet-afs.c

index a5233669493c7ad8fbc4519452312c8d9fd65676..887900b1d661e1b0361259f5daefddfafb7e1c22 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-macros.h,v 1.12 2001/09/14 07:10:05 guy Exp $
+ * $Id: packet-afs-macros.h,v 1.13 2002/01/18 21:30:05 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
                        "VolSync"); \
                save = tree; \
                tree = proto_item_add_subtree(ti, ett_afs_volsync); \
-               OUT_UINT(hf_afs_fs_volsync_spare1); \
+               OUT_DATE(hf_afs_fs_volsync_spare1); \
                OUT_UINT(hf_afs_fs_volsync_spare2); \
                OUT_UINT(hf_afs_fs_volsync_spare3); \
                OUT_UINT(hf_afs_fs_volsync_spare4); \
 /* Output a AFSBulkStats */
 #define OUT_FS_AFSBulkStats() \
        { \
-               unsigned int j,i; \
-               j = tvb_get_guint8(tvb,offset); \
-               offset += 1; \
+               guint32 j,i; \
+               j = tvb_get_ntohl(tvb,offset); \
+               offset += 4; \
                for (i=0; i<j; i++) { \
                        OUT_FS_AFSFetchStatus("Status"); \
                } \
index 4f03d216dbe346208815da3d3fceb88b2006ccce..e23858c9577b6c7f6e1461067f5ffa5bae74f6b1 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-register-info.h,v 1.8 2001/06/18 02:17:44 guy Exp $
+ * $Id: packet-afs-register-info.h,v 1.9 2002/01/18 21:30:05 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
        FT_UINT32, BASE_DEC, 0, 0, "Length", HFILL }},
 
 
-{ &hf_afs_fs_volsync_spare1, { "Spare 1", "afs.fs.volsync.spare1", 
-       FT_UINT32, BASE_DEC, 0, 0, "Spare 1", HFILL }},
+{ &hf_afs_fs_volsync_spare1, { "Volume Creation Timestamp", "afs.fs.volsync.spare1", 
+       FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Volume Creation Timestamp", HFILL }},
 { &hf_afs_fs_volsync_spare2, { "Spare 2", "afs.fs.volsync.spare2", 
        FT_UINT32, BASE_DEC, 0, 0, "Spare 2", HFILL }},
 { &hf_afs_fs_volsync_spare3, { "Spare 3", "afs.fs.volsync.spare3", 
index 68679eaa836aa7854671be9ab11cec3595c530e1..62ddb0d25e11e408fe04b065f9df7fbbe0a60c73 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.36 2001/12/10 00:25:26 guy Exp $
+ * $Id: packet-afs.c,v 1.37 2002/01/18 21:30:05 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -373,8 +373,14 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        /* until we do cache, can't handle replies */
                        ti = NULL;
                        if ( !reply && node != 0 ) {
-                               ti = proto_tree_add_uint(afs_tree,
-                                       node, tvb, offset, 4, opcode);
+                               if ( rxinfo->seq == 1 )
+                               {
+                                       ti = proto_tree_add_uint(afs_tree,
+                                               node, tvb, offset, 4, opcode);
+                               } else {
+                                       ti = proto_tree_add_uint(afs_tree,
+                                               node, tvb, offset, 0, opcode);
+                               }
                        } else if ( reply && node != 0 ) {
                                /* the opcode isn't in this packet */
                                ti = proto_tree_add_uint(afs_tree,
@@ -571,6 +577,7 @@ dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int off
                                break;
                        case 155: /* bulk status */
                                OUT_FS_AFSBulkStats();
+                               SKIP(4); 
                                OUT_FS_AFSCBs();
                                OUT_FS_AFSVolSync();
                                break;
@@ -602,7 +609,11 @@ dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int off
 static void
 dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int offset, int opcode)
 {
-       offset += 4;  /* skip the opcode */
+       /* skip the opcode if this is the first packet in the stream */
+       if ( rxinfo->seq == 1 )
+       {
+               offset += 4;  /* skip the opcode */
+       }
 
        switch ( opcode )
        {
@@ -618,11 +629,15 @@ dissect_fs_request(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int o
                        OUT_FS_AFSFid("Target");
                        break;
                case 133: /* Store Data */
-                       OUT_FS_AFSFid("Destination");
-                       OUT_FS_AFSStoreStatus("Status");
-                       OUT_UINT(hf_afs_fs_offset);
-                       OUT_UINT(hf_afs_fs_length);
-                       OUT_UINT(hf_afs_fs_flength);
+                       if ( rxinfo->seq == 1 )
+                       {
+                               OUT_FS_AFSFid("Destination");
+                               OUT_FS_AFSStoreStatus("Status");
+                               OUT_UINT(hf_afs_fs_offset);
+                               OUT_UINT(hf_afs_fs_length);
+                               OUT_UINT(hf_afs_fs_flength);
+                       }
+                       OUT_BYTES_ALL(hf_afs_fs_data);
                        break;
                case 134: /* Store ACL */
                        OUT_FS_AFSFid("Target");