aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nfs.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-07-09 13:47:59 -0400
committerMichael Mann <mmann78@netscape.net>2017-09-16 11:12:29 +0000
commit7d65b573f2734017be416f31852c4ede42bd987b (patch)
tree5fc5e6ebe6c44a5060292541f9664f0244a5e0e4 /epan/dissectors/packet-nfs.c
parentd992e85fe8e9192cb730abf8796336d3b6d6fd50 (diff)
Have register_decode_as_next_proto create dissector table.
For protocols that have don't have a unique identifier for their payload, have register_decode_as_next_proto be a one stop shop to create Decode As functionality and a dissector table of type FT_NONE. Change-Id: Ic1f2e9ed0aee0554a4eb8f232630b99c0604dfc0 Reviewed-on: https://code.wireshark.org/review/22575 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-nfs.c')
-rw-r--r--epan/dissectors/packet-nfs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index fc860ff11f..2dc4d21925 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -2241,10 +2241,8 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
if (!hidden) {
tvbuff_t *fh_tvb;
- /* Functionality for choosing subdissector is controlled through Decode As as NFS doesn't
- have a unique identifier to determine subdissector */
fh_tvb = tvb_new_subset_length_caplen(tvb, offset, fhlen, fhlen);
- if (!dissector_try_uint(nfs_fhandle_table, 0, fh_tvb, pinfo, tree))
+ if (!dissector_try_payload(nfs_fhandle_table, fh_tvb, pinfo, tree))
dissect_fhandle_data_unknown(fh_tvb, pinfo, tree, NULL);
}
}
@@ -14044,9 +14042,6 @@ proto_register_nfs(void)
" in the info column. Others (like GETFH, PUTFH, etc) are not displayed",
&display_major_nfs4_ops);
- nfs_fhandle_table = register_dissector_table("nfs_fhandle.type",
- "NFS Filehandle types", proto_nfs, FT_UINT8, BASE_HEX);
-
prefs_register_obsolete_preference(nfs_module, "default_fhandle_type");
nfs_name_snoop_known = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
@@ -14055,7 +14050,8 @@ proto_register_nfs(void)
register_init_routine(nfs_name_snoop_init);
register_cleanup_routine(nfs_name_snoop_cleanup);
- register_decode_as_next_proto("nfs", "NFS File Handle", "nfs_fhandle.type", (build_label_func*)&nfs_prompt);
+ nfs_fhandle_table = register_decode_as_next_proto(proto_nfs, "NFS File Handle", "nfs_fhandle.type",
+ "NFS Filehandle types", (build_label_func*)&nfs_prompt);
}