2 * Routines for fmp dissection
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifdef HAVE_SYS_TYPES_H
26 #include <sys/types.h>
36 #include <epan/packet.h>
37 #include <epan/prefs.h>
38 #include <epan/strutil.h>
39 #include "packet-fmp.h"
40 #include "packet-rpc.h"
43 int hf_fmp_procedure = -1;
45 int hf_fmp_fsBlkSz = -1;
46 int hf_fmp_sessionHandle = -1;
47 int hf_fmp_fmpFHandle = -1;
48 int hf_fmp_msgNum = -1;
49 int hf_fmp_fileSize = -1;
50 int hf_fmp_cookie = -1;
51 int hf_fmp_firstLogBlk = -1;
52 int hf_fmp_numBlksReq = -1;
54 static int proto_fmp = -1;
55 static int hf_fmp_hostID = -1;
56 static int hf_fmp_status = -1;
57 static int hf_fmp_btime = -1;
58 static int hf_fmp_time_sec = -1;
59 static int hf_fmp_time_nsec = -1;
60 static int hf_fmp_notifyPort = -1;
61 static int hf_fmp_minBlks = -1;
62 static int hf_fmp_eof = -1;
63 static int hf_fmp_path = -1;
64 static int hf_fmp_plugInID = -1;
65 static int hf_fmp_plugInBuf = -1;
66 static int hf_fmp_nfsFHandle = -1;
67 static int hf_fmp_extentList_len = -1;
68 static int hf_fmp_extent_state = -1;
69 static int hf_fmp_numBlks = -1;
70 static int hf_fmp_volID = -1;
71 static int hf_fmp_startOffset = -1;
72 static int hf_fmp_volHandle = -1;
73 static int hf_fmp_devSignature = -1;
74 static int hf_fmp_dskSigEnt_val = -1;
75 static int hf_fmp_mount_path = -1;
76 static int hf_fmp_sig_offset = -1;
77 static int hf_fmp_os_major = -1;
78 static int hf_fmp_os_minor = -1;
79 static int hf_fmp_os_name = -1;
80 static int hf_fmp_os_patch = -1;
81 static int hf_fmp_os_build = -1;
82 static int hf_fmp_server_version_string = -1;
83 static int hf_fmp_description = -1;
84 static int hf_fmp_nfsv3Attr_type = -1;
85 static int hf_fmp_nfsv3Attr_mode = -1;
86 static int hf_fmp_nfsv3Attr_nlink = -1;
87 static int hf_fmp_nfsv3Attr_uid = -1;
88 static int hf_fmp_nfsv3Attr_gid = -1;
89 static int hf_fmp_nfsv3Attr_used = -1;
90 static int hf_fmp_nfsv3Attr_rdev = -1;
91 static int hf_fmp_nfsv3Attr_fsid = -1;
92 static int hf_fmp_nfsv3Attr_fileid = -1;
93 static int hf_fmp_cmd = -1;
94 static int hf_fmp_topVolumeId = -1;
95 static int hf_fmp_cursor = -1;
96 static int hf_fmp_offset64 = -1;
97 static int hf_fmp_start_offset64 = -1;
98 static int hf_fmp_slice_size = -1;
99 static int hf_fmp_volume = -1;
100 static int hf_fmp_stripeSize = -1;
101 static int hf_fmp_firstLogBlk64 =-1;
104 static gint ett_fmp = -1;
105 static gint ett_fmp_timeval = -1;
106 static gint ett_fmp_extList = -1;
107 static gint ett_fmp_ext = -1;
108 static gint ett_fmp_fileHandle = -1;
109 static gint ett_capabilities = -1;
110 static gint ett_HierVolumeDescription = -1;
111 static gint ett_attrs = -1;
113 gboolean fmp_fhandle_reqrep_matching = FALSE;
116 dissect_fmp_genString(tvbuff_t *tvb, int offset, proto_tree *tree)
120 mode = tvb_get_ntohl(tvb, offset);
124 proto_tree_add_text(tree, tvb, offset, 4,
125 "Encoding Mode: ASCII (%d)", mode);
129 proto_tree_add_text(tree, tvb, offset, 4,
130 "Encoding Mode: UTF8 (%d)", mode);
134 proto_tree_add_text(tree, tvb, offset, 4,
135 "Encoding Mode: UNICODE (%d)", mode);
139 proto_tree_add_text(tree, tvb, offset, 4,
140 "Encoding Mode: UNKNOWN (%d)", mode);
145 offset = dissect_rpc_string(tvb, tree, hf_fmp_path,
152 get_fileHandleSrc_size(tvbuff_t *tvb, int offset)
157 np = tvb_get_ntohl(tvb, offset);
161 length = 4 + FMP_MAX_PATH_LEN;
164 length = 8 + tvb_get_ntohl(tvb, offset + 4);
170 length = 8 + tvb_get_ntohl(tvb, offset + 4);
178 length = 8 + FMP_MAX_PATH_LEN;
189 dissect_fmp_fileHandleSrc(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
194 proto_item *fileHandleItem;
195 proto_tree *fileHandleTree;
198 length = get_fileHandleSrc_size(tvb, offset);
200 np = tvb_get_ntohl(tvb, offset);
202 fileHandleItem = proto_tree_add_text(tree, tvb, offset, length,
203 "Source File Handle");
204 fileHandleTree = proto_item_add_subtree(fileHandleItem,
209 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
210 "Native Protocol: PATH (%d)", np);
213 offset = dissect_rpc_string(tvb, fileHandleTree,
214 hf_fmp_mount_path, offset, NULL);
218 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
219 "Native Protocol: NFS (%d)", np);
222 offset = dissect_rpc_data(tvb, fileHandleTree,
223 hf_fmp_nfsFHandle, offset);
227 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
228 "Native Protocol: CIFS (%d)", np);
231 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid: %d",
232 tvb_get_ntohs(tvb, offset));
235 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid: %d",
236 tvb_get_ntohs(tvb, offset));
239 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid: %d",
240 tvb_get_ntohs(tvb, offset));
245 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
246 "Native Protocol: FMP (%d)", np);
249 offset = dissect_rpc_string(tvb, fileHandleTree,
250 hf_fmp_fmpFHandle, offset, NULL);
254 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
255 "Native Protocol: FS_ONLY (%d)", np);
258 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
259 "FsID: %d", tvb_get_ntohl(tvb, offset));
264 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
265 "Native Protocol: SHARE (%d)", np);
268 offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
272 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
273 "Native Protocol: MOUNT (%d)", np);
276 offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
280 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
281 "Native Protocol: CIFSV2: (%d)", np);
283 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid : %d",
284 tvb_get_ntohs(tvb, offset));
287 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid : %d",
288 tvb_get_ntohs(tvb, offset));
291 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid : %d",
292 tvb_get_ntohs(tvb, offset));
295 proto_tree_add_text(fileHandleTree, tvb, offset, 2, "cifsPort: %d",
296 tvb_get_ntohs(tvb, offset));
300 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
301 "Native Protocol: UNC: (%d)", np);
304 offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
309 proto_tree_add_text(fileHandleTree, tvb, offset, 4,
310 "Native Protocol: UNKNOWN (%d)", np);
319 dissect_fmp_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
327 state = tvb_get_ntohl(tvb, offset);
328 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_extent_state,
335 dissect_fmp_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint32 ext_num)
344 extItem = proto_tree_add_text(tree, tvb, offset, 20 ,
345 "Extent (%u)", (guint32) ext_num);
347 extTree = proto_item_add_subtree(extItem, ett_fmp_ext);
349 offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_firstLogBlk,
351 offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_numBlks,
353 offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_volID, offset);
354 offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_startOffset,
356 offset = dissect_fmp_extentState(tvb, offset, extTree);
362 dissect_fmp_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo,
367 proto_item *extListItem;
368 proto_tree *extListTree;
375 numExtents = tvb_get_ntohl(tvb, offset);
376 totalLength = 4 + (20 * numExtents);
378 extListItem = proto_tree_add_text(tree, tvb, offset, totalLength,
380 extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
382 offset = dissect_rpc_uint32(tvb, extListTree,
383 hf_fmp_extentList_len, offset);
385 for (i = 1; i <= numExtents; i++) {
386 offset = dissect_fmp_extent(tvb, offset, pinfo, extListTree, i);
394 dissect_fmp_extentListEx(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
398 proto_item *extListItem;
399 proto_tree *extListTree;
406 numExtents = tvb_get_ntohl(tvb, offset);
411 for (i = 1; i <= numExtents; i++) {
412 extListItem = proto_tree_add_text(tree, tvb, offset, 28,
414 extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
417 offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_firstLogBlk64, offset);
419 offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_numBlksReq,
422 offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_volID, offset);
424 offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_start_offset64, offset);
426 offset = dissect_fmp_extentState(tvb, offset, extListTree);
435 dissect_plugInID(tvbuff_t *tvb, int offset, proto_tree *tree)
437 const guint8 *plugInID;
443 plugInID = tvb_get_ptr(tvb, offset, FMP_PLUG_IN_ID_SZ);
444 proto_tree_add_bytes(tree, hf_fmp_plugInID, tvb, offset, FMP_PLUG_IN_ID_SZ,
450 dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
453 char msg[MAX_MSG_SIZE];
461 cmd = tvb_get_ntohl(tvb, offset);
463 /* Initialize the message for an empty string */
466 for (i = 0; cmd != 0 && i < 32; i++) {
470 if (cmd & bitValue) {
472 case FMP_COMMIT_SPECIFIED:
473 g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
475 case FMP_RELEASE_SPECIFIED:
476 g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
478 case FMP_RELEASE_ALL:
479 g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
482 g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
484 case FMP_UPDATE_TIME:
485 g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
487 case FMP_ACCESS_TIME:
488 g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
491 g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
495 /* clear the bit that we processed */
498 /* add a "bitwise inclusive OR" symbol between cmds */
500 g_strlcat(msg, " | ", MAX_MSG_SIZE);
505 if (strlen(msg) == 0) {
506 g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
509 proto_tree_add_text(tree, tvb, offset, 4, "Cmd: %s", msg);
514 dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
516 int length,numdisks,i,j;
518 numdisks = tvb_get_ntohl(tvb, offset);
519 proto_tree_add_text(tree, tvb, offset, 4, "Number of Disk: %d", numdisks);
522 for(i=0;i<numdisks;i++){
523 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_sig_offset, offset);
524 length = tvb_get_ntohl(tvb, offset);
525 proto_tree_add_text(tree, tvb, offset, 4, "Length of List : %d", length);
528 for(j=0;j<length;j++){
529 proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
530 tvb_get_ntohl(tvb, offset));
532 offset = dissect_rpc_string(tvb, tree, hf_fmp_dskSigEnt_val,
536 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_volID, offset);
544 dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
552 vmType = tvb_get_ntohl(tvb, offset);
555 case FMP_SERVER_BASED:
556 proto_tree_add_text(tree, tvb, offset, 4,
557 "Volume Mgmt Capability: SERVER_BASED (%d)", vmType);
560 case FMP_THIRD_PARTY:
561 proto_tree_add_text(tree, tvb, offset, 4,
562 "Volume Mgmt Capability: THIRD_PARTY (%d)", vmType);
565 case FMP_CLIENT_BASED_DART:
566 proto_tree_add_text(tree, tvb, offset, 4,
567 "Volume Mgmt Capability: CLIENT_BASED_DART (%d)",
571 case FMP_CLIENT_BASED_SIMPLE:
572 proto_tree_add_text(tree, tvb, offset, 4,
573 "Volume Mgmt Capability: CLIENT_BASED_SIMPLE (%d)",
576 case FMP_HIERARCHICAL_VOLUME:
577 proto_tree_add_text(tree, tvb, offset, 4,
578 "Volume Mgmt Capability: FMP_HIERARCHICAL_VOLUME (%d)",
586 proto_tree_add_text(tree, tvb, offset, 4,
587 "Volume Mgmt Capability: UNKNOWN (%d)", vmType);
596 dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
597 proto_tree *tree, int hf_time, int hf_time_sec,
602 proto_item* time_item;
603 proto_tree* time_tree = NULL;
609 ts.secs = tvb_get_ntohl(tvb, offset+0);
610 ts.nsecs = tvb_get_ntohl(tvb, offset+4);
612 time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8, &ts);
614 time_tree = proto_item_add_subtree(time_item, ett_fmp_timeval);
618 proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
620 proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
629 dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
636 proto_tree_add_text(tree, tvb, offset, 8,
637 "Heart Beat Interval: %d.%d seconds",
638 tvb_get_ntohl(tvb, offset),
639 tvb_get_ntohl(tvb, offset+4));
645 dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
653 status = tvb_get_ntohl(tvb, offset);
676 case FMP_NOTIFY_ERROR:
677 case FMP_WRITER_LOST_BLK:
678 case FMP_WRONG_MSG_NUM:
679 case FMP_SESSION_LOST:
680 case FMP_REQUEST_CANCELLED:
683 case FMP_HOT_SESSION:
686 case FMP_COLD_SESSION:
689 case FMP_CLIENT_TERMINATED:
692 case FMP_REQUEST_QUEUED:
698 case FMP_WRITER_ZEROED_BLK:
701 case FMP_WRONG_HANDLE:
704 case FMP_DUPLICATE_OPEN:
707 case FMP_PLUGIN_NOFUNC:
715 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
720 dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
729 qc = tvb_get_ntohl(tvb, offset);
732 case FMP_SCSI_INQUIRY:
733 proto_tree_add_text(tree, tvb, offset, 4,
734 "Query Command: SCSI_INQUIRY (%d)", qc);
737 proto_tree_add_text(tree, tvb, offset, 4,
738 "Query Command: DART_STAMP (%d)", qc);
741 proto_tree_add_text(tree, tvb, offset, 4,
742 "Query Command: UNKNOWN (%d)", qc);
747 proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
748 tvb_get_ntohl(tvb, offset));
751 offset = dissect_rpc_string(tvb, tree, hf_fmp_devSignature,
759 int dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
762 proto_tree *Hietree,*hieTree;
763 fmpVolumeType volumeType;
764 fmpDiskIdentifierType diskIdentifierType;
765 volumeType = tvb_get_ntohl(tvb, offset);
768 case FMP_VOLUME_DISK:
769 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
770 "VOLUME: DISK(%d)", volumeType );
771 Hietree = proto_item_add_subtree(hieTree,
772 ett_HierVolumeDescription);
774 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
775 offset += 8; /* blockIndex64 */
776 diskIdentifierType = tvb_get_ntohl(tvb, offset);
779 switch(diskIdentifierType){
780 case FMP_DISK_IDENTIFIER_SIGNATURE:
781 proto_tree_add_text(Hietree, tvb, offset, 4,
782 "DISK IDENTIFIER: SIGNATURE(%d)", diskIdentifierType);
784 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_sig_offset, offset);
785 length = tvb_get_ntohl(tvb, offset);
786 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
789 for(i=0;i<length;i++){
790 proto_tree_add_text(Hietree, tvb, offset, 4, "sigOffset: 0x%x",
791 tvb_get_ntohl(tvb, offset));
793 offset = dissect_rpc_string(tvb, Hietree, hf_fmp_dskSigEnt_val, offset, NULL);
800 case FMP_DISK_IDENTIFIER_SERIAL:
801 proto_tree_add_text(Hietree, tvb, offset, 4,
802 "DISK IDENTIFIER: SERIAL(%d)", diskIdentifierType);
803 dissect_fmp_devSerial(tvb, offset, NULL, Hietree);
808 case FMP_VOLUME_SLICE:
809 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
810 "VOLUME: SLICE(%d)", volumeType );
811 Hietree = proto_item_add_subtree(hieTree,
812 ett_HierVolumeDescription);
814 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
816 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_offset64, offset);
818 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_slice_size, offset);
820 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset);
824 case FMP_VOLUME_STRIPE:
825 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
826 "VOLUME: STRIPE(%d)", volumeType );
827 Hietree = proto_item_add_subtree(hieTree,
828 ett_HierVolumeDescription);
830 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
832 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_stripeSize, offset);
833 length = tvb_get_ntohl(tvb, offset);
834 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
837 for(i=0;i<length;i++){
838 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
843 case FMP_VOLUME_META:
844 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
845 "VOLUME: META(%d)", volumeType );
846 Hietree = proto_item_add_subtree(hieTree,
847 ett_HierVolumeDescription);
849 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
851 length = tvb_get_ntohl(tvb, offset);
852 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
854 for(i=0;i<length;i++){
855 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
859 proto_tree_add_text(tree, tvb, offset, 4,
860 "VOLUME: UNKNOWN (%d)",volumeType);
867 int dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
872 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
873 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
874 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
876 /* hierarchical description of volume. Each volume describes a
877 piece of the entire hierarchy and is guarenteed to only refer to
878 volumes that have already been described by the data structure up
879 to this point in time. In some extreme cases, the number of
880 volumes and their descriptions may be to large to fit in a single
881 RPC reply. In this case, the application may send getVolumeInfo
882 requests for the specific topVolumeId -- specifying the number of
883 volumes already recieved by the client, and the cookie. The
884 server is then responsible for sending another message containing
885 additional volumes. These RPCs exchanges may continue multiple
886 times, until the client has fetched the entire hierarchical
887 volume description. If the volume hierarchy changes duing a
888 multiple RPC sequence, the server will return an
889 FMP_VOLUME_CHANGED error, and the client must discard all
890 information already received and restart the request with
894 vollength = tvb_get_ntohl(tvb, offset);
895 proto_tree_add_text(tree, tvb, offset, 4, "Length of volume List : %d", vollength);
898 offset = dissect_fmp_VolumeDescription(tvb, offset, tree);
909 dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
913 guint32 phyVolList_len;
920 vmType = tvb_get_ntohl(tvb, offset);
923 case FMP_SERVER_BASED:
927 proto_tree_add_text(tree, tvb, offset, 4,
928 "Volume Mgmt Type: SERVER_BASED (%d)",
932 phyVolList_len = tvb_get_ntohl(tvb, offset);
936 * Loop through and print all of the devInfo
939 while (phyVolList_len) {
941 dissect_fmp_devSerial(tvb, offset, pinfo, tree);
942 volIndex = tvb_get_ntohl(tvb, offset);
943 proto_tree_add_text(tree, tvb, offset, 4, "0x%x",
950 case FMP_THIRD_PARTY:
951 proto_tree_add_text(tree, tvb, offset, 4,
952 "Volume Mgmt Type: THIRD_PARTY (%d)",
956 offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
960 case FMP_CLIENT_BASED_DART:
961 proto_tree_add_text(tree, tvb, offset, 4,
962 "Volume Mgmt Type: CLIENT_BASED_DART (%d)",
966 offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
970 case FMP_CLIENT_BASED_SIMPLE:
971 proto_tree_add_text(tree, tvb, offset, 4,
972 "Volume Mgmt Type: CLIENT_BASED_SIMPLE (%d)",
977 * Decoding simpleVolInfo
979 offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
981 proto_tree_add_text(tree, tvb, offset, 4, "blockIndex: 0x%x",
982 tvb_get_ntohl(tvb, offset));
986 case FMP_DISK_SIGNATURE:
987 proto_tree_add_text(tree, tvb, offset, 4,
988 "Volume Mgmt Type: DISK_SIGNATURE: (%d)",
991 offset = dissect_InterpretVolMgtStuff(tvb, offset, tree);
994 case FMP_HIERARCHICAL_VOLUME:
995 proto_tree_add_text(tree, tvb, offset, 4,
996 "Volume Mgmt Type: FMP_HIERARCHICAL_VOLUME: (%d)",
1000 dissect_fmp_Hiervolume(tvb, offset, tree);
1004 proto_tree_add_text(tree, tvb, offset, 4,
1005 "Volume Mgmt Type: UNKNOWN (%d)", vmType);
1014 dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
1023 proto = tvb_get_ntohl(tvb, offset);
1027 proto_tree_add_text(tree, tvb, offset, 4,
1028 "Protocol: TCP (%d)",
1032 proto_tree_add_text(tree, tvb, offset, 4,
1033 "Protocol: UDP (%d)",
1037 proto_tree_add_text(tree, tvb, offset, 4,
1038 "Protocol: UNKNOWN (%d)",
1050 dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
1054 proto_tree *capTree;
1055 proto_tree *captree;
1060 cap_val = tvb_get_ntohl(tvb, offset);
1061 captree = proto_tree_add_text(tree, tvb, offset, 4,
1064 capTree = proto_item_add_subtree(captree,
1067 if (cap_val & FMP_CAP_REVOKE_HANDLE_LIST ){
1068 proto_tree_add_text(capTree, tvb, offset, 4,
1069 "CAP_REVOKE_HANDLE_LIST (%x)",
1072 if (cap_val & FMP_CAP_UNC_NAMES ){
1073 proto_tree_add_text(capTree, tvb, offset, 4,
1074 "CAP_UNC_NAMES (%x)",
1077 if (cap_val & FMP_CAP_CIFSV2 ){
1078 proto_tree_add_text(capTree, tvb, offset, 4,
1088 dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
1091 clientErrorNum errorNum;
1092 errorNum = tvb_get_ntohl(tvb, offset);
1095 case FMP_CE_GENERIC:
1096 proto_tree_add_text(tree, tvb, offset, 4,
1097 "CLIENT Error Number: FMP_CE_GENERIC (%d)",
1101 case FMP_CE_DISK_ERROR:
1102 proto_tree_add_text(tree, tvb, offset, 4,
1103 "CLIENT Error Number: FMP_CE_DISK_ERROR (%d)",
1108 proto_tree_add_text(tree, tvb, offset, 4,
1109 "CLIENT Error Number: Unknown Error Number (%d)",
1116 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1122 dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
1125 proto_tree *attrstree;
1126 proto_tree *attrsTree;
1128 attrstree = proto_tree_add_text(tree, tvb, offset, 84,
1130 attrsTree = proto_item_add_subtree(attrstree,
1132 attrs = tvb_get_ntohl(tvb, offset);
1133 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_type, offset);
1134 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_mode, offset);
1135 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_nlink, offset);
1136 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_uid, offset);
1137 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_gid, offset);
1138 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_fileSize, offset);
1139 /* Here hf_fmp_fileSize is used in
1142 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_used, offset);
1143 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_rdev, offset);
1144 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fsid, offset);
1145 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fileid, offset);
1146 proto_tree_add_text(tree, tvb, offset, 8,"atime: %d.%d seconds",
1147 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1149 proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
1150 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1152 proto_tree_add_text(tree, tvb, offset, 8,"ctime: %d.%d seconds",
1153 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1161 dissect_FMP_SessionCreate_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1164 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1166 offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
1167 hf_fmp_time_sec, hf_fmp_time_nsec);
1168 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
1174 dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1179 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1181 offset = dissect_rpc_data(tvb, tree,
1182 hf_fmp_sessionHandle, offset);
1183 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1185 offset = dissect_fmp_timeval(tvb, offset, pinfo, tree,
1186 hf_fmp_btime, hf_fmp_time_sec,
1188 offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo, tree);
1195 dissect_FMP_HeartBeat_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1198 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1205 dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1209 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1214 dissect_FMP_Mount_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1217 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1219 offset = dissect_fmp_capability(tvb, offset, tree);
1220 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1225 dissect_FMP_Mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1230 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1232 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1234 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsBlkSz,
1236 offset = dissect_fmp_vmInfo(tvb, offset, pinfo, tree);
1243 dissect_FMP_Open_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1246 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1248 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1253 dissect_FMP_Open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1258 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1260 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1262 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1264 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1267 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1274 dissect_FMP_Close_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1277 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1278 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1283 dissect_FMP_Close_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1288 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1290 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1298 dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1300 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1303 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1304 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1306 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1308 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1313 dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1318 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1320 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1322 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1324 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1326 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1328 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1330 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1337 dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, int offset,
1338 packet_info *pinfo, proto_tree *tree)
1340 offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
1342 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1343 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1345 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1347 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1352 dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1357 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1359 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1361 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1363 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1365 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1367 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1369 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1375 dissect_FMP_GetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1378 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1379 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1380 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1382 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1384 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1389 dissect_FMP_GetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1394 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1396 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1398 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1400 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1402 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1409 dissect_FMP_AllocSpace_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1412 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1413 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1414 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1416 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1418 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1423 dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1428 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1430 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1432 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1434 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1436 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1443 dissect_FMP_Flush_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1446 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1447 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1448 offset = dissect_fmp_flushCmd(tvb, offset, tree);
1449 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1450 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1455 dissect_FMP_Flush_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1460 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1462 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1469 dissect_FMP_CancelReq_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1472 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1473 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1474 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1479 dissect_FMP_CancelReq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1484 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1486 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1493 dissect_FMP_PlugIn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1496 offset = dissect_plugInID(tvb, offset, tree);
1497 offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf, offset);
1502 dissect_FMP_PlugIn_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1507 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1509 offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf,
1516 dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, int offset,
1517 packet_info *pinfo _U_, proto_tree *tree)
1519 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1525 dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, int offset,
1526 packet_info *pinfo _U_, proto_tree *tree)
1530 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1535 dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, int offset,packet_info *pinfo, proto_tree *tree)
1538 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1540 offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree, hf_fmp_btime,
1541 hf_fmp_time_sec, hf_fmp_time_nsec);
1542 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
1544 offset = dissect_fmp_notifyProtocol(tvb, offset, tree);
1546 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1548 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1551 offset = dissect_rpc_string(tvb, tree, hf_fmp_os_name,
1554 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1557 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1560 offset = dissect_fmp_capabilities(tvb, offset, tree);
1567 dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1572 offset = dissect_fmp_status(tvb, offset, tree, &rval);
1574 offset = dissect_rpc_data(tvb, tree,
1575 hf_fmp_sessionHandle, offset);
1576 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1578 offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree,
1579 hf_fmp_btime, hf_fmp_time_sec,
1581 offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo , tree);
1583 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1586 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1589 offset = dissect_rpc_string(tvb, tree, hf_fmp_server_version_string,
1592 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1595 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1598 offset = dissect_fmp_capabilities(tvb, offset, tree);
1606 dissect_FMP_ReportClientError_request(tvbuff_t *tvb, int offset,
1607 packet_info *pinfo _U_, proto_tree *tree)
1609 offset = dissect_rpc_string(tvb, tree, hf_fmp_description,
1612 offset = dissect_fmp_cerrInfo(tvb, offset, tree);
1617 dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, int offset,
1618 packet_info *pinfo _U_, proto_tree *tree)
1621 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1627 dissect_FMP_GetAttr_request(tvbuff_t *tvb, int offset,
1628 packet_info *pinfo _U_, proto_tree *tree)
1630 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1632 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1639 dissect_FMP_GetAttr_reply(tvbuff_t *tvb, int offset,
1640 packet_info *pinfo _U_, proto_tree *tree)
1643 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1645 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1647 offset = dissect_fmp_attrs(tvb, offset, tree);
1654 dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, int offset,
1655 packet_info *pinfo, proto_tree *tree)
1658 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1661 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1668 dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, int offset,
1669 packet_info *pinfo _U_, proto_tree *tree)
1673 offset = dissect_fmp_status(tvb, offset, tree, &rval);
1676 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1677 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1678 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
1679 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
1680 offset = dissect_fmp_attrs(tvb, offset, tree);
1689 dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, int offset,
1690 packet_info *pinfo, proto_tree *tree)
1693 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1694 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1695 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cmd, offset);
1696 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1698 proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
1699 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1701 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1708 dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, int offset,
1709 packet_info *pinfo _U_, proto_tree *tree)
1713 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1715 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1717 offset = dissect_fmp_attrs(tvb, offset, tree);
1725 dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, int offset,
1726 packet_info *pinfo _U_, proto_tree *tree)
1728 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
1729 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
1730 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1737 dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, int offset,
1738 packet_info *pinfo _U_, proto_tree *tree)
1742 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1744 /* FIXME: I don't know size of this volumes */
1745 offset = dissect_fmp_Hiervolume(tvb,offset, tree);
1752 dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, int offset,
1753 packet_info *pinfo, proto_tree *tree)
1755 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1757 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1758 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1759 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1761 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1767 dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1771 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1773 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1775 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1777 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1779 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1781 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1783 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1791 dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb, int offset,
1792 packet_info *pinfo, proto_tree *tree)
1794 offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
1796 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1797 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1798 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1800 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1806 dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1811 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1813 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1815 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1817 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1819 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1821 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1823 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1829 dissect_FMP_GetMapEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1832 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1833 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1834 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1835 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1837 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1843 dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1848 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1850 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1852 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1854 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1856 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1864 dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1867 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1868 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1869 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1870 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1872 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1878 dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1883 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1885 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1887 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1889 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1891 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1898 dissect_FMP_FlushEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1901 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1902 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1903 offset = dissect_fmp_flushCmd(tvb, offset, tree);
1904 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1905 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1910 dissect_FMP_FlushEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1915 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1917 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1923 * proc number, "proc name", dissect_request, dissect_reply
1924 * NULL as function pointer means: type of arguments is "void".
1926 static const vsff fmp3_proc[] = {
1928 { 1, "SessionCreate",
1929 dissect_FMP_SessionCreate_request, dissect_FMP_SessionCreate_reply },
1932 dissect_FMP_HeartBeat_request, dissect_FMP_HeartBeat_reply },
1935 dissect_FMP_Mount_request, dissect_FMP_Mount_reply },
1938 dissect_FMP_Open_request, dissect_FMP_Open_reply },
1941 dissect_FMP_Close_request, dissect_FMP_Close_reply },
1944 dissect_FMP_OpenGetMap_request, dissect_FMP_OpenGetMap_reply },
1946 { 7, "OpenAllocSpace",
1947 dissect_FMP_OpenAllocSpace_request, dissect_FMP_OpenAllocSpace_reply },
1950 dissect_FMP_GetMap_request, dissect_FMP_GetMap_reply },
1953 dissect_FMP_AllocSpace_request, dissect_FMP_AllocSpace_reply },
1956 dissect_FMP_Flush_request, dissect_FMP_Flush_reply },
1959 dissect_FMP_CancelReq_request, dissect_FMP_CancelReq_reply },
1962 dissect_FMP_PlugIn_request, dissect_FMP_PlugIn_reply },
1964 { 13, "SessionTerminate",
1965 dissect_FMP_SessionTerminate_request, dissect_FMP_SessionTerminate_reply },
1967 { 14, "SessionCreateEx",
1968 dissect_FMP_SessionCreateEx_request, dissect_FMP_SessionCreateEx_reply },
1970 { 15, "ReportClientError",
1971 dissect_FMP_ReportClientError_request, dissect_FMP_ReportClientError_reply },
1973 { 16 , "Get Attribute",
1974 dissect_FMP_GetAttr_request, dissect_FMP_GetAttr_reply },
1976 { 17 , "Open Get Attribute",
1977 dissect_FMP_OpenGetAttr_request, dissect_FMP_OpenGetAttr_reply },
1979 { 18 , "Flush Get Attribute",
1980 dissect_FMP_FlushGetAttr_request, dissect_FMP_FlushGetAttr_reply },
1982 { 19 , "OpenGetMapEx",
1983 dissect_FMP_OpenGetMapEx_request, dissect_FMP_OpenGetMapEx_reply },
1985 { 20 , "OpenAllocSpaceEx",
1986 dissect_FMP_OpenAllocSpaceEx_request, dissect_FMP_OpenAllocSpaceEx_reply },
1989 dissect_FMP_GetMapEx_request, dissect_FMP_GetMapEx_reply },
1991 { 22 , "AllocSpaceEx",
1992 dissect_FMP_AllocSpaceEx_request, dissect_FMP_AllocSpaceEx_reply },
1994 { 23 , "FMP_FlushEx",
1995 dissect_FMP_FlushEx_request, dissect_FMP_FlushEx_reply },
1998 { 24 , "FlushGetAttrEx",
1999 dissect_FMP_FlushGetAttrEx_request, dissect_FMP_FlushGetAttrEx_reply },
2003 { 25 , "GetVolumeInfo",
2004 dissect_FMP_GetVolumeInfo_request, dissect_FMP_GetVolumeInfo_reply },
2007 {0 , NULL , NULL , NULL }
2012 static const value_string fmp_proc_vals[] = {
2013 { 1, "SessionCreate" },
2018 { 6, "OpenGetMap" },
2019 { 7, "OpenAllocSpace" },
2021 { 9, "AllocSpace " },
2023 { 11, "CancelReq" },
2025 { 13, "SessionTerminate" },
2026 { 14, "SessionCreateEx" },
2027 { 15, "ReportClientError" },
2029 { 17, "OpenGetAttr" },
2030 { 18, "FlushGetAttr"},
2031 { 19, "OpenGetMapEx"},
2032 { 20, "OpenAllocSpaceEx"},
2034 { 22, "AllocSpaceEx"},
2036 { 24, "FlushGetAttrEx"},
2037 { 25, "GetVolumeInfo"},
2043 static const value_string fmp_status_vals[] = {
2051 {500,"WRONG_MSG_NUM"},
2052 {501,"SESSION_LOST"},
2053 {502,"HOT_SESSION"},
2054 {503,"COLD_SESSION"},
2055 {504,"CLIENT_TERMINATED"},
2056 {505,"WRITER_LOST_BLK"},
2057 {506,"FMP_REQUEST_QUEUED"},
2058 {507,"FMP_FALL_BACK"},
2059 {508,"REQUEST_CANCELLED"},
2060 {509,"WRITER_ZEROED_BLK"},
2061 {510,"NOTIFY_ERROR"},
2062 {511,"FMP_WRONG_HANDLE"},
2063 {512,"DUPLICATE_OPEN"},
2064 {600,"PLUGIN_NOFUNC"},
2069 static const value_string fmp_extentState_vals[] = {
2079 proto_register_fmp(void)
2081 static hf_register_info hf[] = {
2082 { &hf_fmp_procedure, {
2083 "Procedure", "fmp.procedure", FT_UINT32, BASE_DEC,
2084 VALS(fmp_proc_vals) , 0, NULL, HFILL }}, /* New addition */
2087 "Host ID", "fmp.hostID", FT_STRING, BASE_NONE,
2088 NULL, 0, NULL, HFILL }},
2091 "Boot Time", "fmp.btime", FT_ABSOLUTE_TIME, BASE_NONE,
2092 NULL, 0, "Machine Boot Time", HFILL }},
2094 { &hf_fmp_time_sec, {
2095 "seconds", "fmp.btime.sec", FT_UINT32, BASE_DEC,
2096 NULL, 0, "Seconds", HFILL }},
2098 { &hf_fmp_time_nsec, {
2099 "nanoseconds", "fmp.btime.nsec", FT_UINT32, BASE_DEC,
2100 NULL, 0, "Nanoseconds", HFILL }},
2102 { &hf_fmp_notifyPort, {
2103 "Notify Port", "fmp.notifyPort", FT_UINT32, BASE_DEC,
2104 NULL, 0, "FMP Notify Port", HFILL }},
2106 { &hf_fmp_sessionHandle, {
2107 "Session Handle", "fmp.sessHandle", FT_BYTES, BASE_NONE,
2108 NULL, 0, "FMP Session Handle", HFILL }},
2110 { &hf_fmp_fmpFHandle, {
2111 "FMP File Handle", "fmp.fmpFHandle",
2112 FT_BYTES, BASE_NONE, NULL, 0, NULL,
2115 { &hf_fmp_nfsFHandle, {
2116 "NFS File Handle", "fmp.nfsFHandle", FT_BYTES,
2117 BASE_NONE, NULL, 0, NULL, HFILL }},
2120 "File System ID", "fmp.fsID", FT_UINT32, BASE_HEX,
2121 NULL, 0, NULL, HFILL }},
2123 "Status", "fmp.status", FT_UINT32, BASE_DEC,
2124 VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
2126 { &hf_fmp_fsBlkSz, {
2127 "FS Block Size", "fmp.fsBlkSz", FT_UINT32, BASE_DEC,
2128 NULL, 0, "File System Block Size", HFILL }},
2130 { &hf_fmp_volHandle, {
2131 "Volume Handle", "fmp.volHandle", FT_STRING, BASE_NONE,
2132 NULL, 0, "FMP Volume Handle", HFILL }},
2134 { &hf_fmp_dskSigEnt_val, {
2135 "Celerra Signature", "fmp.dsi.ds.dsList.dskSigLst_val.dse.dskSigEnt_val", FT_STRING, BASE_NONE,
2136 NULL, 0, NULL, HFILL }},
2137 { &hf_fmp_devSignature, {
2138 "Signature DATA", "fmp.devSig", FT_STRING, BASE_NONE,
2139 NULL, 0, NULL, HFILL }},
2140 { &hf_fmp_mount_path, {
2141 "Native Protocol: PATH", "fmp.mount_path", FT_STRING, BASE_NONE,
2142 NULL, 0, "Absolute path from the root on the server side", HFILL }},
2143 { &hf_fmp_sig_offset, {
2144 "Sig Offset", "fmp.dsi.ds.sig_offset", FT_UINT64, BASE_DEC,
2145 NULL, 0, NULL, HFILL }},
2147 { &hf_fmp_numBlksReq, {
2148 "Extent Length", "fmp.numBlksReq", FT_UINT32,
2149 BASE_DEC, NULL, 0, NULL, HFILL }},
2151 { &hf_fmp_minBlks, {
2152 "Minimum Blocks to Grant", "fmp.minBlks", FT_UINT32,
2153 BASE_DEC, NULL, 0, NULL, HFILL }},
2156 "Message Number", "fmp.msgNum", FT_UINT32, BASE_DEC,
2157 NULL, 0, "FMP Message Number", HFILL }},
2160 "Cookie", "fmp.cookie", FT_UINT32, BASE_HEX,
2161 NULL, 0, "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
2163 { &hf_fmp_fileSize, {
2164 "File Size", "fmp.fileSize", FT_UINT64, BASE_DEC,
2165 NULL, 0, NULL, HFILL }},
2167 { &hf_fmp_extentList_len, {
2168 "Extent List Length", "fmp.extentList_len", FT_UINT32,
2169 BASE_DEC, NULL, 0, "FMP Extent List Length", HFILL }},
2171 { &hf_fmp_extent_state, {
2172 "Extent State", "fmp.extentState", FT_UINT32,BASE_DEC,
2173 VALS(fmp_extentState_vals), 0, "FMP Extent State", HFILL }},
2175 { &hf_fmp_firstLogBlk, {
2176 "firstLogBlk", "fmp.firstLogBlk", FT_UINT32,
2177 BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
2179 { &hf_fmp_numBlks, {
2180 "Number Blocks", "fmp.numBlks", FT_UINT32, BASE_DEC,
2181 NULL, 0, "Number of Blocks", HFILL }},
2184 "Volume ID inside DART", "fmp.volID", FT_UINT32, BASE_HEX,
2185 NULL, 0, "FMP Volume ID inside DART", HFILL }},
2187 { &hf_fmp_startOffset, {
2188 "Start Offset", "fmp.startOffset", FT_UINT32, BASE_DEC,
2189 NULL, 0, "FMP Start Offset", HFILL }},
2191 { &hf_fmp_start_offset64, {
2192 "Start offset", "fmp.start_offset64", FT_UINT64, BASE_DEC,
2193 NULL, 0, "Start Offset of extentEx", HFILL }},
2196 "EOF", "fmp.eof", FT_UINT64, BASE_DEC,
2197 NULL, 0, "End Of File", HFILL }},
2199 { &hf_fmp_plugInID, {
2200 "Plug In Cmd ID", "fmp.plugInID", FT_BYTES, BASE_NONE,
2201 NULL, 0, "Plug In Command ID", HFILL }},
2203 { &hf_fmp_plugInBuf, {
2204 "Plug In Args", "fmp.plugIn", FT_BYTES, BASE_NONE,
2205 NULL, 0, "FMP Plug In Arguments", HFILL }},
2206 { &hf_fmp_os_major, {
2207 "OS Major", "fmp.os_major", FT_UINT32, BASE_DEC,
2208 NULL, 0, "FMP OS Major", HFILL }},
2209 { &hf_fmp_os_minor, {
2210 "OS Minor", "fmp.os_minor", FT_UINT32, BASE_DEC,
2211 NULL, 0, "FMP OS Minor", HFILL }},
2212 { &hf_fmp_os_name, {
2213 "OS Name", "fmp.os_name", FT_STRING, BASE_NONE,
2214 NULL, 0, NULL, HFILL }},
2216 "Mount Path", "fmp.Path", FT_STRING, BASE_NONE,
2217 NULL, 0, NULL, HFILL }},
2218 { &hf_fmp_os_patch, {
2219 "OS Path", "fmp.os_patch", FT_UINT32, BASE_DEC,
2220 NULL, 0, NULL, HFILL }},
2221 { &hf_fmp_os_build, {
2222 "OS Build", "fmp.os_build", FT_UINT32, BASE_DEC,
2223 NULL, 0, NULL, HFILL }},
2224 { &hf_fmp_server_version_string, {
2225 "Server Version String", "fmp.server_version_string", FT_STRING, BASE_NONE,
2226 NULL, 0, NULL, HFILL }},
2227 { &hf_fmp_description, {
2228 "Error Description", "fmp.description", FT_STRING, BASE_NONE,
2229 NULL, 0, "Client Error Description", HFILL }},
2230 { &hf_fmp_nfsv3Attr_type, {
2231 "Type", "fmp.nfsv3Attr_type", FT_UINT32, BASE_DEC,
2232 NULL, 0, "NFSV3 Attr Type", HFILL }},
2233 { &hf_fmp_nfsv3Attr_mode, {
2234 "Mode", "fmp.nfsv3Attr_mod", FT_UINT32, BASE_DEC,
2235 NULL, 0, NULL, HFILL }},
2236 { &hf_fmp_nfsv3Attr_nlink, {
2237 "nlink", "fmp.nfsv3Attr_nlink", FT_UINT32, BASE_DEC,
2238 NULL, 0, NULL, HFILL }},
2239 { &hf_fmp_nfsv3Attr_uid, {
2240 "uid", "fmp.nfsv3Attr_uid", FT_UINT32, BASE_DEC,
2241 NULL, 0, "UID", HFILL }},
2242 { &hf_fmp_nfsv3Attr_gid, {
2243 "gid", "fmp.nfsv3Attr_gid", FT_UINT32, BASE_DEC,
2244 NULL, 0, "GID", HFILL }},
2245 /* for nfsv3Attr_size use hf_fmp_fileSize */
2246 { &hf_fmp_nfsv3Attr_used, {
2247 "Used", "fmp.nfsv3Attr_used", FT_UINT64, BASE_DEC,
2248 NULL, 0, "used", HFILL }},
2249 { &hf_fmp_nfsv3Attr_rdev, {
2250 "rdev", "fmp.nfsv3Attr_rdev", FT_UINT64, BASE_DEC,
2251 NULL, 0, NULL, HFILL }},
2252 { &hf_fmp_nfsv3Attr_fsid, {
2253 "fsid", "fmp.nfsv3Attr_fsid", FT_UINT64, BASE_DEC,
2254 NULL, 0, NULL, HFILL }},
2255 { &hf_fmp_nfsv3Attr_fileid, {
2256 "File ID", "fmp.nfsv3Attr_fileid", FT_UINT64, BASE_DEC,
2257 NULL, 0, "fileid", HFILL }},
2259 "Command", "fmp.cmd", FT_UINT32, BASE_DEC,
2260 NULL, 0, "command", HFILL }},
2261 { &hf_fmp_topVolumeId, {
2262 "Top Volume ID", "fmp.topVolumeId", FT_UINT32, BASE_HEX,
2263 NULL, 0, NULL, HFILL }},
2265 "number of volumes", "fmp.cursor", FT_UINT32, BASE_DEC,
2266 NULL, 0, NULL, HFILL }},
2267 { &hf_fmp_offset64, {
2268 "offset", "fmp.offset64", FT_UINT64, BASE_DEC,
2269 NULL, 0, NULL, HFILL }},
2270 { &hf_fmp_slice_size, {
2271 "size of the slice", "fmp.slice_size", FT_UINT64, BASE_DEC,
2272 NULL, 0, NULL, HFILL }},
2274 "Volume ID's", "fmp.volume", FT_UINT32, BASE_HEX,
2275 NULL, 0, "FMP Volume ID's", HFILL }},
2276 { &hf_fmp_stripeSize, {
2277 "size of the stripe", "fmp.stripeSize", FT_UINT64, BASE_DEC,
2278 NULL, 0, NULL, HFILL }},
2279 { &hf_fmp_firstLogBlk64, {
2280 "First Logical Block", "fmp.firstLogBlk64", FT_UINT64, BASE_DEC,
2281 NULL, 0, NULL, HFILL }},
2285 static gint *ett[] = {
2290 &ett_fmp_fileHandle,
2292 &ett_HierVolumeDescription,
2296 module_t *fmp_module;
2297 proto_fmp = proto_register_protocol("File Mapping Protocol", "FMP",
2300 proto_register_field_array(proto_fmp, hf, array_length(hf));
2301 proto_register_subtree_array(ett, array_length(ett));
2303 fmp_module=prefs_register_protocol(proto_fmp, NULL);
2305 prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
2306 "Fhandle filters finds both request/response",
2307 "With this option display filters for fmp fhandle a RPC call, even if the actual fhandle is only present in one of the packets"
2308 , &fmp_fhandle_reqrep_matching);
2313 proto_reg_handoff_fmp(void)
2315 /* Register the protocol as RPC */
2316 rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp);
2318 /* Register the procedure tables */
2319 rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc,hf_fmp_procedure);