1 /* packet-gluster_cli.c
2 * Routines for Gluster CLI dissection
3 * Copyright 2012, Niels de Vos <ndevos@redhat.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * References to source files point in general to the glusterfs sources.
27 * There is currently no RFC or other document where the protocol is
28 * completely described. The glusterfs sources can be found at:
29 * - http://git.gluster.com/?p=glusterfs.git
30 * - https://github.com/gluster/glusterfs
32 * The coding-style is roughly the same as the one use in the Linux kernel,
33 * see http://www.kernel.org/doc/Documentation/CodingStyle.
40 #include <epan/packet.h>
42 #include "packet-rpc.h"
43 #include "packet-gluster.h"
45 /* Initialize the protocol and registered fields */
46 static gint proto_gluster_cli
= -1;
48 /* programs and procedures */
49 static gint hf_gluster_cli_proc
= -1;
50 static gint hf_gluster_cli_2_proc
= -1;
51 static gint hf_gluster_dict
= -1;
52 static gint hf_gluster_path
= -1;
53 static gint hf_gluster_lazy
= -1;
54 static gint hf_gluster_label
= -1;
55 static gint hf_gluster_unused
= -1;
56 static gint hf_gluster_wd
= -1;
57 static gint hf_gluster_op_errstr
= -1;
58 static gint hf_gluster_hostname
= -1;
59 static gint hf_gluster_port
= -1;
60 static gint hf_gluster_flags
= -1;
62 /* Initialize the subtree pointers */
63 static gint ett_gluster_cli
= -1;
67 gluster_cli_2_common_call(tvbuff_t
*tvb
, int offset
,
68 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
70 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_gluster_dict
, offset
);
76 gluster_cli_2_common_reply(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
77 proto_tree
*tree
, void* data _U_
)
79 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
80 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_op_errstr
, offset
,
82 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_gluster_dict
, offset
);
88 gluster_cli_2_probe_reply(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
89 proto_tree
*tree
, void* data _U_
)
91 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
92 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_port
, offset
);
93 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_hostname
, offset
,
95 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_op_errstr
, offset
,
102 gluster_cli_2_probe_call(tvbuff_t
*tvb
, int offset
,
103 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
105 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_hostname
, offset
,
107 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_port
, offset
);
113 gluster_cli_2_deprobe_reply(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
114 proto_tree
*tree
, void* data _U_
)
116 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
117 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_hostname
, offset
,
124 gluster_cli_2_deprobe_call(tvbuff_t
*tvb
, int offset
,
125 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
127 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_hostname
, offset
,
129 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_port
, offset
);
130 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_flags
, offset
);
136 gluster_cli_2_fsm_log_call(tvbuff_t
*tvb
, int offset
,
137 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
139 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_wd
, offset
, NULL
);
145 gluster_cli_2_getwd_reply(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
146 proto_tree
*tree
, void* data _U_
)
148 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
149 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_wd
, offset
, NULL
);
155 gluster_cli_2_getwd_call(tvbuff_t
*tvb
, int offset
,
156 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
158 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_unused
, offset
);
164 gluster_cli_2_mount_call(tvbuff_t
*tvb
, int offset
,
165 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
167 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_label
, offset
,
169 offset
= gluster_rpc_dissect_dict(tree
, tvb
, hf_gluster_dict
, offset
);
175 gluster_cli_2_mount_reply(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
176 proto_tree
*tree
, void* data _U_
)
178 offset
= gluster_dissect_common_reply(tvb
, offset
, pinfo
, tree
, data
);
179 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_path
, offset
, NULL
);
185 gluster_cli_2_umount_call(tvbuff_t
*tvb
, int offset
,
186 packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
188 offset
= dissect_rpc_uint32(tvb
, tree
, hf_gluster_lazy
, offset
);
189 offset
= dissect_rpc_string(tvb
, tree
, hf_gluster_path
, offset
, NULL
);
194 /* procedures for GLUSTER_CLI_PROGRAM */
195 static const vsff gluster_cli_proc
[] = {
196 { GLUSTER_CLI_NULL
, "NULL", NULL
, NULL
},
197 { GLUSTER_CLI_PROBE
, "PROBE", NULL
, NULL
},
198 { GLUSTER_CLI_DEPROBE
, "DEPROBE", NULL
, NULL
},
199 { GLUSTER_CLI_LIST_FRIENDS
, "LIST_FRIENDS", NULL
, NULL
},
200 { GLUSTER_CLI_CREATE_VOLUME
, "CREATE_VOLUME", NULL
, NULL
},
201 { GLUSTER_CLI_GET_VOLUME
, "GET_VOLUME", NULL
, NULL
},
202 { GLUSTER_CLI_GET_NEXT_VOLUME
, "GET_NEXT_VOLUME", NULL
, NULL
},
203 { GLUSTER_CLI_DELETE_VOLUME
, "DELETE_VOLUME", NULL
, NULL
},
204 { GLUSTER_CLI_START_VOLUME
, "START_VOLUME", NULL
, NULL
},
205 { GLUSTER_CLI_STOP_VOLUME
, "STOP_VOLUME", NULL
, NULL
},
206 { GLUSTER_CLI_RENAME_VOLUME
, "RENAME_VOLUME", NULL
, NULL
},
207 { GLUSTER_CLI_DEFRAG_VOLUME
, "DEFRAG_VOLUME", NULL
, NULL
},
208 { GLUSTER_CLI_SET_VOLUME
, "SET_VOLUME", NULL
, NULL
},
209 { GLUSTER_CLI_ADD_BRICK
, "ADD_BRICK", NULL
, NULL
},
210 { GLUSTER_CLI_REMOVE_BRICK
, "REMOVE_BRICK", NULL
, NULL
},
211 { GLUSTER_CLI_REPLACE_BRICK
, "REPLACE_BRICK", NULL
, NULL
},
212 { GLUSTER_CLI_LOG_FILENAME
, "LOG_FILENAME", NULL
, NULL
},
213 { GLUSTER_CLI_LOG_LOCATE
, "LOG_LOCATE", NULL
, NULL
},
214 { GLUSTER_CLI_LOG_ROTATE
, "LOG_ROTATE", NULL
, NULL
},
215 { GLUSTER_CLI_GETSPEC
, "GETSPEC", NULL
, NULL
},
216 { GLUSTER_CLI_PMAP_PORTBYBRICK
, "PMAP_PORTBYBRICK", NULL
, NULL
},
217 { GLUSTER_CLI_SYNC_VOLUME
, "SYNC_VOLUME", NULL
, NULL
},
218 { GLUSTER_CLI_RESET_VOLUME
, "RESET_VOLUME", NULL
, NULL
},
219 { GLUSTER_CLI_FSM_LOG
, "FSM_LOG", NULL
, NULL
},
220 { GLUSTER_CLI_GSYNC_SET
, "GSYNC_SET", NULL
, NULL
},
221 { GLUSTER_CLI_PROFILE_VOLUME
, "PROFILE_VOLUME", NULL
, NULL
},
222 { GLUSTER_CLI_QUOTA
, "QUOTA", NULL
, NULL
},
223 { GLUSTER_CLI_TOP_VOLUME
, "TOP_VOLUME", NULL
, NULL
},
224 { GLUSTER_CLI_GETWD
, "GETWD", NULL
, NULL
},
225 { GLUSTER_CLI_LOG_LEVEL
, "LOG_LEVEL", NULL
, NULL
},
226 { GLUSTER_CLI_STATUS_VOLUME
, "STATUS_VOLUME", NULL
, NULL
},
227 { GLUSTER_CLI_MOUNT
, "MOUNT", NULL
, NULL
},
228 { GLUSTER_CLI_UMOUNT
, "UMOUNT", NULL
, NULL
},
229 { GLUSTER_CLI_HEAL_VOLUME
, "HEAL_VOLUME", NULL
, NULL
},
230 { GLUSTER_CLI_STATEDUMP_VOLUME
, "STATEDUMP_VOLUME", NULL
, NULL
},
231 { 0, NULL
, NULL
, NULL
}
234 /* procedures for GLUSTER_CLI_PROGRAM version 2*/
235 static const vsff gluster_cli_2_proc
[] = {
237 GLUSTER_CLI_2_NULL
, "NULL",
238 gluster_cli_2_common_call
, gluster_cli_2_common_reply
241 GLUSTER_CLI_2_PROBE
, "PROBE",
242 gluster_cli_2_probe_call
, gluster_cli_2_probe_reply
245 GLUSTER_CLI_2_DEPROBE
, "DEPROBE",
246 gluster_cli_2_deprobe_call
, gluster_cli_2_deprobe_reply
249 GLUSTER_CLI_2_LIST_FRIENDS
, "LIST_FRIENDS",
250 gluster_cli_2_common_call
, gluster_cli_2_common_reply
253 GLUSTER_CLI_2_CREATE_VOLUME
, "CREATE_VOLUME",
254 gluster_cli_2_common_call
, gluster_cli_2_common_reply
257 GLUSTER_CLI_2_GET_VOLUME
, "GET_VOLUME",
258 gluster_cli_2_common_call
, gluster_cli_2_common_reply
261 GLUSTER_CLI_2_GET_NEXT_VOLUME
, "GET_NEXT_VOLUME",
262 gluster_cli_2_common_call
, gluster_cli_2_common_reply
265 GLUSTER_CLI_2_DELETE_VOLUME
, "DELETE_VOLUME",
266 gluster_cli_2_common_call
, gluster_cli_2_common_reply
269 GLUSTER_CLI_2_START_VOLUME
, "START_VOLUME",
270 gluster_cli_2_common_call
, gluster_cli_2_common_reply
273 GLUSTER_CLI_2_STOP_VOLUME
, "STOP_VOLUME",
274 gluster_cli_2_common_call
, gluster_cli_2_common_reply
277 GLUSTER_CLI_2_RENAME_VOLUME
, "RENAME_VOLUME",
278 gluster_cli_2_common_call
, gluster_cli_2_common_reply
281 GLUSTER_CLI_2_DEFRAG_VOLUME
, "DEFRAG_VOLUME" ,
282 gluster_cli_2_common_call
, gluster_cli_2_common_reply
285 GLUSTER_CLI_2_SET_VOLUME
, "SET_VOLUME",
286 gluster_cli_2_common_call
, gluster_cli_2_common_reply
289 GLUSTER_CLI_2_ADD_BRICK
, "ADD_BRICK",
290 gluster_cli_2_common_call
, gluster_cli_2_common_reply
293 GLUSTER_CLI_2_REMOVE_BRICK
, "REMOVE_BRICK",
294 gluster_cli_2_common_call
, gluster_cli_2_common_reply
297 GLUSTER_CLI_2_REPLACE_BRICK
, "REPLACE_BRICK",
298 gluster_cli_2_common_call
, gluster_cli_2_common_reply
301 GLUSTER_CLI_2_LOG_ROTATE
, "LOG_ROTATE",
302 gluster_cli_2_common_call
, gluster_cli_2_common_reply
305 GLUSTER_CLI_2_GETSPEC
, "GETSPEC",
306 gluster_cli_2_common_call
, gluster_cli_2_common_reply
309 GLUSTER_CLI_2_PMAP_PORTBYBRICK
, "PMAP_PORTBYBRICK",
310 gluster_cli_2_common_call
, gluster_cli_2_common_reply
313 GLUSTER_CLI_2_SYNC_VOLUME
, "SYNC_VOLUME",
314 gluster_cli_2_common_call
, gluster_cli_2_common_reply
317 GLUSTER_CLI_2_RESET_VOLUME
, "RESET_VOLUME",
318 gluster_cli_2_common_call
, gluster_cli_2_common_reply
321 GLUSTER_CLI_2_FSM_LOG
, "FSM_LOG",
322 gluster_cli_2_fsm_log_call
, gluster_cli_2_common_reply
325 GLUSTER_CLI_2_GSYNC_SET
, "GSYNC_SET",
326 gluster_cli_2_common_call
, gluster_cli_2_common_reply
329 GLUSTER_CLI_2_PROFILE_VOLUME
, "PROFILE_VOLUME",
330 gluster_cli_2_common_call
, gluster_cli_2_common_reply
333 GLUSTER_CLI_2_QUOTA
, "QUOTA",
334 gluster_cli_2_common_call
, gluster_cli_2_common_reply
337 GLUSTER_CLI_2_TOP_VOLUME
, "TOP_VOLUME",
338 gluster_cli_2_common_call
, gluster_cli_2_common_reply
341 GLUSTER_CLI_2_GETWD
, "GETWD",
342 gluster_cli_2_getwd_call
, gluster_cli_2_getwd_reply
345 GLUSTER_CLI_2_STATUS_VOLUME
, "STATUS_VOLUME",
346 gluster_cli_2_common_call
, gluster_cli_2_common_reply
349 GLUSTER_CLI_2_STATUS_ALL
, "STATUS_ALL",
350 gluster_cli_2_common_call
, gluster_cli_2_common_reply
353 GLUSTER_CLI_2_MOUNT
, "MOUNT",
354 gluster_cli_2_mount_call
, gluster_cli_2_mount_reply
357 GLUSTER_CLI_2_UMOUNT
, "UMOUNT",
358 gluster_cli_2_umount_call
, gluster_dissect_common_reply
361 GLUSTER_CLI_2_HEAL_VOLUME
, "HEAL_VOLUME",
362 gluster_cli_2_common_call
, gluster_cli_2_common_reply
365 GLUSTER_CLI_2_STATEDUMP_VOLUME
, "STATEDUMP_VOLUME",
366 gluster_cli_2_common_call
, gluster_cli_2_common_reply
369 GLUSTER_CLI_2_LIST_VOLUME
, "LIST_VOLUME",
370 gluster_cli_2_common_call
, gluster_cli_2_common_reply
373 GLUSTER_CLI_2_CLRLOCKS_VOLUME
, "CLRLOCKS_VOLUME",
374 gluster_cli_2_common_call
, gluster_cli_2_common_reply
376 { 0, NULL
, NULL
, NULL
}
380 static const value_string gluster_cli_proc_vals
[] = {
381 { GLUSTER_CLI_NULL
, "NULL" },
382 { GLUSTER_CLI_PROBE
, "PROBE" },
383 { GLUSTER_CLI_DEPROBE
, "DEPROBE" },
384 { GLUSTER_CLI_LIST_FRIENDS
, "LIST_FRIENDS" },
385 { GLUSTER_CLI_CREATE_VOLUME
, "CREATE_VOLUME" },
386 { GLUSTER_CLI_GET_VOLUME
, "GET_VOLUME" },
387 { GLUSTER_CLI_GET_NEXT_VOLUME
, "GET_NEXT_VOLUME" },
388 { GLUSTER_CLI_DELETE_VOLUME
, "DELETE_VOLUME" },
389 { GLUSTER_CLI_START_VOLUME
, "START_VOLUME" },
390 { GLUSTER_CLI_STOP_VOLUME
, "STOP_VOLUME" },
391 { GLUSTER_CLI_RENAME_VOLUME
, "RENAME_VOLUME" },
392 { GLUSTER_CLI_DEFRAG_VOLUME
, "DEFRAG_VOLUME" },
393 { GLUSTER_CLI_SET_VOLUME
, "SET_VOLUME" },
394 { GLUSTER_CLI_ADD_BRICK
, "ADD_BRICK" },
395 { GLUSTER_CLI_REMOVE_BRICK
, "REMOVE_BRICK" },
396 { GLUSTER_CLI_REPLACE_BRICK
, "REPLACE_BRICK" },
397 { GLUSTER_CLI_LOG_FILENAME
, "LOG_FILENAME" },
398 { GLUSTER_CLI_LOG_LOCATE
, "LOG_LOCATE" },
399 { GLUSTER_CLI_LOG_ROTATE
, "LOG_ROTATE" },
400 { GLUSTER_CLI_GETSPEC
, "GETSPEC" },
401 { GLUSTER_CLI_PMAP_PORTBYBRICK
, "PMAP_PORTBYBRICK" },
402 { GLUSTER_CLI_SYNC_VOLUME
, "SYNC_VOLUME" },
403 { GLUSTER_CLI_RESET_VOLUME
, "RESET_VOLUME" },
404 { GLUSTER_CLI_FSM_LOG
, "FSM_LOG" },
405 { GLUSTER_CLI_GSYNC_SET
, "GSYNC_SET" },
406 { GLUSTER_CLI_PROFILE_VOLUME
, "PROFILE_VOLUME" },
407 { GLUSTER_CLI_QUOTA
, "QUOTA" },
408 { GLUSTER_CLI_TOP_VOLUME
, "TOP_VOLUME" },
409 { GLUSTER_CLI_GETWD
, "GETWD" },
410 { GLUSTER_CLI_LOG_LEVEL
, "LOG_LEVEL" },
411 { GLUSTER_CLI_STATUS_VOLUME
, "STATUS_VOLUME" },
412 { GLUSTER_CLI_MOUNT
, "MOUNT" },
413 { GLUSTER_CLI_UMOUNT
, "UMOUNT" },
414 { GLUSTER_CLI_HEAL_VOLUME
, "HEAL_VOLUME" },
415 { GLUSTER_CLI_STATEDUMP_VOLUME
, "STATEDUMP_VOLUME" },
418 static value_string_ext gluster_cli_proc_vals_ext
= VALUE_STRING_EXT_INIT(gluster_cli_proc_vals
);
420 static const value_string gluster_cli_2_proc_vals
[] = {
421 { GLUSTER_CLI_2_NULL
, "NULL" },
422 { GLUSTER_CLI_2_PROBE
, "PROBE" },
423 { GLUSTER_CLI_2_DEPROBE
, "DEPROBE" },
424 { GLUSTER_CLI_2_LIST_FRIENDS
, "LIST_FRIENDS" },
425 { GLUSTER_CLI_2_CREATE_VOLUME
, "CREATE_VOLUME" },
426 { GLUSTER_CLI_2_GET_VOLUME
, "GET_VOLUME" },
427 { GLUSTER_CLI_2_GET_NEXT_VOLUME
, "GET_NEXT_VOLUME" },
428 { GLUSTER_CLI_2_DELETE_VOLUME
, "DELETE_VOLUME" },
429 { GLUSTER_CLI_2_START_VOLUME
, "START_VOLUME" },
430 { GLUSTER_CLI_2_STOP_VOLUME
, "STOP_VOLUME" },
431 { GLUSTER_CLI_2_RENAME_VOLUME
, "RENAME_VOLUME" },
432 { GLUSTER_CLI_2_DEFRAG_VOLUME
, "DEFRAG_VOLUME" },
433 { GLUSTER_CLI_2_SET_VOLUME
, "SET_VOLUME" },
434 { GLUSTER_CLI_2_ADD_BRICK
, "ADD_BRICK" },
435 { GLUSTER_CLI_2_REMOVE_BRICK
, "REMOVE_BRICK" },
436 { GLUSTER_CLI_2_REPLACE_BRICK
, "REPLACE_BRICK" },
437 { GLUSTER_CLI_2_LOG_ROTATE
, "LOG_ROTATE" },
438 { GLUSTER_CLI_2_GETSPEC
, "GETSPEC" },
439 { GLUSTER_CLI_2_PMAP_PORTBYBRICK
, "PMAP_PORTBYBRICK" },
440 { GLUSTER_CLI_2_SYNC_VOLUME
, "SYNC_VOLUME" },
441 { GLUSTER_CLI_2_RESET_VOLUME
, "RESET_VOLUME" },
442 { GLUSTER_CLI_2_FSM_LOG
, "FSM_LOG" },
443 { GLUSTER_CLI_2_GSYNC_SET
, "GSYNC_SET" },
444 { GLUSTER_CLI_2_PROFILE_VOLUME
, "PROFILE_VOLUME" },
445 { GLUSTER_CLI_2_QUOTA
, "QUOTA" },
446 { GLUSTER_CLI_2_TOP_VOLUME
, "TOP_VOLUME" },
447 { GLUSTER_CLI_2_GETWD
, "GETWD" },
448 { GLUSTER_CLI_2_STATUS_VOLUME
, "STATUS_VOLUME" },
449 { GLUSTER_CLI_2_STATUS_ALL
, "STATUS_ALL" },
450 { GLUSTER_CLI_2_MOUNT
, "MOUNT" },
451 { GLUSTER_CLI_2_UMOUNT
, "UMOUNT" },
452 { GLUSTER_CLI_2_HEAL_VOLUME
, "HEAL_VOLUME" },
453 { GLUSTER_CLI_2_STATEDUMP_VOLUME
, "STATEDUMP_VOLUME" },
454 { GLUSTER_CLI_2_LIST_VOLUME
, "LIST_VOLUME"},
455 { GLUSTER_CLI_2_CLRLOCKS_VOLUME
, "CLRLOCKS_VOLUME" },
458 static value_string_ext gluster_cli_2_proc_vals_ext
= VALUE_STRING_EXT_INIT(gluster_cli_2_proc_vals
);
461 proto_register_gluster_cli(void)
463 /* Setup list of header fields See Section 1.6.1 for details */
464 static hf_register_info hf
[] = {
466 { &hf_gluster_cli_proc
,
467 { "Gluster CLI", "gluster.cli.proc", FT_UINT32
,
468 BASE_DEC
| BASE_EXT_STRING
, &gluster_cli_proc_vals_ext
, 0, NULL
,
471 { &hf_gluster_cli_2_proc
,
472 { "Gluster CLI", "gluster.cli.proc", FT_UINT32
,
473 BASE_DEC
| BASE_EXT_STRING
, &gluster_cli_2_proc_vals_ext
, 0,
477 { "Dict", "gluster.dict", FT_STRING
, BASE_NONE
, NULL
,
481 { "Path", "gluster.path", FT_STRING
, BASE_NONE
, NULL
,
485 { "Lazy", "gluster.lazy", FT_UINT32
, BASE_HEX
, NULL
,
489 { "Label", "gluster.label", FT_STRING
, BASE_NONE
, NULL
,
492 { &hf_gluster_unused
,
493 { "Unused", "gluster.unused", FT_UINT32
, BASE_HEX
,
494 NULL
, 0, NULL
, HFILL
}
497 { "Path", "gluster.wd", FT_STRING
, BASE_NONE
, NULL
, 0,
500 { &hf_gluster_op_errstr
,
501 { "Error", "gluster.op_errstr", FT_STRING
, BASE_NONE
,
502 NULL
, 0, NULL
, HFILL
}
504 { &hf_gluster_hostname
,
505 { "Hostname", "gluster.hostname", FT_STRING
, BASE_NONE
,
506 NULL
, 0, NULL
, HFILL
}
509 { "Port", "gluster.port", FT_UINT32
, BASE_DEC
, NULL
, 0,
513 { "Flags", "gluster.flag", FT_UINT32
, BASE_HEX
, NULL
,
518 /* Setup protocol subtree array */
519 static gint
*ett
[] = {
523 /* Register the protocol name and description */
524 proto_gluster_cli
= proto_register_protocol("Gluster CLI",
525 "Gluster CLI", "gluster.cli");
526 proto_register_subtree_array(ett
, array_length(ett
));
527 proto_register_field_array(proto_gluster_cli
, hf
, array_length(hf
));
531 proto_reg_handoff_gluster_cli(void)
533 rpc_init_prog(proto_gluster_cli
, GLUSTER_CLI_PROGRAM
, ett_gluster_cli
);
534 rpc_init_proc_table(GLUSTER_CLI_PROGRAM
, 1, gluster_cli_proc
,
535 hf_gluster_cli_proc
);
536 rpc_init_proc_table(GLUSTER_CLI_PROGRAM
, 2, gluster_cli_2_proc
,
537 hf_gluster_cli_2_proc
);