Coverage Report

Created: 2026-07-12 07:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-fmp.c
Line
Count
Source
1
/* packet-fmp.c
2
 * Routines for fmp dissection
3
 *
4
 * Wireshark - Network traffic analyzer
5
 * By Gerald Combs <gerald@wireshark.org>
6
 * Copyright 1998 Gerald Combs
7
 *
8
 * SPDX-License-Identifier: GPL-2.0-or-later
9
 */
10
11
#include "config.h"
12
13
#include <epan/packet.h>
14
#include <epan/prefs.h>
15
#include <epan/tfs.h>
16
#include "packet-fmp.h"
17
#include "packet-rpc.h"
18
19
void proto_register_fmp(void);
20
void proto_reg_handoff_fmp(void);
21
22
static int hf_fmp_procedure;
23
static int hf_fmp_fsID;
24
static int hf_fmp_fsBlkSz;
25
static int hf_fmp_sessionHandle;
26
static int hf_fmp_fmpFHandle;
27
static int hf_fmp_msgNum;
28
static int hf_fmp_fileSize;
29
static int hf_fmp_cookie;
30
static int hf_fmp_firstLogBlk;
31
static int hf_fmp_numBlksReq;
32
33
static int proto_fmp;
34
static int hf_fmp_hostID;
35
static int hf_fmp_status;
36
static int hf_fmp_btime;
37
static int hf_fmp_time_sec;
38
static int hf_fmp_time_nsec;
39
static int hf_fmp_notifyPort;
40
static int hf_fmp_minBlks;
41
static int hf_fmp_eof;
42
static int hf_fmp_path;
43
static int hf_fmp_plugInID;
44
static int hf_fmp_plugInBuf;
45
static int hf_fmp_nfsFHandle;
46
static int hf_fmp_extentList_len;
47
static int hf_fmp_extent_state;
48
static int hf_fmp_numBlks;
49
static int hf_fmp_volID;
50
static int hf_fmp_startOffset;
51
static int hf_fmp_volHandle;
52
static int hf_fmp_devSignature;
53
static int hf_fmp_dskSigEnt_val;
54
static int hf_fmp_mount_path;
55
static int hf_fmp_sig_offset;
56
static int hf_fmp_os_major;
57
static int hf_fmp_os_minor;
58
static int hf_fmp_os_name;
59
static int hf_fmp_os_patch;
60
static int hf_fmp_os_build;
61
static int hf_fmp_server_version_string;
62
static int hf_fmp_description;
63
static int hf_fmp_nfsv3Attr_type;
64
static int hf_fmp_nfsv3Attr_mode;
65
static int hf_fmp_nfsv3Attr_nlink;
66
static int hf_fmp_nfsv3Attr_uid;
67
static int hf_fmp_nfsv3Attr_gid;
68
static int hf_fmp_nfsv3Attr_used;
69
static int hf_fmp_nfsv3Attr_rdev;
70
static int hf_fmp_nfsv3Attr_fsid;
71
static int hf_fmp_nfsv3Attr_fileid;
72
static int hf_fmp_cmd;
73
static int hf_fmp_topVolumeId;
74
static int hf_fmp_cursor;
75
static int hf_fmp_offset64;
76
static int hf_fmp_start_offset64;
77
static int hf_fmp_slice_size;
78
static int hf_fmp_volume;
79
static int hf_fmp_stripeSize;
80
static int hf_fmp_firstLogBlk64;
81
static int hf_fmp_native_protocol;
82
static int hf_fmp_encoding_mode;
83
static int hf_fmp_capability;
84
static int hf_fmp_devSerial_query_cmd;
85
static int hf_fmp_volume_desc;
86
static int hf_fmp_disk_identifier;
87
static int hf_fmp_volume_mgmt_type;
88
static int hf_fmp_notify_protocol;
89
static int hf_fmp_client_error_number;
90
/* Generated from convert_proto_tree_add_text.pl */
91
static int hf_fmp_cap;
92
static int hf_fmp_cap_revoke_handle_list;
93
static int hf_fmp_length_of_volume_list;
94
static int hf_fmp_cap_unc_names;
95
static int hf_fmp_length_of_list;
96
static int hf_fmp_sigoffset;
97
static int hf_fmp_uid;
98
static int hf_fmp_fid;
99
static int hf_fmp_fsid;
100
static int hf_fmp_tid;
101
static int hf_fmp_cifsport;
102
static int hf_fmp_blockindex;
103
static int hf_fmp_number_of_disk;
104
static int hf_fmp_cap_cifsv2;
105
static int hf_fmp_mtime;
106
static int hf_fmp_atime;
107
static int hf_fmp_ctime;
108
static int hf_fmp_heartbeat_interval;
109
static int hf_fmp_volindex;
110
111
static int ett_fmp;
112
static int ett_fmp_timeval;
113
static int ett_fmp_extList;
114
static int ett_fmp_ext;
115
static int ett_fmp_fileHandle;
116
static int ett_capabilities;
117
static int ett_HierVolumeDescription;
118
static int ett_attrs;
119
120
static const value_string fmp_encoding_mode_vals[] = {
121
    {FMP_ASCII, "ASCII"},
122
    {FMP_UTF8, "UTF8"},
123
    {FMP_UNICODE1, "UNICODE"},
124
    {0,NULL}
125
};
126
127
static bool fmp_fhandle_reqrep_matching;
128
129
static int
130
dissect_fmp_genString(tvbuff_t *tvb, packet_info* pinfo, int offset, proto_tree *tree)
131
0
{
132
0
    proto_tree_add_item(tree, hf_fmp_encoding_mode, tvb, offset, 4, ENC_BIG_ENDIAN);
133
0
    offset += 4;
134
135
0
    if (try_val_to_str(tvb_get_ntohl(tvb, offset), fmp_encoding_mode_vals) == NULL)
136
0
        return offset;
137
138
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_path,
139
0
                                offset, NULL);
140
141
0
    return offset;
142
0
}
143
144
static int
145
get_fileHandleSrc_size(tvbuff_t *tvb, int offset)
146
0
{
147
0
    int            length;
148
0
    nativeProtocol np;
149
150
0
    np = (nativeProtocol)tvb_get_ntohl(tvb, offset);
151
152
0
    switch (np) {
153
0
    case FMP_PATH:
154
0
        length =  4 + FMP_MAX_PATH_LEN;
155
0
        break;
156
0
    case FMP_NFS:
157
0
        length =  8 + tvb_get_ntohl(tvb, offset + 4);
158
0
        break;
159
0
    case FMP_CIFS:
160
0
        length =  10;
161
0
        break;
162
0
    case FMP_FMP:
163
0
        length =  8 + tvb_get_ntohl(tvb, offset + 4);
164
0
        break;
165
0
    case FMP_FS_ONLY:
166
0
        length =  8;
167
0
        break;
168
0
    case FMP_SHARE:
169
        /* FALLTHROUGH */
170
0
    case FMP_MOUNT:
171
0
        length =  8 + FMP_MAX_PATH_LEN;
172
0
        break;
173
0
    default:
174
0
        length =  4;
175
0
        break;
176
0
    }
177
178
0
    return length;
179
0
}
180
181
static int
182
dissect_fmp_fileHandleSrc(tvbuff_t *tvb, int offset, packet_info *pinfo,
183
                          proto_tree *tree)
184
0
{
185
0
    nativeProtocol      np;
186
187
0
    proto_tree *fileHandleTree;
188
0
    int         length;
189
190
0
    length = get_fileHandleSrc_size(tvb, offset);
191
192
0
    fileHandleTree = proto_tree_add_subtree(tree, tvb, offset, length,
193
0
                                          ett_fmp_fileHandle, NULL, "Source File Handle");
194
195
0
    np = (nativeProtocol)tvb_get_ntohl(tvb, offset);
196
0
    proto_tree_add_item(fileHandleTree, hf_fmp_native_protocol, tvb, offset, 4, ENC_BIG_ENDIAN);
197
0
    offset += 4;
198
199
0
    switch (np) {
200
0
    case FMP_PATH:
201
0
        offset = dissect_rpc_string(tvb, pinfo, fileHandleTree,
202
0
                                    hf_fmp_mount_path, offset, NULL);
203
0
        break;
204
205
0
    case FMP_NFS:
206
0
        offset = dissect_rpc_data(tvb, pinfo, fileHandleTree,
207
0
                                  hf_fmp_nfsFHandle, offset);
208
0
        break;
209
210
0
    case FMP_CIFS:
211
0
        proto_tree_add_item(fileHandleTree, hf_fmp_fid, tvb, offset, 2, ENC_BIG_ENDIAN);
212
0
        offset += 2;
213
214
0
        proto_tree_add_item(fileHandleTree, hf_fmp_tid, tvb, offset, 2, ENC_BIG_ENDIAN);
215
0
        offset += 2;
216
217
0
        proto_tree_add_item(fileHandleTree, hf_fmp_uid, tvb, offset, 2, ENC_BIG_ENDIAN);
218
0
        offset += 2;
219
0
        break;
220
221
0
    case FMP_FMP:
222
0
        offset = dissect_rpc_string(tvb, pinfo, fileHandleTree,
223
0
                                    hf_fmp_fmpFHandle, offset, NULL);
224
0
        break;
225
226
0
    case FMP_FS_ONLY:
227
0
        proto_tree_add_item(fileHandleTree, hf_fmp_fsid, tvb, offset, 4, ENC_BIG_ENDIAN);
228
0
        offset += 4;
229
0
        break;
230
231
0
    case FMP_SHARE:
232
0
        offset = dissect_fmp_genString(tvb, pinfo, offset, fileHandleTree);
233
0
        break;
234
235
0
    case FMP_MOUNT:
236
0
        offset = dissect_fmp_genString(tvb, pinfo, offset, fileHandleTree);
237
0
        break;
238
239
0
    case FMP_CIFSV2:
240
0
        proto_tree_add_item(fileHandleTree, hf_fmp_fid, tvb, offset, 2, ENC_BIG_ENDIAN);
241
0
        offset += 2;
242
243
0
        proto_tree_add_item(fileHandleTree, hf_fmp_tid, tvb, offset, 2, ENC_BIG_ENDIAN);
244
0
        offset += 2;
245
246
0
        proto_tree_add_item(fileHandleTree, hf_fmp_uid, tvb, offset, 2, ENC_BIG_ENDIAN);
247
0
        offset += 2;
248
249
0
        proto_tree_add_item(fileHandleTree, hf_fmp_cifsport, tvb, offset, 2, ENC_BIG_ENDIAN);
250
0
        offset += 2;
251
0
        break;
252
0
    case FMP_UNC:
253
0
        offset = dissect_fmp_genString(tvb, pinfo, offset, fileHandleTree);
254
0
        break;
255
256
0
    default:
257
0
        break;
258
0
    }
259
260
0
    return offset;
261
0
}
262
263
static int
264
dissect_fmp_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
265
0
{
266
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_extent_state,
267
0
                                offset);
268
269
0
    return offset;
270
0
}
271
272
static int
273
dissect_fmp_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, uint32_t ext_num)
274
0
{
275
0
    proto_tree *extTree;
276
277
0
    extTree = proto_tree_add_subtree_format(tree, tvb, offset, 20 ,
278
0
                                  ett_fmp_ext, NULL, "Extent (%u)", (uint32_t) ext_num);
279
280
0
    offset = dissect_rpc_uint32(tvb,  extTree, hf_fmp_firstLogBlk,
281
0
                                offset);
282
0
    offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_numBlks,
283
0
                                offset);
284
0
    offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_volID, offset);
285
0
    offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_startOffset,
286
0
                                offset);
287
0
    offset = dissect_fmp_extentState(tvb, offset, extTree);
288
289
0
    return offset;
290
0
}
291
292
static int
293
dissect_fmp_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo,
294
                       proto_tree *tree)
295
0
{
296
0
    uint32_t    numExtents;
297
0
    uint32_t    totalLength;
298
0
    proto_tree *extListTree;
299
0
    uint32_t    i;
300
301
0
    numExtents = tvb_get_ntohl(tvb, offset);
302
0
    totalLength = 4 + (20 * numExtents);
303
304
0
    extListTree =  proto_tree_add_subtree(tree, tvb, offset, totalLength,
305
0
                                       ett_fmp_extList, NULL, "Extent List");
306
307
0
    offset = dissect_rpc_uint32(tvb, extListTree,
308
0
                                hf_fmp_extentList_len, offset);
309
310
0
    for (i = 0; i < numExtents; i++) {
311
0
        offset = dissect_fmp_extent(tvb, offset, pinfo, extListTree, i+1);
312
0
    }
313
314
0
    return offset;
315
0
}
316
317
318
static int
319
dissect_fmp_extentListEx(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
320
                         proto_tree *tree)
321
0
{
322
0
    uint32_t    numExtents;
323
0
    proto_tree *extListTree;
324
0
    uint32_t    i;
325
326
0
    numExtents = tvb_get_ntohl(tvb, offset);
327
328
0
    offset += 4;
329
330
0
    for (i = 0; i < numExtents; i++) {
331
0
        extListTree =  proto_tree_add_subtree(tree, tvb, offset, 28,
332
0
                                           ett_fmp_extList, NULL, "Extent List");
333
334
0
        offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_firstLogBlk64,  offset);
335
336
0
        offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_numBlksReq,
337
0
                                    offset);
338
339
0
        offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_volID, offset);
340
341
0
        offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_start_offset64, offset);
342
343
0
        offset = dissect_fmp_extentState(tvb, offset, extListTree);
344
345
0
    }
346
347
0
    return offset;
348
0
}
349
350
351
static int
352
dissect_plugInID(tvbuff_t *tvb, int offset, proto_tree *tree)
353
0
{
354
0
    if (!tree) {
355
0
        return offset;
356
0
    }
357
358
0
    proto_tree_add_item(tree, hf_fmp_plugInID, tvb, offset, FMP_PLUG_IN_ID_SZ,
359
0
                        ENC_NA);
360
0
    return offset;
361
0
}
362
363
static int
364
dissect_fmp_flushCmd(tvbuff_t *tvb, int offset,  proto_tree *tree)
365
0
{
366
0
    uint32_t cmd;
367
0
    char    msg[MAX_MSG_SIZE];
368
0
    uint32_t bitValue;
369
0
    int     i;
370
371
0
    if (tree) {
372
0
        cmd = tvb_get_ntohl(tvb, offset);
373
374
        /* Initialize the message for an empty string */
375
0
        msg[0] = '\0';
376
377
0
        for (i = 0; cmd != 0 && i < 32; i++) {
378
379
0
            bitValue = 1U << i;
380
381
0
            if (cmd & bitValue) {
382
0
                switch (bitValue) {
383
0
                case FMP_COMMIT_SPECIFIED:
384
0
                    (void) g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
385
0
                    break;
386
0
                case FMP_RELEASE_SPECIFIED:
387
0
                    (void) g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
388
0
                    break;
389
0
                case FMP_RELEASE_ALL:
390
0
                    (void) g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
391
0
                    break;
392
0
                case FMP_CLOSE_FILE:
393
0
                    (void) g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
394
0
                    break;
395
0
                case FMP_UPDATE_TIME:
396
0
                    (void) g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
397
0
                    break;
398
0
                case FMP_ACCESS_TIME:
399
0
                    (void) g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
400
0
                    break;
401
0
                default:
402
0
                    (void) g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
403
0
                    break;
404
0
                }
405
406
                /* clear the bit that we processed */
407
0
                cmd &= ~bitValue;
408
409
                /* add a "bitwise inclusive OR" symbol between cmds */
410
0
                if (cmd) {
411
0
                    (void) g_strlcat(msg, " | ", MAX_MSG_SIZE);
412
0
                }
413
0
            }
414
0
        }
415
416
0
        if (strlen(msg) == 0) {
417
0
            (void) g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
418
0
        }
419
420
0
        proto_tree_add_uint_format_value(tree, hf_fmp_cmd, tvb, offset, 4, cmd, "%s", msg);
421
0
    }
422
0
    offset += 4;
423
0
    return offset;
424
0
}
425
426
static int
427
dissect_InterpretVolMgtStuff(tvbuff_t *tvb, packet_info* pinfo, int offset, proto_tree *tree)
428
0
{
429
0
    int length, numdisks, i, j;
430
431
0
    numdisks = tvb_get_ntohl(tvb, offset);
432
0
    proto_tree_add_item(tree, hf_fmp_number_of_disk, tvb, offset, 4, ENC_BIG_ENDIAN);
433
0
    offset += 4;
434
435
0
    for (i=0; i<numdisks; i++) {
436
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_sig_offset, offset);
437
0
        length = tvb_get_ntohl(tvb, offset);
438
0
        proto_tree_add_item(tree, hf_fmp_length_of_list, tvb, offset, 4, ENC_BIG_ENDIAN);
439
0
        offset += 4;
440
441
0
        for (j=0; j<length; j++) {
442
0
            proto_tree_add_item(tree, hf_fmp_sigoffset, tvb, offset, 4, ENC_BIG_ENDIAN);
443
0
            offset += 4;
444
0
            offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_dskSigEnt_val,
445
0
                                        offset, NULL);
446
447
0
        }
448
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_volID, offset);
449
450
0
    }
451
0
    return offset;
452
453
454
0
}
455
456
static int
457
dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
458
0
{
459
0
    proto_tree_add_item(tree, hf_fmp_capability, tvb, offset, 4, ENC_BIG_ENDIAN);
460
0
    return offset+4;
461
0
}
462
463
static int
464
dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
465
                    proto_tree *tree, int hf_time, int hf_time_sec,
466
                    int hf_time_nsec)
467
0
{
468
0
    if (tree) {
469
0
        nstime_t ts;
470
471
0
        proto_item* time_item;
472
0
        proto_tree* time_tree;
473
474
0
        ts.secs = tvb_get_ntohl(tvb, offset+0);
475
0
        ts.nsecs = tvb_get_ntohl(tvb, offset+4);
476
477
0
        time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8, &ts);
478
0
        time_tree = proto_item_add_subtree(time_item, ett_fmp_timeval);
479
480
0
        proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
481
0
                            (uint32_t) ts.secs);
482
0
        proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
483
0
                            ts.nsecs);
484
0
    }
485
0
    offset += 8;
486
0
    return offset;
487
0
}
488
489
static int
490
dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
491
                          proto_tree *tree)
492
0
{
493
0
    proto_tree_add_item(tree, hf_fmp_heartbeat_interval, tvb, offset, 8, ENC_BIG_ENDIAN);
494
0
    offset += 8;
495
0
    return offset;
496
0
}
497
498
static int
499
dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
500
0
{
501
0
    fmpStat status;
502
503
0
    status = (fmpStat)tvb_get_ntohl(tvb, offset);
504
505
0
    switch (status) {
506
0
    case FMP_OK:
507
0
        *rval = 0;
508
0
        break;
509
0
    case FMP_IOERROR:
510
0
        *rval = 1;
511
0
        break;
512
0
    case FMP_NOMEM:
513
0
        *rval = 1;
514
0
        break;
515
0
    case FMP_NOACCESS:
516
0
        *rval = 1;
517
0
        break;
518
0
    case FMP_INVALIDARG:
519
520
0
        *rval = 1;
521
0
        break;
522
0
    case FMP_FSFULL:
523
0
        *rval = 0;
524
0
        break;
525
0
    case FMP_QUEUE_FULL:
526
0
    case FMP_NOTIFY_ERROR:
527
0
    case FMP_WRITER_LOST_BLK:
528
0
    case FMP_WRONG_MSG_NUM:
529
0
    case FMP_SESSION_LOST:
530
0
    case FMP_REQUEST_CANCELLED:
531
0
        *rval = 1;
532
0
        break;
533
0
    case FMP_HOT_SESSION:
534
0
        *rval = 0;
535
0
        break;
536
0
    case FMP_COLD_SESSION:
537
0
        *rval = 0;
538
0
        break;
539
0
    case FMP_CLIENT_TERMINATED:
540
0
        *rval = 0;
541
0
        break;
542
0
    case FMP_REQUEST_QUEUED:
543
0
        *rval = 0;
544
0
        break;
545
0
    case FMP_FALL_BACK:
546
0
        *rval = 0;
547
0
        break;
548
0
    case FMP_WRITER_ZEROED_BLK:
549
0
        *rval = 0;
550
0
        break;
551
0
    case FMP_WRONG_HANDLE:
552
0
        *rval = 0;
553
0
        break;
554
0
    case FMP_DUPLICATE_OPEN:
555
0
        *rval = 1;
556
0
        break;
557
0
    case FMP_PLUGIN_NOFUNC:
558
0
        *rval = 1;
559
0
        break;
560
0
    default:
561
0
        *rval = 1;
562
0
        break;
563
0
    }
564
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
565
0
    return offset;
566
0
}
567
568
static int
569
dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo,
570
                      proto_tree *tree)
571
0
{
572
0
    proto_tree_add_item(tree, hf_fmp_devSerial_query_cmd, tvb, offset, 4, ENC_BIG_ENDIAN);
573
0
    offset += 4;
574
575
0
    proto_tree_add_item(tree, hf_fmp_sigoffset, tvb, offset, 4, ENC_BIG_ENDIAN);
576
0
    offset += 4;
577
578
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_devSignature,
579
0
                                offset, NULL);
580
0
    return offset;
581
0
}
582
583
static int
584
dissect_fmp_VolumeDescription(tvbuff_t *tvb, packet_info* pinfo, int offset, proto_tree * tree)
585
0
{
586
0
    int                    i,length;
587
0
    proto_tree            *Hietree;
588
0
    proto_item            *ti;
589
0
    fmpVolumeType          volumeType;
590
0
    fmpDiskIdentifierType  diskIdentifierType;
591
592
0
    volumeType = (fmpVolumeType)tvb_get_ntohl(tvb, offset);
593
0
    ti = proto_tree_add_item(tree, hf_fmp_volume_desc, tvb, offset, 4, ENC_BIG_ENDIAN);
594
0
    Hietree = proto_item_add_subtree(ti, ett_HierVolumeDescription);
595
0
    offset += 4;
596
597
0
    switch (volumeType) {
598
599
0
    case FMP_VOLUME_DISK:
600
0
        offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
601
0
        offset += 8; /* blockIndex64 */
602
0
        diskIdentifierType = (fmpDiskIdentifierType)tvb_get_ntohl(tvb, offset);
603
0
        proto_tree_add_item(Hietree, hf_fmp_disk_identifier, tvb, offset, 4, ENC_BIG_ENDIAN);
604
0
        offset += 4;
605
606
0
        switch (diskIdentifierType) {
607
0
        case FMP_DISK_IDENTIFIER_SIGNATURE:
608
0
            offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_sig_offset,  offset);
609
0
            length = tvb_get_ntohl(tvb, offset);
610
0
            proto_tree_add_item(Hietree, hf_fmp_length_of_list, tvb, offset, 4, ENC_BIG_ENDIAN);
611
0
            offset += 4;
612
613
0
            for (i=0; i<length; i++) {
614
0
                proto_tree_add_item(Hietree, hf_fmp_sigoffset, tvb, offset, 4, ENC_BIG_ENDIAN);
615
0
                offset += 4;
616
0
                offset = dissect_rpc_string(tvb, pinfo, Hietree, hf_fmp_dskSigEnt_val,  offset, NULL);
617
618
619
0
            }
620
0
            break;
621
622
0
        case FMP_DISK_IDENTIFIER_SERIAL:
623
0
            dissect_fmp_devSerial(tvb, offset, NULL, Hietree);
624
0
            break;
625
0
        }
626
627
0
        break;
628
0
    case FMP_VOLUME_SLICE:
629
0
        offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
630
631
0
        offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_offset64, offset);
632
633
0
        offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_slice_size, offset);
634
635
0
        offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset);
636
637
0
        break;
638
639
0
    case FMP_VOLUME_STRIPE:
640
0
        offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
641
642
0
        offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_stripeSize, offset);
643
0
        length = tvb_get_ntohl(tvb, offset);
644
0
        proto_tree_add_item(Hietree, hf_fmp_length_of_list, tvb, offset, 4, ENC_BIG_ENDIAN);
645
0
        offset += 4;
646
647
0
        for (i=0; i<length; i++) {
648
0
            offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
649
650
0
        }
651
0
        break;
652
653
0
    case FMP_VOLUME_META:
654
0
        offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
655
656
0
        length = tvb_get_ntohl(tvb, offset);
657
0
        proto_tree_add_item(Hietree, hf_fmp_length_of_list, tvb, offset, 4, ENC_BIG_ENDIAN);
658
0
        offset += 4;
659
0
        for (i=0; i<length; i++) {
660
0
            offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
661
0
        }
662
0
        break;
663
0
    default:
664
0
        break;
665
0
    }
666
0
    return offset;
667
0
}
668
669
670
static int
671
dissect_fmp_Hiervolume(tvbuff_t *tvb, packet_info* pinfo, int offset, proto_tree * tree)
672
0
{
673
674
0
    int vollength;
675
676
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
677
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
678
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
679
680
    /* hierarchical description of volume.  Each volume describes a
681
       piece of the entire hierarchy and is guaranteed to only refer to
682
       volumes that have already been described by the data structure up
683
       to this point in time.  In some extreme cases, the number of
684
       volumes and their descriptions may be to large to fit in a single
685
       RPC reply.  In this case, the application may send getVolumeInfo
686
       requests for the specific topVolumeId -- specifying the number of
687
       volumes already received by the client, and the cookie.  The
688
       server is then responsible for sending another message containing
689
       additional volumes.  These RPCs exchanges may continue multiple
690
       times, until the client has fetched the entire hierarchical
691
       volume description.  If the volume hierarchy changes duing a
692
       multiple RPC sequence, the server will return an
693
       FMP_VOLUME_CHANGED error, and the client must discard all
694
       information already received and restart the request with
695
       FMP_Mount.
696
    */
697
698
0
    vollength = tvb_get_ntohl(tvb, offset);
699
0
    proto_tree_add_item(tree, hf_fmp_length_of_volume_list, tvb, offset, 4, ENC_BIG_ENDIAN);
700
0
    offset += 4;
701
0
    while (vollength) {
702
0
        offset =  dissect_fmp_VolumeDescription(tvb, pinfo, offset, tree);
703
0
        vollength--;
704
0
    }
705
706
0
    return offset;
707
708
0
}
709
710
711
712
static int
713
dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
714
                   proto_tree *tree)
715
0
{
716
0
    int     vmType;
717
0
    uint32_t phyVolList_len;
718
719
0
    vmType = tvb_get_ntohl(tvb, offset);
720
0
    proto_tree_add_item(tree, hf_fmp_volume_mgmt_type, tvb, offset, 4, ENC_BIG_ENDIAN);
721
722
0
    switch (vmType) {
723
0
    case FMP_SERVER_BASED:
724
        /*
725
         * Need to finish
726
         */
727
0
        phyVolList_len = tvb_get_ntohl(tvb, offset);
728
0
        offset += 4;
729
730
        /*
731
         * Loop through and print all of the devInfo
732
         * structures.
733
         */
734
0
        while (phyVolList_len) {
735
0
            offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
736
0
            proto_tree_add_item(tree, hf_fmp_volindex, tvb, offset, 4, ENC_BIG_ENDIAN);
737
0
            offset += 4;
738
0
            phyVolList_len--;
739
0
        }
740
0
        break;
741
742
0
    case FMP_THIRD_PARTY:
743
0
        offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_volHandle,
744
0
                                    offset, NULL);
745
0
        break;
746
747
0
    case FMP_CLIENT_BASED_DART:
748
0
        offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_volHandle,
749
0
                                    offset, NULL);
750
0
        break;
751
752
0
    case FMP_CLIENT_BASED_SIMPLE:
753
        /*
754
         * Decoding simpleVolInfo
755
         */
756
0
        offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
757
758
0
        proto_tree_add_item(tree, hf_fmp_blockindex, tvb, offset, 4, ENC_BIG_ENDIAN);
759
0
        offset += 4;
760
0
        break;
761
762
0
    case FMP_DISK_SIGNATURE:
763
0
        offset = dissect_InterpretVolMgtStuff(tvb, pinfo, offset, tree);
764
0
        break;
765
766
0
    case FMP_HIERARCHICAL_VOLUME:
767
0
        dissect_fmp_Hiervolume(tvb, pinfo, offset, tree);
768
0
        break;
769
770
0
    default:
771
0
        break;
772
0
    }
773
774
0
    return offset;
775
0
}
776
777
static int
778
dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
779
0
{
780
0
    proto_tree_add_item(tree, hf_fmp_notify_protocol, tvb, offset, 4, ENC_BIG_ENDIAN);
781
0
    return (offset+4);
782
0
}
783
784
785
static int
786
dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
787
0
{
788
0
    static int * const capabilities[] = {
789
0
        &hf_fmp_cap_revoke_handle_list,
790
0
        &hf_fmp_cap_unc_names,
791
0
        &hf_fmp_cap_cifsv2,
792
0
        NULL
793
0
    };
794
795
0
    proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_fmp_cap, ett_capabilities,
796
0
                        capabilities, ENC_BIG_ENDIAN, BMT_NO_APPEND);
797
0
    return (offset+4);
798
0
}
799
800
static int
801
dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
802
0
{
803
0
    int            rval;
804
805
0
    proto_tree_add_item(tree, hf_fmp_client_error_number, tvb, offset, 4, ENC_BIG_ENDIAN);
806
0
    offset += 4;
807
808
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
809
810
0
    return offset;
811
0
}
812
813
static int
814
dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
815
0
{
816
0
    proto_tree *attrsTree;
817
818
0
    attrsTree =  proto_tree_add_subtree(tree, tvb, offset, 84,
819
0
                                     ett_attrs, NULL, "Attribute: ");
820
0
    offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_type, offset);
821
0
    offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_mode, offset);
822
0
    offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_nlink, offset);
823
0
    offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_uid, offset);
824
0
    offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_gid, offset);
825
0
    offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_fileSize, offset);
826
    /* Here hf_fmp_fileSize is used in
827
     * place of size
828
     */
829
0
    offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_used,   offset);
830
0
    offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_rdev,   offset);
831
0
    offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fsid,   offset);
832
0
    offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fileid, offset);
833
0
    proto_tree_add_item(tree, hf_fmp_atime, tvb, offset, 8, ENC_BIG_ENDIAN);
834
0
    offset +=8;
835
0
    proto_tree_add_item(tree, hf_fmp_mtime, tvb, offset, 8, ENC_BIG_ENDIAN);
836
0
    offset +=8;
837
0
    proto_tree_add_item(tree, hf_fmp_ctime, tvb, offset, 8, ENC_BIG_ENDIAN);
838
0
    offset +=8;
839
0
    return offset;
840
0
}
841
842
843
844
static int
845
dissect_FMP_SessionCreate_request(tvbuff_t *tvb, packet_info *pinfo,
846
                                  proto_tree *tree, void* data _U_)
847
0
{
848
0
    unsigned offset = 0;
849
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_hostID,
850
0
                                offset, NULL);
851
0
    offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
852
0
                                 hf_fmp_time_sec, hf_fmp_time_nsec);
853
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
854
0
                                offset);
855
0
    return offset;
856
0
}
857
858
static int
859
dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, packet_info *pinfo,
860
                                proto_tree *tree, void* data _U_)
861
0
{
862
0
    int rval;
863
0
    unsigned offset = 0;
864
865
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
866
0
    if (rval == 0) {
867
0
        offset = dissect_rpc_data(tvb, pinfo, tree,
868
0
                                  hf_fmp_sessionHandle, offset);
869
0
        offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_hostID,
870
0
                                    offset, NULL);
871
0
        offset = dissect_fmp_timeval(tvb, offset, pinfo, tree,
872
0
                                     hf_fmp_btime, hf_fmp_time_sec,
873
0
                                     hf_fmp_time_nsec);
874
0
        offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo, tree);
875
0
    }
876
877
0
    return offset;
878
0
}
879
880
static int
881
dissect_FMP_HeartBeat_request(tvbuff_t *tvb, packet_info *pinfo,
882
                              proto_tree *tree, void* data _U_)
883
0
{
884
0
    return dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle, 0);
885
0
}
886
887
static int
888
dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
889
                            proto_tree *tree, void* data _U_)
890
0
{
891
0
    int rval;
892
893
0
    return dissect_fmp_status(tvb, 0, tree, &rval);
894
0
}
895
896
static int
897
dissect_FMP_Mount_request(tvbuff_t *tvb, packet_info *pinfo,
898
                          proto_tree *tree, void* data _U_)
899
0
{
900
0
    unsigned offset = 0;
901
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle,
902
0
                              offset);
903
0
    offset = dissect_fmp_capability(tvb, offset, tree);
904
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
905
0
    return offset;
906
0
}
907
908
static int
909
dissect_FMP_Mount_reply(tvbuff_t *tvb, packet_info *pinfo,
910
                        proto_tree *tree, void* data _U_)
911
0
{
912
0
    int rval;
913
0
    unsigned offset = 0;
914
915
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
916
0
    if (rval == 0) {
917
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
918
0
                                    offset);
919
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsBlkSz,
920
0
                                    offset);
921
0
        offset = dissect_fmp_vmInfo(tvb, offset, pinfo, tree);
922
0
    }
923
924
0
    return offset;
925
0
}
926
927
static int
928
dissect_FMP_Open_request(tvbuff_t *tvb, packet_info *pinfo,
929
                         proto_tree *tree, void* data _U_)
930
0
{
931
0
    unsigned offset = 0;
932
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle,
933
0
                              offset);
934
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
935
0
    return offset;
936
0
}
937
938
static int
939
dissect_FMP_Open_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
940
                       proto_tree *tree, void* data _U_)
941
0
{
942
0
    int rval;
943
0
    unsigned offset = 0;
944
945
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
946
0
    if (rval == 0) {
947
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle,
948
0
                                  offset);
949
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
950
0
                                    offset);
951
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
952
0
                                    offset);
953
954
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID,
955
0
                                    offset);
956
0
    }
957
0
    return offset;
958
0
}
959
960
static int
961
dissect_FMP_Close_request(tvbuff_t *tvb, packet_info *pinfo,
962
                          proto_tree *tree, void* data _U_)
963
0
{
964
0
    unsigned offset = 0;
965
966
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
967
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
968
0
    return offset;
969
0
}
970
971
static int
972
dissect_FMP_Close_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
973
                        proto_tree *tree, void* data _U_)
974
0
{
975
0
    int rval;
976
0
    unsigned offset = 0;
977
978
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
979
0
    if (rval == 0) {
980
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
981
0
                                    offset);
982
0
    }
983
984
0
    return offset;
985
0
}
986
987
static int
988
dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
989
0
{
990
0
    unsigned offset = 0;
991
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle,
992
0
                              offset);
993
994
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
995
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_firstLogBlk,
996
0
                                offset);
997
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq,
998
0
                                offset);
999
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1000
0
    return offset;
1001
0
}
1002
1003
static int
1004
dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, packet_info *pinfo,
1005
                             proto_tree *tree, void* data _U_)
1006
0
{
1007
0
    int rval;
1008
0
    unsigned offset = 0;
1009
1010
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1011
0
    if (rval == 0) {
1012
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle,
1013
0
                                  offset);
1014
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1015
0
                                    offset);
1016
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1017
0
                                    offset);
1018
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1019
0
                                    offset);
1020
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID,
1021
0
                                    offset);
1022
0
        offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1023
0
    }
1024
1025
0
    return offset;
1026
0
}
1027
1028
static int
1029
dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1030
0
{
1031
0
    unsigned offset = 0;
1032
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle, offset);
1033
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1034
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_firstLogBlk, offset);
1035
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq, offset);
1036
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1037
0
    return offset;
1038
0
}
1039
1040
static int
1041
dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, packet_info *pinfo,
1042
                                 proto_tree *tree, void* data _U_)
1043
0
{
1044
0
    int rval;
1045
0
    unsigned offset = 0;
1046
1047
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1048
0
    if (rval == 0) {
1049
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle,
1050
0
                                  offset);
1051
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1052
0
                                    offset);
1053
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1054
0
                                    offset);
1055
0
        offset = dissect_rpc_uint64(tvb,  tree, hf_fmp_fileSize,
1056
0
                                    offset);
1057
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID,
1058
0
                                    offset);
1059
0
        offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1060
0
    }
1061
0
    return offset;
1062
0
}
1063
1064
static int
1065
dissect_FMP_GetMap_request(tvbuff_t *tvb, packet_info *pinfo,
1066
                           proto_tree *tree, void* data _U_)
1067
0
{
1068
0
    unsigned offset = 0;
1069
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1070
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum, offset);
1071
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_firstLogBlk,
1072
0
                                offset);
1073
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq,
1074
0
                                offset);
1075
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1076
0
    return offset;
1077
0
}
1078
1079
static int
1080
dissect_FMP_GetMap_reply(tvbuff_t *tvb, packet_info *pinfo,
1081
                         proto_tree *tree, void* data _U_)
1082
0
{
1083
0
    int rval;
1084
0
    unsigned offset = 0;
1085
1086
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1087
0
    if (rval == 0) {
1088
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1089
0
                                    offset);
1090
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1091
0
                                    offset);
1092
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1093
0
                                    offset);
1094
0
        offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1095
0
    }
1096
1097
0
    return offset;
1098
0
}
1099
1100
static int
1101
dissect_FMP_AllocSpace_request(tvbuff_t *tvb, packet_info *pinfo,
1102
                               proto_tree *tree, void* data _U_)
1103
0
{
1104
0
    unsigned offset = 0;
1105
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1106
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1107
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
1108
0
                                offset);
1109
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1110
0
                                offset);
1111
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1112
0
    return offset;
1113
0
}
1114
1115
static int
1116
dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, packet_info *pinfo,
1117
                             proto_tree *tree, void* data _U_)
1118
0
{
1119
0
    int rval;
1120
0
    unsigned offset = 0;
1121
1122
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1123
0
    if (rval == 0) {
1124
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1125
0
                                    offset);
1126
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1127
0
                                    offset);
1128
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1129
0
                                    offset);
1130
0
        offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1131
0
    }
1132
1133
0
    return offset;
1134
0
}
1135
1136
static int
1137
dissect_FMP_Flush_request(tvbuff_t *tvb, packet_info *pinfo,
1138
                          proto_tree *tree, void* data _U_)
1139
0
{
1140
0
    unsigned offset = 0;
1141
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1142
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1143
0
    offset = dissect_fmp_flushCmd(tvb, offset, tree);
1144
0
    offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1145
0
    offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1146
0
    return offset;
1147
0
}
1148
1149
static int
1150
dissect_FMP_Flush_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
1151
                        proto_tree *tree, void* data _U_)
1152
0
{
1153
0
    int rval;
1154
0
    unsigned offset = 0;
1155
1156
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1157
0
    if (rval == 0) {
1158
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1159
0
                                    offset);
1160
0
    }
1161
0
    return offset;
1162
0
}
1163
1164
static int
1165
dissect_FMP_CancelReq_request(tvbuff_t *tvb, packet_info *pinfo,
1166
                              proto_tree *tree, void* data _U_)
1167
0
{
1168
0
    unsigned offset = 0;
1169
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1170
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1171
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1172
0
    return offset;
1173
0
}
1174
1175
static int
1176
dissect_FMP_CancelReq_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
1177
                            proto_tree *tree, void* data _U_)
1178
0
{
1179
0
    int rval;
1180
0
    unsigned offset = 0;
1181
1182
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1183
0
    if (rval == 0) {
1184
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1185
0
                                    offset);
1186
0
    }
1187
0
    return offset;
1188
0
}
1189
1190
static int
1191
dissect_FMP_PlugIn_request(tvbuff_t *tvb, packet_info *pinfo,
1192
                           proto_tree *tree, void* data _U_)
1193
0
{
1194
0
    unsigned offset = 0;
1195
0
    offset = dissect_plugInID(tvb, offset, tree);
1196
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_plugInBuf, offset);
1197
0
    return offset;
1198
0
}
1199
1200
static int
1201
dissect_FMP_PlugIn_reply(tvbuff_t *tvb, packet_info *pinfo,
1202
                         proto_tree *tree, void* data _U_)
1203
0
{
1204
0
    int rval;
1205
0
    unsigned offset = 0;
1206
1207
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1208
0
    if (rval == 0) {
1209
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_plugInBuf,
1210
0
                                  offset);
1211
0
    }
1212
0
    return offset;
1213
0
}
1214
1215
static int
1216
dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1217
0
{
1218
0
    return dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle, 0);
1219
0
}
1220
1221
static int
1222
dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
1223
0
{
1224
0
    int rval;
1225
1226
0
    return dissect_fmp_status(tvb, 0,tree, &rval);
1227
0
}
1228
1229
static int
1230
dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1231
0
{
1232
0
    unsigned offset = 0;
1233
1234
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_hostID,
1235
0
                                offset, NULL);
1236
0
    offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree, hf_fmp_btime,
1237
0
                                 hf_fmp_time_sec, hf_fmp_time_nsec);
1238
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
1239
0
                                offset);
1240
0
    offset = dissect_fmp_notifyProtocol(tvb, offset, tree);
1241
1242
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1243
0
                                offset);
1244
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1245
0
                                offset);
1246
1247
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_os_name,
1248
0
                                offset, NULL);
1249
1250
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1251
0
                                offset);
1252
1253
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1254
0
                                offset);
1255
1256
0
    offset = dissect_fmp_capabilities(tvb, offset, tree);
1257
1258
0
    return offset;
1259
0
}
1260
1261
1262
static int
1263
dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1264
0
{
1265
0
    int rval;
1266
0
    unsigned offset = 0;
1267
1268
0
    offset = dissect_fmp_status(tvb, offset, tree, &rval);
1269
0
    if (rval == 0) {
1270
0
        offset = dissect_rpc_data(tvb, pinfo, tree,
1271
0
                                  hf_fmp_sessionHandle, offset);
1272
0
        offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_hostID,
1273
0
                                    offset, NULL);
1274
0
        offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree,
1275
0
                                     hf_fmp_btime, hf_fmp_time_sec,
1276
0
                                     hf_fmp_time_nsec);
1277
0
        offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo , tree);
1278
1279
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
1280
0
                                    offset);
1281
1282
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
1283
0
                                    offset);
1284
1285
0
        offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_server_version_string,
1286
0
                                    offset, NULL);
1287
1288
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
1289
0
                                    offset);
1290
1291
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
1292
0
                                    offset);
1293
1294
0
        offset = dissect_fmp_capabilities(tvb, offset, tree);
1295
0
    }
1296
1297
0
    return offset;
1298
0
}
1299
1300
1301
static int
1302
dissect_FMP_ReportClientError_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1303
0
{
1304
0
    unsigned offset = 0;
1305
0
    offset = dissect_rpc_string(tvb, pinfo, tree, hf_fmp_description,
1306
0
                                offset, NULL);
1307
1308
0
    offset = dissect_fmp_cerrInfo(tvb, offset, tree);
1309
0
    return offset;
1310
0
}
1311
1312
static int
1313
dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
1314
0
{
1315
0
    int rval;
1316
0
    unsigned offset = 0;
1317
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1318
1319
0
    return offset;
1320
0
}
1321
1322
static int
1323
dissect_FMP_GetAttr_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1324
0
{
1325
0
    unsigned offset = 0;
1326
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1327
1328
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1329
1330
0
    return offset;
1331
0
}
1332
1333
1334
static int
1335
dissect_FMP_GetAttr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
1336
0
{
1337
0
    int rval;
1338
0
    unsigned offset = 0;
1339
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1340
0
    if (rval == 0) {
1341
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1342
1343
0
        offset = dissect_fmp_attrs(tvb, offset, tree);
1344
0
    }
1345
1346
0
    return offset;
1347
0
}
1348
1349
static int
1350
dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1351
0
{
1352
0
    unsigned offset = 0;
1353
1354
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle,
1355
0
                              offset);
1356
1357
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1358
1359
0
    return offset;
1360
0
}
1361
1362
1363
static int
1364
dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1365
0
{
1366
0
    int rval;
1367
0
    unsigned offset = 0;
1368
1369
0
    offset = dissect_fmp_status(tvb, offset, tree, &rval);
1370
1371
0
    if (rval == 0) {
1372
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1373
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1374
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
1375
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID, offset);
1376
0
        offset = dissect_fmp_attrs(tvb, offset, tree);
1377
0
    }
1378
1379
1380
0
    return offset;
1381
0
}
1382
1383
1384
static int
1385
dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1386
0
{
1387
0
    unsigned offset = 0;
1388
1389
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1390
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1391
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cmd, offset);
1392
0
    offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1393
1394
0
    proto_tree_add_item(tree, hf_fmp_mtime, tvb, offset, 8, ENC_BIG_ENDIAN);
1395
0
    offset += 8;
1396
0
    offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
1397
1398
0
    return offset;
1399
0
}
1400
1401
1402
static int
1403
dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
1404
0
{
1405
0
    int rval;
1406
0
    unsigned offset = 0;
1407
1408
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1409
0
    if (rval == 0) {
1410
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1411
1412
0
        offset = dissect_fmp_attrs(tvb, offset, tree);
1413
0
    }
1414
1415
0
    return offset;
1416
0
}
1417
1418
1419
static int
1420
dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
1421
0
{
1422
0
    unsigned offset = 0;
1423
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
1424
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
1425
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
1426
0
    return offset;
1427
0
}
1428
1429
1430
1431
static int
1432
dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1433
0
{
1434
0
    int rval;
1435
0
    unsigned offset = 0;
1436
1437
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1438
0
    if (rval == 0) {
1439
        /* FIXME: I don't know size of this volumes */
1440
0
        offset = dissect_fmp_Hiervolume(tvb, pinfo, offset, tree);
1441
0
    }
1442
0
    return offset;
1443
1444
0
}
1445
1446
static int
1447
dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1448
0
{
1449
0
    unsigned offset = 0;
1450
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_sessionHandle,
1451
0
                              offset);
1452
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1453
0
    offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64,  offset);
1454
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq,
1455
0
                                offset);
1456
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1457
0
    return offset;
1458
0
}
1459
1460
1461
static int
1462
dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, packet_info *pinfo,
1463
                               proto_tree *tree, void* data _U_)
1464
0
{
1465
0
    int rval;
1466
0
    unsigned offset = 0;
1467
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1468
0
    if (rval == 0) {
1469
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle,
1470
0
                                  offset);
1471
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1472
0
                                    offset);
1473
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1474
0
                                    offset);
1475
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1476
0
                                    offset);
1477
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID,
1478
0
                                    offset);
1479
0
        offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1480
0
    }
1481
1482
0
    return offset;
1483
0
}
1484
1485
1486
static int
1487
dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb,
1488
                                     packet_info *pinfo, proto_tree *tree, void* data _U_)
1489
0
{
1490
0
    unsigned offset = 0;
1491
0
    offset = dissect_rpc_data(tvb , pinfo, tree, hf_fmp_sessionHandle,
1492
0
                              offset);
1493
0
    offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
1494
0
    offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64,  offset);
1495
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq,
1496
0
                                offset);
1497
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1498
0
    return offset;
1499
0
}
1500
1501
1502
static int
1503
dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, packet_info *pinfo,
1504
                                   proto_tree *tree, void* data _U_)
1505
0
{
1506
0
    int rval;
1507
0
    unsigned offset = 0;
1508
1509
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1510
0
    if (rval == 0) {
1511
0
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle,
1512
0
                                  offset);
1513
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1514
0
                                    offset);
1515
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1516
0
                                    offset);
1517
0
        offset = dissect_rpc_uint64(tvb,  tree, hf_fmp_fileSize,
1518
0
                                    offset);
1519
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_fsID,
1520
0
                                    offset);
1521
0
        offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1522
0
    }
1523
0
    return offset;
1524
0
}
1525
1526
static int
1527
dissect_FMP_GetMapEx_request(tvbuff_t *tvb, packet_info *pinfo,
1528
                             proto_tree *tree, void* data _U_)
1529
0
{
1530
0
    unsigned offset = 0;
1531
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1532
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum, offset);
1533
0
    offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64,  offset);
1534
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_numBlksReq,
1535
0
                                offset);
1536
0
    offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_minBlks, offset);
1537
0
    return offset;
1538
0
}
1539
1540
1541
static int
1542
dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, packet_info *pinfo,
1543
                           proto_tree *tree, void* data _U_)
1544
0
{
1545
0
    int rval;
1546
0
    unsigned offset = 0;
1547
1548
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1549
0
    if (rval == 0) {
1550
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_msgNum,
1551
0
                                    offset);
1552
0
        offset = dissect_rpc_uint32(tvb,  tree, hf_fmp_cookie,
1553
0
                                    offset);
1554
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1555
0
                                    offset);
1556
0
        offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1557
0
    }
1558
1559
0
    return offset;
1560
0
}
1561
1562
1563
static int
1564
dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, packet_info *pinfo,
1565
                                 proto_tree *tree, void* data _U_)
1566
0
{
1567
0
    unsigned offset = 0;
1568
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1569
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1570
0
    offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64,  offset);
1571
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
1572
0
                                offset);
1573
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
1574
0
    return offset;
1575
0
}
1576
1577
1578
static int
1579
dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, packet_info *pinfo,
1580
                               proto_tree *tree, void* data _U_)
1581
0
{
1582
0
    int rval;
1583
0
    unsigned offset = 0;
1584
1585
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1586
0
    if (rval == 0) {
1587
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1588
0
                                    offset);
1589
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
1590
0
                                    offset);
1591
0
        offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
1592
0
                                    offset);
1593
0
        offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1594
0
    }
1595
1596
0
    return offset;
1597
0
}
1598
1599
static int
1600
dissect_FMP_FlushEx_request(tvbuff_t *tvb, packet_info *pinfo,
1601
                            proto_tree *tree, void* data _U_)
1602
0
{
1603
0
    unsigned offset = 0;
1604
0
    offset = dissect_rpc_data(tvb, pinfo, tree, hf_fmp_fmpFHandle, offset);
1605
0
    offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
1606
0
    offset = dissect_fmp_flushCmd(tvb, offset, tree);
1607
0
    offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
1608
0
    offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
1609
0
    return offset;
1610
0
}
1611
1612
static int
1613
dissect_FMP_FlushEx_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
1614
                          proto_tree *tree, void* data _U_)
1615
0
{
1616
0
    int rval;
1617
0
    unsigned offset = 0;
1618
1619
0
    offset = dissect_fmp_status(tvb, offset,tree, &rval);
1620
0
    if (rval == 0) {
1621
0
        offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
1622
0
                                    offset);
1623
0
    }
1624
0
    return offset;
1625
0
}
1626
/*
1627
 * proc number, "proc name", dissect_request, dissect_reply
1628
 */
1629
static const vsff fmp3_proc[] = {
1630
    { 0,
1631
      "NULL",
1632
      dissect_rpc_void,
1633
      dissect_rpc_void, },
1634
1635
    { 1,
1636
      "SessionCreate",
1637
      dissect_FMP_SessionCreate_request,
1638
      dissect_FMP_SessionCreate_reply },
1639
1640
    { 2,
1641
      "HeartBeat",
1642
      dissect_FMP_HeartBeat_request,
1643
      dissect_FMP_HeartBeat_reply },
1644
1645
    { 3,
1646
      "Mount",
1647
      dissect_FMP_Mount_request,
1648
      dissect_FMP_Mount_reply },
1649
1650
    { 4,
1651
      "Open",
1652
      dissect_FMP_Open_request,
1653
      dissect_FMP_Open_reply },
1654
1655
    { 5,
1656
      "Close",
1657
      dissect_FMP_Close_request,
1658
      dissect_FMP_Close_reply },
1659
1660
    { 6,
1661
      "OpenGetMap",
1662
      dissect_FMP_OpenGetMap_request,
1663
      dissect_FMP_OpenGetMap_reply },
1664
1665
    { 7,
1666
      "OpenAllocSpace",
1667
      dissect_FMP_OpenAllocSpace_request,
1668
      dissect_FMP_OpenAllocSpace_reply },
1669
1670
    { 8,
1671
      "GetMap",
1672
      dissect_FMP_GetMap_request,
1673
      dissect_FMP_GetMap_reply },
1674
1675
    { 9,
1676
      "AllocSpace",
1677
      dissect_FMP_AllocSpace_request,
1678
      dissect_FMP_AllocSpace_reply },
1679
1680
    { 10,
1681
      "Flush",
1682
      dissect_FMP_Flush_request,
1683
      dissect_FMP_Flush_reply },
1684
1685
    { 11,
1686
      "CancelReq",
1687
      dissect_FMP_CancelReq_request,
1688
      dissect_FMP_CancelReq_reply },
1689
1690
    { 12,
1691
      "PlugIn",
1692
      dissect_FMP_PlugIn_request,
1693
      dissect_FMP_PlugIn_reply },
1694
1695
    { 13,
1696
      "SessionTerminate",
1697
      dissect_FMP_SessionTerminate_request,
1698
      dissect_FMP_SessionTerminate_reply },
1699
1700
    { 14,
1701
      "SessionCreateEx",
1702
      dissect_FMP_SessionCreateEx_request,
1703
      dissect_FMP_SessionCreateEx_reply },
1704
1705
    { 15,
1706
      "ReportClientError",
1707
      dissect_FMP_ReportClientError_request,
1708
      dissect_FMP_ReportClientError_reply },
1709
1710
    { 16           ,
1711
      "Get Attribute",
1712
      dissect_FMP_GetAttr_request,
1713
      dissect_FMP_GetAttr_reply },
1714
1715
    { 17               ,
1716
      "Open Get Attribute",
1717
      dissect_FMP_OpenGetAttr_request,
1718
      dissect_FMP_OpenGetAttr_reply },
1719
1720
    { 18               ,
1721
      "Flush Get Attribute",
1722
      dissect_FMP_FlushGetAttr_request,
1723
      dissect_FMP_FlushGetAttr_reply },
1724
1725
    { 19               ,
1726
      "OpenGetMapEx",
1727
      dissect_FMP_OpenGetMapEx_request,
1728
      dissect_FMP_OpenGetMapEx_reply },
1729
1730
    { 20               ,
1731
      "OpenAllocSpaceEx",
1732
      dissect_FMP_OpenAllocSpaceEx_request,
1733
      dissect_FMP_OpenAllocSpaceEx_reply },
1734
1735
    { 21               ,
1736
      "GetMapEx",
1737
      dissect_FMP_GetMapEx_request,
1738
      dissect_FMP_GetMapEx_reply },
1739
1740
    { 22               ,
1741
      "AllocSpaceEx",
1742
      dissect_FMP_AllocSpaceEx_request,
1743
      dissect_FMP_AllocSpaceEx_reply },
1744
1745
    { 23               ,
1746
      "FMP_FlushEx",
1747
      dissect_FMP_FlushEx_request,
1748
      dissect_FMP_FlushEx_reply },
1749
#if 0
1750
1751
    { 24               ,
1752
      "FlushGetAttrEx",
1753
      dissect_FMP_FlushGetAttrEx_request,
1754
      dissect_FMP_FlushGetAttrEx_reply },
1755
1756
#endif
1757
1758
    { 25               ,
1759
      "GetVolumeInfo",
1760
      dissect_FMP_GetVolumeInfo_request,
1761
      dissect_FMP_GetVolumeInfo_reply },
1762
1763
1764
    {0 , NULL , NULL , NULL }
1765
1766
};
1767
1768
1769
static const rpc_prog_vers_info fmp_vers_info[] = {
1770
    { FMP_VERSION_3, fmp3_proc, &hf_fmp_procedure }
1771
};
1772
1773
1774
static const value_string fmp_proc_vals[] = {
1775
    {  0, "NULL" },
1776
    {  1, "SessionCreate" },
1777
    {  2, "HeartBeat" },
1778
    {  3, "Mount" },
1779
    {  4, "Open" },
1780
    {  5, "Close" },
1781
    {  6, "OpenGetMap" },
1782
    {  7, "OpenAllocSpace" },
1783
    {  8, "GetMap" },
1784
    {  9, "AllocSpace " },
1785
    { 10, "Flush" },
1786
    { 11, "CancelReq" },
1787
    { 12, "PlugIn" },
1788
    { 13, "SessionTerminate" },
1789
    { 14, "SessionCreateEx" },
1790
    { 15, "ReportClientError" },
1791
    { 16, "GetAttr " },
1792
    { 17, "OpenGetAttr" },
1793
    { 18, "FlushGetAttr"},
1794
    { 19, "OpenGetMapEx"},
1795
    { 20, "OpenAllocSpaceEx"},
1796
    { 21, "GetMapEx"},
1797
    { 22, "AllocSpaceEx"},
1798
    { 23, "FlushEx"},
1799
    { 24, "FlushGetAttrEx"},
1800
    { 25, "GetVolumeInfo"},
1801
    { 0,NULL }
1802
};
1803
1804
1805
static const value_string fmp_status_vals[] = {
1806
    {  0, "OK"},
1807
    {  5, "IOERROR"},
1808
    { 12, "NOMEM"},
1809
    { 13, "NOACCESS"},
1810
    { 22, "INVALIDARG"},
1811
    { 28, "FSFULL"},
1812
    { 79, "QUEUE_FULL"},
1813
    {500, "WRONG_MSG_NUM"},
1814
    {501, "SESSION_LOST"},
1815
    {502, "HOT_SESSION"},
1816
    {503, "COLD_SESSION"},
1817
    {504, "CLIENT_TERMINATED"},
1818
    {505, "WRITER_LOST_BLK"},
1819
    {506, "FMP_REQUEST_QUEUED"},
1820
    {507, "FMP_FALL_BACK"},
1821
    {508, "REQUEST_CANCELLED"},
1822
    {509, "WRITER_ZEROED_BLK"},
1823
    {510, "NOTIFY_ERROR"},
1824
    {511, "FMP_WRONG_HANDLE"},
1825
    {512, "DUPLICATE_OPEN"},
1826
    {600, "PLUGIN_NOFUNC"},
1827
    {0,NULL}
1828
};
1829
1830
1831
static const value_string fmp_extentState_vals[] = {
1832
    {0,"VALID_DATA"},
1833
    {1,"INVALID_DATA"},
1834
    {2,"NONE_DATA"},
1835
    {0,NULL}
1836
};
1837
1838
static const value_string fmp_native_protocol_vals[] = {
1839
    {FMP_PATH, "PATH"},
1840
    {FMP_NFS, "NFS"},
1841
    {FMP_CIFS, "CIFS"},
1842
    {FMP_FMP, "FMP"},
1843
    {FMP_FS_ONLY, "FS_ONLY"},
1844
    {FMP_SHARE, "SHARE"},
1845
    {FMP_MOUNT, "MOUNT"},
1846
    {FMP_CIFSV2, "CIFSV2"},
1847
    {FMP_UNC,"UNC"},
1848
    {0,NULL}
1849
};
1850
1851
static const value_string fmp_volume_mgmt_capability_vals[] = {
1852
    {FMP_SERVER_BASED, "SERVER_BASED"},
1853
    {FMP_THIRD_PARTY, "THIRD_PARTY"},
1854
    {FMP_CLIENT_BASED_DART, "CLIENT_BASED_DART"},
1855
    {FMP_CLIENT_BASED_SIMPLE, "CLIENT_BASED_SIMPLE"},
1856
    {FMP_HIERARCHICAL_VOLUME, "FMP_HIERARCHICAL_VOLUME"},
1857
    {0,NULL}
1858
};
1859
1860
static const value_string fmp_query_cmd_vals[] = {
1861
    {FMP_SCSI_INQUIRY, "SCSI_INQUIRY"},
1862
    {FMP_DART_STAMP, "DART_STAMP"},
1863
    {0,NULL}
1864
};
1865
1866
static const value_string fmp_volume_desc_vals[] = {
1867
    {FMP_VOLUME_DISK, "DISK"},
1868
    {FMP_VOLUME_SLICE, "SLICE"},
1869
    {FMP_VOLUME_STRIPE, "STRIPE"},
1870
    {FMP_VOLUME_META, "META"},
1871
    {FMP_VOLUME_SLICE, "SLICE"},
1872
    {FMP_VOLUME_SLICE, "SLICE"},
1873
    {0,NULL}
1874
};
1875
1876
static const value_string fmp_disk_identifier_vals[] = {
1877
    {FMP_DISK_IDENTIFIER_SIGNATURE, "SIGNATURE"},
1878
    {FMP_DISK_IDENTIFIER_SERIAL, "SERIAL"},
1879
    {0,NULL}
1880
};
1881
1882
static const value_string fmp_notify_protocol_vals[] = {
1883
    {FMP_TCP, "TCP"},
1884
    {FMP_UDP, "UDP"},
1885
    {0,NULL}
1886
};
1887
1888
static const value_string fmp_volume_mgmt_type_vals[] = {
1889
    {FMP_SERVER_BASED, "SERVER_BASED"},
1890
    {FMP_THIRD_PARTY, "THIRD_PARTY"},
1891
    {FMP_CLIENT_BASED_DART, "CLIENT_BASED_DART"},
1892
    {FMP_CLIENT_BASED_SIMPLE, "CLIENT_BASED_SIMPLE"},
1893
    {FMP_DISK_SIGNATURE, "DISK_SIGNATURE"},
1894
    {FMP_HIERARCHICAL_VOLUME, "HIERARCHICAL_VOLUME"},
1895
    {0,NULL}
1896
};
1897
1898
static const value_string fmp_client_error_number_vals[] = {
1899
    {FMP_CE_GENERIC, "FMP_CE_GENERIC"},
1900
    {FMP_CE_DISK_ERROR, "FMP_CE_DISK_ERROR"},
1901
    {0,NULL}
1902
};
1903
1904
void
1905
proto_register_fmp(void)
1906
15
{
1907
15
    static hf_register_info hf[] = {
1908
15
        { &hf_fmp_procedure,
1909
15
          { "Procedure", "fmp.procedure",
1910
15
            FT_UINT32, BASE_DEC, VALS(fmp_proc_vals),
1911
15
            0, NULL, HFILL }},        /* New addition */
1912
1913
15
        { &hf_fmp_hostID,
1914
15
          { "Host ID", "fmp.hostID",
1915
15
            FT_STRING, BASE_NONE, NULL, 0,
1916
15
            NULL, HFILL }},
1917
1918
15
        { &hf_fmp_btime,
1919
15
          { "Boot Time", "fmp.btime",
1920
15
            FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
1921
15
            "Machine Boot Time", HFILL }},
1922
1923
15
        { &hf_fmp_time_sec,
1924
15
          { "seconds", "fmp.btime.sec",
1925
15
            FT_UINT32, BASE_DEC, NULL, 0,
1926
15
            NULL, HFILL }},
1927
1928
15
        { &hf_fmp_time_nsec,
1929
15
          { "nanoseconds", "fmp.btime.nsec",
1930
15
            FT_UINT32, BASE_DEC, NULL, 0,
1931
15
            NULL, HFILL }},
1932
1933
15
        { &hf_fmp_notifyPort,
1934
15
          { "Notify Port", "fmp.notifyPort",
1935
15
            FT_UINT32, BASE_DEC, NULL, 0,
1936
15
            NULL, HFILL }},
1937
1938
15
        { &hf_fmp_sessionHandle,
1939
15
          { "Session Handle", "fmp.sessHandle",
1940
15
            FT_BYTES, BASE_NONE, NULL, 0,
1941
15
            NULL, HFILL }},
1942
1943
15
        { &hf_fmp_fmpFHandle,
1944
15
          { "FMP File Handle", "fmp.fmpFHandle",
1945
15
            FT_BYTES, BASE_NONE, NULL, 0,
1946
15
            NULL,
1947
1948
15
                HFILL }},
1949
15
        { &hf_fmp_nfsFHandle,
1950
15
          { "NFS File Handle", "fmp.nfsFHandle",
1951
15
            FT_BYTES, BASE_NONE, NULL, 0,
1952
15
            NULL, HFILL }},
1953
1954
15
        { &hf_fmp_fsID,
1955
15
          { "File System ID", "fmp.fsID",
1956
15
            FT_UINT32, BASE_HEX, NULL, 0,
1957
15
            NULL, HFILL }},
1958
1959
15
        { &hf_fmp_status,
1960
15
          { "Status", "fmp.status",
1961
15
            FT_UINT32, BASE_DEC, VALS(fmp_status_vals), 0,
1962
15
            "Reply Status", HFILL }},
1963
1964
15
        { &hf_fmp_fsBlkSz,
1965
15
          { "File System Block Size", "fmp.fsBlkSz",
1966
15
            FT_UINT32, BASE_DEC, NULL, 0,
1967
15
            NULL, HFILL }},
1968
1969
15
        { &hf_fmp_volHandle,
1970
15
          { "Volume Handle", "fmp.volHandle",
1971
15
            FT_STRING, BASE_NONE, NULL, 0,
1972
15
            NULL, HFILL }},
1973
1974
15
        { &hf_fmp_dskSigEnt_val,
1975
15
          { "Celerra Signature", "fmp.dsi.ds.dsList.dskSigLst_val.dse.dskSigEnt_val",
1976
15
            FT_STRING, BASE_NONE, NULL, 0,
1977
15
            NULL, HFILL }},
1978
1979
15
        { &hf_fmp_devSignature,
1980
15
          { "Signature DATA", "fmp.devSig",
1981
15
            FT_STRING, BASE_NONE, NULL, 0,
1982
15
            NULL, HFILL }},
1983
1984
15
        { &hf_fmp_mount_path,
1985
15
          { "Native Protocol: PATH", "fmp.mount_path",
1986
15
            FT_STRING, BASE_NONE, NULL, 0,
1987
15
            "Absolute path from the root on the server side", HFILL }},
1988
1989
15
        { &hf_fmp_sig_offset,
1990
15
          { "Sig Offset", "fmp.dsi.ds.sig_offset",
1991
15
            FT_UINT64, BASE_DEC, NULL, 0,
1992
15
            NULL, HFILL }},
1993
1994
15
        { &hf_fmp_numBlksReq,
1995
15
          { "Extent Length", "fmp.numBlksReq",
1996
15
            FT_UINT32, BASE_DEC, NULL, 0,
1997
15
            NULL, HFILL }},
1998
1999
15
        { &hf_fmp_minBlks,
2000
15
          { "Minimum Blocks to Grant", "fmp.minBlks",
2001
15
            FT_UINT32, BASE_DEC, NULL, 0,
2002
15
            NULL, HFILL }},
2003
2004
15
        { &hf_fmp_msgNum,
2005
15
          { "Message Number", "fmp.msgNum",
2006
15
            FT_UINT32, BASE_DEC, NULL, 0,
2007
15
            NULL, HFILL }},
2008
2009
15
        { &hf_fmp_cookie,
2010
15
          { "Cookie", "fmp.cookie",
2011
15
            FT_UINT32, BASE_HEX, NULL, 0,
2012
15
            "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
2013
2014
15
        { &hf_fmp_fileSize,
2015
15
          { "File Size", "fmp.fileSize",
2016
15
            FT_UINT64, BASE_DEC, NULL, 0,
2017
15
            NULL, HFILL }},
2018
2019
15
        { &hf_fmp_extentList_len,
2020
15
          { "Extent List Length", "fmp.extentList_len",
2021
15
            FT_UINT32, BASE_DEC, NULL, 0,
2022
15
            NULL, HFILL }},
2023
2024
15
        { &hf_fmp_extent_state,
2025
15
          { "Extent State", "fmp.extentState",
2026
15
            FT_UINT32,BASE_DEC, VALS(fmp_extentState_vals), 0,
2027
15
            NULL, HFILL }},
2028
2029
15
        { &hf_fmp_firstLogBlk,
2030
15
          { "First Logical File Block", "fmp.firstLogBlk",
2031
15
            FT_UINT32, BASE_DEC, NULL, 0,
2032
15
            NULL, HFILL }},
2033
2034
15
        { &hf_fmp_numBlks,
2035
15
          { "Number of Blocks", "fmp.numBlks",
2036
15
            FT_UINT32, BASE_DEC, NULL, 0,
2037
15
            NULL, HFILL }},
2038
2039
15
        { &hf_fmp_volID,
2040
15
          { "Volume ID inside DART", "fmp.volID",
2041
15
            FT_UINT32, BASE_HEX, NULL, 0,
2042
15
            NULL, HFILL }},
2043
2044
15
        { &hf_fmp_startOffset,
2045
15
          { "Start Offset", "fmp.startOffset",
2046
15
            FT_UINT32, BASE_DEC, NULL, 0,
2047
15
            NULL, HFILL }},
2048
2049
15
        { &hf_fmp_start_offset64,
2050
15
          { "Start offset", "fmp.start_offset64",
2051
15
            FT_UINT64, BASE_DEC, NULL, 0,
2052
15
            "Start Offset of extentEx", HFILL }},
2053
2054
15
        { &hf_fmp_eof,
2055
15
          { "EOF", "fmp.eof",
2056
15
            FT_UINT64, BASE_DEC, NULL, 0,
2057
15
            "End Of File", HFILL }},
2058
2059
15
        { &hf_fmp_plugInID,
2060
15
          { "Plug In Cmd ID", "fmp.plugInID",
2061
15
            FT_BYTES, BASE_NONE, NULL, 0,
2062
15
            NULL, HFILL }},
2063
2064
15
        { &hf_fmp_plugInBuf,
2065
15
          { "Plug In Args", "fmp.plugIn",
2066
15
            FT_BYTES, BASE_NONE, NULL, 0,
2067
15
            NULL, HFILL }},
2068
2069
15
        { &hf_fmp_os_major,
2070
15
          { "OS Major", "fmp.os_major",
2071
15
            FT_UINT32, BASE_DEC, NULL, 0,
2072
15
            NULL, HFILL }},
2073
2074
15
        { &hf_fmp_os_minor,
2075
15
          { "OS Minor", "fmp.os_minor",
2076
15
            FT_UINT32, BASE_DEC, NULL, 0,
2077
15
            NULL, HFILL }},
2078
2079
15
        { &hf_fmp_os_name,
2080
15
          { "OS Name", "fmp.os_name",
2081
15
            FT_STRING, BASE_NONE, NULL, 0,
2082
15
            NULL, HFILL }},
2083
2084
15
        { &hf_fmp_path,
2085
15
          { "Mount Path", "fmp.Path",
2086
15
            FT_STRING, BASE_NONE, NULL, 0,
2087
15
            NULL, HFILL }},
2088
2089
15
        { &hf_fmp_os_patch,
2090
15
          { "OS Path", "fmp.os_patch",
2091
15
            FT_UINT32, BASE_DEC, NULL, 0,
2092
15
            NULL, HFILL }},
2093
2094
15
        { &hf_fmp_os_build,
2095
15
          { "OS Build", "fmp.os_build",
2096
15
            FT_UINT32, BASE_DEC, NULL, 0,
2097
15
            NULL, HFILL }},
2098
2099
15
        { &hf_fmp_server_version_string,
2100
15
          { "Server Version String", "fmp.server_version_string",
2101
15
            FT_STRING, BASE_NONE, NULL, 0,
2102
15
            NULL, HFILL }},
2103
2104
15
        { &hf_fmp_description,
2105
15
          { "Error Description", "fmp.description",
2106
15
            FT_STRING, BASE_NONE, NULL, 0,
2107
15
            "Client Error Description", HFILL }},
2108
2109
15
        { &hf_fmp_nfsv3Attr_type,
2110
15
          { "Type", "fmp.nfsv3Attr_type",
2111
15
            FT_UINT32, BASE_DEC, NULL, 0,
2112
15
            "NFSV3 Attr Type", HFILL }},
2113
2114
15
        { &hf_fmp_nfsv3Attr_mode,
2115
15
          { "Mode", "fmp.nfsv3Attr_mod",
2116
15
            FT_UINT32, BASE_DEC, NULL, 0,
2117
15
            NULL, HFILL }},
2118
2119
15
        { &hf_fmp_nfsv3Attr_nlink,
2120
15
          { "nlink", "fmp.nfsv3Attr_nlink",
2121
15
            FT_UINT32, BASE_DEC, NULL, 0,
2122
15
            NULL, HFILL }},
2123
2124
15
        { &hf_fmp_nfsv3Attr_uid,
2125
15
          { "uid", "fmp.nfsv3Attr_uid",
2126
15
            FT_UINT32, BASE_DEC, NULL, 0,
2127
15
            NULL, HFILL }},
2128
2129
15
        { &hf_fmp_nfsv3Attr_gid,
2130
15
          { "gid", "fmp.nfsv3Attr_gid",
2131
15
            FT_UINT32, BASE_DEC, NULL, 0,
2132
15
            NULL, HFILL }},
2133
2134
        /* for nfsv3Attr_size use hf_fmp_fileSize */
2135
15
        { &hf_fmp_nfsv3Attr_used,
2136
15
          { "Used", "fmp.nfsv3Attr_used",
2137
15
            FT_UINT64, BASE_DEC, NULL, 0,
2138
15
            NULL, HFILL }},
2139
2140
15
        { &hf_fmp_nfsv3Attr_rdev,
2141
15
          { "rdev", "fmp.nfsv3Attr_rdev",
2142
15
            FT_UINT64, BASE_DEC, NULL, 0,
2143
15
            NULL, HFILL }},
2144
2145
15
        { &hf_fmp_nfsv3Attr_fsid,
2146
15
          { "fsid", "fmp.nfsv3Attr_fsid",
2147
15
            FT_UINT64, BASE_DEC, NULL, 0,
2148
15
            NULL, HFILL }},
2149
2150
15
        { &hf_fmp_nfsv3Attr_fileid,
2151
15
          { "File ID", "fmp.nfsv3Attr_fileid",
2152
15
            FT_UINT64, BASE_DEC, NULL, 0,
2153
15
            NULL, HFILL }},
2154
2155
15
        { &hf_fmp_cmd,
2156
15
          { "Command", "fmp.cmd",
2157
15
            FT_UINT32, BASE_DEC, NULL, 0,
2158
15
            NULL, HFILL }},
2159
2160
15
        { &hf_fmp_topVolumeId,
2161
15
          { "Top Volume ID", "fmp.topVolumeId",
2162
15
            FT_UINT32, BASE_HEX, NULL, 0,
2163
15
            NULL, HFILL }},
2164
2165
15
        { &hf_fmp_cursor,
2166
15
          { "number of volumes", "fmp.cursor",
2167
15
            FT_UINT32, BASE_DEC, NULL, 0,
2168
15
            NULL, HFILL }},
2169
2170
15
        { &hf_fmp_offset64,
2171
15
          { "offset", "fmp.offset64",
2172
15
            FT_UINT64, BASE_DEC, NULL, 0,
2173
15
            NULL, HFILL }},
2174
2175
15
        { &hf_fmp_slice_size,
2176
15
          { "size of the slice", "fmp.slice_size",
2177
15
            FT_UINT64, BASE_DEC, NULL, 0,
2178
15
            NULL, HFILL }},
2179
2180
15
        { &hf_fmp_volume,
2181
15
          { "Volume ID's", "fmp.volume",
2182
15
            FT_UINT32, BASE_HEX, NULL, 0,
2183
15
            NULL, HFILL }},
2184
2185
15
        { &hf_fmp_stripeSize,
2186
15
          { "size of the stripe", "fmp.stripeSize",
2187
15
            FT_UINT64, BASE_DEC, NULL, 0,
2188
15
            NULL, HFILL }},
2189
2190
15
        { &hf_fmp_firstLogBlk64,
2191
15
          { "First Logical Block", "fmp.firstLogBlk64",
2192
15
            FT_UINT64, BASE_DEC, NULL, 0,
2193
15
            NULL, HFILL }},
2194
2195
15
        { &hf_fmp_native_protocol,
2196
15
          { "Native Protocol", "fmp.native_protocol",
2197
15
            FT_UINT32, BASE_DEC, VALS(fmp_native_protocol_vals), 0,
2198
15
            NULL, HFILL }},
2199
2200
15
        { &hf_fmp_encoding_mode,
2201
15
          { "Encoding Mode", "fmp.encoding_mode",
2202
15
            FT_UINT32, BASE_DEC, VALS(fmp_encoding_mode_vals), 0,
2203
15
            NULL, HFILL }},
2204
2205
15
        { &hf_fmp_capability,
2206
15
          { "Volume Mgmt Capability", "fmp.capability",
2207
15
            FT_UINT32, BASE_DEC, VALS(fmp_volume_mgmt_capability_vals), 0,
2208
15
            NULL, HFILL }},
2209
2210
15
        { &hf_fmp_devSerial_query_cmd,
2211
15
          { "Query Command", "fmp.devSerial.query_cmd",
2212
15
            FT_UINT32, BASE_DEC, VALS(fmp_query_cmd_vals), 0,
2213
15
            NULL, HFILL }},
2214
2215
15
        { &hf_fmp_volume_desc,
2216
15
          { "VOLUME", "fmp.volume_desc",
2217
15
            FT_UINT32, BASE_DEC, VALS(fmp_volume_desc_vals), 0,
2218
15
            NULL, HFILL }},
2219
2220
15
        { &hf_fmp_disk_identifier,
2221
15
          { "DISK IDENTIFIER", "fmp.disk_identifier",
2222
15
            FT_UINT32, BASE_DEC, VALS(fmp_disk_identifier_vals), 0,
2223
15
            NULL, HFILL }},
2224
2225
15
        { &hf_fmp_volume_mgmt_type,
2226
15
          { "Volume Mgmt Type", "fmp.volume_mgmt_type",
2227
15
            FT_UINT32, BASE_DEC, VALS(fmp_volume_mgmt_type_vals), 0,
2228
15
            NULL, HFILL }},
2229
2230
15
        { &hf_fmp_notify_protocol,
2231
15
          { "Protocol", "fmp.notify_protocol",
2232
15
            FT_UINT32, BASE_DEC, VALS(fmp_notify_protocol_vals), 0,
2233
15
            NULL, HFILL }},
2234
2235
15
        { &hf_fmp_client_error_number,
2236
15
          { "CLIENT Error Number", "fmp.client_error_number",
2237
15
            FT_UINT32, BASE_DEC, VALS(fmp_client_error_number_vals), 0,
2238
15
            NULL, HFILL }},
2239
2240
      /* Generated from convert_proto_tree_add_text.pl */
2241
15
      { &hf_fmp_fid, { "fid", "fmp.fid", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2242
15
      { &hf_fmp_tid, { "tid", "fmp.tid", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2243
15
      { &hf_fmp_uid, { "uid", "fmp.uid", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2244
15
      { &hf_fmp_fsid, { "FsID", "fmp.fsid", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2245
15
      { &hf_fmp_cifsport, { "cifsPort", "fmp.cifsport", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2246
15
      { &hf_fmp_number_of_disk, { "Number of Disk", "fmp.number_of_disk", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2247
15
      { &hf_fmp_length_of_list, { "Length of List", "fmp.length_of_list", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2248
15
      { &hf_fmp_sigoffset, { "sigOffset", "fmp.sigoffset", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
2249
15
      { &hf_fmp_length_of_volume_list, { "Length of volume List", "fmp.length_of_volume_list", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
2250
15
      { &hf_fmp_blockindex, { "blockIndex", "fmp.blockindex", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
2251
15
      { &hf_fmp_cap, { "Capabilities", "fmp.cap", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
2252
15
      { &hf_fmp_cap_revoke_handle_list, { "CAP_REVOKE_HANDLE_LIST", "fmp.cap.revoke_handle_list", FT_BOOLEAN, 32, TFS(&tfs_yes_no), FMP_CAP_REVOKE_HANDLE_LIST, NULL, HFILL }},
2253
15
      { &hf_fmp_cap_unc_names, { "CAP_UNC_NAMES", "fmp.cap.unc_names", FT_BOOLEAN, 32, TFS(&tfs_yes_no), FMP_CAP_UNC_NAMES, NULL, HFILL }},
2254
15
      { &hf_fmp_cap_cifsv2, { "CAP_CIFSV2", "fmp.cap.cifsv2", FT_BOOLEAN, 32, TFS(&tfs_yes_no), FMP_CAP_CIFSV2, NULL, HFILL }},
2255
15
      { &hf_fmp_mtime, { "mtime", "fmp.mtime", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
2256
15
      { &hf_fmp_atime, { "atime", "fmp.atime", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
2257
15
      { &hf_fmp_ctime, { "ctime", "fmp.ctime", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
2258
15
      { &hf_fmp_heartbeat_interval, { "Heartbeat interval", "fmp.heartbeat_interval", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, NULL, HFILL }},
2259
15
      { &hf_fmp_volindex, { "volIndex", "fmp.volindex", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
2260
15
    };
2261
2262
15
    static int *ett[] = {
2263
15
        &ett_fmp,
2264
15
        &ett_fmp_timeval,
2265
15
        &ett_fmp_extList,
2266
15
        &ett_fmp_ext,
2267
15
        &ett_fmp_fileHandle,
2268
15
        &ett_capabilities,
2269
15
        &ett_HierVolumeDescription,
2270
15
        &ett_attrs
2271
15
    };
2272
2273
15
    module_t *fmp_module;
2274
15
    proto_fmp = proto_register_protocol("File Mapping Protocol", "FMP", "fmp");
2275
2276
15
    proto_register_field_array(proto_fmp, hf, array_length(hf));
2277
15
    proto_register_subtree_array(ett, array_length(ett));
2278
2279
15
    fmp_module=prefs_register_protocol(proto_fmp, NULL);
2280
2281
15
    prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
2282
15
                                   "Fhandle filters finds both request/response",
2283
15
                                   "With this option display filters for fmp fhandle a RPC call,"
2284
15
                                   " even if the actual fhandle is only present in one of the packets",
2285
15
                                   &fmp_fhandle_reqrep_matching);
2286
2287
15
}
2288
2289
void
2290
proto_reg_handoff_fmp(void)
2291
15
{
2292
    /* Register the protocol as RPC */
2293
15
    rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp,
2294
                  G_N_ELEMENTS(fmp_vers_info), fmp_vers_info);
2295
15
}
2296
2297
/*
2298
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
2299
 *
2300
 * Local variables:
2301
 * c-basic-offset: 4
2302
 * tab-width: 8
2303
 * indent-tabs-mode: nil
2304
 * End:
2305
 *
2306
 * vi: set shiftwidth=4 tabstop=8 expandtab:
2307
 * :indentSize=4:tabSize=8:noTabs=true:
2308
 */