diff options
author | Michael Mann <mmann78@netscape.net> | 2017-07-09 13:44:06 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-09-16 11:12:52 +0000 |
commit | 69250aa51eac68015e520f5680970ded2db1ee14 (patch) | |
tree | 7c437441cf41433d203d24850c7d440d2fa08045 /epan/packet.h | |
parent | 7d65b573f2734017be416f31852c4ede42bd987b (diff) |
Add support for dissector tables of type FT_NONE.
This is for dissectors that have "payloads" that don't have
a unique identifier to determine a sub dissector.
For the command line parameter -d, specifying a selector is no longer
required for dissector tables of type FT_NONE.
Change-Id: I3370d9e0dc147deeca4f26b842fe35dc3bda876e
Reviewed-on: https://code.wireshark.org/review/22574
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/packet.h')
-rw-r--r-- | epan/packet.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/packet.h b/epan/packet.h index 84aa4912f5..ffe23285a4 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -367,6 +367,25 @@ WS_DLL_PUBLIC int dissector_try_guid_new(dissector_table_t sub_dissectors, WS_DLL_PUBLIC dissector_handle_t dissector_get_guid_handle( dissector_table_t const sub_dissectors, guid_key* guid_val); +/* Use the currently assigned payload dissector for the dissector table and, + if any, call the dissector with the arguments supplied, and return the + number of bytes consumed, otherwise return 0. */ +WS_DLL_PUBLIC int dissector_try_payload(dissector_table_t sub_dissectors, + tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); + +/* Use the currently assigned payload dissector for the dissector table and, + if any, call the dissector with the arguments supplied, and return the + number of bytes consumed, otherwise return 0. */ +WS_DLL_PUBLIC int dissector_try_payload_new(dissector_table_t sub_dissectors, + tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const gboolean add_proto_name, void *data); + +/* Change the entry for a dissector in a payload (FT_NONE) dissector table + with a particular pattern to use a new dissector handle. */ +WS_DLL_PUBLIC void dissector_change_payload(const char *abbrev, dissector_handle_t handle); + +/* Reset payload (FT_NONE) dissector table to its initial value. */ +WS_DLL_PUBLIC void dissector_reset_payload(const char *name); + /* Add a handle to the list of handles that *could* be used with this table. That list is used by the "Decode As"/"-d" code in the UI. */ WS_DLL_PUBLIC void dissector_add_for_decode_as(const char *name, |