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];
462 cmd = tvb_get_ntohl(tvb, offset);
464 /* Initialize the message for an empty string */
466 strcpy(msgIndex, "No command specified");
468 for (i = 0; cmd != 0 && i < 32; i++) {
472 if (cmd & bitValue) {
474 case FMP_COMMIT_SPECIFIED:
475 strcpy(msgIndex, "COMMIT_SPECIFIED");
476 msgIndex += strlen("COMMIT_SPECIFIED");
478 case FMP_RELEASE_SPECIFIED:
479 strcpy(msgIndex, "RELEASE_SPECIFIED");
480 msgIndex += strlen("RELEASE_SPECIFIED");
482 case FMP_RELEASE_ALL:
483 strcpy(msgIndex, "RELEASE_ALL");
484 msgIndex += strlen("RELEASE_ALL");
487 strcpy(msgIndex, "CLOSE_FILE");
488 msgIndex += strlen("CLOSE_FILE");
490 case FMP_UPDATE_TIME:
491 strcpy(msgIndex, "UPDATE_TIME");
492 msgIndex += strlen("UPDATE_TIME");
494 case FMP_ACCESS_TIME:
495 strcpy(msgIndex, "ACCESS_TIME");
496 msgIndex += strlen("ACCESS_TIME");
499 strcpy(msgIndex, "UNKNOWN");
500 msgIndex += strlen("UNKNOWN");
504 /* clear the bit that we processed */
507 /* add a "bitwise inclusive OR" symbol between cmds */
509 strcpy(msgIndex, " | ");
510 msgIndex += strlen(" | ");
515 proto_tree_add_text(tree, tvb, offset, 4, "Cmd: %s", msg);
520 dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
522 int length,numdisks,i,j;
524 numdisks = tvb_get_ntohl(tvb, offset);
525 proto_tree_add_text(tree, tvb, offset, 4, "Number of Disk: %d", numdisks);
528 for(i=0;i<numdisks;i++){
529 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_sig_offset, offset);
530 length = tvb_get_ntohl(tvb, offset);
531 proto_tree_add_text(tree, tvb, offset, 4, "Lenght of List : %d", length);
534 for(j=0;j<length;j++){
535 proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
536 tvb_get_ntohl(tvb, offset));
538 offset = dissect_rpc_string(tvb, tree, hf_fmp_dskSigEnt_val,
542 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_volID, offset);
550 dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
558 vmType = tvb_get_ntohl(tvb, offset);
561 case FMP_SERVER_BASED:
562 proto_tree_add_text(tree, tvb, offset, 4,
563 "Volume Mgmt Capability: SERVER_BASED (%d)", vmType);
566 case FMP_THIRD_PARTY:
567 proto_tree_add_text(tree, tvb, offset, 4,
568 "Volume Mgmt Capability: THIRD_PARTY (%d)", vmType);
571 case FMP_CLIENT_BASED_DART:
572 proto_tree_add_text(tree, tvb, offset, 4,
573 "Volume Mgmt Capability: CLIENT_BASED_DART (%d)",
577 case FMP_CLIENT_BASED_SIMPLE:
578 proto_tree_add_text(tree, tvb, offset, 4,
579 "Volume Mgmt Capability: CLIENT_BASED_SIMPLE (%d)",
582 case FMP_HIERARCHICAL_VOLUME:
583 proto_tree_add_text(tree, tvb, offset, 4,
584 "Volume Mgmt Capability: FMP_HIERARCHICAL_VOLUME (%d)",
592 proto_tree_add_text(tree, tvb, offset, 4,
593 "Volume Mgmt Capability: UNKNOWN (%d)", vmType);
602 dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
603 proto_tree *tree, int hf_time, int hf_time_sec,
608 proto_item* time_item;
609 proto_tree* time_tree = NULL;
615 ts.secs = tvb_get_ntohl(tvb, offset+0);
616 ts.nsecs = tvb_get_ntohl(tvb, offset+4);
618 time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8, &ts);
620 time_tree = proto_item_add_subtree(time_item, ett_fmp_timeval);
624 proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
626 proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
635 dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
642 proto_tree_add_text(tree, tvb, offset, 8,
643 "Heart Beat Interval: %d.%d seconds",
644 tvb_get_ntohl(tvb, offset),
645 tvb_get_ntohl(tvb, offset+4));
651 dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
659 status = tvb_get_ntohl(tvb, offset);
682 case FMP_NOTIFY_ERROR:
683 case FMP_WRITER_LOST_BLK:
684 case FMP_WRONG_MSG_NUM:
685 case FMP_SESSION_LOST:
686 case FMP_REQUEST_CANCELLED:
689 case FMP_HOT_SESSION:
692 case FMP_COLD_SESSION:
695 case FMP_CLIENT_TERMINATED:
698 case FMP_REQUEST_QUEUED:
704 case FMP_WRITER_ZEROED_BLK:
709 case FMP_WRONG_HANDLE:
712 case FMP_DUPLICATE_OPEN:
715 case FMP_PLUGIN_NOFUNC:
723 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
728 dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
737 qc = tvb_get_ntohl(tvb, offset);
740 case FMP_SCSI_INQUIRY:
741 proto_tree_add_text(tree, tvb, offset, 4,
742 "Query Command: SCSI_INQUIRY (%d)", qc);
745 proto_tree_add_text(tree, tvb, offset, 4,
746 "Query Command: DART_STAMP (%d)", qc);
749 proto_tree_add_text(tree, tvb, offset, 4,
750 "Query Command: UNKNOWN (%d)", qc);
755 proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
756 tvb_get_ntohl(tvb, offset));
759 offset = dissect_rpc_string(tvb, tree, hf_fmp_devSignature,
767 int dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
770 proto_tree *Hietree,*hieTree;
771 fmpVolumeType volumeType;
772 fmpDiskIdentifierType diskIdentifierType;
773 volumeType = tvb_get_ntohl(tvb, offset);
776 case FMP_VOLUME_DISK:
777 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
778 "VOLUME: DISK(%d)", volumeType );
779 Hietree = proto_item_add_subtree(hieTree,
780 ett_HierVolumeDescription);
782 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
783 offset += 8; /* blockIndex64 */
784 diskIdentifierType = tvb_get_ntohl(tvb, offset);
787 switch(diskIdentifierType){
788 case FMP_DISK_IDENTIFIER_SIGNATURE:
789 proto_tree_add_text(Hietree, tvb, offset, 4,
790 "DISK IDENTIFIER: SIGNATURE(%d)", diskIdentifierType);
792 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_sig_offset, offset);
793 length = tvb_get_ntohl(tvb, offset);
794 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
797 for(i=0;i<length;i++){
798 proto_tree_add_text(Hietree, tvb, offset, 4, "sigOffset: 0x%x",
799 tvb_get_ntohl(tvb, offset));
801 offset = dissect_rpc_string(tvb, Hietree, hf_fmp_dskSigEnt_val, offset, NULL);
808 case FMP_DISK_IDENTIFIER_SERIAL:
809 proto_tree_add_text(Hietree, tvb, offset, 4,
810 "DISK IDENTIFIER: SERIAL(%d)", diskIdentifierType);
811 dissect_fmp_devSerial(tvb, offset, NULL, Hietree);
816 case FMP_VOLUME_SLICE:
817 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
818 "VOLUME: SLICE(%d)", volumeType );
819 Hietree = proto_item_add_subtree(hieTree,
820 ett_HierVolumeDescription);
822 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
824 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_offset64, offset);
826 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_slice_size, offset);
828 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset);
832 case FMP_VOLUME_STRIPE:
833 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
834 "VOLUME: STRIPE(%d)", volumeType );
835 Hietree = proto_item_add_subtree(hieTree,
836 ett_HierVolumeDescription);
838 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
840 offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_stripeSize, offset);
841 length = tvb_get_ntohl(tvb, offset);
842 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
845 for(i=0;i<length;i++){
846 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
851 case FMP_VOLUME_META:
852 hieTree = proto_tree_add_text(tree, tvb, offset, 4,
853 "VOLUME: META(%d)", volumeType );
854 Hietree = proto_item_add_subtree(hieTree,
855 ett_HierVolumeDescription);
857 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
859 length = tvb_get_ntohl(tvb, offset);
860 proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
862 for(i=0;i<length;i++){
863 offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
867 proto_tree_add_text(tree, tvb, offset, 4,
868 "VOLUME: UNKNOWN (%d)",volumeType);
875 int dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
880 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
881 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
882 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
884 /* hierarchical description of volume. Each volume describes a
885 piece of the entire hierarchy and is guarenteed to only refer to
886 volumes that have already been described by the data structure up
887 to this point in time. In some extreme cases, the number of
888 volumes and their descriptions may be to large to fit in a single
889 RPC reply. In this case, the application may send getVolumeInfo
890 requests for the specific topVolumeId -- specifying the number of
891 volumes already recieved by the client, and the cookie. The
892 server is then responsible for sending another message containing
893 additional volumes. These RPCs exchanges may continue multiple
894 times, until the client has fetched the entire hierarchical
895 volume description. If the volume hierarchy changes duing a
896 multiple RPC sequence, the server will return an
897 FMP_VOLUME_CHANGED error, and the client must discard all
898 information already received and restart the request with
902 vollength = tvb_get_ntohl(tvb, offset);
903 proto_tree_add_text(tree, tvb, offset, 4, "Length of volume List : %d", vollength);
906 offset = dissect_fmp_VolumeDescription(tvb, offset, tree);
917 dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
921 guint32 phyVolList_len;
928 vmType = tvb_get_ntohl(tvb, offset);
931 case FMP_SERVER_BASED:
935 proto_tree_add_text(tree, tvb, offset, 4,
936 "Volume Mgmt Type: SERVER_BASED (%d)",
940 phyVolList_len = tvb_get_ntohl(tvb, offset);
944 * Loop through and print all of the devInfo
947 while (phyVolList_len) {
949 dissect_fmp_devSerial(tvb, offset, pinfo, tree);
950 volIndex = tvb_get_ntohl(tvb, offset);
951 proto_tree_add_text(tree, tvb, offset, 4, "0x%x",
958 case FMP_THIRD_PARTY:
959 proto_tree_add_text(tree, tvb, offset, 4,
960 "Volume Mgmt Type: THIRD_PARTY (%d)",
964 offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
968 case FMP_CLIENT_BASED_DART:
969 proto_tree_add_text(tree, tvb, offset, 4,
970 "Volume Mgmt Type: CLIENT_BASED_DART (%d)",
974 offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
978 case FMP_CLIENT_BASED_SIMPLE:
979 proto_tree_add_text(tree, tvb, offset, 4,
980 "Volume Mgmt Type: CLIENT_BASED_SIMPLE (%d)",
985 * Decoding simpleVolInfo
987 offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
989 proto_tree_add_text(tree, tvb, offset, 4, "blockIndex: 0x%x",
990 tvb_get_ntohl(tvb, offset));
994 case FMP_DISK_SIGNATURE:
995 proto_tree_add_text(tree, tvb, offset, 4,
996 "Volume Mgmt Type: DISK_SIGNATURE: (%d)",
999 offset = dissect_InterpretVolMgtStuff(tvb, offset, tree);
1002 case FMP_HIERARCHICAL_VOLUME:
1003 proto_tree_add_text(tree, tvb, offset, 4,
1004 "Volume Mgmt Type: FMP_HIERARCHICAL_VOLUME: (%d)",
1008 dissect_fmp_Hiervolume(tvb, offset, tree);
1012 proto_tree_add_text(tree, tvb, offset, 4,
1013 "Volume Mgmt Type: UNKNOWN (%d)", vmType);
1022 dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
1031 proto = tvb_get_ntohl(tvb, offset);
1035 proto_tree_add_text(tree, tvb, offset, 4,
1036 "Protocol: TCP (%d)",
1040 proto_tree_add_text(tree, tvb, offset, 4,
1041 "Protocol: UDP (%d)",
1045 proto_tree_add_text(tree, tvb, offset, 4,
1046 "Protocol: UNKNOW (%d)",
1058 dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
1062 proto_tree *capTree;
1063 proto_tree *captree;
1068 cap_val = tvb_get_ntohl(tvb, offset);
1069 captree = proto_tree_add_text(tree, tvb, offset, 4,
1072 capTree = proto_item_add_subtree(captree,
1075 if (cap_val & FMP_CAP_REVOKE_HANDLE_LIST ){
1076 proto_tree_add_text(capTree, tvb, offset, 4,
1077 "CAP_REVOKE_HANDLE_LIST (%x)",
1080 if (cap_val & FMP_CAP_UNC_NAMES ){
1081 proto_tree_add_text(capTree, tvb, offset, 4,
1082 "CAP_UNC_NAMES (%x)",
1085 if (cap_val & FMP_CAP_CIFSV2 ){
1086 proto_tree_add_text(capTree, tvb, offset, 4,
1096 dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
1099 clientErrorNum errorNum;
1100 errorNum = tvb_get_ntohl(tvb, offset);
1103 case FMP_CE_GENERIC:
1104 proto_tree_add_text(tree, tvb, offset, 4,
1105 "CLIENT Error Number: FMP_CE_GENERIC (%d)",
1109 case FMP_CE_DISK_ERROR:
1110 proto_tree_add_text(tree, tvb, offset, 4,
1111 "CLIENT Error Number: FMP_CE_DISK_ERROR (%d)",
1116 proto_tree_add_text(tree, tvb, offset, 4,
1117 "CLIENT Error Number: Unknow Error Number (%d)",
1124 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1130 dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
1133 proto_tree *attrstree;
1134 proto_tree *attrsTree;
1136 attrstree = proto_tree_add_text(tree, tvb, offset, 84,
1138 attrsTree = proto_item_add_subtree(attrstree,
1140 attrs = tvb_get_ntohl(tvb, offset);
1141 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_type, offset);
1142 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_mode, offset);
1143 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_nlink, offset);
1144 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_uid, offset);
1145 offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_gid, offset);
1146 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_fileSize, offset);
1147 /* Here hf_fmp_fileSize is used in
1150 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_used, offset);
1151 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_rdev, offset);
1152 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fsid, offset);
1153 offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fileid, offset);
1154 proto_tree_add_text(tree, tvb, offset, 8,"atime: %d.%d seconds",
1155 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1157 proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
1158 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1160 proto_tree_add_text(tree, tvb, offset, 8,"ctime: %d.%d seconds",
1161 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1169 dissect_FMP_SessionCreate_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1172 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1174 offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
1175 hf_fmp_time_sec, hf_fmp_time_nsec);
1176 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
1182 dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1187 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1189 offset = dissect_rpc_data(tvb, tree,
1190 hf_fmp_sessionHandle, offset);
1191 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1193 offset = dissect_fmp_timeval(tvb, offset, pinfo, tree,
1194 hf_fmp_btime, hf_fmp_time_sec,
1196 offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo, tree);
1203 dissect_FMP_HeartBeat_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1206 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1213 dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1217 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1222 dissect_FMP_Mount_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1225 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1227 offset = dissect_fmp_capability(tvb, offset, tree);
1228 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1233 dissect_FMP_Mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1238 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1240 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1242 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsBlkSz,
1244 offset = dissect_fmp_vmInfo(tvb, offset, pinfo, tree);
1251 dissect_FMP_Open_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1254 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1256 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1261 dissect_FMP_Open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1266 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1268 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1270 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1272 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1275 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1282 dissect_FMP_Close_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1285 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1286 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1291 dissect_FMP_Close_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1296 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1298 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1306 dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1308 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1311 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1312 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1314 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1316 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1321 dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1326 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1328 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1330 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1332 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1334 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1336 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1338 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1345 dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, int offset,
1346 packet_info *pinfo, proto_tree *tree)
1348 offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
1350 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1351 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1353 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1355 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1360 dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1365 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1367 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1369 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1371 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1373 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1375 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1377 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1383 dissect_FMP_GetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1386 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1387 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1388 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1390 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1392 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1397 dissect_FMP_GetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1402 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1404 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1406 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1408 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1410 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1417 dissect_FMP_AllocSpace_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1420 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1421 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1422 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1424 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1426 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1431 dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1436 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1438 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1440 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1442 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1444 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1451 dissect_FMP_Flush_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1454 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1455 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1456 offset = dissect_fmp_flushCmd(tvb, offset, tree);
1457 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1458 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1463 dissect_FMP_Flush_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1468 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1470 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1477 dissect_FMP_CancelReq_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1480 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1481 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1482 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1487 dissect_FMP_CancelReq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1492 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1494 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1501 dissect_FMP_PlugIn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1504 offset = dissect_plugInID(tvb, offset, tree);
1505 offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf, offset);
1510 dissect_FMP_PlugIn_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1515 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1517 offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf,
1524 dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, int offset,
1525 packet_info *pinfo _U_, proto_tree *tree)
1527 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1533 dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, int offset,
1534 packet_info *pinfo _U_, proto_tree *tree)
1538 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1543 dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, int offset,packet_info *pinfo, proto_tree *tree)
1546 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1548 offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree, hf_fmp_btime,
1549 hf_fmp_time_sec, hf_fmp_time_nsec);
1550 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
1552 offset = dissect_fmp_notifyProtocol(tvb, offset, tree);
1554 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1556 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1559 offset = dissect_rpc_string(tvb, tree, hf_fmp_os_name,
1562 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1565 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1568 offset = dissect_fmp_capabilities(tvb, offset, tree);
1575 dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1580 offset = dissect_fmp_status(tvb, offset, tree, &rval);
1582 offset = dissect_rpc_data(tvb, tree,
1583 hf_fmp_sessionHandle, offset);
1584 offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
1586 offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree,
1587 hf_fmp_btime, hf_fmp_time_sec,
1589 offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo , tree);
1591 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1594 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1597 offset = dissect_rpc_string(tvb, tree, hf_fmp_server_version_string,
1600 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1603 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1606 offset = dissect_fmp_capabilities(tvb, offset, tree);
1614 dissect_FMP_ReportClientError_request(tvbuff_t *tvb, int offset,
1615 packet_info *pinfo _U_, proto_tree *tree)
1617 offset = dissect_rpc_string(tvb, tree, hf_fmp_description,
1620 offset = dissect_fmp_cerrInfo(tvb, offset, tree);
1625 dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, int offset,
1626 packet_info *pinfo _U_, proto_tree *tree)
1629 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1635 dissect_FMP_GetAttr_request(tvbuff_t *tvb, int offset,
1636 packet_info *pinfo _U_, proto_tree *tree)
1638 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1640 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1647 dissect_FMP_GetAttr_reply(tvbuff_t *tvb, int offset,
1648 packet_info *pinfo _U_, proto_tree *tree)
1651 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1653 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1655 offset = dissect_fmp_attrs(tvb, offset, tree);
1662 dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, int offset,
1663 packet_info *pinfo, proto_tree *tree)
1666 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1669 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1676 dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, int offset,
1677 packet_info *pinfo _U_, proto_tree *tree)
1681 offset = dissect_fmp_status(tvb, offset, tree, &rval);
1684 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1685 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1686 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
1687 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
1688 offset = dissect_fmp_attrs(tvb, offset, tree);
1697 dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, int offset,
1698 packet_info *pinfo, proto_tree *tree)
1701 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1702 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1703 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cmd, offset);
1704 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1706 proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
1707 tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
1709 offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1716 dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, int offset,
1717 packet_info *pinfo _U_, proto_tree *tree)
1721 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1723 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1725 offset = dissect_fmp_attrs(tvb, offset, tree);
1733 dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, int offset,
1734 packet_info *pinfo _U_, proto_tree *tree)
1736 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
1737 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
1738 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1745 dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, int offset,
1746 packet_info *pinfo _U_, proto_tree *tree)
1750 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1752 /* FIXME: I don't know size of this volumes */
1753 offset = dissect_fmp_Hiervolume(tvb,offset, tree);
1760 dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, int offset,
1761 packet_info *pinfo, proto_tree *tree)
1763 offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
1765 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1766 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1767 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1769 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1775 dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1779 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1781 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1783 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1785 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1787 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1789 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1791 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1799 dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb, int offset,
1800 packet_info *pinfo, proto_tree *tree)
1802 offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
1804 offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1805 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1806 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1808 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1814 dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1819 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1821 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
1823 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1825 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1827 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1829 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
1831 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1837 dissect_FMP_GetMapEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1840 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1841 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1842 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1843 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1845 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1851 dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1856 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1858 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1860 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1862 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1864 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1872 dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1875 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1876 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1877 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
1878 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1880 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1886 dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
1891 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1893 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1895 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1897 offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1899 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1906 dissect_FMP_FlushEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
1909 offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
1910 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1911 offset = dissect_fmp_flushCmd(tvb, offset, tree);
1912 offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1913 offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1918 dissect_FMP_FlushEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1923 offset = dissect_fmp_status(tvb, offset,tree, &rval);
1925 offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1931 * proc number, "proc name", dissect_request, dissect_reply
1932 * NULL as function pointer means: type of arguments is "void".
1934 static const vsff fmp3_proc[] = {
1936 { 1, "SessionCreate",
1937 dissect_FMP_SessionCreate_request, dissect_FMP_SessionCreate_reply },
1940 dissect_FMP_HeartBeat_request, dissect_FMP_HeartBeat_reply },
1943 dissect_FMP_Mount_request, dissect_FMP_Mount_reply },
1946 dissect_FMP_Open_request, dissect_FMP_Open_reply },
1949 dissect_FMP_Close_request, dissect_FMP_Close_reply },
1952 dissect_FMP_OpenGetMap_request, dissect_FMP_OpenGetMap_reply },
1954 { 7, "OpenAllocSpace",
1955 dissect_FMP_OpenAllocSpace_request, dissect_FMP_OpenAllocSpace_reply },
1958 dissect_FMP_GetMap_request, dissect_FMP_GetMap_reply },
1961 dissect_FMP_AllocSpace_request, dissect_FMP_AllocSpace_reply },
1964 dissect_FMP_Flush_request, dissect_FMP_Flush_reply },
1967 dissect_FMP_CancelReq_request, dissect_FMP_CancelReq_reply },
1970 dissect_FMP_PlugIn_request, dissect_FMP_PlugIn_reply },
1972 { 13, "SessionTerminate",
1973 dissect_FMP_SessionTerminate_request, dissect_FMP_SessionTerminate_reply },
1975 { 14, "SessionCreateEx",
1976 dissect_FMP_SessionCreateEx_request, dissect_FMP_SessionCreateEx_reply },
1978 { 15, "ReportClientError",
1979 dissect_FMP_ReportClientError_request, dissect_FMP_ReportClientError_reply },
1981 { 16 , "Get Attribute",
1982 dissect_FMP_GetAttr_request, dissect_FMP_GetAttr_reply },
1984 { 17 , "Open Get Attribute",
1985 dissect_FMP_OpenGetAttr_request, dissect_FMP_OpenGetAttr_reply },
1987 { 18 , "Flush Get Attribute",
1988 dissect_FMP_FlushGetAttr_request, dissect_FMP_FlushGetAttr_reply },
1990 { 19 , "OpenGetMapEx",
1991 dissect_FMP_OpenGetMapEx_request, dissect_FMP_OpenGetMapEx_reply },
1993 { 20 , "OpenAllocSpaceEx",
1994 dissect_FMP_OpenAllocSpaceEx_request, dissect_FMP_OpenAllocSpaceEx_reply },
1997 dissect_FMP_GetMapEx_request, dissect_FMP_GetMapEx_reply },
1999 { 22 , "AllocSpaceEx",
2000 dissect_FMP_AllocSpaceEx_request, dissect_FMP_AllocSpaceEx_reply },
2002 { 23 , "FMP_FlushEx",
2003 dissect_FMP_FlushEx_request, dissect_FMP_FlushEx_reply },
2006 { 24 , "FlushGetAttrEx",
2007 dissect_FMP_FlushGetAttrEx_request, dissect_FMP_FlushGetAttrEx_reply },
2011 { 25 , "GetVolumeInfo",
2012 dissect_FMP_GetVolumeInfo_request, dissect_FMP_GetVolumeInfo_reply },
2015 {0 , NULL , NULL , NULL }
2020 static const value_string fmp_proc_vals[] = {
2021 { 1, "SessionCreate" },
2026 { 6, "OpenGetMap" },
2027 { 7, "OpenAllocSpace" },
2029 { 9, "AllocSpace " },
2031 { 11, "CancelReq" },
2033 { 13, "SessionTerminate" },
2034 { 14, "SessionCreateEx" },
2035 { 15, "ReportClientError" },
2037 { 17, "OpenGetAttr" },
2038 { 18, "FlushGetAttr"},
2039 { 19, "OpenGetMapEx"},
2040 { 20, "OpenAllocSpaceEx"},
2042 { 22, "AllocSpaceEx"},
2044 { 24, "FlushGetAttrEx"},
2045 { 25, "GetVolumeInfo"},
2051 static const value_string fmp_status_vals[] = {
2059 {500,"WRONG_MSG_NUM"},
2060 {501,"SESSION_LOST"},
2061 {502,"HOT_SESSION"},
2062 {503,"COLD_SESSION"},
2063 {504,"CLIENT_TERMINATED"},
2064 {505,"WRITER_LOST_BLK"},
2065 {506,"FMP_REQUEST_QUEUED"},
2066 {507,"FMP_FALL_BACK"},
2067 {508,"REQUEST_CANCELLED"},
2068 {509,"WRITER_ZEROED_BLK"},
2069 {510,"NOTIFY_ERROR"},
2070 {511,"FMP_WRONG_HANDLE"},
2071 {512,"DUPLICATE_OPEN"},
2072 {600,"PLUGIN_NOFUNC"},
2077 static const value_string fmp_extentState_vals[] = {
2087 proto_register_fmp(void)
2089 static hf_register_info hf[] = {
2090 { &hf_fmp_procedure, {
2091 "Procedure", "fmp.procedure", FT_UINT32, BASE_DEC,
2092 VALS(fmp_proc_vals) , 0, "Procedure", HFILL }}, /* New addition */
2095 "Host ID", "fmp.hostID", FT_STRING, BASE_NONE,
2096 NULL, 0, "Host ID", HFILL }},
2099 "Boot Time", "fmp.btime", FT_ABSOLUTE_TIME, BASE_NONE,
2100 NULL, 0, "Machine Boot Time", HFILL }},
2102 { &hf_fmp_time_sec, {
2103 "seconds", "fmp.btime.sec", FT_UINT32, BASE_DEC,
2104 NULL, 0, "Seconds", HFILL }},
2106 { &hf_fmp_time_nsec, {
2107 "nano seconds", "fmp.btime.nsec", FT_UINT32, BASE_DEC,
2108 NULL, 0, "Nano-seconds", HFILL }},
2110 { &hf_fmp_notifyPort, {
2111 "Notify Port", "fmp.notifyPort", FT_UINT32, BASE_DEC,
2112 NULL, 0, "FMP Notify Port", HFILL }},
2114 { &hf_fmp_sessionHandle, {
2115 "Session Handle", "fmp.sessHandle", FT_BYTES, BASE_NONE,
2116 NULL, 0, "FMP Session Handle", HFILL }},
2118 { &hf_fmp_fmpFHandle, {
2119 "FMP File Handle", "fmp.fmpFHandle",
2120 FT_BYTES, BASE_NONE, NULL, 0, "FMP File Handle",
2123 { &hf_fmp_nfsFHandle, {
2124 "NFS File Handle", "fmp.nfsFHandle", FT_BYTES,
2125 BASE_NONE, NULL, 0, "NFS File Handle ", HFILL }},
2128 "File System ID", "fmp.fsID", FT_UINT32, BASE_HEX,
2129 NULL, 0, "File System ID", HFILL }},
2131 "Status", "fmp.status", FT_UINT32, BASE_DEC,
2132 VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
2134 { &hf_fmp_fsBlkSz, {
2135 "FS Block Size", "fmp.fsBlkSz", FT_UINT32, BASE_DEC,
2136 NULL, 0, "File System Block Size", HFILL }},
2138 { &hf_fmp_volHandle, {
2139 "Volume Handle", "fmp.volHandle", FT_STRING, BASE_NONE,
2140 NULL, 0, "FMP Volume Handle", HFILL }},
2142 { &hf_fmp_dskSigEnt_val, {
2143 "Celerra Signature", "fmp.dsi.ds.dsList.dskSigLst_val.dse.dskSigEnt_val", FT_STRING, BASE_NONE,
2144 NULL, 0, "Celerra Signature", HFILL }},
2145 { &hf_fmp_devSignature, {
2146 "Signature DATA", "fmp.devSig", FT_STRING, BASE_NONE,
2147 NULL, 0, "Signature DATA", HFILL }},
2148 { &hf_fmp_mount_path, {
2149 "Native Protocol: PATH", "fmp.mount_path", FT_STRING, BASE_NONE,
2150 NULL, 0, "Absoulte path from the root on the server side", HFILL }},
2151 { &hf_fmp_sig_offset, {
2152 "Sig Offset", "fmp.dsi.ds.sig_offset", FT_UINT64, BASE_DEC,
2153 NULL, 0, "Sig Offset", HFILL }},
2155 { &hf_fmp_numBlksReq, {
2156 "Extent Length", "fmp.numBlksReq", FT_UINT32,
2157 BASE_DEC, NULL, 0, "Extent Length", HFILL }},
2159 { &hf_fmp_minBlks, {
2160 "Minimum Blocks to Grant", "fmp.minBlks", FT_UINT32,
2161 BASE_DEC, NULL, 0, "Minimum Blocks to Grant", HFILL }},
2164 "Message Number", "fmp.msgNum", FT_UINT32, BASE_DEC,
2165 NULL, 0, "FMP Message Number", HFILL }},
2168 "Cookie", "fmp.cookie", FT_UINT32, BASE_HEX,
2169 NULL, 0, "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
2171 { &hf_fmp_fileSize, {
2172 "File Size", "fmp.fileSize", FT_UINT64, BASE_DEC,
2173 NULL, 0, "File Size", HFILL }},
2175 { &hf_fmp_extentList_len, {
2176 "Extent List Length", "fmp.extentList_len", FT_UINT32,
2177 BASE_DEC, NULL, 0, "FMP Extent List Length", HFILL }},
2179 { &hf_fmp_extent_state, {
2180 "Extent State", "fmp.extentState", FT_UINT32,BASE_DEC,
2181 VALS(fmp_extentState_vals), 0, "FMP Extent State", HFILL }},
2183 { &hf_fmp_firstLogBlk, {
2184 "firstLogBlk", "fmp.firstLogBlk", FT_UINT32,
2185 BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
2187 { &hf_fmp_numBlks, {
2188 "Number Blocks", "fmp.numBlks", FT_UINT32, BASE_DEC,
2189 NULL, 0, "Number of Blocks", HFILL }},
2192 "Volume ID inside DART", "fmp.volID", FT_UINT32, BASE_HEX,
2193 NULL, 0, "FMP Volume ID inside DART", HFILL }},
2195 { &hf_fmp_startOffset, {
2196 "Start Offset", "fmp.startOffset", FT_UINT32, BASE_DEC,
2197 NULL, 0, "FMP Start Offset", HFILL }},
2199 { &hf_fmp_start_offset64, {
2200 "Start offset", "fmp.start_offset64", FT_UINT64, BASE_DEC,
2201 NULL, 0, "Start Offset of extentEx", HFILL }},
2204 "EOF", "fmp.eof", FT_UINT64, BASE_DEC,
2205 NULL, 0, "End Of File", HFILL }},
2207 { &hf_fmp_plugInID, {
2208 "Plug In Cmd ID", "fmp.plugInID", FT_BYTES, BASE_NONE,
2209 NULL, 0, "Plug In Command ID", HFILL }},
2211 { &hf_fmp_plugInBuf, {
2212 "Plug In Args", "fmp.plugIn", FT_BYTES, BASE_NONE,
2213 NULL, 0, "FMP Plug In Arguments", HFILL }},
2214 { &hf_fmp_os_major, {
2215 "OS Major", "fmp.os_major", FT_UINT32, BASE_DEC,
2216 NULL, 0, "FMP OS Major", HFILL }},
2217 { &hf_fmp_os_minor, {
2218 "OS Minor", "fmp.os_minor", FT_UINT32, BASE_DEC,
2219 NULL, 0, "FMP OS Minor", HFILL }},
2220 { &hf_fmp_os_name, {
2221 "OS Name", "fmp.os_name", FT_STRING, BASE_NONE,
2222 NULL, 0, "OS Name", HFILL }},
2224 "Mount Path", "fmp.Path", FT_STRING, BASE_NONE,
2225 NULL, 0, "Mount Path", HFILL }},
2226 { &hf_fmp_os_patch, {
2227 "OS Path", "fmp.os_patch", FT_UINT32, BASE_DEC,
2228 NULL, 0, "OS Path", HFILL }},
2229 { &hf_fmp_os_build, {
2230 "OS Build", "fmp.os_build", FT_UINT32, BASE_DEC,
2231 NULL, 0, "OS Build", HFILL }},
2232 { &hf_fmp_server_version_string, {
2233 "Server Version String", "fmp.server_version_string", FT_STRING, BASE_NONE,
2234 NULL, 0, "Server Version String", HFILL }},
2235 { &hf_fmp_description, {
2236 "Error Description", "fmp.description", FT_STRING, BASE_NONE,
2237 NULL, 0, "Client Error Description", HFILL }},
2238 { &hf_fmp_nfsv3Attr_type, {
2239 "Type", "fmp.nfsv3Attr_type", FT_UINT32, BASE_DEC,
2240 NULL, 0, "NFSV3 Attr Type ", HFILL }},
2241 { &hf_fmp_nfsv3Attr_mode, {
2242 "Mode", "fmp.nfsv3Attr_mod", FT_UINT32, BASE_DEC,
2243 NULL, 0, "Mode", HFILL }},
2244 { &hf_fmp_nfsv3Attr_nlink, {
2245 "nlink", "fmp.nfsv3Attr_nlink", FT_UINT32, BASE_DEC,
2246 NULL, 0, "nlink", HFILL }},
2247 { &hf_fmp_nfsv3Attr_uid, {
2248 "uid", "fmp.nfsv3Attr_uid", FT_UINT32, BASE_DEC,
2249 NULL, 0, "UID", HFILL }},
2250 { &hf_fmp_nfsv3Attr_gid, {
2251 "gid", "fmp.nfsv3Attr_gid", FT_UINT32, BASE_DEC,
2252 NULL, 0, "GID", HFILL }},
2253 /* for nfsv3Attr_size use hf_fmp_fileSize */
2254 { &hf_fmp_nfsv3Attr_used, {
2255 "Used", "fmp.nfsv3Attr_used", FT_UINT64, BASE_DEC,
2256 NULL, 0, "used", HFILL }},
2257 { &hf_fmp_nfsv3Attr_rdev, {
2258 "rdev", "fmp.nfsv3Attr_rdev", FT_UINT64, BASE_DEC,
2259 NULL, 0, "rdev", HFILL }},
2260 { &hf_fmp_nfsv3Attr_fsid, {
2261 "fsid", "fmp.nfsv3Attr_fsid", FT_UINT64, BASE_DEC,
2262 NULL, 0, "fsid", HFILL }},
2263 { &hf_fmp_nfsv3Attr_fileid, {
2264 "File ID", "fmp.nfsv3Attr_fileid", FT_UINT64, BASE_DEC,
2265 NULL, 0, "fileid", HFILL }},
2267 "Command", "fmp.cmd", FT_UINT32, BASE_DEC,
2268 NULL, 0, "command", HFILL }},
2269 { &hf_fmp_topVolumeId, {
2270 "Top Volume ID", "fmp.topVolumeId", FT_UINT32, BASE_HEX,
2271 NULL, 0, "Top Volume ID", HFILL }},
2273 "number of volumes", "fmp.cursor", FT_UINT32, BASE_DEC,
2274 NULL, 0, "number of volumes", HFILL }},
2275 { &hf_fmp_offset64, {
2276 "offset", "fmp.offset64", FT_UINT64, BASE_DEC,
2277 NULL, 0, "offset", HFILL }},
2278 { &hf_fmp_slice_size, {
2279 "size of the slice", "fmp.slice_size", FT_UINT64, BASE_DEC,
2280 NULL, 0, "size of the slice", HFILL }},
2282 "Volume ID's", "fmp.volume", FT_UINT32, BASE_HEX,
2283 NULL, 0, "FMP Volume ID's", HFILL }},
2284 { &hf_fmp_stripeSize, {
2285 "size of the stripe", "fmp.stripeSize", FT_UINT64, BASE_DEC,
2286 NULL, 0, "size of the stripe", HFILL }},
2287 { &hf_fmp_firstLogBlk64, {
2288 "First Logical Block", "fmp.firstLogBlk64", FT_UINT64, BASE_DEC,
2289 NULL, 0, " ", HFILL }},
2293 static gint *ett[] = {
2298 &ett_fmp_fileHandle,
2300 &ett_HierVolumeDescription,
2304 module_t *fmp_module;
2305 proto_fmp = proto_register_protocol("File Mapping Protocol", "FMP",
2308 proto_register_field_array(proto_fmp, hf, array_length(hf));
2309 proto_register_subtree_array(ett, array_length(ett));
2311 fmp_module=prefs_register_protocol(proto_fmp, NULL);
2313 prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
2314 "Fhandle filters finds both request/response",
2315 "With this option display filters for fmp fhandle a RPC call, even if the actual fhandle is only present in one of the packets"
2316 , &fmp_fhandle_reqrep_matching);
2321 proto_reg_handoff_fmp(void)
2323 /* Register the protocol as RPC */
2324 rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp);
2326 /* Register the procedure tables */
2327 rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc,hf_fmp_procedure);