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-fmp_notify.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-fmp_notify.c')
-rw-r--r-- | epan/dissectors/packet-fmp_notify.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-fmp_notify.c b/epan/dissectors/packet-fmp_notify.c index 6fa4f78db6..0d2f662586 100644 --- a/epan/dissectors/packet-fmp_notify.c +++ b/epan/dissectors/packet-fmp_notify.c @@ -402,6 +402,10 @@ static const vsff fmp_notify2_proc[] = { { 0, NULL, NULL, NULL } }; +static const rpc_prog_vers_info fmp_notify_vers_info[] = { + { FMP_NOTIFY_VERSION_2, fmp_notify2_proc, &hf_fmp_notify_procedure } +}; + static const value_string fmp_notify_proc_vals[] = { { 0, "NULL" }, { 1, "DownGrade" }, @@ -610,11 +614,8 @@ void proto_reg_handoff_fmp_notify(void) { /* Register the protocol as RPC */ - rpc_init_prog(proto_fmp_notify, FMP_NOTIFY_PROG, ett_fmp_notify); - - /* Register the procedure tables */ - rpc_init_proc_table(proto_fmp_notify, FMP_NOTIFY_PROG, FMP_NOTIFY_VERSION_2, - fmp_notify2_proc,hf_fmp_notify_procedure); + rpc_init_prog(proto_fmp_notify, FMP_NOTIFY_PROG, ett_fmp_notify, + G_N_ELEMENTS(fmp_notify_vers_info), fmp_notify_vers_info); } /* |