aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-glusterfs.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-glusterfs.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-glusterfs.c')
-rw-r--r--epan/dissectors/packet-glusterfs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-glusterfs.c b/epan/dissectors/packet-glusterfs.c
index 76cd57809c..53217c5c15 100644
--- a/epan/dissectors/packet-glusterfs.c
+++ b/epan/dissectors/packet-glusterfs.c
@@ -2164,6 +2164,12 @@ static const vsff glusterfs3_3_fop_proc[] = {
};
+static const rpc_prog_vers_info glusterfs_vers_info[] = {
+ { 310, glusterfs3_1_fop_proc, &hf_glusterfs_proc },
+ { 330, glusterfs3_3_fop_proc, &hf_glusterfs_proc },
+};
+
+
static const value_string glusterfs3_1_fop_proc_vals[] = {
{ GFS3_OP_NULL, "NULL" },
{ GFS3_OP_STAT, "STAT" },
@@ -2860,12 +2866,8 @@ proto_register_glusterfs(void)
void
proto_reg_handoff_glusterfs(void)
{
- rpc_init_prog(proto_glusterfs, GLUSTER3_1_FOP_PROGRAM, ett_glusterfs);
- rpc_init_proc_table(proto_glusterfs, GLUSTER3_1_FOP_PROGRAM, 310, glusterfs3_1_fop_proc,
- hf_glusterfs_proc);
- rpc_init_proc_table(proto_glusterfs, GLUSTER3_1_FOP_PROGRAM, 330, glusterfs3_3_fop_proc,
- hf_glusterfs_proc);
-
+ rpc_init_prog(proto_glusterfs, GLUSTER3_1_FOP_PROGRAM, ett_glusterfs,
+ G_N_ELEMENTS(glusterfs_vers_info), glusterfs_vers_info);
}
/*