aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gluster_cli.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-21 12:37:11 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-21 19:38:15 +0000
commit868cd679154e6060bf22945e760ada61988fbd94 (patch)
tree82a031c024bfd130d219e202d54a6823293591bb /epan/dissectors/packet-gluster_cli.c
parentf38d976cbed60c370e127bd40396cedf17644cee (diff)
Do all the work of registering an ONC RPC-based protocol in rpc_init_prog().
Hand it a table of version/procedure table/hf-for-program-number triplets. Change-Id: I2acc03c2da83353165bd422d8537362201c814e2 Reviewed-on: https://code.wireshark.org/review/9740 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-gluster_cli.c')
-rw-r--r--epan/dissectors/packet-gluster_cli.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gluster_cli.c b/epan/dissectors/packet-gluster_cli.c
index 178aed57e8..af926627bf 100644
--- a/epan/dissectors/packet-gluster_cli.c
+++ b/epan/dissectors/packet-gluster_cli.c
@@ -393,6 +393,12 @@ static const vsff gluster_cli_2_proc[] = {
};
+static const rpc_prog_vers_info gluster_cli_vers_info[] = {
+ { 1, gluster_cli_proc, &hf_gluster_cli_proc },
+ { 2, gluster_cli_2_proc, &hf_gluster_cli_2_proc }
+};
+
+
static const value_string gluster_cli_proc_vals[] = {
{ GLUSTER_CLI_NULL, "NULL" },
{ GLUSTER_CLI_PROBE, "PROBE" },
@@ -546,11 +552,8 @@ proto_register_gluster_cli(void)
void
proto_reg_handoff_gluster_cli(void)
{
- rpc_init_prog(proto_gluster_cli, GLUSTER_CLI_PROGRAM, ett_gluster_cli);
- rpc_init_proc_table(proto_gluster_cli, GLUSTER_CLI_PROGRAM, 1, gluster_cli_proc,
- hf_gluster_cli_proc);
- rpc_init_proc_table(proto_gluster_cli, GLUSTER_CLI_PROGRAM, 2, gluster_cli_2_proc,
- hf_gluster_cli_2_proc);
+ rpc_init_prog(proto_gluster_cli, GLUSTER_CLI_PROGRAM, ett_gluster_cli,
+ G_N_ELEMENTS(gluster_cli_vers_info), gluster_cli_vers_info);
}
/*