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-ypxfr.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-ypxfr.c')
-rw-r--r-- | epan/dissectors/packet-ypxfr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ypxfr.c b/epan/dissectors/packet-ypxfr.c index eef67da14a..3ce47f85e2 100644 --- a/epan/dissectors/packet-ypxfr.c +++ b/epan/dissectors/packet-ypxfr.c @@ -49,6 +49,10 @@ static const value_string ypxfr1_proc_vals[] = { }; /* end of YPXFR version 1 */ +static const rpc_prog_vers_info ypxfr_vers_info[] = { + { 1, ypxfr1_proc, &hf_ypxfr_procedure_v1 }, +}; + void proto_register_ypxfr(void) { @@ -72,9 +76,8 @@ void proto_reg_handoff_ypxfr(void) { /* Register the protocol as RPC */ - rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ett_ypxfr); - /* Register the procedure tables */ - rpc_init_proc_table(proto_ypxfr, YPXFR_PROGRAM, 1, ypxfr1_proc, hf_ypxfr_procedure_v1); + rpc_init_prog(proto_ypxfr, YPXFR_PROGRAM, ett_ypxfr, + G_N_ELEMENTS(ypxfr_vers_info), ypxfr_vers_info); } /* |