diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-12-10 19:23:26 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-12-10 19:23:26 +0000 |
commit | 17a67c3b5cb80619ab7e1260a05a28e888cee09e (patch) | |
tree | 538f734525e8a488e4fc60ad4eff509a80458c8f /epan/packet.h | |
parent | 5fa7d37e377abb89e317f4ebd47ebea69ebe0fd9 (diff) | |
download | wireshark-17a67c3b5cb80619ab7e1260a05a28e888cee09e.tar.gz |
Get the "Decode As" dialog working, albeit with a few warts. It differs
from the GTK flavor in two major ways:
- The "Decode As" and "User Specified Decodes" dialog have been unified.
- You can modify the decode as behavior at any time, not just when you
have a packet selected.
Revert part of 53498 so that we can move items marked
/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
from epan/decode_as.h to ui/decode_as_utils.h.
Move "save" code from decode_as_dlg.c to decode_as_utils.c as well.
In packet-dcerpc.c don't register a table named "ethertype". We might
want to add checks for duplicate table names.
To do:
- Add support for ranges?
- Either add support for DCERPC or make DCERPC use a regular dissector
table.
- Fix string selectors (i.e. BER).
svn path=/trunk/; revision=53910
Diffstat (limited to 'epan/packet.h')
-rw-r--r-- | epan/packet.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/epan/packet.h b/epan/packet.h index 205df7ff3b..2b850c3782 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -256,11 +256,26 @@ WS_DLL_PUBLIC gboolean dissector_try_uint(dissector_table_t sub_dissectors, WS_DLL_PUBLIC gboolean dissector_try_uint_new(dissector_table_t sub_dissectors, const guint32 uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const gboolean add_proto_name, void *data); -/* Look for a given value in a given uint dissector table and, if found, - return the dissector handle for that value. */ +/** Look for a given value in a given uint dissector table and, if found, + * return the current dissector handle for that value. + * + * @param[in] sub_dissectors Dissector table to search. + * @param[in] uint_val Value to match, e.g. the port number for the TCP dissector. + * @return The matching dissector handle on success, NULL if no match is found. + */ WS_DLL_PUBLIC dissector_handle_t dissector_get_uint_handle( dissector_table_t const sub_dissectors, const guint32 uint_val); +/** Look for a given value in a given uint dissector table and, if found, + * return the default dissector handle for that value. + * + * @param[in] name Dissector table name. + * @param[in] uint_val Value to match, e.g. the port number for the TCP dissector. + * @return The matching dissector handle on success, NULL if no match is found. + */ +WS_DLL_PUBLIC dissector_handle_t dissector_get_default_uint_handle( + const char *name, const guint32 uint_val); + /* Add an entry to a string dissector table. */ WS_DLL_PUBLIC void dissector_add_string(const char *name, const gchar *pattern, dissector_handle_t handle); @@ -284,11 +299,26 @@ WS_DLL_PUBLIC void dissector_reset_string(const char *name, const gchar *pattern WS_DLL_PUBLIC gboolean dissector_try_string(dissector_table_t sub_dissectors, const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); -/* Look for a given value in a given string dissector table and, if found, - return the dissector handle for that value. */ +/** Look for a given value in a given string dissector table and, if found, + * return the current dissector handle for that value. + * + * @param[in] sub_dissectors Dissector table to search. + * @param[in] string Value to match, e.g. the OID for the BER dissector. + * @return The matching dissector handle on success, NULL if no match is found. + */ WS_DLL_PUBLIC dissector_handle_t dissector_get_string_handle( dissector_table_t sub_dissectors, const gchar *string); +/** Look for a given value in a given string dissector table and, if found, + * return the default dissector handle for that value. + * + * @param[in] name Dissector table name. + * @param[in] string Value to match, e.g. the OID for the BER dissector. + * @return The matching dissector handle on success, NULL if no match is found. + */ +WS_DLL_PUBLIC dissector_handle_t dissector_get_default_string_handle( + const char *name, const gchar *string); + /* Add a handle to the list of handles that *could* be used with this table. That list is used by code in the UI. */ WS_DLL_PUBLIC void dissector_add_handle(const char *name, dissector_handle_t handle); |