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-stat-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-stat-notify.c')
-rw-r--r-- | epan/dissectors/packet-stat-notify.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-stat-notify.c b/epan/dissectors/packet-stat-notify.c index 856b22afd2..f3c959e7ec 100644 --- a/epan/dissectors/packet-stat-notify.c +++ b/epan/dissectors/packet-stat-notify.c @@ -69,6 +69,10 @@ static const value_string statnotify1_proc_vals[] = { }; /* end of stat-notify version 1 */ +static const rpc_prog_vers_info statnotify_vers_info[] = { + { 1, statnotify1_proc, &hf_statnotify_procedure_v1 }, +}; + void proto_register_statnotify(void) @@ -101,9 +105,8 @@ void proto_reg_handoff_statnotify(void) { /* Register the protocol as RPC */ - rpc_init_prog(proto_statnotify, STATNOTIFY_PROGRAM, ett_statnotify); - /* Register the procedure tables */ - rpc_init_proc_table(proto_statnotify, STATNOTIFY_PROGRAM, 1, statnotify1_proc, hf_statnotify_procedure_v1); + rpc_init_prog(proto_statnotify, STATNOTIFY_PROGRAM, ett_statnotify, + G_N_ELEMENTS(statnotify_vers_info), statnotify_vers_info); } /* |