diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-21 12:37:11 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-21 19:38:15 +0000 |
commit | 868cd679154e6060bf22945e760ada61988fbd94 (patch) | |
tree | 82a031c024bfd130d219e202d54a6823293591bb /epan/dissectors/packet-sadmind.c | |
parent | f38d976cbed60c370e127bd40396cedf17644cee (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-sadmind.c')
-rw-r--r-- | epan/dissectors/packet-sadmind.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-sadmind.c b/epan/dissectors/packet-sadmind.c index 611038e6a7..f3657a6ae6 100644 --- a/epan/dissectors/packet-sadmind.c +++ b/epan/dissectors/packet-sadmind.c @@ -71,6 +71,12 @@ static const value_string sadmind3_proc_vals[] = { { 0, NULL } }; +static const rpc_prog_vers_info sadmind_vers_info[] = { + { 1, sadmind1_proc, &hf_sadmind_procedure_v1 }, + { 2, sadmind2_proc, &hf_sadmind_procedure_v2 }, + { 3, sadmind3_proc, &hf_sadmind_procedure_v3 }, +}; + void proto_register_sadmind(void) { @@ -99,11 +105,8 @@ void proto_reg_handoff_sadmind(void) { /* Register the protocol as RPC */ - rpc_init_prog(proto_sadmind, SADMIND_PROGRAM, ett_sadmind); - /* Register the procedure tables */ - rpc_init_proc_table(proto_sadmind, SADMIND_PROGRAM, 1, sadmind1_proc, hf_sadmind_procedure_v1); - rpc_init_proc_table(proto_sadmind, SADMIND_PROGRAM, 2, sadmind2_proc, hf_sadmind_procedure_v2); - rpc_init_proc_table(proto_sadmind, SADMIND_PROGRAM, 3, sadmind3_proc, hf_sadmind_procedure_v3); + rpc_init_prog(proto_sadmind, SADMIND_PROGRAM, ett_sadmind, + G_N_ELEMENTS(sadmind_vers_info), sadmind_vers_info); } /* |