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-teklink.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-teklink.c')
-rw-r--r-- | epan/dissectors/packet-teklink.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-teklink.c b/epan/dissectors/packet-teklink.c index fdf141404c..ceac6ad02c 100644 --- a/epan/dissectors/packet-teklink.c +++ b/epan/dissectors/packet-teklink.c @@ -462,6 +462,10 @@ static const value_string teklink_proc_vals[] = { { 0, NULL } }; +static const rpc_prog_vers_info teklink_vers_info[] = { + { 1, teklink_proc, &hf_teklink_procedure }, +}; + #if 0 static const value_string teklink_error_vals[] = { { 0, NULL } @@ -573,10 +577,8 @@ void proto_reg_handoff_teklink(void) { /* Register the protocol as RPC */ - rpc_init_prog(proto_teklink, PROGRAM_TEKLINK, ett_teklink); - - /* Register the procedure tables */ - rpc_init_proc_table(proto_teklink, PROGRAM_TEKLINK, 1, teklink_proc, hf_teklink_procedure); + rpc_init_prog(proto_teklink, PROGRAM_TEKLINK, ett_teklink, + G_N_ELEMENTS(teklink_vers_info), teklink_vers_info); } /* |