aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bootparams.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-21 12:37:11 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-21 19:38:15 +0000
commit868cd679154e6060bf22945e760ada61988fbd94 (patch)
tree82a031c024bfd130d219e202d54a6823293591bb /epan/dissectors/packet-bootparams.c
parentf38d976cbed60c370e127bd40396cedf17644cee (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-bootparams.c')
-rw-r--r--epan/dissectors/packet-bootparams.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-bootparams.c b/epan/dissectors/packet-bootparams.c
index 295040b3a8..f464a3ef74 100644
--- a/epan/dissectors/packet-bootparams.c
+++ b/epan/dissectors/packet-bootparams.c
@@ -138,7 +138,6 @@ static const vsff bootparams1_proc[] = {
dissect_getfile_call, dissect_getfile_reply },
{ 0, NULL, NULL, NULL }
};
-/* end of Bootparams version 1 */
static const value_string bootparams1_proc_vals[] = {
{ BOOTPARAMSPROC_NULL, "NULL" },
@@ -146,6 +145,11 @@ static const value_string bootparams1_proc_vals[] = {
{ BOOTPARAMSPROC_GETFILE, "GETFILE" },
{ 0, NULL }
};
+/* end of Bootparams version 1 */
+
+static const rpc_prog_vers_info bootparams_vers_info[] = {
+ { 1, bootparams1_proc, &hf_bootparams_procedure_v1 },
+};
void
proto_register_bootparams(void)
@@ -190,9 +194,8 @@ void
proto_reg_handoff_bootparams(void)
{
/* Register the protocol as RPC */
- rpc_init_prog(proto_bootparams, BOOTPARAMS_PROGRAM, ett_bootparams);
- /* Register the procedure tables */
- rpc_init_proc_table(proto_bootparams, BOOTPARAMS_PROGRAM, 1, bootparams1_proc, hf_bootparams_procedure_v1);
+ rpc_init_prog(proto_bootparams, BOOTPARAMS_PROGRAM, ett_bootparams,
+ G_N_ELEMENTS(bootparams_vers_info), bootparams_vers_info);
}
/*