2 * Routines for GlusterFS dissection
3 * Copyright 2012, Niels de Vos <ndevos@redhat.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 * References to source files point in general to the glusterfs sources.
13 * There is currently no RFC or other document where the protocol is
14 * completely described. The glusterfs sources can be found at:
15 * - https://github.com/gluster/glusterfs
17 * The coding-style is roughly the same as the one use in the Linux kernel,
18 * see http://www.kernel.org/doc/Documentation/CodingStyle.
23 #include <epan/packet.h>
24 #include <epan/to_str.h>
26 #include "packet-rpc.h"
27 #include "packet-gluster.h"
29 void proto_register_glusterfs(void);
30 void proto_reg_handoff_glusterfs(void);
32 /* Initialize the protocol and registered fields */
33 static int proto_glusterfs
;
35 /* programs and procedures */
36 static int hf_glusterfs_proc
;
38 /* fields used by multiple programs/procedures */
39 static int hf_gluster_op_ret
;
40 static int hf_gluster_op_errno
;
42 /* GlusterFS specific */
43 static int hf_glusterfs_gfid
;
44 static int hf_glusterfs_pargfid
;
45 static int hf_glusterfs_oldgfid
;
46 static int hf_glusterfs_newgfid
;
47 static int hf_glusterfs_path
;
48 static int hf_glusterfs_bname
;
49 static int hf_glusterfs_dict
;
50 static int hf_glusterfs_fd
;
51 static int hf_glusterfs_offset
;
52 static int hf_glusterfs_size
;
53 static int hf_glusterfs_size64
;
54 static int hf_glusterfs_volume
;
55 static int hf_glusterfs_cmd
;
56 static int hf_glusterfs_type
;
57 static int hf_glusterfs_entries
;
58 static int hf_glusterfs_xflags
;
59 static int hf_glusterfs_linkname
;
60 static int hf_glusterfs_umask
;
61 static int hf_glusterfs_mask
;
62 static int hf_glusterfs_name
;
63 static int hf_glusterfs_namelen
;
64 static int hf_glusterfs_whence
;
66 /* flags passed on to OPEN, CREATE etc.*/
67 static int hf_glusterfs_flags
;
68 static int hf_glusterfs_flags_rdonly
;
69 static int hf_glusterfs_flags_wronly
;
70 static int hf_glusterfs_flags_rdwr
;
71 static int hf_glusterfs_flags_accmode
;
72 static int hf_glusterfs_flags_append
;
73 static int hf_glusterfs_flags_async
;
74 static int hf_glusterfs_flags_cloexec
;
75 static int hf_glusterfs_flags_creat
;
76 static int hf_glusterfs_flags_direct
;
77 static int hf_glusterfs_flags_directory
;
78 static int hf_glusterfs_flags_excl
;
79 static int hf_glusterfs_flags_largefile
;
80 static int hf_glusterfs_flags_noatime
;
81 static int hf_glusterfs_flags_noctty
;
82 static int hf_glusterfs_flags_nofollow
;
83 static int hf_glusterfs_flags_nonblock
;
84 static int hf_glusterfs_flags_ndelay
;
85 static int hf_glusterfs_flags_sync
;
86 static int hf_glusterfs_flags_trunc
;
87 static int hf_glusterfs_flags_reserved
;
90 static int hf_glusterfs_mode
;
91 static int hf_glusterfs_mode_suid
;
92 static int hf_glusterfs_mode_sgid
;
93 static int hf_glusterfs_mode_svtx
;
94 static int hf_glusterfs_mode_rusr
;
95 static int hf_glusterfs_mode_wusr
;
96 static int hf_glusterfs_mode_xusr
;
97 static int hf_glusterfs_mode_rgrp
;
98 static int hf_glusterfs_mode_wgrp
;
99 static int hf_glusterfs_mode_xgrp
;
100 static int hf_glusterfs_mode_roth
;
101 static int hf_glusterfs_mode_woth
;
102 static int hf_glusterfs_mode_xoth
;
103 static int hf_glusterfs_mode_reserved
;
106 static int hf_glusterfs_entry_ino
;
107 static int hf_glusterfs_entry_off
;
108 static int hf_glusterfs_entry_len
;
109 static int hf_glusterfs_entry_type
;
110 static int hf_glusterfs_entry_path
;
113 static int hf_glusterfs_iatt
;
114 static int hf_glusterfs_preparent_iatt
;
115 static int hf_glusterfs_postparent_iatt
;
116 static int hf_glusterfs_preop_iatt
;
117 static int hf_glusterfs_postop_iatt
;
118 static int hf_glusterfs_ia_ino
;
119 static int hf_glusterfs_ia_dev
;
120 static int hf_glusterfs_ia_mode
;
121 static int hf_glusterfs_ia_nlink
;
122 static int hf_glusterfs_ia_uid
;
123 static int hf_glusterfs_ia_gid
;
124 static int hf_glusterfs_ia_rdev
;
125 static int hf_glusterfs_ia_size
;
126 static int hf_glusterfs_ia_blksize
;
127 static int hf_glusterfs_ia_blocks
;
128 static int hf_glusterfs_ia_atime
;
129 static int hf_glusterfs_ia_mtime
;
130 static int hf_glusterfs_ia_ctime
;
132 static int hf_glusterfs_iattx
;
133 static int hf_glusterfs_preparent_iattx
;
134 static int hf_glusterfs_postparent_iattx
;
135 static int hf_glusterfs_preop_iattx
;
136 static int hf_glusterfs_postop_iattx
;
137 static int hf_glusterfs_iax_flags
;
138 static int hf_glusterfs_iax_attributes
;
139 static int hf_glusterfs_iax_attributes_mask
;
140 static int hf_glusterfs_iax_atime
;
141 static int hf_glusterfs_iax_mtime
;
142 static int hf_glusterfs_iax_ctime
;
143 static int hf_glusterfs_iax_btime
;
144 static int hf_glusterfs_iax_atime_nsec
;
145 static int hf_glusterfs_iax_mtime_nsec
;
146 static int hf_glusterfs_iax_ctime_nsec
;
147 static int hf_glusterfs_iax_btime_nsec
;
151 static int hf_glusterfs_flock_type
;
152 static int hf_glusterfs_flock_whence
;
153 static int hf_glusterfs_flock_start
;
154 static int hf_glusterfs_flock_len
;
155 static int hf_glusterfs_flock_pid
;
156 static int hf_glusterfs_flock_owner
;
159 static int hf_glusterfs_bsize
;
160 static int hf_glusterfs_frsize
;
161 static int hf_glusterfs_blocks
;
162 static int hf_glusterfs_bfree
;
163 static int hf_glusterfs_bavail
;
164 static int hf_glusterfs_files
;
165 static int hf_glusterfs_ffree
;
166 static int hf_glusterfs_favail
;
167 static int hf_glusterfs_id
;
168 static int hf_glusterfs_mnt_flags
;
169 static int hf_glusterfs_mnt_flag_rdonly
;
170 static int hf_glusterfs_mnt_flag_nosuid
;
171 static int hf_glusterfs_mnt_flag_nodev
;
172 static int hf_glusterfs_mnt_flag_noexec
;
173 static int hf_glusterfs_mnt_flag_synchronous
;
174 static int hf_glusterfs_mnt_flag_mandlock
;
175 static int hf_glusterfs_mnt_flag_write
;
176 static int hf_glusterfs_mnt_flag_append
;
177 static int hf_glusterfs_mnt_flag_immutable
;
178 static int hf_glusterfs_mnt_flag_noatime
;
179 static int hf_glusterfs_mnt_flag_nodiratime
;
180 static int hf_glusterfs_mnt_flag_relatime
;
181 static int hf_glusterfs_namemax
;
183 static int hf_glusterfs_setattr_valid
;
184 /* flags for setattr.valid */
185 static int hf_glusterfs_setattr_set_mode
;
186 static int hf_glusterfs_setattr_set_uid
;
187 static int hf_glusterfs_setattr_set_gid
;
188 static int hf_glusterfs_setattr_set_size
;
189 static int hf_glusterfs_setattr_set_atime
;
190 static int hf_glusterfs_setattr_set_mtime
;
191 static int hf_glusterfs_setattr_set_reserved
;
194 static int hf_glusterfs_oldbname
;
195 static int hf_glusterfs_newbname
;
197 /* for FSYNC/FSYNCDIR */
198 static int hf_glusterfs_fsync_flags
;
199 static int hf_glusterfs_fsync_flag_datasync
;
200 static int hf_glusterfs_fsync_flag_unknown
;
203 static int hf_glusterfs_entrylk_namelen
;
205 static int hf_gluster_dict_xdr_size
;
206 static int hf_gluster_dict_size
;
207 static int hf_gluster_num_dict_items
;
208 static int hf_gluster_rpc_roundup_bytes
;
209 static int hf_gluster_trusted_afr_key
;
210 static int hf_gluster_dict_value
;
213 /* Initialize the subtree pointers */
214 static int ett_glusterfs
;
215 static int ett_glusterfs_flags
;
216 static int ett_glusterfs_mnt_flags
;
217 static int ett_glusterfs_mode
;
218 static int ett_glusterfs_setattr_valid
;
219 static int ett_glusterfs_parent_iatt
;
220 static int ett_glusterfs_iatt
;
221 static int ett_glusterfs_entry
;
222 static int ett_glusterfs_flock
;
223 static int ett_glusterfs_fsync_flags
;
224 static int ett_gluster_dict
;
225 static int ett_gluster_dict_items
;
228 glusterfs_rpc_dissect_gfid(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
, int offset
)
230 proto_tree_add_item(tree
, hfindex
, tvb
, offset
, 16, ENC_NA
);
237 glusterfs_rpc_dissect_mode(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
,
240 static int * const mode_bits
[] = {
241 &hf_glusterfs_mode_suid
,
242 &hf_glusterfs_mode_sgid
,
243 &hf_glusterfs_mode_svtx
,
244 &hf_glusterfs_mode_rusr
,
245 &hf_glusterfs_mode_wusr
,
246 &hf_glusterfs_mode_xusr
,
247 &hf_glusterfs_mode_rgrp
,
248 &hf_glusterfs_mode_wgrp
,
249 &hf_glusterfs_mode_xgrp
,
250 &hf_glusterfs_mode_roth
,
251 &hf_glusterfs_mode_woth
,
252 &hf_glusterfs_mode_xoth
,
253 &hf_glusterfs_mode_reserved
,
257 proto_tree_add_bitmask(tree
, tvb
, offset
, hfindex
,
258 ett_glusterfs_mode
, mode_bits
, ENC_BIG_ENDIAN
);
265 * from rpc/xdr/src/glusterfs3-xdr.c:xdr_gf_iatt()
268 glusterfs_rpc_dissect_gf_iatt(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
,
271 proto_item
*iatt_item
;
272 proto_tree
*iatt_tree
;
273 int start_offset
= offset
;
275 iatt_item
= proto_tree_add_item(tree
, hfindex
, tvb
, offset
, -1,
277 iatt_tree
= proto_item_add_subtree(iatt_item
, ett_glusterfs_iatt
);
279 offset
= glusterfs_rpc_dissect_gfid(iatt_tree
, tvb
, hf_glusterfs_gfid
,
281 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_ino
,
283 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_dev
,
285 offset
= glusterfs_rpc_dissect_mode(iatt_tree
, tvb
,
286 hf_glusterfs_ia_mode
, offset
);
287 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_nlink
,
289 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_uid
,
291 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_gid
,
293 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_rdev
,
295 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_size
,
297 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_blksize
,
299 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_blocks
,
302 proto_tree_add_item(iatt_tree
, hf_glusterfs_ia_atime
, tvb
,
303 offset
, 8, ENC_TIME_SECS_NSECS
|ENC_BIG_ENDIAN
);
306 proto_tree_add_item(iatt_tree
, hf_glusterfs_ia_mtime
, tvb
,
307 offset
, 8, ENC_TIME_SECS_NSECS
|ENC_BIG_ENDIAN
);
310 proto_tree_add_item(iatt_tree
, hf_glusterfs_ia_ctime
, tvb
,
311 offset
, 8, ENC_TIME_SECS_NSECS
|ENC_BIG_ENDIAN
);
314 proto_item_set_len (iatt_item
, offset
- start_offset
);
320 glusterfs_rpc_dissect_gf_flock(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
322 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_flock_type
, offset
);
323 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_flock_whence
, offset
);
324 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_flock_start
, offset
);
325 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_flock_len
, offset
);
326 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_flock_pid
, offset
);
328 proto_tree_add_item(tree
, hf_glusterfs_flock_owner
, tvb
, offset
, 8, ENC_NA
);
335 glusterfs_rpc_dissect_gf_2_flock(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
337 proto_item
*flock_item
;
338 proto_tree
*flock_tree
;
340 int start_offset
= offset
;
342 flock_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_glusterfs_flock
, &flock_item
, "Flock");
344 offset
= dissect_rpc_uint32(tvb
, flock_tree
, hf_glusterfs_flock_type
,
346 offset
= dissect_rpc_uint32(tvb
, flock_tree
, hf_glusterfs_flock_whence
,
348 offset
= dissect_rpc_uint64(tvb
, flock_tree
, hf_glusterfs_flock_start
,
350 offset
= dissect_rpc_uint64(tvb
, flock_tree
, hf_glusterfs_flock_len
,
352 offset
= dissect_rpc_uint32(tvb
, flock_tree
, hf_glusterfs_flock_pid
,
355 len
= tvb_get_ntohl(tvb
, offset
);
358 proto_tree_add_item(flock_tree
, hf_glusterfs_flock_owner
, tvb
, offset
, len
, ENC_NA
);
361 proto_item_set_len (flock_item
, offset
- start_offset
);
366 static const true_false_string glusterfs_notset_set
= {
371 static const value_string glusterfs_accmode_vals
[] = {
380 glusterfs_rpc_dissect_flags(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
384 proto_item
*flag_tree
;
385 header_field_info
*rdonly_hf
, *accmode_hf
;
387 static int * const flag_bits
[] = {
388 &hf_glusterfs_flags_wronly
,
389 &hf_glusterfs_flags_rdwr
,
390 &hf_glusterfs_flags_creat
,
391 &hf_glusterfs_flags_excl
,
392 &hf_glusterfs_flags_noctty
,
393 &hf_glusterfs_flags_trunc
,
394 &hf_glusterfs_flags_append
,
395 &hf_glusterfs_flags_nonblock
,
396 &hf_glusterfs_flags_ndelay
,
397 &hf_glusterfs_flags_sync
,
398 &hf_glusterfs_flags_async
,
399 &hf_glusterfs_flags_direct
,
400 &hf_glusterfs_flags_largefile
,
401 &hf_glusterfs_flags_directory
,
402 &hf_glusterfs_flags_nofollow
,
403 &hf_glusterfs_flags_noatime
,
404 &hf_glusterfs_flags_cloexec
,
405 &hf_glusterfs_flags_reserved
,
409 flag_tree
= proto_tree_add_bitmask(tree
, tvb
, offset
, hf_glusterfs_flags
, ett_glusterfs_flags
, flag_bits
, ENC_BIG_ENDIAN
);
411 /* rdonly is true only when no flags are set */
412 rdonly
= (tvb_get_ntohl(tvb
, offset
) == 0);
413 proto_tree_add_item(flag_tree
, hf_glusterfs_flags_rdonly
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
415 rdonly_hf
= proto_registrar_get_nth(hf_glusterfs_flags_rdonly
);
416 proto_item_append_text(flag_tree
, ", %s", rdonly_hf
->name
);
419 /* hf_glusterfs_flags_accmode is true if bits 0 and 1 are set */
420 accmode_hf
= proto_registrar_get_nth(hf_glusterfs_flags_accmode
);
421 accmode
= tvb_get_ntohl(tvb
, offset
);
422 proto_tree_add_uint_format_value(flag_tree
, hf_glusterfs_flags_accmode
, tvb
, offset
, 4, accmode
,
423 "%s", val_to_str_const((accmode
& (uint32_t)(accmode_hf
->bitmask
)), glusterfs_accmode_vals
, "Unknown"));
424 if ((accmode
& accmode_hf
->bitmask
) == accmode_hf
->bitmask
)
425 proto_item_append_text(flag_tree
, ", %s", proto_registrar_get_nth(hf_glusterfs_flags_accmode
)->name
);
432 glusterfs_rpc_dissect_statfs(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
434 static int * const flag_bits
[] = {
435 &hf_glusterfs_mnt_flag_rdonly
,
436 &hf_glusterfs_mnt_flag_nosuid
,
437 &hf_glusterfs_mnt_flag_nodev
,
438 &hf_glusterfs_mnt_flag_noexec
,
439 &hf_glusterfs_mnt_flag_synchronous
,
440 &hf_glusterfs_mnt_flag_mandlock
,
441 &hf_glusterfs_mnt_flag_write
,
442 &hf_glusterfs_mnt_flag_append
,
443 &hf_glusterfs_mnt_flag_immutable
,
444 &hf_glusterfs_mnt_flag_noatime
,
445 &hf_glusterfs_mnt_flag_nodiratime
,
446 &hf_glusterfs_mnt_flag_relatime
,
450 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_bsize
, offset
);
451 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_frsize
, offset
);
452 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_blocks
, offset
);
453 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_bfree
, offset
);
454 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_bavail
, offset
);
455 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_files
, offset
);
456 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_ffree
, offset
);
457 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_favail
, offset
);
458 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_id
, offset
);
460 proto_tree_add_bitmask(tree
, tvb
, offset
,
461 hf_glusterfs_mnt_flags
, ett_glusterfs_mnt_flags
,
462 flag_bits
, ENC_BIG_ENDIAN
);
465 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_namemax
, offset
);
470 /* function for dissecting and adding a gluster dict_t to the tree */
472 gluster_rpc_dissect_dict(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
, int offset
)
476 int roundup
, value_len
, key_len
;
477 uint32_t i
, items
, len
;
478 int start_offset
, start_offset2
;
480 proto_item
*subtree_item
, *ti
;
483 proto_item
*dict_item
= NULL
;
485 /* create a subtree for all the items in the dict */
487 header_field_info
*hfinfo
= proto_registrar_get_nth(hfindex
);
490 name
= "<NAMELESS DICT STRUCTURE>";
492 start_offset
= offset
;
493 subtree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_gluster_dict
, &subtree_item
, name
);
495 len
= tvb_get_ntohl(tvb
, offset
);
496 roundup
= rpc_roundup(len
) - len
;
497 ti
= proto_tree_add_item_ret_uint(subtree
, hf_gluster_dict_size
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &len
);
498 proto_item_append_text(ti
, " (%d bytes inc. RPC-roundup)", rpc_roundup(len
));
499 proto_item_set_generated(ti
);
505 items
= tvb_get_ntohl(tvb
, offset
);
507 proto_item_append_text(subtree_item
, ", contains %d item%s", items
, items
== 1 ? "" : "s");
512 proto_tree_add_uint(subtree
, hf_gluster_num_dict_items
, tvb
, offset
, 4, items
);
515 for (i
= 0; i
< items
; i
++) {
516 /* key_len is the length of the key without the terminating '\0' */
517 /* key_len = tvb_get_ntohl(tvb, offset) + 1; // will be read later */
519 value_len
= tvb_get_ntohl(tvb
, offset
);
522 /* read the key, '\0' terminated */
523 key
= tvb_get_stringz_enc(wmem_packet_scope(), tvb
, offset
, &key_len
, ENC_ASCII
);
524 start_offset2
= offset
;
527 /* read the value, possibly '\0' terminated */
529 /* keys named "gfid-req" contain a GFID in hex */
530 if (value_len
== 16 && (
531 !strncmp("gfid-req", key
, 8) ||
532 !strncmp("transaction_id", key
, 14) ||
533 !strncmp("originator_uuid", key
, 15))) {
537 tvb_get_ntohguid(tvb
, offset
, &gfid
);
539 gfid_s
= guid_to_str(wmem_packet_scope(), &gfid
);
540 dict_item
= proto_tree_add_guid_format(subtree
, hf_glusterfs_gfid
,
541 tvb
, offset
, 16, &gfid
,
542 "%s: %s", key
, gfid_s
);
543 /* this is a changelog in binary format */
544 } else if (value_len
== 12 && !strncmp("trusted.afr.", key
, 12)) {
545 dict_item
= proto_tree_add_bytes_format(subtree
, hf_gluster_trusted_afr_key
, tvb
, offset
, 12,
546 NULL
, "%s: 0x%.8x%.8x%.8x", key
,
547 tvb_get_letohl(tvb
, offset
+ 0),
548 tvb_get_letohl(tvb
, offset
+ 4),
549 tvb_get_letohl(tvb
, offset
+ 8));
551 value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, value_len
, ENC_ASCII
);
552 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, value_len
, value
, "%s: %s",
557 proto_item_set_len (dict_item
, offset
- start_offset2
);
561 ti
= proto_tree_add_item(subtree
, hf_gluster_rpc_roundup_bytes
, tvb
, offset
, -1, ENC_NA
);
562 proto_item_set_generated(ti
);
566 proto_item_set_len (subtree_item
, offset
- start_offset
);
572 * from rpc/xdr/src/glusterfs3-xdr.c:xdr_gf_iatt()
575 glusterfs_rpc_dissect_gfx_iatt(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
,
578 proto_item
*iatt_item
;
579 proto_tree
*iatt_tree
;
580 int start_offset
= offset
;
582 iatt_item
= proto_tree_add_item(tree
, hfindex
, tvb
, offset
, -1,
584 iatt_tree
= proto_item_add_subtree(iatt_item
, ett_glusterfs_iatt
);
586 offset
= glusterfs_rpc_dissect_gfid(iatt_tree
, tvb
, hf_glusterfs_gfid
,
588 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_flags
,
590 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_ino
,
592 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_dev
,
594 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_rdev
,
596 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_size
,
598 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_ia_blocks
,
600 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_attributes
,
602 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_attributes_mask
,
604 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_atime
,
606 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_mtime
,
608 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_ctime
,
610 offset
= dissect_rpc_uint64(tvb
, iatt_tree
, hf_glusterfs_iax_btime
,
612 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_iax_atime_nsec
,
614 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_iax_mtime_nsec
,
616 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_iax_ctime_nsec
,
618 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_iax_btime_nsec
,
620 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_nlink
,
622 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_uid
,
624 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_gid
,
626 offset
= dissect_rpc_uint32(tvb
, iatt_tree
, hf_glusterfs_ia_blksize
,
628 offset
= glusterfs_rpc_dissect_mode(iatt_tree
, tvb
,
629 hf_glusterfs_ia_mode
, offset
);
631 proto_item_set_len (iatt_item
, offset
- start_offset
);
636 /* function for dissecting and adding a gluster4_0 dict_t to the tree */
638 gluster_rpc4_0_dissect_dict(proto_tree
*tree
, tvbuff_t
*tvb
, int hfindex
, int offset
)
642 uint32_t i
, items
, len
, val_type
, val_len
, key_len
;
643 int start_offset
, start_offset2
;
647 proto_item
*subtree_item
;
650 proto_item
*dict_item
= NULL
;
652 /* create a subtree for all the items in the dict */
654 header_field_info
*hfinfo
= proto_registrar_get_nth(hfindex
);
657 name
= "<NAMELESS DICT STRUCTURE>";
659 start_offset
= offset
;
660 subtree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_gluster_dict
, &subtree_item
, name
);
662 len
= tvb_get_ntohl(tvb
, offset
);
663 offset
= dissect_rpc_uint32 (tvb
, subtree
, hf_gluster_dict_xdr_size
, offset
);
670 items
= tvb_get_ntohl(tvb
, offset
);
671 offset
= dissect_rpc_uint32 (tvb
, subtree
, hf_gluster_num_dict_items
, offset
);
676 for (i
= 0; i
< items
; i
++) {
678 key_len
= tvb_get_ntohl(tvb
, offset
);
679 key_len
= rpc_roundup(key_len
);
682 /* read the key, '\0' terminated */
683 key
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, key_len
, ENC_ASCII
);
684 start_offset2
= offset
;
687 val_type
= tvb_get_ntohl(tvb
, offset
);
692 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, val_len
,
693 NULL
, "%s: %"PRId64
, key
,
694 tvb_get_int64(tvb
, offset
, ENC_BIG_ENDIAN
));
695 } else if (val_type
== 3) {
697 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, val_len
,
698 NULL
, "%s: %"PRIu64
, key
,
699 tvb_get_uint64(tvb
, offset
, ENC_BIG_ENDIAN
));
700 } else if (val_type
== 4) {
702 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, val_len
,
704 tvb_get_ieee_double(tvb
, offset
, ENC_BIG_ENDIAN
));
705 } else if (val_type
== 5) {
706 val_len
= tvb_get_ntohl(tvb
, offset
);
707 val_len
= rpc_roundup(val_len
);
709 value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, val_len
, ENC_ASCII
);
710 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, val_len
, value
, "%s: %s",
712 } else if (val_type
== 8) {
713 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
714 hf_glusterfs_preparent_iatt
, offset
);
715 } else if (val_type
== 7) {
717 tvb_get_ntohguid(tvb
, offset
, &gfid
);
718 gfid_s
= guid_to_str(wmem_packet_scope(), &gfid
);
719 dict_item
= proto_tree_add_guid_format(subtree
, hf_glusterfs_gfid
,
720 tvb
, offset
, val_len
, &gfid
,
721 "%s: %s", key
, gfid_s
);
722 } else if (val_type
== 6) {
723 val_len
= tvb_get_ntohl(tvb
, offset
);
726 /* read the value, possibly '\0' terminated */
728 /* keys named "gfid-req" contain a GFID in hex */
729 if (val_len
== 16 && (
730 !strncmp("gfid-req", key
, 8) ||
731 !strncmp("transaction_id", key
, 14) ||
732 !strncmp("originator_uuid", key
, 15))) {
733 tvb_get_ntohguid(tvb
, offset
, &gfid
);
735 gfid_s
= guid_to_str(wmem_packet_scope(), &gfid
);
736 dict_item
= proto_tree_add_guid_format(subtree
, hf_glusterfs_gfid
,
737 tvb
, offset
, 16, &gfid
,
738 "%s: %s", key
, gfid_s
);
739 /* this is a changelog in binary format */
740 } else if (val_len
== 12 && !strncmp("trusted.afr.", key
, 12)) {
741 dict_item
= proto_tree_add_bytes_format(subtree
, hf_gluster_trusted_afr_key
, tvb
, offset
, 12,
742 NULL
, "%s: 0x%.8x%.8x%.8x", key
,
743 tvb_get_letohl(tvb
, offset
+ 0),
744 tvb_get_letohl(tvb
, offset
+ 4),
745 tvb_get_letohl(tvb
, offset
+ 8));
747 value
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, val_len
, ENC_ASCII
);
748 dict_item
= proto_tree_add_string_format(subtree
, hf_gluster_dict_value
, tvb
, offset
, val_len
, value
, "%s: %s",
754 proto_item_set_len (dict_item
, offset
- start_offset2
);
757 proto_item_set_len (subtree_item
, offset
- start_offset
);
763 GlusterFS protocol error codes, from the GlusterFS source.
765 The GlusterFS server maps system errno values to these codes,
766 which is a Good Thing, because not only are some errno values
767 different on different platforms, some errno values on some
768 Linux platforms differ from the equivalent values on most
769 Linux platforms, meaning that if a server sends one of its
770 errno values to a client with a different operating system -
771 or if a Linux server sends one of its errno values to a Linux
772 client with different errno values - the errno might not be
773 interpreted correctly.
775 Copyright notice from the GlusterFS code's compat-errno.h,
776 from which these codes, CF_ERROR_CODE_ names, and error
777 message strings are taken:
779 Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com>
780 This file is part of GlusterFS.
782 This file is licensed to you under your choice of the GNU Lesser
783 General Public License, version 3 or any later version (LGPLv3 or
784 later), or the GNU General Public License, version 2 (GPLv2), in all
785 cases as published by the Free Software Foundation.
788 static const value_string glusterfs_error_codes
[] = {
789 {0, "Success"}, /* GF_ERROR_CODE_SUCCESS */
790 {1, "Operation not permitted"}, /* GF_ERROR_CODE_PERM */
791 {2, "No such file or directory"}, /* GF_ERROR_CODE_NOENT */
792 {3, "No such process"}, /* GF_ERROR_CODE_SRCH */
793 {4, "Interrupted system call"}, /* GF_ERROR_CODE_INTR */
794 {5, "I/O error"}, /* GF_ERROR_CODE_IO */
795 {6, "No such device or address"}, /* GF_ERROR_CODE_NXIO */
796 {7, "Argument list too long"}, /* GF_ERROR_CODE_2BIG */
797 {8, "Exec format error"}, /* GF_ERROR_CODE_NOEXEC */
798 {9, "Bad file number"}, /* GF_ERROR_CODE_BADF */
799 {10, "No child processes"}, /* GF_ERROR_CODE_CHILD */
800 {11, "Try again"}, /* GF_ERROR_CODE_AGAIN */
801 {12, "Out of memory"}, /* GF_ERROR_CODE_NOMEM */
802 {13, "Permission denied"}, /* GF_ERROR_CODE_ACCES */
803 {14, "Bad address"}, /* GF_ERROR_CODE_FAULT */
804 {15, "Block device required"}, /* GF_ERROR_CODE_NOTBLK */
805 {16, "Device or resource busy"}, /* GF_ERROR_CODE_BUSY */
806 {17, "File exists"}, /* GF_ERROR_CODE_EXIST */
807 {18, "Cross-device link"}, /* GF_ERROR_CODE_XDEV */
808 {19, "No such device"}, /* GF_ERROR_CODE_NODEV */
809 {20, "Not a directory"}, /* GF_ERROR_CODE_NOTDIR */
810 {21, "Is a directory"}, /* GF_ERROR_CODE_ISDIR */
811 {22, "Invalid argument"}, /* GF_ERROR_CODE_INVAL */
812 {23, "File table overflow"}, /* GF_ERROR_CODE_NFILE */
813 {24, "Too many open files"}, /* GF_ERROR_CODE_MFILE */
814 {25, "Not a typewriter"}, /* GF_ERROR_CODE_NOTTY */
815 {26, "Text file busy"}, /* GF_ERROR_CODE_TXTBSY */
816 {27, "File too large"}, /* GF_ERROR_CODE_FBIG */
817 {28, "No space left on device"}, /* GF_ERROR_CODE_NOSPC */
818 {29, "Illegal seek"}, /* GF_ERROR_CODE_SPIPE */
819 {30, "Read-only file system"}, /* GF_ERROR_CODE_ROFS */
820 {31, "Too many links"}, /* GF_ERROR_CODE_MLINK */
821 {32, "Broken pipe"}, /* GF_ERROR_CODE_PIPE */
822 {33, "Math argument out of domain of func"}, /* GF_ERROR_CODE_DOM */
823 {34, "Math result not representable"}, /* GF_ERROR_CODE_RANGE */
824 {35, "Resource deadlock would occur"}, /* GF_ERROR_CODE_DEADLK */
825 {36, "File name too long"}, /* GF_ERROR_CODE_NAMETOOLONG */
826 {37, "No record locks available"}, /* GF_ERROR_CODE_NOLCK */
827 {38, "Function not implemented"}, /* GF_ERROR_CODE_NOSYS */
828 {39, "Directory not empty"}, /* GF_ERROR_CODE_NOTEMPTY */
829 {40, "Too many symbolic links encountered"}, /* GF_ERROR_CODE_LOOP */
831 {42, "No message of desired type"}, /* GF_ERROR_CODE_NOMSG */
832 {43, "Identifier removed"}, /* GF_ERROR_CODE_IDRM */
833 {44, "Channel number out of range"}, /* GF_ERROR_CODE_CHRNG */
834 {45, "Level 2 not synchronized"}, /* GF_ERROR_CODE_L2NSYNC */
835 {46, "Level 3 halted"}, /* GF_ERROR_CODE_L3HLT */
836 {47, "Level 3 reset"}, /* GF_ERROR_CODE_L3RST */
837 {48, "Link number out of range"}, /* GF_ERROR_CODE_LNRNG */
838 {49, "Protocol driver not attached"}, /* GF_ERROR_CODE_UNATCH */
839 {50, "No CSI structure available"}, /* GF_ERROR_CODE_NOCSI */
840 {51, "Level 2 halted"}, /* GF_ERROR_CODE_L2HLT */
841 {52, "Invalid exchange"}, /* GF_ERROR_CODE_BADE */
842 {53, "Invalid request descriptor"}, /* GF_ERROR_CODE_BADR */
843 {54, "Exchange full"}, /* GF_ERROR_CODE_XFULL */
844 {55, "No anode"}, /* GF_ERROR_CODE_NOANO */
845 {56, "Invalid request code"}, /* GF_ERROR_CODE_BADRQC */
846 {57, "Invalid slot"}, /* GF_ERROR_CODE_BADSLT */
847 {59, "Bad font file format"}, /* GF_ERROR_CODE_BFONT */
848 {60, "Device not a stream"}, /* GF_ERROR_CODE_NOSTR */
849 {61, "No data available"}, /* GF_ERROR_CODE_NODATA */
850 {62, "Timer expired"}, /* GF_ERROR_CODE_TIME */
851 {63, "Out of streams resources"}, /* GF_ERROR_CODE_NOSR */
852 {64, "Machine is not on the network"}, /* GF_ERROR_CODE_NONET */
853 {65, "Package not installed"}, /* GF_ERROR_CODE_NOPKG */
854 {66, "Object is remote"}, /* GF_ERROR_CODE_REMOTE */
855 {67, "Link has been severed"}, /* GF_ERROR_CODE_NOLINK */
856 {68, "Advertise error"}, /* GF_ERROR_CODE_ADV */
857 {69, "Srmount error"}, /* GF_ERROR_CODE_SRMNT */
858 {70, "Communication error on send"}, /* GF_ERROR_CODE_COMM */
859 {71, "Protocol error"}, /* GF_ERROR_CODE_PROTO */
860 {72, "Multihop attempted"}, /* GF_ERROR_CODE_MULTIHOP */
861 {73, "RFS specific error"}, /* GF_ERROR_CODE_DOTDOT */
862 {74, "Not a data message"}, /* GF_ERROR_CODE_BADMSG */
863 {75, "Value too large for defined data type"}, /* GF_ERROR_CODE_OVERFLOW */
864 {76, "Name not unique on network"}, /* GF_ERROR_CODE_NOTUNIQ */
865 {77, "File descriptor in bad state"}, /* GF_ERROR_CODE_BADFD */
866 {78, "Remote address changed"}, /* GF_ERROR_CODE_REMCHG */
867 {79, "Can not access a needed shared library"}, /* GF_ERROR_CODE_LIBACC */
868 {80, "Accessing a corrupted shared library"}, /* GF_ERROR_CODE_LIBBAD */
869 {81, ".lib section in a.out corrupted"}, /* GF_ERROR_CODE_LIBSCN */
870 {82, "Attempting to link in too many shared libraries"}, /* GF_ERROR_CODE_LIBMAX */
871 {83, "Cannot exec a shared library directly"}, /* GF_ERROR_CODE_LIBEXEC */
872 {84, "Illegal byte sequence"}, /* GF_ERROR_CODE_ILSEQ */
873 {85, "Interrupted system call should be restarted"}, /* GF_ERROR_CODE_RESTART */
874 {86, "Streams pipe error"}, /* GF_ERROR_CODE_STRPIPE */
875 {87, "Too many users"}, /* GF_ERROR_CODE_USERS */
876 {88, "Socket operation on non-socket"}, /* GF_ERROR_CODE_NOTSOCK */
877 {89, "Destination address required"}, /* GF_ERROR_CODE_DESTADDRREQ */
878 {90, "Message too long"}, /* GF_ERROR_CODE_MSGSIZE */
879 {91, "Protocol wrong type for socket"}, /* GF_ERROR_CODE_PROTOTYPE */
880 {92, "Protocol not available"}, /* GF_ERROR_CODE_NOPROTOOPT */
881 {93, "Protocol not supported"}, /* GF_ERROR_CODE_PROTONOSUPPORT */
882 {94, "Socket type not supported"}, /* GF_ERROR_CODE_SOCKTNOSUPPORT */
883 {95, "Operation not supported on transport endpoint"}, /* GF_ERROR_CODE_OPNOTSUPP */
884 {96, "Protocol family not supported"}, /* GF_ERROR_CODE_PFNOSUPPORT */
885 {97, "Address family not supported by protocol"}, /* GF_ERROR_CODE_AFNOSUPPORT */
886 {98, "Address already in use"}, /* GF_ERROR_CODE_ADDRINUSE */
887 {99, "Cannot assign requested address"}, /* GF_ERROR_CODE_ADDRNOTAVAIL */
888 {100, "Network is down"}, /* GF_ERROR_CODE_NETDOWN */
889 {101, "Network is unreachable"}, /* GF_ERROR_CODE_NETUNREACH */
890 {102, "Network dropped connection because of reset"}, /* GF_ERROR_CODE_NETRESET */
891 {103, "Software caused connection abort"}, /* GF_ERROR_CODE_CONNABORTED */
892 {104, "Connection reset by peer"}, /* GF_ERROR_CODE_CONNRESET */
893 {105, "No buffer space available"}, /* GF_ERROR_CODE_NOBUFS */
894 {106, "Transport endpoint is already connected"}, /* GF_ERROR_CODE_ISCONN */
895 {107, "Transport endpoint is not connected"}, /* GF_ERROR_CODE_NOTCONN */
896 {108, "Cannot send after transport endpoint shutdown"}, /* GF_ERROR_CODE_SHUTDOWN */
897 {109, "Too many references: cannot splice"}, /* GF_ERROR_CODE_TOOMANYREFS */
898 {110, "Connection timed out"}, /* GF_ERROR_CODE_TIMEDOUT */
899 {111, "Connection refused"}, /* GF_ERROR_CODE_CONNREFUSED */
900 {112, "Host is down"}, /* GF_ERROR_CODE_HOSTDOWN */
901 {113, "No route to host"}, /* GF_ERROR_CODE_HOSTUNREACH */
902 {114, "Operation already in progress"}, /* GF_ERROR_CODE_ALREADY */
903 {115, "Operation now in progress"}, /* GF_ERROR_CODE_INPROGRESS */
904 {116, "Stale NFS file handle"}, /* GF_ERROR_CODE_STALE */
905 {117, "Structure needs cleaning"}, /* GF_ERROR_CODE_UCLEAN */
906 {118, "Not a XENIX named type file"}, /* GF_ERROR_CODE_NOTNAM */
907 {119, "No XENIX semaphores available"}, /* GF_ERROR_CODE_NAVAIL */
908 {120, "Is a named type file"}, /* GF_ERROR_CODE_ISNAM */
909 {121, "Remote I/O error"}, /* GF_ERROR_CODE_REMOTEIO */
910 {122, "Quota exceeded"}, /* GF_ERROR_CODE_DQUOT */
911 {123, "No medium found"}, /* GF_ERROR_CODE_NOMEDIUM */
912 {124, "Wrong medium type"}, /* GF_ERROR_CODE_MEDIUMTYPE */
913 {125, "Operation Canceled"}, /* GF_ERROR_CODE_CANCELED */
914 {126, "Required key not available"}, /* GF_ERROR_CODE_NOKEY */
915 {127, "Key has expired"}, /* GF_ERROR_CODE_KEYEXPIRED */
916 {128, "Key has been revoked"}, /* GF_ERROR_CODE_KEYREVOKED */
917 {129, "Key was rejected by service"}, /* GF_ERROR_CODE_KEYREJECTED */
919 /* for robust mutexes */
920 {130, "Owner died"}, /* GF_ERROR_CODE_OWNERDEAD */
921 {131, "State not recoverable"}, /* GF_ERROR_CODE_NOTRECOVERABLE */
924 * "Should never be seen by user programs"
925 * These are internal system call returns (Linux?) used to
926 * indicate various internal conditions such as "restart
927 * this system call" indications.
929 {512, "Restart system call"}, /* GF_ERROR_CODE_RESTARTSYS */
930 {513, "Restart system call (no intr)"}, /* GF_ERROR_CODE_RESTARTNOINTR */
931 {514, "Restart if no signal handler"}, /* GF_ERROR_CODE_RESTARTNOHAND */
932 {515, "No ioctl command"}, /* GF_ERROR_CODE_NOIOCTLCMD */
933 {516, "Restart system call by calling sys_restart_syscall"}, /* GF_ERROR_CODE_RESTART_RESTARTBLOCK */
935 /* Defined for the NFSv3 protocol */
936 {521, "Illegal NFS file handle"}, /* GF_ERROR_CODE_BADHANDLE */
937 {522, "Update synchronization mismatch"}, /* GF_ERROR_CODE_NOTSYNC */
938 {523, "Cookie is stale"}, /* GF_ERROR_CODE_BADCOOKIE */
939 {524, "Operation is not supported"}, /* GF_ERROR_CODE_NOTSUPP */
940 {525, "Buffer or request is too small"}, /* GF_ERROR_CODE_TOOSMALL */
941 {526, "An untranslatable error occurred"}, /* GF_ERROR_CODE_SERVERFAULT */
942 {527, "Type not supported by server"}, /* GF_ERROR_CODE_BADTYPE */
943 {528, "Request initiated, but will not complete before timeout"}, /* GF_ERROR_CODE_JUKEBOX */
944 {529, "iocb queued, will get completion event"}, /* GF_ERROR_CODE_IOCBQUEUED */
945 {530, "iocb queued, will trigger a retry"}, /* GF_ERROR_CODE_IOCBRETRY */
948 {701, "No such policy registered"}, /* GF_ERROR_CODE_NOPOLICY */
949 {702, "Malformed Mach-O file"}, /* GF_ERROR_CODE_BADMACHO */
950 {703, "Device power is off"}, /* GF_ERROR_CODE_PWROFF */
951 {704, "Device error" /* e.g., paper out */}, /* GF_ERROR_CODE_DEVERR */
952 {705, "Bad CPU type in executable"}, /* GF_ERROR_CODE_BADARCH */
953 {706, "Bad executable"}, /* GF_ERROR_CODE_BADEXEC */
954 {707, "Shared library version mismatch"}, /* GF_ERROR_CODE_SHLIBVERS */
957 {801, "Facility is not active"}, /* GF_ERROR_CODE_NOTACTIVE */
958 {802, "Locked lock was unmapped"}, /* GF_ERROR_CODE_LOCKUNMAPPED */
961 {901, "Too many processes"}, /* GF_ERROR_CODE_PROCLIM */
962 {902, "RPC struct is bad"}, /* GF_ERROR_CODE_BADRPC */
963 {903, "RPC version wrong"}, /* GF_ERROR_CODE_RPCMISMATCH */
964 {904, "RPC prog. not avail"}, /* GF_ERROR_CODE_PROGUNAVAIL */
965 {905, "Program version wrong"}, /* GF_ERROR_CODE_PROGMISMATCH */
966 {905, "Bad procedure for program"}, /* GF_ERROR_CODE_PROCUNAVAIL */
967 {906, "Inappropriate file type or format"}, /* GF_ERROR_CODE_FTYPE */
968 {907, "Authentication error"}, /* GF_ERROR_CODE_AUTH */
969 {908, "Need authenticator"}, /* GF_ERROR_CODE_NEEDAUTH */
970 {909, "Programming error"}, /* GF_ERROR_CODE_DOOFUS */
971 {1024, "Unknown"}, /* GF_ERROR_CODE_UNKNOWN */
975 static value_string_ext glusterfs_error_codes_ext
= VALUE_STRING_EXT_INIT(glusterfs_error_codes
);
978 gluster_dissect_common_reply(tvbuff_t
*tvb
, int offset
,
979 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
981 proto_item
*errno_item
;
984 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_op_ret
, offset
);
986 op_errno
= tvb_get_ntohl(tvb
, offset
);
987 errno_item
= proto_tree_add_int(tree
, hf_gluster_op_errno
, tvb
,
988 offset
, 4, op_errno
);
989 proto_item_append_text(errno_item
, " (%s)", val_to_str_ext_const(op_errno
, &glusterfs_error_codes_ext
, "Unknown"));
996 gluster_local_dissect_common_reply(tvbuff_t
*tvb
,
997 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
999 return gluster_dissect_common_reply(tvb
, 0, pinfo
, tree
, data
);
1003 _glusterfs_gfs3_common_readdir_reply(tvbuff_t
*tvb
, proto_tree
*tree
, int offset
)
1005 proto_item
*errno_item
;
1008 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_entries
, offset
);
1010 op_errno
= tvb_get_ntohl(tvb
, offset
);
1011 errno_item
= proto_tree_add_int(tree
, hf_gluster_op_errno
, tvb
,
1012 offset
, 4, op_errno
);
1014 proto_item_append_text(errno_item
, " (More replies follow)");
1015 else if (op_errno
== 2 /* GF_ERROR_CODE_NOENT */)
1016 proto_item_append_text(errno_item
, " (Last reply)");
1023 glusterfs_gfs3_op_unlink_reply(tvbuff_t
*tvb
,
1024 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1028 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1029 hf_glusterfs_preparent_iatt
, offset
);
1030 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1031 hf_glusterfs_postparent_iatt
, offset
);
1037 glusterfs_gfs3_op_unlink_call(tvbuff_t
*tvb
,
1038 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1042 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1043 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1044 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1049 glusterfs_gfs3_op_statfs_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1050 proto_tree
*tree
, void* data
)
1054 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1055 offset
= glusterfs_rpc_dissect_statfs(tree
, tvb
, offset
);
1060 glusterfs_gfs3_op_statfs_call(tvbuff_t
*tvb
,
1061 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1065 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1066 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1072 glusterfs_gfs3_op_flush_call(tvbuff_t
*tvb
,
1073 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1077 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1078 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1083 glusterfs_gfs3_op_setxattr_call(tvbuff_t
*tvb
,
1084 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1088 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1089 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1090 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1091 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1097 glusterfs_gfs3_op_opendir_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1098 proto_tree
*tree
, void* data
)
1102 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1103 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1108 glusterfs_gfs3_op_opendir_call(tvbuff_t
*tvb
,
1109 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1113 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1114 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1119 /* rpc/xdr/src/glusterfs3-xdr.c:xdr_gfs3_create_rsp */
1121 glusterfs_gfs3_op_create_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1122 proto_tree
*tree
, void* data
)
1126 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1127 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1129 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1130 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1131 hf_glusterfs_preparent_iatt
, offset
);
1132 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1133 hf_glusterfs_postparent_iatt
, offset
);
1138 /* rpc/xdr/src/glusterfs3-xdr.c:xdr_gfs3_create_req */
1140 glusterfs_gfs3_op_create_call(tvbuff_t
*tvb
,
1141 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1144 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1145 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1146 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
1147 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1148 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1149 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1155 glusterfs_gfs3_op_lookup_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1156 proto_tree
*tree
, void* data
)
1159 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1160 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1162 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1163 hf_glusterfs_postparent_iatt
, offset
);
1164 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1170 glusterfs_gfs3_op_lookup_call(tvbuff_t
*tvb
,
1171 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1174 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1175 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1176 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1177 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1178 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1179 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1185 glusterfs_gfs3_op_inodelk_call(tvbuff_t
*tvb
,
1186 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1188 proto_item
*flock_item
;
1189 proto_tree
*flock_tree
;
1193 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1194 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
1195 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
1197 start_offset
= offset
;
1198 flock_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_glusterfs_flock
, &flock_item
, "Flock");
1199 offset
= glusterfs_rpc_dissect_gf_flock(flock_tree
, tvb
, offset
);
1200 proto_item_set_len (flock_item
, offset
- start_offset
);
1202 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1203 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
1208 _glusterfs_gfs_op_readdir_entry(tvbuff_t
*tvb
, int offset
, proto_tree
*tree
,
1209 bool iatt
, bool proto_4_0
, bool dict
)
1211 proto_item
*entry_item
;
1212 proto_tree
*entry_tree
;
1213 const char* path
= NULL
;
1214 int start_offset
= offset
;
1216 entry_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_glusterfs_entry
, &entry_item
, "Entry");
1218 offset
= dissect_rpc_uint64(tvb
, entry_tree
, hf_glusterfs_entry_ino
, offset
);
1219 offset
= dissect_rpc_uint64(tvb
, entry_tree
, hf_glusterfs_entry_off
, offset
);
1220 offset
= dissect_rpc_uint32(tvb
, entry_tree
, hf_glusterfs_entry_len
, offset
);
1221 offset
= dissect_rpc_uint32(tvb
, entry_tree
, hf_glusterfs_entry_type
, offset
);
1222 offset
= dissect_rpc_string(tvb
, entry_tree
, hf_glusterfs_entry_path
, offset
, &path
);
1224 proto_item_append_text(entry_item
, " Path: %s", path
);
1228 offset
= glusterfs_rpc_dissect_gfx_iatt(entry_tree
, tvb
,
1229 hf_glusterfs_iattx
, offset
);
1231 offset
= glusterfs_rpc_dissect_gf_iatt(entry_tree
, tvb
,
1232 hf_glusterfs_iatt
, offset
);
1236 offset
= gluster_rpc4_0_dissect_dict(entry_tree
, tvb
, hf_glusterfs_dict
, offset
);
1238 offset
= gluster_rpc_dissect_dict(entry_tree
, tvb
, hf_glusterfs_dict
, offset
);
1241 proto_item_set_len (entry_item
, offset
- start_offset
);
1247 glusterfs_gfs3_op_readdirp_entry(tvbuff_t
*tvb
, int offset
,
1248 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1250 return _glusterfs_gfs_op_readdir_entry(tvb
, offset
, tree
, true, false, false);
1254 glusterfs_gfs3_3_op_readdir_entry(tvbuff_t
*tvb
, int offset
,
1255 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1257 return _glusterfs_gfs_op_readdir_entry(tvb
, offset
, tree
, false, false, false);
1261 glusterfs_gfs3_3_op_readdirp_entry(tvbuff_t
*tvb
, int offset
,
1262 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1264 return _glusterfs_gfs_op_readdir_entry(tvb
, offset
, tree
, true, false, true);
1268 glusterfs_gfs4_0_op_readdir_entry(tvbuff_t
*tvb
, int offset
,
1269 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1271 return _glusterfs_gfs_op_readdir_entry(tvb
, offset
, tree
, false, true, false);
1275 glusterfs_gfs4_0_op_readdirp_entry(tvbuff_t
*tvb
, int offset
,
1276 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1278 return _glusterfs_gfs_op_readdir_entry(tvb
, offset
, tree
, true, true, true);
1281 /* details in xlators/storage/posix/src/posix.c:posix_fill_readdir() */
1283 glusterfs_gfs3_op_readdirp_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1284 proto_tree
*tree
, void* data _U_
)
1287 offset
= _glusterfs_gfs3_common_readdir_reply(tvb
, tree
, offset
);
1288 offset
= dissect_rpc_list(tvb
, pinfo
, tree
, offset
,
1289 glusterfs_gfs3_op_readdirp_entry
, NULL
);
1295 glusterfs_gfs3_op_readdirp_call(tvbuff_t
*tvb
,
1296 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1299 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1300 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1301 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1302 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1308 glusterfs_gfs3_op_setattr_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1309 proto_tree
*tree
, void* data
)
1313 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1314 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1315 hf_glusterfs_preop_iatt
, offset
);
1316 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1317 hf_glusterfs_postop_iatt
, offset
);
1323 glusterfs_rpc_dissect_setattr(proto_tree
*tree
, tvbuff_t
*tvb
, int offset
)
1325 static int * const flag_bits
[] = {
1326 &hf_glusterfs_setattr_set_mode
,
1327 &hf_glusterfs_setattr_set_uid
,
1328 &hf_glusterfs_setattr_set_gid
,
1329 &hf_glusterfs_setattr_set_size
,
1330 &hf_glusterfs_setattr_set_atime
,
1331 &hf_glusterfs_setattr_set_mtime
,
1332 &hf_glusterfs_setattr_set_reserved
,
1336 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_glusterfs_setattr_valid
,
1337 ett_glusterfs_setattr_valid
, flag_bits
, ENC_NA
);
1344 glusterfs_gfs3_op_setattr_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1348 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
,
1350 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1352 offset
= glusterfs_rpc_dissect_setattr(tree
, tvb
, offset
);
1353 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
, NULL
);
1358 /*GlusterFS 3_3 fops */
1361 glusterfs_gfs3_3_op_stat_call(tvbuff_t
*tvb
,
1362 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1366 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1367 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1373 glusterfs_gfs3_3_op_stat_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1374 proto_tree
*tree
, void* data
)
1378 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1379 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1381 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
1387 /* glusterfs_gfs3_3_op_mknod_reply() is also used as a ..mkdir_reply() */
1389 glusterfs_gfs3_3_op_mknod_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1390 proto_tree
*tree
, void* data
)
1394 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1395 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1397 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1398 hf_glusterfs_preparent_iatt
, offset
);
1399 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1400 hf_glusterfs_postparent_iatt
, offset
);
1401 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
1408 glusterfs_gfs3_3_op_mknod_call(tvbuff_t
*tvb
,
1409 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1413 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1414 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1415 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
1416 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
1417 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1418 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1424 glusterfs_gfs3_3_op_mkdir_call(tvbuff_t
*tvb
,
1425 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1428 const char *name
= NULL
;
1430 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1431 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
1432 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
1433 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
1434 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1435 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
1441 glusterfs_gfs3_3_op_readlink_reply(tvbuff_t
*tvb
,
1442 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1445 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1446 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1448 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
,
1450 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
1456 glusterfs_gfs3_3_op_readlink_call(tvbuff_t
*tvb
,
1457 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1460 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1461 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1462 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1467 /* glusterfs_gfs3_3_op_unlink_reply() is also used for ...rmdir_reply() */
1469 glusterfs_gfs3_3_op_unlink_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1470 proto_tree
*tree
, void* data
)
1474 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1475 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1476 hf_glusterfs_preparent_iatt
, offset
);
1477 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1478 hf_glusterfs_postparent_iatt
, offset
);
1479 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1485 glusterfs_gfs3_3_op_unlink_call(tvbuff_t
*tvb
,
1486 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1491 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1492 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1493 xflags
= tvb_get_ntohl(tvb
, offset
);
1494 proto_tree_add_uint_format(tree
, hf_glusterfs_xflags
, tvb
, offset
, 4, xflags
, "Flags: 0%02o", xflags
);
1496 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1502 glusterfs_gfs3_3_op_rmdir_call(tvbuff_t
*tvb
,
1503 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1508 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1509 xflags
= tvb_get_ntohl(tvb
, offset
);
1510 proto_tree_add_uint_format(tree
, hf_glusterfs_xflags
, tvb
, offset
, 4, xflags
, "Flags: 0%02o", xflags
);
1512 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1513 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1519 glusterfs_gfs3_3_op_symlink_call(tvbuff_t
*tvb
,
1520 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1524 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1525 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
1526 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
1528 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_linkname
, offset
, NULL
);
1529 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1535 glusterfs_gfs3_3_op_rename_call(tvbuff_t
*tvb
,
1536 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1540 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_oldgfid
, offset
);
1541 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_newgfid
, offset
);
1542 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_oldbname
, offset
, NULL
);
1543 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_newbname
, offset
, NULL
);
1544 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1550 glusterfs_gfs3_3_op_rename_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1551 proto_tree
*tree
, void* data
)
1553 proto_tree
*old_tree
, *new_tree
;
1554 proto_item
*old_item
, *new_item
;
1558 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1559 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1562 start_offset
= offset
;
1563 old_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1,
1564 ett_glusterfs_parent_iatt
, &old_item
, "Old parent");
1565 offset
= glusterfs_rpc_dissect_gf_iatt(old_tree
, tvb
,
1566 hf_glusterfs_preparent_iatt
, offset
);
1567 offset
= glusterfs_rpc_dissect_gf_iatt(old_tree
, tvb
,
1568 hf_glusterfs_postparent_iatt
, offset
);
1569 proto_item_set_len (old_item
, offset
- start_offset
);
1571 start_offset
= offset
;
1572 new_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_glusterfs_parent_iatt
, &new_item
, "New parent");
1573 offset
= glusterfs_rpc_dissect_gf_iatt(new_tree
, tvb
,
1574 hf_glusterfs_preparent_iatt
, offset
);
1575 offset
= glusterfs_rpc_dissect_gf_iatt(new_tree
, tvb
,
1576 hf_glusterfs_postparent_iatt
, offset
);
1577 proto_item_set_len (new_item
, offset
- start_offset
);
1579 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1585 glusterfs_gfs3_3_op_link_call(tvbuff_t
*tvb
,
1586 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1590 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_oldgfid
, offset
);
1591 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_newgfid
, offset
);
1592 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_newbname
, offset
, NULL
);
1593 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1599 glusterfs_gfs3_3_op_truncate_call(tvbuff_t
*tvb
,
1600 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1604 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1605 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1606 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1612 glusterfs_gfs3_3_op_open_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1613 proto_tree
*tree
, void* data
)
1617 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1618 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1619 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1624 glusterfs_gfs3_3_op_open_call(tvbuff_t
*tvb
,
1625 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1628 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1629 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1630 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1636 glusterfs_gfs3_3_op_read_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1637 proto_tree
*tree
, void* data
)
1641 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1642 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1644 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1645 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
1652 glusterfs_gfs3_3_op_read_call(tvbuff_t
*tvb
,
1653 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1657 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1658 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1659 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1660 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1661 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1662 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1668 glusterfs_gfs3_3_op_write_call(tvbuff_t
*tvb
,
1669 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1673 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1674 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1675 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1676 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1677 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1678 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1684 glusterfs_gfs3_3_op_statfs_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1685 proto_tree
*tree
, void* data
)
1689 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1690 offset
= glusterfs_rpc_dissect_statfs(tree
, tvb
, offset
);
1691 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1697 glusterfs_gfs3_3_op_statfs_call(tvbuff_t
*tvb
,
1698 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1702 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1703 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1709 glusterfs_gfs3_3_op_flush_call(tvbuff_t
*tvb
,
1710 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1714 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1715 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1716 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1722 glusterfs_gfs3_3_op_setxattr_call(tvbuff_t
*tvb
,
1723 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1727 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1728 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1729 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1730 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1736 glusterfs_gfs3_3_op_getxattr_call(tvbuff_t
*tvb
,
1737 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1741 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1742 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_namelen
, offset
);
1743 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
1744 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1751 glusterfs_gfs3_3_op_getxattr_reply(tvbuff_t
*tvb
,
1752 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1756 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1757 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1758 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1764 glusterfs_gfs3_3_op_removexattr_call(tvbuff_t
*tvb
,
1765 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1769 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1770 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
1771 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1777 glusterfs_gfs3_3_op_fsync_call(tvbuff_t
*tvb
,
1778 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1780 static int * const flag_bits
[] = {
1781 &hf_glusterfs_fsync_flag_datasync
,
1782 &hf_glusterfs_fsync_flag_unknown
,
1787 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1788 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1790 proto_tree_add_bitmask(tree
, tvb
, offset
,
1791 hf_glusterfs_fsync_flags
,
1792 ett_glusterfs_fsync_flags
, flag_bits
, ENC_NA
);
1795 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1801 glusterfs_gfs3_3_op_opendir_reply(tvbuff_t
*tvb
,
1802 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1806 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1807 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1808 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1814 glusterfs_gfs3_3_op_opendir_call(tvbuff_t
*tvb
,
1815 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1818 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1819 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1825 glusterfs_gfs3_3_op_create_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1826 proto_tree
*tree
, void* data
)
1830 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1831 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1833 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1834 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1835 hf_glusterfs_preparent_iatt
, offset
);
1836 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
1837 hf_glusterfs_postparent_iatt
, offset
);
1838 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1845 glusterfs_gfs3_3_op_create_call(tvbuff_t
*tvb
,
1846 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1848 const char *name
= NULL
;
1851 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1852 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1853 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
1854 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
1855 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
1856 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1857 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
1863 glusterfs_gfs3_3_op_ftruncate_call(tvbuff_t
*tvb
,
1864 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1868 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1869 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1870 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1871 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1877 glusterfs_gfs3_3_op_fstat_call(tvbuff_t
*tvb
,
1878 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1882 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1883 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1884 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1890 glusterfs_gfs3_3_op_fstat_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
1891 proto_tree
*tree
, void* data
)
1895 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1896 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
1898 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
1905 glusterfs_gfs3_3_op_lk_call(tvbuff_t
*tvb
,
1906 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1910 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1911 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1912 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
1913 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
1914 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
1915 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1921 glusterfs_gfs3_3_op_lk_reply(tvbuff_t
*tvb
,
1922 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1926 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
1927 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
1928 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1934 glusterfs_gfs3_3_op_access_call(tvbuff_t
*tvb
,
1935 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1939 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1940 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_mask
, offset
);
1941 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1946 glusterfs_gfs3_3_op_lookup_call(tvbuff_t
*tvb
,
1947 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1949 const char *name
= NULL
;
1953 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1954 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
1955 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
1956 length
= tvb_get_letohl(tvb
, offset
);
1957 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
1958 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1960 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Filename: (nameless, by GFID)");
1962 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
1968 glusterfs_gfs3_3_op_readdir_reply(tvbuff_t
*tvb
,
1969 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1973 offset
= _glusterfs_gfs3_common_readdir_reply(tvb
, tree
, offset
);
1974 offset
= dissect_rpc_list(tvb
, pinfo
, tree
, offset
,
1975 glusterfs_gfs3_3_op_readdir_entry
, NULL
);
1976 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1982 glusterfs_gfs3_3_op_readdir_call(tvbuff_t
*tvb
,
1983 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
1987 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
1988 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
1989 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
1990 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
1991 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
1997 glusterfs_gfs3_3_op_inodelk_call(tvbuff_t
*tvb
,
1998 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2002 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2003 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2004 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2005 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2006 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2007 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2013 glusterfs_gfs3_3_op_finodelk_call(tvbuff_t
*tvb
,
2014 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2018 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2019 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2021 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2022 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2023 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2025 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2026 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2032 glusterfs_gfs3_3_op_entrylk_call(tvbuff_t
*tvb
,
2033 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2037 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2038 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2039 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2040 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_entrylk_namelen
, offset
);
2041 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2042 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2043 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2049 glusterfs_gfs3_3_op_fentrylk_call(tvbuff_t
*tvb
,
2050 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2054 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2055 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2056 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2057 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2058 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_entrylk_namelen
, offset
);
2059 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2060 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2061 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2067 glusterfs_gfs3_3_op_xattrop_reply(tvbuff_t
*tvb
,
2068 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
2072 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2073 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2074 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2080 glusterfs_gfs3_3_op_xattrop_call(tvbuff_t
*tvb
,
2081 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2085 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2086 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2087 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2088 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2094 glusterfs_gfs3_3_op_fxattrop_call(tvbuff_t
*tvb
,
2095 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2099 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2100 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2101 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2102 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2103 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2109 glusterfs_gfs3_3_op_fgetxattr_call(tvbuff_t
*tvb
,
2110 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2114 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2115 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2116 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_namelen
, offset
);
2117 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2118 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2124 gluter_gfs3_3_op_fsetxattr_call(tvbuff_t
*tvb
,
2125 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2129 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2130 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2131 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2132 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2133 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2139 glusterfs_gfs3_3_op_setattr_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2140 proto_tree
*tree
, void* data
)
2144 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2145 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
2146 hf_glusterfs_preop_iatt
, offset
);
2147 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
,
2148 hf_glusterfs_postop_iatt
, offset
);
2149 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2155 glusterfs_gfs3_3_op_setattr_call(tvbuff_t
*tvb
,
2156 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2160 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
,
2162 offset
= glusterfs_rpc_dissect_gf_iatt(tree
, tvb
, hf_glusterfs_iatt
,
2164 offset
= glusterfs_rpc_dissect_setattr(tree
, tvb
, offset
);
2165 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2171 glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t
*tvb
,
2172 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
2176 offset
= _glusterfs_gfs3_common_readdir_reply(tvb
, tree
, offset
);
2177 offset
= dissect_rpc_list(tvb
, pinfo
, tree
, offset
,
2178 glusterfs_gfs3_3_op_readdirp_entry
, NULL
);
2179 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2184 /* READDIRP and DISCARD both use this */
2186 glusterfs_gfs3_3_op_readdirp_call(tvbuff_t
*tvb
,
2187 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2191 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2192 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2193 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2194 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2195 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2201 glusterfs_gfs3_3_op_release_call(tvbuff_t
*tvb
,
2202 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2206 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2207 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2208 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2214 glusterfs_gfs3_3_op_releasedir_call(tvbuff_t
*tvb
,
2215 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2219 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2220 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2221 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2227 glusterfs_gfs3_3_op_fremovexattr_call(tvbuff_t
*tvb
,
2228 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2232 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2233 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2234 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2235 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2241 glusterfs_gfs3_3_op_fallocate_call(tvbuff_t
*tvb
,
2242 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2246 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2247 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2248 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2249 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2250 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2251 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2257 glusterfs_gfs3_3_op_zerofill_call(tvbuff_t
*tvb
,
2258 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2262 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2263 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2264 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2265 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_size64
, offset
);
2271 glusterfs_gfs3_3_op_seek_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2272 proto_tree
*tree
, void* data
)
2276 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2277 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2278 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2284 glusterfs_gfs3_3_op_seek_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
2285 proto_tree
*tree
, void* data _U_
)
2289 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2290 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2291 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2292 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_whence
, offset
);
2293 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2298 /* This function is for common replay. RELEASE , RELEASEDIR and some other function use this method */
2301 glusterfs_gfs3_3_op_common_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2302 proto_tree
*tree
, void* data
)
2306 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2307 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2313 /*GlusterFS 4_0 fops */
2316 glusterfs_gfs4_0_op_stat_call(tvbuff_t
*tvb
,
2317 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2321 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2322 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2328 glusterfs_gfs4_0_op_common_iatt_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2329 proto_tree
*tree
, void* data
)
2333 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2334 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2335 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2340 /* glusterfs_gfs4_0_op_mknod_reply() is also used as a ..mkdir_reply() */
2342 glusterfs_gfs4_0_op_common_3iatt_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2343 proto_tree
*tree
, void* data
)
2347 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2348 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
2350 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2352 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2353 hf_glusterfs_preparent_iattx
, offset
);
2354 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2355 hf_glusterfs_postparent_iattx
, offset
);
2361 glusterfs_gfs4_0_op_mknod_call(tvbuff_t
*tvb
,
2362 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2366 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2367 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2368 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
2369 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
2370 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
2371 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2377 glusterfs_gfs4_0_op_mkdir_call(tvbuff_t
*tvb
,
2378 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
2381 const char *name
= NULL
;
2383 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2384 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
2385 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
2386 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
2387 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2388 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
2394 glusterfs_gfs4_0_op_readlink_reply(tvbuff_t
*tvb
,
2395 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
2398 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2399 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
2401 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2403 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_path
, offset
,
2409 glusterfs_gfs4_0_op_readlink_call(tvbuff_t
*tvb
,
2410 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2413 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2414 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2415 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2420 /* glusterfs_gfs4_0_op_unlink_reply() is also used for ...rmdir_reply() */
2422 glusterfs_gfs4_0_op_common_2parent_iatt_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2423 proto_tree
*tree
, void* data
)
2427 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2428 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2429 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2430 hf_glusterfs_preparent_iattx
, offset
);
2431 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2432 hf_glusterfs_postparent_iattx
, offset
);
2438 glusterfs_gfs4_0_op_unlink_call(tvbuff_t
*tvb
,
2439 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2444 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2445 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
2446 xflags
= tvb_get_ntohl(tvb
, offset
);
2447 proto_tree_add_uint_format(tree
, hf_glusterfs_xflags
, tvb
, offset
, 4, xflags
, "Flags: 0%02o", xflags
);
2449 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2455 glusterfs_gfs4_0_op_rmdir_call(tvbuff_t
*tvb
,
2456 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2461 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2462 xflags
= tvb_get_ntohl(tvb
, offset
);
2463 proto_tree_add_uint_format(tree
, hf_glusterfs_xflags
, tvb
, offset
, 4, xflags
, "Flags: 0%02o", xflags
);
2465 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
2466 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2472 glusterfs_gfs4_0_op_symlink_call(tvbuff_t
*tvb
,
2473 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2477 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2478 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, NULL
);
2479 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
2481 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_linkname
, offset
, NULL
);
2482 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2488 glusterfs_gfs4_0_op_rename_call(tvbuff_t
*tvb
,
2489 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2493 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_oldgfid
, offset
);
2494 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_newgfid
, offset
);
2495 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_oldbname
, offset
, NULL
);
2496 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_newbname
, offset
, NULL
);
2497 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2503 glusterfs_gfs4_0_op_rename_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2504 proto_tree
*tree
, void* data
)
2506 proto_tree
*old_tree
, *new_tree
;
2507 proto_item
*old_item
, *new_item
;
2511 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2512 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2513 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2516 start_offset
= offset
;
2517 old_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1,
2518 ett_glusterfs_parent_iatt
, &old_item
, "Old parent");
2519 offset
= glusterfs_rpc_dissect_gfx_iatt(old_tree
, tvb
,
2520 hf_glusterfs_preparent_iattx
, offset
);
2521 offset
= glusterfs_rpc_dissect_gfx_iatt(old_tree
, tvb
,
2522 hf_glusterfs_postparent_iattx
, offset
);
2523 proto_item_set_len (old_item
, offset
- start_offset
);
2525 start_offset
= offset
;
2526 new_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_glusterfs_parent_iatt
, &new_item
, "New parent");
2527 offset
= glusterfs_rpc_dissect_gfx_iatt(new_tree
, tvb
,
2528 hf_glusterfs_preparent_iattx
, offset
);
2529 offset
= glusterfs_rpc_dissect_gfx_iatt(new_tree
, tvb
,
2530 hf_glusterfs_postparent_iattx
, offset
);
2531 proto_item_set_len (new_item
, offset
- start_offset
);
2537 glusterfs_gfs4_0_op_link_call(tvbuff_t
*tvb
,
2538 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2542 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_oldgfid
, offset
);
2543 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_newgfid
, offset
);
2544 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_newbname
, offset
, NULL
);
2545 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2551 glusterfs_gfs4_0_op_truncate_call(tvbuff_t
*tvb
,
2552 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2556 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2557 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2558 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2564 glusterfs_gfs4_0_op_open_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2565 proto_tree
*tree
, void* data
)
2569 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2570 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2571 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2576 glusterfs_gfs4_0_op_open_call(tvbuff_t
*tvb
,
2577 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2580 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2581 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2582 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2588 glusterfs_gfs4_0_op_read_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2589 proto_tree
*tree
, void* data
)
2593 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2594 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2596 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2597 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
,
2604 glusterfs_gfs4_0_op_read_call(tvbuff_t
*tvb
,
2605 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2609 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2610 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2611 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2612 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2613 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2614 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2620 glusterfs_gfs4_0_op_write_call(tvbuff_t
*tvb
,
2621 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2625 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2626 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2627 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2628 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2629 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2630 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2636 glusterfs_gfs4_0_op_statfs_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2637 proto_tree
*tree
, void* data
)
2641 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2642 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2643 offset
= glusterfs_rpc_dissect_statfs(tree
, tvb
, offset
);
2649 glusterfs_gfs4_0_op_statfs_call(tvbuff_t
*tvb
,
2650 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2654 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2655 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2661 glusterfs_gfs4_0_op_flush_call(tvbuff_t
*tvb
,
2662 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2666 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2667 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2668 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2674 glusterfs_gfs4_0_op_setxattr_call(tvbuff_t
*tvb
,
2675 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2679 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2680 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2681 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2682 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2688 glusterfs_gfs4_0_op_getxattr_call(tvbuff_t
*tvb
,
2689 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2693 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2694 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_namelen
, offset
);
2695 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2696 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2703 glusterfs_gfs4_0_op_common_dict_reply(tvbuff_t
*tvb
,
2704 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
2708 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2709 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2710 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2711 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2712 hf_glusterfs_preop_iattx
, offset
);
2713 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2714 hf_glusterfs_postop_iattx
, offset
);
2720 glusterfs_gfs4_0_op_removexattr_call(tvbuff_t
*tvb
,
2721 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2725 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2726 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2727 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2733 glusterfs_gfs4_0_op_fsync_call(tvbuff_t
*tvb
,
2734 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2736 static int * const flag_bits
[] = {
2737 &hf_glusterfs_fsync_flag_datasync
,
2738 &hf_glusterfs_fsync_flag_unknown
,
2743 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2744 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2746 proto_tree_add_bitmask(tree
, tvb
, offset
,
2747 hf_glusterfs_fsync_flags
,
2748 ett_glusterfs_fsync_flags
, flag_bits
, ENC_NA
);
2751 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2757 glusterfs_gfs4_0_op_opendir_call(tvbuff_t
*tvb
,
2758 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2761 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2762 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2768 glusterfs_gfs4_0_op_create_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
2769 proto_tree
*tree
, void* data
)
2773 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2774 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2775 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
2777 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2778 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2779 hf_glusterfs_preparent_iattx
, offset
);
2780 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
2781 hf_glusterfs_postparent_iattx
, offset
);
2788 glusterfs_gfs4_0_op_create_call(tvbuff_t
*tvb
,
2789 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
2791 const char *name
= NULL
;
2794 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2795 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2796 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_mode
, offset
);
2797 offset
= glusterfs_rpc_dissect_mode(tree
, tvb
, hf_glusterfs_umask
, offset
);
2798 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
2799 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2800 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
2806 glusterfs_gfs4_0_op_ftruncate_call(tvbuff_t
*tvb
,
2807 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2811 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2812 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2813 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2814 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2820 glusterfs_gfs4_0_op_fstat_call(tvbuff_t
*tvb
,
2821 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2825 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2826 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2827 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2833 glusterfs_gfs4_0_op_lk_call(tvbuff_t
*tvb
,
2834 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2838 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2839 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2840 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2841 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2842 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2843 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2849 glusterfs_gfs4_0_op_lk_reply(tvbuff_t
*tvb
,
2850 packet_info
*pinfo
, proto_tree
*tree
, void* data
)
2854 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
2855 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2856 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2862 glusterfs_gfs4_0_op_access_call(tvbuff_t
*tvb
,
2863 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2867 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2868 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_mask
, offset
);
2869 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2874 glusterfs_gfs4_0_op_lookup_call(tvbuff_t
*tvb
,
2875 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
2877 const char *name
= NULL
;
2881 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2882 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_pargfid
, offset
);
2883 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
2884 length
= tvb_get_letohl(tvb
, offset
);
2885 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_bname
, offset
, &name
);
2886 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2888 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Filename: (nameless, by GFID)");
2890 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Filename: %s", name
);
2896 glusterfs_gfs4_0_op_readdir_reply(tvbuff_t
*tvb
,
2897 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
2901 offset
= _glusterfs_gfs3_common_readdir_reply(tvb
, tree
, offset
);
2902 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2903 offset
= dissect_rpc_list(tvb
, pinfo
, tree
, offset
,
2904 glusterfs_gfs4_0_op_readdir_entry
, NULL
);
2910 glusterfs_gfs4_0_op_readdir_call(tvbuff_t
*tvb
,
2911 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2915 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2916 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2917 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
2918 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
2919 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2925 glusterfs_gfs4_0_op_inodelk_call(tvbuff_t
*tvb
,
2926 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2930 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2931 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2932 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2933 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2934 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2935 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2941 glusterfs_gfs4_0_op_finodelk_call(tvbuff_t
*tvb
,
2942 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2946 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2947 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2949 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2950 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2951 offset
= glusterfs_rpc_dissect_gf_2_flock(tree
, tvb
, offset
);
2953 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2954 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2960 glusterfs_gfs4_0_op_entrylk_call(tvbuff_t
*tvb
,
2961 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2965 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2966 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2967 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2968 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_entrylk_namelen
, offset
);
2969 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2970 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2971 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2977 glusterfs_gfs4_0_op_fentrylk_call(tvbuff_t
*tvb
,
2978 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
2982 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
2983 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
2984 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_cmd
, offset
);
2985 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_type
, offset
);
2986 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_entrylk_namelen
, offset
);
2987 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
2988 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_volume
, offset
, NULL
);
2989 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
2995 glusterfs_gfs4_0_op_xattrop_call(tvbuff_t
*tvb
,
2996 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3000 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3001 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
3002 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3003 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3009 glusterfs_gfs4_0_op_fxattrop_call(tvbuff_t
*tvb
,
3010 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3014 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3015 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
3016 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3017 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3018 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3024 glusterfs_gfs4_0_op_fgetxattr_call(tvbuff_t
*tvb
,
3025 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3029 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3030 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3031 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_namelen
, offset
);
3032 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
3033 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3039 gluter_gfs4_0_op_fsetxattr_call(tvbuff_t
*tvb
,
3040 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3044 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3045 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3046 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
3047 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3048 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3054 glusterfs_gfs4_0_op_common_2iatt_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
3055 proto_tree
*tree
, void* data
)
3059 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
3060 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3061 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
3062 hf_glusterfs_preop_iattx
, offset
);
3063 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
,
3064 hf_glusterfs_postop_iattx
, offset
);
3070 glusterfs_gfs4_0_op_setattr_call(tvbuff_t
*tvb
,
3071 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3075 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
,
3077 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
3079 offset
= glusterfs_rpc_dissect_setattr(tree
, tvb
, offset
);
3080 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3086 glusterfs_gfs4_0_op_fsetattr_call(tvbuff_t
*tvb
,
3087 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3091 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
,
3093 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3094 offset
= glusterfs_rpc_dissect_gfx_iatt(tree
, tvb
, hf_glusterfs_iattx
,
3096 offset
= glusterfs_rpc_dissect_setattr(tree
, tvb
, offset
);
3097 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3103 glusterfs_gfs4_0_op_readdirp_reply(tvbuff_t
*tvb
,
3104 packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
3108 offset
= _glusterfs_gfs3_common_readdir_reply(tvb
, tree
, offset
);
3109 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3110 offset
= dissect_rpc_list(tvb
, pinfo
, tree
, offset
,
3111 glusterfs_gfs4_0_op_readdirp_entry
, NULL
);
3116 /* READDIRP and DISCARD both use this */
3118 glusterfs_gfs4_0_op_readdirp_call(tvbuff_t
*tvb
,
3119 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3123 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3124 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3125 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
3126 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
3127 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3133 glusterfs_gfs4_0_op_release_call(tvbuff_t
*tvb
,
3134 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3138 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3139 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3140 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3146 glusterfs_gfs4_0_op_releasedir_call(tvbuff_t
*tvb
,
3147 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3151 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3152 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3153 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3159 glusterfs_gfs4_0_op_fremovexattr_call(tvbuff_t
*tvb
,
3160 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3164 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3165 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3166 offset
= dissect_rpc_string(tvb
, tree
, hf_glusterfs_name
, offset
, NULL
);
3167 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3173 glusterfs_gfs4_0_op_fallocate_call(tvbuff_t
*tvb
,
3174 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3178 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3179 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3180 offset
= glusterfs_rpc_dissect_flags(tree
, tvb
, offset
);
3181 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
3182 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_size
, offset
);
3183 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3189 glusterfs_gfs4_0_op_zerofill_call(tvbuff_t
*tvb
,
3190 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
3194 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3195 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3196 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
3197 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_size64
, offset
);
3203 glusterfs_gfs4_0_op_seek_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
3204 proto_tree
*tree
, void* data
)
3208 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
3209 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3210 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
3216 glusterfs_gfs4_0_op_seek_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
3217 proto_tree
*tree
, void* data _U_
)
3221 offset
= glusterfs_rpc_dissect_gfid(tree
, tvb
, hf_glusterfs_gfid
, offset
);
3222 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_fd
, offset
);
3223 offset
= dissect_rpc_uint64(tvb
, tree
, hf_glusterfs_offset
, offset
);
3224 offset
= dissect_rpc_uint32(tvb
, tree
, hf_glusterfs_whence
, offset
);
3225 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3230 /* This function is for common replay. RELEASE , RELEASEDIR and some other function use this method */
3233 glusterfs_gfs4_0_op_common_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
3234 proto_tree
*tree
, void* data
)
3238 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
3239 offset
= gluster_rpc4_0_dissect_dict(tree
, tvb
, hf_glusterfs_dict
, offset
);
3246 * GLUSTER3_1_FOP_PROGRAM
3247 * - xlators/protocol/client/src/client3_1-fops.c
3248 * - xlators/protocol/server/src/server3_1-fops.c
3250 static const vsff glusterfs3_1_fop_proc
[] = {
3252 GFS3_OP_NULL
, "NULL",
3253 dissect_rpc_void
, dissect_rpc_void
3255 { GFS3_OP_STAT
, "STAT", dissect_rpc_unknown
, dissect_rpc_unknown
},
3256 { GFS3_OP_READLINK
, "READLINK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3257 { GFS3_OP_MKNOD
, "MKNOD", dissect_rpc_unknown
, dissect_rpc_unknown
},
3258 { GFS3_OP_MKDIR
, "MKDIR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3260 GFS3_OP_UNLINK
, "UNLINK",
3261 glusterfs_gfs3_op_unlink_call
, glusterfs_gfs3_op_unlink_reply
3263 { GFS3_OP_RMDIR
, "RMDIR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3264 { GFS3_OP_SYMLINK
, "SYMLINK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3265 { GFS3_OP_RENAME
, "RENAME", dissect_rpc_unknown
, dissect_rpc_unknown
},
3266 { GFS3_OP_LINK
, "LINK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3267 { GFS3_OP_TRUNCATE
, "TRUNCATE", dissect_rpc_unknown
, dissect_rpc_unknown
},
3268 { GFS3_OP_OPEN
, "OPEN", dissect_rpc_unknown
, dissect_rpc_unknown
},
3269 { GFS3_OP_READ
, "READ", dissect_rpc_unknown
, dissect_rpc_unknown
},
3270 { GFS3_OP_WRITE
, "WRITE", dissect_rpc_unknown
, dissect_rpc_unknown
},
3272 GFS3_OP_STATFS
, "STATFS",
3273 glusterfs_gfs3_op_statfs_call
, glusterfs_gfs3_op_statfs_reply
3276 GFS3_OP_FLUSH
, "FLUSH",
3277 glusterfs_gfs3_op_flush_call
, gluster_local_dissect_common_reply
3279 { GFS3_OP_FSYNC
, "FSYNC", dissect_rpc_unknown
, dissect_rpc_unknown
},
3281 GFS3_OP_SETXATTR
, "SETXATTR",
3282 glusterfs_gfs3_op_setxattr_call
, gluster_local_dissect_common_reply
3284 { GFS3_OP_GETXATTR
, "GETXATTR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3285 { GFS3_OP_REMOVEXATTR
, "REMOVEXATTR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3287 GFS3_OP_OPENDIR
, "OPENDIR",
3288 glusterfs_gfs3_op_opendir_call
, glusterfs_gfs3_op_opendir_reply
3290 { GFS3_OP_FSYNCDIR
, "FSYNCDIR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3291 { GFS3_OP_ACCESS
, "ACCESS", dissect_rpc_unknown
, dissect_rpc_unknown
},
3293 GFS3_OP_CREATE
, "CREATE",
3294 glusterfs_gfs3_op_create_call
, glusterfs_gfs3_op_create_reply
3296 { GFS3_OP_FTRUNCATE
, "FTRUNCATE", dissect_rpc_unknown
, dissect_rpc_unknown
},
3297 { GFS3_OP_FSTAT
, "FSTAT", dissect_rpc_unknown
, dissect_rpc_unknown
},
3298 { GFS3_OP_LK
, "LK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3300 GFS3_OP_LOOKUP
, "LOOKUP",
3301 glusterfs_gfs3_op_lookup_call
, glusterfs_gfs3_op_lookup_reply
3303 { GFS3_OP_READDIR
, "READDIR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3305 GFS3_OP_INODELK
, "INODELK",
3306 glusterfs_gfs3_op_inodelk_call
, gluster_local_dissect_common_reply
3308 { GFS3_OP_FINODELK
, "FINODELK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3309 { GFS3_OP_ENTRYLK
, "ENTRYLK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3310 { GFS3_OP_FENTRYLK
, "FENTRYLK", dissect_rpc_unknown
, dissect_rpc_unknown
},
3311 { GFS3_OP_XATTROP
, "XATTROP", dissect_rpc_unknown
, dissect_rpc_unknown
},
3312 { GFS3_OP_FXATTROP
, "FXATTROP", dissect_rpc_unknown
, dissect_rpc_unknown
},
3313 { GFS3_OP_FGETXATTR
, "FGETXATTR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3314 { GFS3_OP_FSETXATTR
, "FSETXATTR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3315 { GFS3_OP_RCHECKSUM
, "RCHECKSUM", dissect_rpc_unknown
, dissect_rpc_unknown
},
3317 GFS3_OP_SETATTR
, "SETATTR",
3318 glusterfs_gfs3_op_setattr_call
, glusterfs_gfs3_op_setattr_reply
3321 GFS3_OP_FSETATTR
, "FSETATTR",
3322 /* SETATTR and SETFATTS calls and reply are encoded the same */
3323 glusterfs_gfs3_op_setattr_call
, glusterfs_gfs3_op_setattr_reply
3326 GFS3_OP_READDIRP
, "READDIRP",
3327 glusterfs_gfs3_op_readdirp_call
, glusterfs_gfs3_op_readdirp_reply
3329 { GFS3_OP_RELEASE
, "RELEASE", dissect_rpc_unknown
, dissect_rpc_unknown
},
3330 { GFS3_OP_RELEASEDIR
, "RELEASEDIR", dissect_rpc_unknown
, dissect_rpc_unknown
},
3331 { 0, NULL
, NULL
, NULL
}
3336 * GLUSTER3_1_FOP_PROGRAM for 3_3
3337 * - xlators/protocol/client/src/client3_1-fops.c
3338 * - xlators/protocol/server/src/server3_1-fops.c
3340 static const vsff glusterfs3_3_fop_proc
[] = {
3342 GFS3_OP_NULL
, "NULL",
3343 dissect_rpc_void
, dissect_rpc_void
3346 GFS3_OP_STAT
, "STAT",
3347 glusterfs_gfs3_3_op_stat_call
, glusterfs_gfs3_3_op_stat_reply
3350 GFS3_OP_READLINK
, "READLINK",
3351 glusterfs_gfs3_3_op_readlink_call
, glusterfs_gfs3_3_op_readlink_reply
3354 GFS3_OP_MKNOD
, "MKNOD",
3355 glusterfs_gfs3_3_op_mknod_call
, glusterfs_gfs3_3_op_mknod_reply
3358 GFS3_OP_MKDIR
, "MKDIR",
3359 glusterfs_gfs3_3_op_mkdir_call
, glusterfs_gfs3_3_op_mknod_reply
3362 GFS3_OP_UNLINK
, "UNLINK",
3363 glusterfs_gfs3_3_op_unlink_call
, glusterfs_gfs3_3_op_unlink_reply
3366 GFS3_OP_RMDIR
, "RMDIR",
3367 glusterfs_gfs3_3_op_rmdir_call
, glusterfs_gfs3_3_op_unlink_reply
3370 GFS3_OP_SYMLINK
, "SYMLINK",
3371 glusterfs_gfs3_3_op_symlink_call
, glusterfs_gfs3_3_op_mknod_reply
3374 GFS3_OP_RENAME
, "RENAME",
3375 glusterfs_gfs3_3_op_rename_call
, glusterfs_gfs3_3_op_rename_reply
3378 GFS3_OP_LINK
, "LINK",
3379 glusterfs_gfs3_3_op_link_call
, glusterfs_gfs3_3_op_mknod_reply
3382 GFS3_OP_TRUNCATE
, "TRUNCATE",
3383 glusterfs_gfs3_3_op_truncate_call
, glusterfs_gfs3_3_op_unlink_reply
3386 GFS3_OP_OPEN
, "OPEN",
3387 glusterfs_gfs3_3_op_open_call
, glusterfs_gfs3_3_op_open_reply
3390 GFS3_OP_READ
, "READ",
3391 glusterfs_gfs3_3_op_read_call
, glusterfs_gfs3_3_op_read_reply
3394 GFS3_OP_WRITE
, "WRITE",
3395 glusterfs_gfs3_3_op_write_call
, glusterfs_gfs3_3_op_setattr_reply
3398 GFS3_OP_STATFS
, "STATFS",
3399 glusterfs_gfs3_3_op_statfs_call
, glusterfs_gfs3_3_op_statfs_reply
3402 GFS3_OP_FLUSH
, "FLUSH",
3403 glusterfs_gfs3_3_op_flush_call
, glusterfs_gfs3_3_op_common_reply
3406 GFS3_OP_FSYNC
, "FSYNC",
3407 glusterfs_gfs3_3_op_fsync_call
, glusterfs_gfs3_3_op_setattr_reply
3410 GFS3_OP_SETXATTR
, "SETXATTR",
3411 glusterfs_gfs3_3_op_setxattr_call
, glusterfs_gfs3_3_op_common_reply
3414 GFS3_OP_GETXATTR
, "GETXATTR",
3415 glusterfs_gfs3_3_op_getxattr_call
, glusterfs_gfs3_3_op_getxattr_reply
3418 GFS3_OP_REMOVEXATTR
, "REMOVEXATTR",
3419 glusterfs_gfs3_3_op_removexattr_call
, glusterfs_gfs3_3_op_common_reply
3422 GFS3_OP_OPENDIR
, "OPENDIR",
3423 glusterfs_gfs3_3_op_opendir_call
, glusterfs_gfs3_3_op_opendir_reply
3426 GFS3_OP_FSYNCDIR
, "FSYNCDIR",
3427 glusterfs_gfs3_3_op_fsync_call
, glusterfs_gfs3_3_op_common_reply
3430 GFS3_OP_ACCESS
, "ACCESS",
3431 glusterfs_gfs3_3_op_access_call
, glusterfs_gfs3_3_op_common_reply
3434 GFS3_OP_CREATE
, "CREATE",
3435 glusterfs_gfs3_3_op_create_call
, glusterfs_gfs3_3_op_create_reply
3438 GFS3_OP_FTRUNCATE
, "FTRUNCATE",
3439 glusterfs_gfs3_3_op_ftruncate_call
, glusterfs_gfs3_3_op_unlink_reply
3442 GFS3_OP_FSTAT
, "FSTAT",
3443 glusterfs_gfs3_3_op_fstat_call
, glusterfs_gfs3_3_op_fstat_reply
3447 glusterfs_gfs3_3_op_lk_call
, glusterfs_gfs3_3_op_lk_reply
3450 GFS3_OP_LOOKUP
, "LOOKUP",
3451 glusterfs_gfs3_3_op_lookup_call
, glusterfs_gfs3_3_op_setattr_reply
3454 GFS3_OP_READDIR
, "READDIR",
3455 glusterfs_gfs3_3_op_readdir_call
, glusterfs_gfs3_3_op_readdir_reply
3458 GFS3_OP_INODELK
, "INODELK",
3459 glusterfs_gfs3_3_op_inodelk_call
, glusterfs_gfs3_3_op_common_reply
3462 GFS3_OP_FINODELK
, "FINODELK",
3463 glusterfs_gfs3_3_op_finodelk_call
, glusterfs_gfs3_3_op_common_reply
3466 GFS3_OP_ENTRYLK
, "ENTRYLK",
3467 glusterfs_gfs3_3_op_entrylk_call
, glusterfs_gfs3_3_op_common_reply
3470 GFS3_OP_FENTRYLK
, "FENTRYLK",
3471 glusterfs_gfs3_3_op_fentrylk_call
, glusterfs_gfs3_3_op_common_reply
3474 GFS3_OP_XATTROP
, "XATTROP",
3475 glusterfs_gfs3_3_op_xattrop_call
, glusterfs_gfs3_3_op_xattrop_reply
3477 /*xattrop and fxattrop replay both are same */
3479 GFS3_OP_FXATTROP
, "FXATTROP",
3480 glusterfs_gfs3_3_op_fxattrop_call
, glusterfs_gfs3_3_op_xattrop_reply
3483 GFS3_OP_FGETXATTR
, "FGETXATTR",
3484 glusterfs_gfs3_3_op_fgetxattr_call
, glusterfs_gfs3_3_op_xattrop_reply
3487 GFS3_OP_FSETXATTR
, "FSETXATTR",
3488 gluter_gfs3_3_op_fsetxattr_call
, glusterfs_gfs3_3_op_common_reply
3490 { GFS3_OP_RCHECKSUM
, "RCHECKSUM", dissect_rpc_unknown
, dissect_rpc_unknown
},
3492 GFS3_OP_SETATTR
, "SETATTR",
3493 glusterfs_gfs3_3_op_setattr_call
, glusterfs_gfs3_3_op_setattr_reply
3496 GFS3_OP_FSETATTR
, "FSETATTR",
3497 /* SETATTR and SETFATTS calls and reply are encoded the same */
3498 glusterfs_gfs3_3_op_setattr_call
, glusterfs_gfs3_3_op_setattr_reply
3501 GFS3_OP_READDIRP
, "READDIRP",
3502 glusterfs_gfs3_3_op_readdirp_call
, glusterfs_gfs3_3_op_readdirp_reply
3505 GFS3_OP_RELEASE
, "RELEASE",
3506 glusterfs_gfs3_3_op_release_call
, glusterfs_gfs3_3_op_common_reply
3509 GFS3_OP_RELEASEDIR
, "RELEASEDIR",
3510 glusterfs_gfs3_3_op_releasedir_call
, glusterfs_gfs3_3_op_common_reply
3513 GFS3_OP_FREMOVEXATTR
, "FREMOVEXATTR",
3514 glusterfs_gfs3_3_op_fremovexattr_call
, glusterfs_gfs3_3_op_common_reply
3517 GFS3_OP_FALLOCATE
, "FALLOCATE",
3518 glusterfs_gfs3_3_op_fallocate_call
, glusterfs_gfs3_3_op_setattr_reply
3521 GFS3_OP_DISCARD
, "DISCARD",
3522 glusterfs_gfs3_3_op_readdirp_call
, glusterfs_gfs3_3_op_setattr_reply
3525 GFS3_OP_ZEROFILL
, "ZEROFILL",
3526 glusterfs_gfs3_3_op_zerofill_call
, glusterfs_gfs3_3_op_setattr_reply
3529 GFS3_OP_SEEK
, "SEEK",
3530 glusterfs_gfs3_3_op_seek_call
, glusterfs_gfs3_3_op_seek_reply
3532 { 0, NULL
, NULL
, NULL
}
3537 * GLUSTER4_0_FOP_PROGRAM for 4_0
3538 * - xlators/protocol/client/src/client-rpc-fops_v2.c
3539 * - xlators/protocol/server/src/server-rpc-fops_v2.c
3541 static const vsff glusterfs4_0_fop_proc
[] = {
3543 GFS3_OP_NULL
, "NULL",
3544 dissect_rpc_void
, dissect_rpc_void
3547 GFS3_OP_STAT
, "STAT",
3548 glusterfs_gfs4_0_op_stat_call
, glusterfs_gfs4_0_op_common_iatt_reply
3551 GFS3_OP_READLINK
, "READLINK",
3552 glusterfs_gfs4_0_op_readlink_call
, glusterfs_gfs4_0_op_readlink_reply
3555 GFS3_OP_MKNOD
, "MKNOD",
3556 glusterfs_gfs4_0_op_mknod_call
, glusterfs_gfs4_0_op_common_3iatt_reply
3559 GFS3_OP_MKDIR
, "MKDIR",
3560 glusterfs_gfs4_0_op_mkdir_call
, glusterfs_gfs4_0_op_common_3iatt_reply
3563 GFS3_OP_UNLINK
, "UNLINK",
3564 glusterfs_gfs4_0_op_unlink_call
, glusterfs_gfs4_0_op_common_2parent_iatt_reply
3567 GFS3_OP_RMDIR
, "RMDIR",
3568 glusterfs_gfs4_0_op_rmdir_call
, glusterfs_gfs4_0_op_common_2parent_iatt_reply
3571 GFS3_OP_SYMLINK
, "SYMLINK",
3572 glusterfs_gfs4_0_op_symlink_call
, glusterfs_gfs4_0_op_common_3iatt_reply
3575 GFS3_OP_RENAME
, "RENAME",
3576 glusterfs_gfs4_0_op_rename_call
, glusterfs_gfs4_0_op_rename_reply
3579 GFS3_OP_LINK
, "LINK",
3580 glusterfs_gfs4_0_op_link_call
, glusterfs_gfs4_0_op_common_3iatt_reply
3583 GFS3_OP_TRUNCATE
, "TRUNCATE",
3584 glusterfs_gfs4_0_op_truncate_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3587 GFS3_OP_OPEN
, "OPEN",
3588 glusterfs_gfs4_0_op_open_call
, glusterfs_gfs4_0_op_open_reply
3591 GFS3_OP_READ
, "READ",
3592 glusterfs_gfs4_0_op_read_call
, glusterfs_gfs4_0_op_read_reply
3595 GFS3_OP_WRITE
, "WRITE",
3596 glusterfs_gfs4_0_op_write_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3599 GFS3_OP_STATFS
, "STATFS",
3600 glusterfs_gfs4_0_op_statfs_call
, glusterfs_gfs4_0_op_statfs_reply
3603 GFS3_OP_FLUSH
, "FLUSH",
3604 glusterfs_gfs4_0_op_flush_call
, glusterfs_gfs4_0_op_common_reply
3607 GFS3_OP_FSYNC
, "FSYNC",
3608 glusterfs_gfs4_0_op_fsync_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3611 GFS3_OP_SETXATTR
, "SETXATTR",
3612 glusterfs_gfs4_0_op_setxattr_call
, glusterfs_gfs4_0_op_common_reply
3615 GFS3_OP_GETXATTR
, "GETXATTR",
3616 glusterfs_gfs4_0_op_getxattr_call
, glusterfs_gfs4_0_op_common_dict_reply
3619 GFS3_OP_REMOVEXATTR
, "REMOVEXATTR",
3620 glusterfs_gfs4_0_op_removexattr_call
, glusterfs_gfs4_0_op_common_reply
3623 GFS3_OP_OPENDIR
, "OPENDIR",
3624 glusterfs_gfs4_0_op_opendir_call
, glusterfs_gfs4_0_op_open_reply
3627 GFS3_OP_FSYNCDIR
, "FSYNCDIR",
3628 glusterfs_gfs4_0_op_fsync_call
, glusterfs_gfs4_0_op_common_reply
3631 GFS3_OP_ACCESS
, "ACCESS",
3632 glusterfs_gfs4_0_op_access_call
, glusterfs_gfs4_0_op_common_reply
3635 GFS3_OP_CREATE
, "CREATE",
3636 glusterfs_gfs4_0_op_create_call
, glusterfs_gfs4_0_op_create_reply
3639 GFS3_OP_FTRUNCATE
, "FTRUNCATE",
3640 glusterfs_gfs4_0_op_ftruncate_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3643 GFS3_OP_FSTAT
, "FSTAT",
3644 glusterfs_gfs4_0_op_fstat_call
, glusterfs_gfs4_0_op_common_iatt_reply
3648 glusterfs_gfs4_0_op_lk_call
, glusterfs_gfs4_0_op_lk_reply
3651 GFS3_OP_LOOKUP
, "LOOKUP",
3652 glusterfs_gfs4_0_op_lookup_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3655 GFS3_OP_READDIR
, "READDIR",
3656 glusterfs_gfs4_0_op_readdir_call
, glusterfs_gfs4_0_op_readdir_reply
3659 GFS3_OP_INODELK
, "INODELK",
3660 glusterfs_gfs4_0_op_inodelk_call
, glusterfs_gfs4_0_op_common_reply
3663 GFS3_OP_FINODELK
, "FINODELK",
3664 glusterfs_gfs4_0_op_finodelk_call
, glusterfs_gfs4_0_op_common_reply
3667 GFS3_OP_ENTRYLK
, "ENTRYLK",
3668 glusterfs_gfs4_0_op_entrylk_call
, glusterfs_gfs4_0_op_common_reply
3671 GFS3_OP_FENTRYLK
, "FENTRYLK",
3672 glusterfs_gfs4_0_op_fentrylk_call
, glusterfs_gfs4_0_op_common_reply
3675 GFS3_OP_XATTROP
, "XATTROP",
3676 glusterfs_gfs4_0_op_xattrop_call
, glusterfs_gfs4_0_op_common_dict_reply
3678 /*xattrop and fxattrop replay both are same */
3680 GFS3_OP_FXATTROP
, "FXATTROP",
3681 glusterfs_gfs4_0_op_fxattrop_call
, glusterfs_gfs4_0_op_common_dict_reply
3684 GFS3_OP_FGETXATTR
, "FGETXATTR",
3685 glusterfs_gfs4_0_op_fgetxattr_call
, glusterfs_gfs4_0_op_common_dict_reply
3688 GFS3_OP_FSETXATTR
, "FSETXATTR",
3689 gluter_gfs4_0_op_fsetxattr_call
, glusterfs_gfs4_0_op_common_reply
3691 { GFS3_OP_RCHECKSUM
, "RCHECKSUM", dissect_rpc_unknown
, dissect_rpc_unknown
},
3693 GFS3_OP_SETATTR
, "SETATTR",
3694 glusterfs_gfs4_0_op_setattr_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3697 GFS3_OP_FSETATTR
, "FSETATTR",
3698 /* SETATTR and SETFATTS calls and reply are encoded the same */
3699 glusterfs_gfs4_0_op_fsetattr_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3702 GFS3_OP_READDIRP
, "READDIRP",
3703 glusterfs_gfs4_0_op_readdirp_call
, glusterfs_gfs4_0_op_readdirp_reply
3706 GFS3_OP_RELEASE
, "RELEASE",
3707 glusterfs_gfs4_0_op_release_call
, glusterfs_gfs4_0_op_common_reply
3710 GFS3_OP_RELEASEDIR
, "RELEASEDIR",
3711 glusterfs_gfs4_0_op_releasedir_call
, glusterfs_gfs4_0_op_common_reply
3714 GFS3_OP_FREMOVEXATTR
, "FREMOVEXATTR",
3715 glusterfs_gfs4_0_op_fremovexattr_call
, glusterfs_gfs4_0_op_common_reply
3718 GFS3_OP_FALLOCATE
, "FALLOCATE",
3719 glusterfs_gfs4_0_op_fallocate_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3722 GFS3_OP_DISCARD
, "DISCARD",
3723 glusterfs_gfs4_0_op_readdirp_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3726 GFS3_OP_ZEROFILL
, "ZEROFILL",
3727 glusterfs_gfs4_0_op_zerofill_call
, glusterfs_gfs4_0_op_common_2iatt_reply
3730 GFS3_OP_SEEK
, "SEEK",
3731 glusterfs_gfs4_0_op_seek_call
, glusterfs_gfs4_0_op_seek_reply
3733 { 0, NULL
, NULL
, NULL
}
3737 static const rpc_prog_vers_info glusterfs_vers_info
[] = {
3738 { 310, glusterfs3_1_fop_proc
, &hf_glusterfs_proc
},
3739 { 330, glusterfs3_3_fop_proc
, &hf_glusterfs_proc
},
3740 { 400, glusterfs4_0_fop_proc
, &hf_glusterfs_proc
},
3744 static const value_string glusterfs3_1_fop_proc_vals
[] = {
3745 { GFS3_OP_NULL
, "NULL" },
3746 { GFS3_OP_STAT
, "STAT" },
3747 { GFS3_OP_READLINK
, "READLINK" },
3748 { GFS3_OP_MKNOD
, "MKNOD" },
3749 { GFS3_OP_MKDIR
, "MKDIR" },
3750 { GFS3_OP_UNLINK
, "UNLINK" },
3751 { GFS3_OP_RMDIR
, "RMDIR" },
3752 { GFS3_OP_SYMLINK
, "SYMLINK" },
3753 { GFS3_OP_RENAME
, "RENAME" },
3754 { GFS3_OP_LINK
, "LINK" },
3755 { GFS3_OP_TRUNCATE
, "TRUNCATE" },
3756 { GFS3_OP_OPEN
, "OPEN" },
3757 { GFS3_OP_READ
, "READ" },
3758 { GFS3_OP_WRITE
, "WRITE" },
3759 { GFS3_OP_STATFS
, "STATFS" },
3760 { GFS3_OP_FLUSH
, "FLUSH" },
3761 { GFS3_OP_FSYNC
, "FSYNC" },
3762 { GFS3_OP_SETXATTR
, "SETXATTR" },
3763 { GFS3_OP_GETXATTR
, "GETXATTR" },
3764 { GFS3_OP_REMOVEXATTR
, "REMOVEXATTR" },
3765 { GFS3_OP_OPENDIR
, "OPENDIR" },
3766 { GFS3_OP_FSYNCDIR
, "FSYNCDIR" },
3767 { GFS3_OP_ACCESS
, "ACCESS" },
3768 { GFS3_OP_CREATE
, "CREATE" },
3769 { GFS3_OP_FTRUNCATE
, "FTRUNCATE" },
3770 { GFS3_OP_FSTAT
, "FSTAT" },
3771 { GFS3_OP_LK
, "LK" },
3772 { GFS3_OP_LOOKUP
, "LOOKUP" },
3773 { GFS3_OP_READDIR
, "READDIR" },
3774 { GFS3_OP_INODELK
, "INODELK" },
3775 { GFS3_OP_FINODELK
, "FINODELK" },
3776 { GFS3_OP_ENTRYLK
, "ENTRYLK" },
3777 { GFS3_OP_FENTRYLK
, "FENTRYLK" },
3778 { GFS3_OP_XATTROP
, "XATTROP" },
3779 { GFS3_OP_FXATTROP
, "FXATTROP" },
3780 { GFS3_OP_FGETXATTR
, "FGETXATTR" },
3781 { GFS3_OP_FSETXATTR
, "FSETXATTR" },
3782 { GFS3_OP_RCHECKSUM
, "RCHECKSUM" },
3783 { GFS3_OP_SETATTR
, "SETATTR" },
3784 { GFS3_OP_FSETATTR
, "FSETATTR" },
3785 { GFS3_OP_READDIRP
, "READDIRP" },
3786 { GFS3_OP_FORGET
, "FORGET" },
3787 { GFS3_OP_RELEASE
, "RELEASE" },
3788 { GFS3_OP_RELEASEDIR
, "RELEASEDIR" },
3789 { GFS3_OP_FREMOVEXATTR
, "FREMOVEXATTR" },
3790 { GFS3_OP_FALLOCATE
, "FALLOCATE" },
3791 { GFS3_OP_DISCARD
, "DISCARD" },
3792 { GFS3_OP_ZEROFILL
, "ZEROFILL" },
3793 { GFS3_OP_IPC
, "IPC" },
3794 { GFS3_OP_SEEK
, "SEEK" },
3797 static value_string_ext glusterfs3_1_fop_proc_vals_ext
= VALUE_STRING_EXT_INIT(glusterfs3_1_fop_proc_vals
);
3799 /* dir-entry types */
3800 static const value_string glusterfs_entry_type_names
[] = {
3801 { GLUSTER_DT_UNKNOWN
, "DT_UNKNOWN" },
3802 { GLUSTER_DT_FIFO
, "DT_FIFO" },
3803 { GLUSTER_DT_CHR
, "DT_CHR" },
3804 { GLUSTER_DT_DIR
, "DT_DIR" },
3805 { GLUSTER_DT_BLK
, "DT_BLK" },
3806 { GLUSTER_DT_REG
, "DT_REG" },
3807 { GLUSTER_DT_LNK
, "DT_LNK" },
3808 { GLUSTER_DT_SOCK
, "DT_SOCK" },
3809 { GLUSTER_DT_WHT
, "DT_WHT" },
3812 static value_string_ext glusterfs_entry_type_names_ext
= VALUE_STRING_EXT_INIT(glusterfs_entry_type_names
);
3814 /* Normal locking commands */
3815 static const value_string glusterfs_lk_cmd_names
[] = {
3816 { GF_LK_GETLK
, "GF_LK_GETLK" },
3817 { GF_LK_SETLK
, "GF_LK_SETLK" },
3818 { GF_LK_SETLKW
, "GF_LK_SETLKW" },
3819 { GF_LK_RESLK_LCK
, "GF_LK_RESLK_LCK" },
3820 { GF_LK_RESLK_LCKW
, "GF_LK_RESLK_LCKW" },
3821 { GF_LK_RESLK_UNLCK
, "GF_LK_RESLK_UNLCK" },
3822 { GF_LK_GETLK_FD
, "GF_LK_GETLK_FD" },
3825 static value_string_ext glusterfs_lk_cmd_names_ext
= VALUE_STRING_EXT_INIT(glusterfs_lk_cmd_names
);
3827 /* Different lock types */
3828 static const value_string glusterfs_lk_type_names
[] = {
3829 { GF_LK_F_RDLCK
, "GF_LK_F_RDLCK" },
3830 { GF_LK_F_WRLCK
, "GF_LK_F_WRLCK" },
3831 { GF_LK_F_UNLCK
, "GF_LK_F_UNLCK" },
3832 { GF_LK_EOL
, "GF_LK_EOL" },
3836 static const value_string glusterfs_lk_whence
[] = {
3837 { GF_LK_SEEK_SET
, "SEEK_SET" },
3838 { GF_LK_SEEK_CUR
, "SEEK_CUR" },
3839 { GF_LK_SEEK_END
, "SEEK_END" },
3843 static const value_string glusterfs_seek_whence
[] = {
3844 { GF_SEEK_DATA
, "SEEK_DATA" },
3845 { GF_SEEK_HOLE
, "SEEK_HOLE" },
3850 proto_register_glusterfs(void)
3852 /* Setup list of header fields See Section 1.6.1 for details */
3853 static hf_register_info hf
[] = {
3855 { &hf_glusterfs_proc
,
3856 { "GlusterFS", "glusterfs.proc", FT_UINT32
, BASE_DEC
| BASE_EXT_STRING
,
3857 &glusterfs3_1_fop_proc_vals_ext
, 0, NULL
, HFILL
}
3859 /* fields used by multiple programs/procedures and other
3860 * Gluster dissectors with gluster_dissect_common_reply() */
3861 { &hf_gluster_op_ret
,
3862 { "Return value", "gluster.op_ret", FT_INT32
, BASE_DEC
,
3863 NULL
, 0, NULL
, HFILL
}
3865 { &hf_gluster_op_errno
,
3866 { "Errno", "gluster.op_errno", FT_INT32
, BASE_DEC
,
3867 NULL
, 0, NULL
, HFILL
}
3869 /* GlusterFS specific */
3870 { &hf_glusterfs_gfid
,
3871 { "GFID", "glusterfs.gfid", FT_GUID
,
3872 BASE_NONE
, NULL
, 0, NULL
, HFILL
}
3874 { &hf_glusterfs_pargfid
,
3875 { "Parent GFID", "glusterfs.pargfid", FT_GUID
,
3877 "GFID of the parent directory", HFILL
}
3879 { &hf_glusterfs_oldgfid
,
3880 { "Old GFID", "glusterfs.oldgfid", FT_GUID
,
3881 BASE_NONE
, NULL
, 0, NULL
, HFILL
}
3883 { &hf_glusterfs_newgfid
,
3884 { "New GFID", "glusterfs.newgfid", FT_GUID
,
3885 BASE_NONE
, NULL
, 0, NULL
, HFILL
}
3887 { &hf_glusterfs_path
,
3888 { "Path", "glusterfs.path", FT_STRING
, BASE_NONE
,
3889 NULL
, 0, NULL
, HFILL
}
3891 { &hf_glusterfs_bname
,
3892 { "Basename", "glusterfs.bname", FT_STRING
, BASE_NONE
,
3893 NULL
, 0, NULL
, HFILL
}
3895 { &hf_glusterfs_dict
,
3896 { "Dict", "glusterfs.dict", FT_STRING
, BASE_NONE
,
3897 NULL
, 0, NULL
, HFILL
}
3900 { "File Descriptor", "glusterfs.fd", FT_UINT64
, BASE_DEC
,
3901 NULL
, 0, NULL
, HFILL
}
3903 { &hf_glusterfs_offset
,
3904 { "Offset", "glusterfs.offset", FT_UINT64
, BASE_DEC
,
3905 NULL
, 0, NULL
, HFILL
}
3907 { &hf_glusterfs_size
,
3908 { "Size", "glusterfs.size", FT_UINT32
, BASE_DEC
,
3909 NULL
, 0, NULL
, HFILL
}
3911 { &hf_glusterfs_size64
,
3912 { "Size", "glusterfs.size64", FT_UINT64
, BASE_DEC
,
3913 NULL
, 0, NULL
, HFILL
}
3915 { &hf_glusterfs_type
,
3916 { "Type", "glusterfs.type", FT_INT32
, BASE_DEC
,
3917 VALS(glusterfs_lk_type_names
), 0, NULL
, HFILL
}
3919 { &hf_glusterfs_cmd
,
3920 { "Command", "glusterfs.cmd", FT_INT32
, BASE_DEC
| BASE_EXT_STRING
,
3921 &glusterfs_lk_cmd_names_ext
, 0, NULL
, HFILL
}
3923 { &hf_glusterfs_volume
,
3924 { "Volume", "glusterfs.volume", FT_STRING
, BASE_NONE
,
3925 NULL
, 0, NULL
, HFILL
}
3927 { &hf_glusterfs_namelen
,
3928 { "Name Length", "glusterfs.namelen", FT_UINT32
, BASE_DEC
,
3929 NULL
, 0, NULL
, HFILL
}
3931 { &hf_glusterfs_linkname
,
3932 { "Linkname", "glusterfs.linkname", FT_STRING
, BASE_NONE
,
3933 NULL
, 0, NULL
, HFILL
}
3935 { &hf_glusterfs_umask
,
3936 { "Umask", "glusterfs.umask", FT_UINT32
, BASE_OCT
,
3937 NULL
, 0, NULL
, HFILL
}
3939 { &hf_glusterfs_mask
,
3940 { "Mask", "glusterfs.mask", FT_UINT32
, BASE_OCT
,
3941 NULL
, 0, NULL
, HFILL
}
3944 { &hf_glusterfs_entries
, /* READDIRP returned <x> entries */
3945 { "Entries returned", "glusterfs.entries", FT_INT32
, BASE_DEC
,
3946 NULL
, 0, NULL
, HFILL
}
3948 { &hf_glusterfs_whence
,
3949 { "Whence", "glusterfs.whence", FT_UINT32
, BASE_DEC
,
3950 VALS(glusterfs_seek_whence
), 0, NULL
, HFILL
}
3952 /* Flags passed on to OPEN, CREATE etc, based on */
3953 { &hf_glusterfs_flags
,
3954 { "Flags", "glusterfs.flags", FT_UINT32
, BASE_OCT
,
3955 NULL
, 0, NULL
, HFILL
}
3957 { &hf_glusterfs_flags_rdonly
,
3958 { "O_RDONLY", "glusterfs.flags.rdonly", FT_BOOLEAN
, 32,
3959 TFS(&glusterfs_notset_set
), 0xffffffff, NULL
, HFILL
}
3961 { &hf_glusterfs_flags_wronly
,
3962 { "O_WRONLY", "glusterfs.flags.wronly", FT_BOOLEAN
, 32,
3963 TFS(&tfs_set_notset
), 00000001, NULL
, HFILL
}
3965 { &hf_glusterfs_flags_rdwr
,
3966 { "O_RDWR", "glusterfs.flags.rdwr", FT_BOOLEAN
, 32,
3967 TFS(&tfs_set_notset
), 00000002, NULL
, HFILL
}
3969 { &hf_glusterfs_flags_accmode
,
3970 { "O_ACCMODE", "glusterfs.flags.accmode", FT_UINT32
, BASE_DEC
,
3971 VALS(glusterfs_accmode_vals
), 00000003, NULL
, HFILL
}
3973 { &hf_glusterfs_flags_append
,
3974 { "O_APPEND", "glusterfs.flags.append", FT_BOOLEAN
, 32,
3975 TFS(&tfs_set_notset
), 00002000, NULL
, HFILL
}
3977 { &hf_glusterfs_flags_async
,
3978 { "O_ASYNC", "glusterfs.flags.async", FT_BOOLEAN
, 32,
3979 TFS(&tfs_set_notset
), 00020000, NULL
, HFILL
}
3981 { &hf_glusterfs_flags_cloexec
,
3982 { "O_CLOEXEC", "glusterfs.flags.cloexec", FT_BOOLEAN
, 32,
3983 TFS(&tfs_set_notset
), 02000000, NULL
, HFILL
}
3985 { &hf_glusterfs_flags_creat
,
3986 { "O_CREAT", "glusterfs.flags.creat", FT_BOOLEAN
, 32,
3987 TFS(&tfs_set_notset
), 00000100, NULL
, HFILL
}
3989 { &hf_glusterfs_flags_direct
,
3990 { "O_DIRECT", "glusterfs.flags.direct", FT_BOOLEAN
, 32,
3991 TFS(&tfs_set_notset
), 00040000, NULL
, HFILL
}
3993 { &hf_glusterfs_flags_directory
,
3994 { "O_DIRECTORY", "glusterfs.flags.directory", FT_BOOLEAN
, 32,
3995 TFS(&tfs_set_notset
), 00200000, NULL
, HFILL
}
3997 { &hf_glusterfs_flags_excl
,
3998 { "O_EXCL", "glusterfs.flags.excl", FT_BOOLEAN
, 32,
3999 TFS(&tfs_set_notset
), 00000200, NULL
, HFILL
}
4001 { &hf_glusterfs_flags_largefile
,
4002 { "O_LARGEFILE", "glusterfs.flags.largefile", FT_BOOLEAN
, 32,
4003 TFS(&tfs_set_notset
), 00100000, NULL
, HFILL
}
4005 { &hf_glusterfs_flags_noatime
,
4006 { "O_NOATIME", "glusterfs.flags.noatime", FT_BOOLEAN
, 32,
4007 TFS(&tfs_set_notset
), 01000000, NULL
, HFILL
}
4009 { &hf_glusterfs_flags_noctty
,
4010 { "O_NOCTTY", "glusterfs.flags.noctty", FT_BOOLEAN
, 32,
4011 TFS(&tfs_set_notset
), 00000400, NULL
, HFILL
}
4013 { &hf_glusterfs_flags_nofollow
,
4014 { "O_NOFOLLOW", "glusterfs.flags.nofollow", FT_BOOLEAN
, 32,
4015 TFS(&tfs_set_notset
), 00400000, NULL
, HFILL
}
4017 /* TODO: These 2 have the same mask. Which one is correct? */
4018 { &hf_glusterfs_flags_nonblock
,
4019 { "O_NONBLOCK", "glusterfs.flags.nonblock", FT_BOOLEAN
, 32,
4020 TFS(&tfs_set_notset
), 00004000, NULL
, HFILL
}
4022 { &hf_glusterfs_flags_ndelay
,
4023 { "O_NDELAY", "glusterfs.flags.ndelay", FT_BOOLEAN
, 32,
4024 TFS(&tfs_set_notset
), 00004000, NULL
, HFILL
}
4026 /* TODO: These 2 have the same mask. Which one is correct? */
4027 { &hf_glusterfs_flags_sync
,
4028 { "O_SYNC", "glusterfs.flags.sync", FT_BOOLEAN
, 32,
4029 TFS(&tfs_set_notset
), 00010000, NULL
, HFILL
}
4031 { &hf_glusterfs_flags_trunc
,
4032 { "O_TRUNC", "glusterfs.flags.trunc", FT_BOOLEAN
, 32,
4033 TFS(&tfs_set_notset
), 00001000, NULL
, HFILL
}
4035 { &hf_glusterfs_flags_reserved
,
4036 { "Unused", "glusterfs.flags.reserved", FT_BOOLEAN
, 32,
4037 TFS(&tfs_set_notset
), 037774000074, NULL
, HFILL
}
4040 { &hf_glusterfs_mode
,
4041 { "Mode", "glusterfs.mode", FT_UINT32
, BASE_OCT
,
4042 NULL
, 0, "Access Permissions", HFILL
}
4044 { &hf_glusterfs_mode_suid
,
4045 { "S_ISUID", "glusterfs.mode.s_isuid", FT_BOOLEAN
, 32,
4046 TFS(&tfs_set_notset
), (04000), "set-user-ID", HFILL
}
4048 { &hf_glusterfs_mode_sgid
,
4049 { "S_ISGID", "glusterfs.mode.s_isgid", FT_BOOLEAN
, 32,
4050 TFS(&tfs_set_notset
), (02000), "set-group-ID", HFILL
}
4052 { &hf_glusterfs_mode_svtx
,
4053 { "S_ISVTX", "glusterfs.mode.s_isvtx", FT_BOOLEAN
, 32,
4054 TFS(&tfs_set_notset
), (01000), "sticky bit", HFILL
}
4056 { &hf_glusterfs_mode_rusr
,
4057 { "S_IRUSR", "glusterfs.mode.s_irusr", FT_BOOLEAN
, 32,
4058 TFS(&tfs_set_notset
), (00400), "read by owner", HFILL
}
4060 { &hf_glusterfs_mode_wusr
,
4061 { "S_IWUSR", "glusterfs.mode.s_iwusr", FT_BOOLEAN
, 32,
4062 TFS(&tfs_set_notset
), (00200), "write by owner", HFILL
}
4064 { &hf_glusterfs_mode_xusr
,
4065 { "S_IXUSR", "glusterfs.mode.s_ixusr", FT_BOOLEAN
, 32,
4066 TFS(&tfs_set_notset
), (00100), "execute/search by owner", HFILL
}
4068 { &hf_glusterfs_mode_rgrp
,
4069 { "S_IRGRP", "glusterfs.mode.s_irgrp", FT_BOOLEAN
, 32,
4070 TFS(&tfs_set_notset
), (00040), "read by group", HFILL
}
4072 { &hf_glusterfs_mode_wgrp
,
4073 { "S_IWGRP", "glusterfs.mode.s_iwgrp", FT_BOOLEAN
, 32,
4074 TFS(&tfs_set_notset
), (00020), "write by group", HFILL
}
4076 { &hf_glusterfs_mode_xgrp
,
4077 { "S_IXGRP", "glusterfs.mode.s_ixgrp", FT_BOOLEAN
, 32,
4078 TFS(&tfs_set_notset
), (00010), "execute/search by group", HFILL
}
4080 { &hf_glusterfs_mode_roth
,
4081 { "S_IROTH", "glusterfs.mode.s_iroth", FT_BOOLEAN
, 32,
4082 TFS(&tfs_set_notset
), (00004), "read by others", HFILL
}
4084 { &hf_glusterfs_mode_woth
,
4085 { "S_IWOTH", "glusterfs.mode.s_iwoth", FT_BOOLEAN
, 32,
4086 TFS(&tfs_set_notset
), (00002), "write by others", HFILL
}
4088 { &hf_glusterfs_mode_xoth
,
4089 { "S_IXOTH", "glusterfs.mode.s_ixoth", FT_BOOLEAN
, 32,
4090 TFS(&tfs_set_notset
), (00001), "execute/search by others", HFILL
}
4092 { &hf_glusterfs_mode_reserved
,
4093 { "Reserved", "glusterfs.mode.reserved", FT_BOOLEAN
, 32,
4094 TFS(&tfs_set_notset
), (~07777), "execute/search by others", HFILL
}
4096 /* the dir-entry structure */
4097 { &hf_glusterfs_entry_ino
,
4098 { "Inode", "glusterfs.entry.ino", FT_UINT64
, BASE_DEC
,
4099 NULL
, 0, NULL
, HFILL
}
4101 { &hf_glusterfs_entry_off
, /* like telldir() */
4102 { "Offset", "glusterfs.entry.d_off", FT_UINT64
, BASE_DEC
,
4103 NULL
, 0, NULL
, HFILL
}
4105 { &hf_glusterfs_entry_len
, /* length of the path string */
4106 { "Path length", "glusterfs.entry.len", FT_UINT32
, BASE_DEC
,
4107 NULL
, 0, NULL
, HFILL
}
4109 { &hf_glusterfs_entry_type
,
4110 { "Type", "glusterfs.entry.d_type", FT_UINT32
, BASE_DEC
| BASE_EXT_STRING
,
4111 &glusterfs_entry_type_names_ext
, 0, NULL
, HFILL
}
4113 { &hf_glusterfs_entry_path
,
4114 { "Path", "glusterfs.entry.path", FT_STRING
, BASE_NONE
,
4115 NULL
, 0, NULL
, HFILL
}
4117 /* the IATT structure */
4118 { &hf_glusterfs_iatt
,
4119 { "IATT", "glusterfs.iatt", FT_NONE
, BASE_NONE
, NULL
,
4122 { &hf_glusterfs_preparent_iatt
,
4123 { "Pre-operation parent IATT", "glusterfs.preparent_iatt", FT_NONE
, BASE_NONE
, NULL
,
4126 { &hf_glusterfs_postparent_iatt
,
4127 { "Post-operation parent IATT", "glusterfs.postparent_iatt", FT_NONE
, BASE_NONE
, NULL
,
4130 { &hf_glusterfs_preop_iatt
,
4131 { "Pre-operation IATT", "glusterfs.preop_iatt", FT_NONE
, BASE_NONE
, NULL
,
4134 { &hf_glusterfs_postop_iatt
,
4135 { "Post-operation IATT", "glusterfs.postop_iatt", FT_NONE
, BASE_NONE
, NULL
,
4138 { &hf_glusterfs_ia_ino
,
4139 { "Inode", "glusterfs.ia_ino", FT_UINT64
, BASE_DEC
,
4140 NULL
, 0, NULL
, HFILL
}
4142 { &hf_glusterfs_ia_dev
,
4143 { "Device", "glusterfs.ia_dev", FT_UINT64
, BASE_HEX
,
4144 NULL
, 0, NULL
, HFILL
}
4146 { &hf_glusterfs_ia_mode
,
4147 { "Mode", "glusterfs.ia_mode", FT_UINT32
, BASE_OCT
,
4148 NULL
, 0, NULL
, HFILL
}
4150 { &hf_glusterfs_ia_nlink
,
4151 { "Number of hard links", "glusterfs.ia_nlink",
4152 FT_INT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4154 { &hf_glusterfs_ia_uid
,
4155 { "UID", "glusterfs.ia_uid", FT_INT32
, BASE_DEC
,
4156 NULL
, 0, NULL
, HFILL
}
4158 { &hf_glusterfs_ia_gid
,
4159 { "GID", "glusterfs.ia_gid", FT_INT32
, BASE_DEC
,
4160 NULL
, 0, NULL
, HFILL
}
4162 { &hf_glusterfs_ia_rdev
,
4163 { "Root device", "glusterfs.ia_rdev", FT_UINT64
,
4164 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4166 { &hf_glusterfs_ia_size
,
4167 { "Size", "glusterfs.ia_size", FT_UINT64
, BASE_DEC
,
4168 NULL
, 0, NULL
, HFILL
}
4170 { &hf_glusterfs_ia_blksize
,
4171 { "Block size", "glusterfs.ia_blksize", FT_INT32
,
4172 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4174 { &hf_glusterfs_ia_blocks
,
4175 { "Blocks", "glusterfs.ia_blocks", FT_UINT64
,
4176 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4178 { &hf_glusterfs_ia_atime
,
4179 { "Time of last access", "glusterfs.ia_atime",
4180 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0,
4183 { &hf_glusterfs_ia_mtime
,
4184 { "Time of last modification", "glusterfs.ia_mtime",
4185 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0,
4188 { &hf_glusterfs_ia_ctime
,
4189 { "Time of last status change", "glusterfs.ia_ctime",
4190 FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0,
4194 /* the IATTx structure */
4195 { &hf_glusterfs_iattx
,
4196 { "IATTX", "glusterfs.iattx", FT_NONE
, BASE_NONE
, NULL
,
4199 { &hf_glusterfs_preparent_iattx
,
4200 { "Pre-operation parent IATTX", "glusterfs.preparent_iattx", FT_NONE
, BASE_NONE
, NULL
,
4203 { &hf_glusterfs_postparent_iattx
,
4204 { "Post-operation parent IATTX", "glusterfs.postparent_iattx", FT_NONE
, BASE_NONE
, NULL
,
4207 { &hf_glusterfs_preop_iattx
,
4208 { "Pre-operation IATTX", "glusterfs.preop_iattx", FT_NONE
, BASE_NONE
, NULL
,
4211 { &hf_glusterfs_postop_iattx
,
4212 { "Post-operation IATTX", "glusterfs.postop_iattx", FT_NONE
, BASE_NONE
, NULL
,
4215 { &hf_glusterfs_iax_attributes
,
4216 { "IATT attributes", "glusterfs.iax_attributes", FT_UINT64
,
4217 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4219 { &hf_glusterfs_iax_attributes_mask
,
4220 { "IATT attributes mask", "glusterfs.iax_attributes_mask", FT_UINT64
,
4221 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4223 { &hf_glusterfs_iax_flags
,
4224 { "IATT flags", "glusterfs.iax_flags", FT_UINT64
,
4225 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4227 { &hf_glusterfs_iax_atime
,
4228 { "Time of last access", "glusterfs.iax_atime",
4229 FT_UINT64
, BASE_DEC
, NULL
, 0,
4232 { &hf_glusterfs_iax_mtime
,
4233 { "Time of last modification", "glusterfs.iax_mtime",
4234 FT_UINT64
, BASE_DEC
, NULL
, 0,
4237 { &hf_glusterfs_iax_ctime
,
4238 { "Time of last status change", "glusterfs.iax_ctime",
4239 FT_UINT64
, BASE_DEC
, NULL
, 0,
4242 { &hf_glusterfs_iax_btime
,
4243 { "Creation time", "glusterfs.iax_btime",
4244 FT_UINT64
, BASE_DEC
, NULL
, 0,
4247 { &hf_glusterfs_iax_atime_nsec
,
4248 { "Time of last access(nsec)", "glusterfs.iax_atime_nsec",
4249 FT_UINT64
, BASE_DEC
, NULL
, 0,
4252 { &hf_glusterfs_iax_mtime_nsec
,
4253 { "Time of last modification(nsec)", "glusterfs.iax_mtime_nsec",
4254 FT_UINT64
, BASE_DEC
, NULL
, 0,
4257 { &hf_glusterfs_iax_ctime_nsec
,
4258 { "Time of last status change(nsec)", "glusterfs.iax_ctime_nsec",
4259 FT_UINT64
, BASE_DEC
, NULL
, 0,
4262 { &hf_glusterfs_iax_btime_nsec
,
4263 { "Creation time(nsec)", "glusterfs.iax_btime_nsec",
4264 FT_UINT64
, BASE_DEC
, NULL
, 0,
4269 { &hf_glusterfs_flock_type
,
4270 { "Type", "glusterfs.flock.type", FT_UINT32
, BASE_DEC
,
4271 VALS(glusterfs_lk_type_names
), 0, NULL
, HFILL
}
4273 { &hf_glusterfs_flock_whence
,
4274 { "Whence", "glusterfs.flock.whence", FT_UINT32
,
4275 BASE_DEC
, VALS(glusterfs_lk_whence
), 0, NULL
,
4278 { &hf_glusterfs_flock_start
,
4279 { "Start", "glusterfs.flock.start", FT_UINT64
,
4280 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4282 { &hf_glusterfs_flock_len
,
4283 { "Length", "glusterfs.flock.len", FT_UINT64
, BASE_DEC
,
4284 NULL
, 0, NULL
, HFILL
}
4286 { &hf_glusterfs_flock_pid
,
4287 { "PID", "glusterfs.flock.pid", FT_INT32
, BASE_DEC
,
4288 NULL
, 0, NULL
, HFILL
}
4290 { &hf_glusterfs_flock_owner
,
4291 { "Owner", "glusterfs.flock.owner", FT_BYTES
,
4292 BASE_NONE
, NULL
, 0, NULL
, HFILL
}
4295 /* statvfs descriptions from 'man 2 statvfs' on Linix */
4296 { &hf_glusterfs_bsize
,
4297 { "File system block size", "glusterfs.statfs.bsize",
4298 FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4300 { &hf_glusterfs_frsize
,
4301 { "Fragment size", "glusterfs.statfs.frsize",
4302 FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4304 { &hf_glusterfs_blocks
,
4305 { "Size of fs in f_frsize units",
4306 "glusterfs.statfs.blocks", FT_UINT64
, BASE_DEC
,
4307 NULL
, 0, NULL
, HFILL
}
4309 { &hf_glusterfs_bfree
,
4310 { "# free blocks", "glusterfs.statfs.bfree", FT_UINT64
,
4311 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4313 { &hf_glusterfs_bavail
,
4314 { "# free blocks for non-root",
4315 "glusterfs.statfs.bavail", FT_UINT64
, BASE_DEC
,
4316 NULL
, 0, NULL
, HFILL
}
4318 { &hf_glusterfs_files
,
4319 { "# inodes", "glusterfs.statfs.files", FT_UINT64
,
4320 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4322 { &hf_glusterfs_ffree
,
4323 { "# free inodes", "glusterfs.statfs.ffree", FT_UINT64
,
4324 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4326 { &hf_glusterfs_favail
,
4327 { "# free inodes for non-root",
4328 "glusterfs.statfs.favail", FT_UINT64
, BASE_DEC
,
4329 NULL
, 0, NULL
, HFILL
}
4332 { "File system ID", "glusterfs.statfs.fsid", FT_UINT64
,
4333 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4335 { &hf_glusterfs_mnt_flags
,
4336 { "Mount flags", "glusterfs.statfs.flags", FT_UINT64
,
4337 BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4339 /* ST_* flags from /usr/include/bits/statvfs.h */
4340 { &hf_glusterfs_mnt_flag_rdonly
,
4341 { "ST_RDONLY", "glusterfs.statfs.flag.rdonly",
4342 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 1, NULL
,
4345 { &hf_glusterfs_mnt_flag_nosuid
,
4346 { "ST_NOSUID", "glusterfs.statfs.flag.nosuid",
4347 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 2, NULL
,
4350 { &hf_glusterfs_mnt_flag_nodev
,
4351 { "ST_NODEV", "glusterfs.statfs.flag.nodev",
4352 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 4, NULL
,
4355 { &hf_glusterfs_mnt_flag_noexec
,
4356 { "ST_EXEC", "glusterfs.statfs.flag.noexec",
4357 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 8, NULL
,
4360 { &hf_glusterfs_mnt_flag_synchronous
,
4362 "glusterfs.statfs.flag.synchronous",
4363 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 16, NULL
,
4366 { &hf_glusterfs_mnt_flag_mandlock
,
4367 { "ST_MANDLOCK", "glusterfs.statfs.flag.mandlock",
4368 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 64, NULL
,
4371 { &hf_glusterfs_mnt_flag_write
,
4372 { "ST_WRITE", "glusterfs.statfs.flag.write",
4373 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 128,
4376 { &hf_glusterfs_mnt_flag_append
,
4377 { "ST_APPEND", "glusterfs.statfs.flag.append",
4378 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 256,
4381 { &hf_glusterfs_mnt_flag_immutable
,
4382 { "ST_IMMUTABLE", "glusterfs.statfs.flag.immutable",
4383 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 512,
4386 { &hf_glusterfs_mnt_flag_noatime
,
4387 { "ST_NOATIME", "glusterfs.statfs.flag.noatime",
4388 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 1024,
4391 { &hf_glusterfs_mnt_flag_nodiratime
,
4392 { "ST_NODIRATIME", "glusterfs.statfs.flag.nodiratime",
4393 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 2048,
4396 { &hf_glusterfs_mnt_flag_relatime
,
4397 { "ST_RELATIME", "glusterfs.statfs.flag.relatime",
4398 FT_BOOLEAN
, 64, TFS(&tfs_set_notset
), 4096,
4401 { &hf_glusterfs_namemax
,
4402 { "Maximum filename length",
4403 "glusterfs.statfs.namemax", FT_UINT64
,
4404 BASE_DEC
, NULL
, 0, NULL
, HFILL
}
4406 { &hf_glusterfs_setattr_valid
,
4407 { "Set attributes", "glusterfs.setattr.valid",
4408 FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}
4410 /* setattr.valid flags from libglusterfs/src/xlator.h */
4411 { &hf_glusterfs_setattr_set_mode
,
4412 { "SET_ATTR_MODE", "glusterfs.setattr.set_mode",
4413 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000001,
4416 { &hf_glusterfs_setattr_set_uid
,
4417 { "SET_ATTR_UID", "glusterfs.setattr.set_uid",
4418 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000002,
4421 { &hf_glusterfs_setattr_set_gid
,
4422 { "SET_ATTR_GID", "glusterfs.setattr.set_gid",
4423 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000004,
4426 { &hf_glusterfs_setattr_set_size
,
4427 { "SET_ATTR_SIZE", "glusterfs.setattr.set_size",
4428 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000008,
4431 { &hf_glusterfs_setattr_set_atime
,
4432 { "SET_ATTR_ATIME", "glusterfs.setattr.set_atime",
4433 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000010,
4436 { &hf_glusterfs_setattr_set_mtime
,
4437 { "SET_ATTR_MTIME", "glusterfs.setattr.set_mtime",
4438 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000020,
4441 { &hf_glusterfs_setattr_set_reserved
,
4442 { "Reserved", "glusterfs.setattr.set_reserved",
4443 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0xffffffcf,
4446 { &hf_glusterfs_xflags
,
4447 { "XFlags", "glusterfs.xflags", FT_UINT32
, BASE_OCT
,
4448 NULL
, 0, NULL
, HFILL
}
4450 { &hf_glusterfs_oldbname
,
4451 { "OldBasename", "glusterfs.oldbname", FT_STRING
, BASE_NONE
,
4452 NULL
, 0, NULL
, HFILL
}
4454 { &hf_glusterfs_newbname
,
4455 { "NewBasename", "glusterfs.newbname", FT_STRING
, BASE_NONE
,
4456 NULL
, 0, NULL
, HFILL
}
4458 { &hf_glusterfs_name
,
4459 { "Name", "glusterfs.name", FT_STRING
, BASE_NONE
,
4460 NULL
, 0, NULL
, HFILL
}
4462 { &hf_glusterfs_fsync_flags
,
4463 { "Flags", "glusterfs.fsync.flags", FT_UINT32
, BASE_HEX
,
4464 NULL
, 0, NULL
, HFILL
}
4466 { &hf_glusterfs_fsync_flag_datasync
,
4467 { "DATASYNC", "glusterfs.fsync.datasync",
4468 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x1,
4471 { &hf_glusterfs_fsync_flag_unknown
,
4472 { "Unknown", "glusterfs.fsync.unknown",
4473 FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), ~0x1,
4476 /* For entry an fentry lk */
4477 { &hf_glusterfs_entrylk_namelen
,
4478 { "File Descriptor", "glusterfs.entrylk.namelen", FT_UINT64
, BASE_DEC
,
4479 NULL
, 0, NULL
, HFILL
}
4481 { &hf_gluster_dict_xdr_size
,
4482 { "XDR Size", "glusterfs.dict_xdr_size", FT_UINT32
, BASE_DEC
,
4483 NULL
, 0, NULL
, HFILL
}
4485 { &hf_gluster_dict_size
,
4486 { "Size", "glusterfs.dict_size", FT_UINT32
, BASE_DEC
,
4487 NULL
, 0, NULL
, HFILL
}
4489 { &hf_gluster_num_dict_items
,
4490 { "Items", "glusterfs.num_dict_items", FT_UINT32
, BASE_DEC
,
4491 NULL
, 0, NULL
, HFILL
}
4493 { &hf_gluster_rpc_roundup_bytes
,
4494 { "RPC-roundup bytes", "glusterfs.rpc_roundup_bytes", FT_BYTES
, BASE_NONE
,
4495 NULL
, 0, NULL
, HFILL
}
4497 { &hf_gluster_trusted_afr_key
,
4498 { "Key", "glusterfs.trusted_afr_key", FT_BYTES
, BASE_NONE
,
4499 NULL
, 0, NULL
, HFILL
}
4501 { &hf_gluster_dict_value
,
4502 { "Value", "glusterfs.dict_value", FT_STRING
, BASE_NONE
,
4503 NULL
, 0, NULL
, HFILL
}
4507 /* Setup protocol subtree array */
4508 static int *ett
[] = {
4510 &ett_glusterfs_flags
,
4511 &ett_glusterfs_mnt_flags
,
4512 &ett_glusterfs_mode
,
4513 &ett_glusterfs_entry
,
4514 &ett_glusterfs_setattr_valid
,
4515 &ett_glusterfs_parent_iatt
,
4516 &ett_glusterfs_iatt
,
4517 &ett_glusterfs_flock
,
4518 &ett_glusterfs_fsync_flags
,
4520 &ett_gluster_dict_items
4523 /* Register the protocol name and description */
4524 proto_glusterfs
= proto_register_protocol("GlusterFS", "GlusterFS",
4526 proto_register_subtree_array(ett
, array_length(ett
));
4527 proto_register_field_array(proto_glusterfs
, hf
, array_length(hf
));
4531 proto_reg_handoff_glusterfs(void)
4533 rpc_init_prog(proto_glusterfs
, GLUSTER3_1_FOP_PROGRAM
, ett_glusterfs
,
4534 G_N_ELEMENTS(glusterfs_vers_info
), glusterfs_vers_info
);
4538 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4543 * indent-tabs-mode: t
4546 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
4547 * :indentSize=8:tabSize=8:noTabs=false: