aboutsummaryrefslogtreecommitdiffstats
path: root/epan/expert.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-07-02 19:53:28 +0000
committerMichael Mann <mmann78@netscape.net>2013-07-02 19:53:28 +0000
commite16933f4961aa8905444f80876355f6b3a2cf46f (patch)
tree28b72cf9e0e3228b1f4c03e81661da0ea98a3314 /epan/expert.h
parentb0e04aca735b8dce0631107a480452deab00e048 (diff)
Add proto_tree_add_expert and proto_tree_add_expert_format. This was added to expert.h instead of proto.h because the underlying code to process expert info is static (and should probably remain so). Also, proto_tree_add_expert and proto_tree_add_expert_format follow "expert info" rules in that they should be called regardless of tree status (even though they take a tree as an argument), unlike the functions in proto.h
Also added an enumeration for checksum validation status, as verifying checksums is considered "expert" functionality. svn path=/trunk/; revision=50322
Diffstat (limited to 'epan/expert.h')
-rw-r--r--epan/expert.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/epan/expert.h b/epan/expert.h
index c286db183c..fe218195d1 100644
--- a/epan/expert.h
+++ b/epan/expert.h
@@ -166,6 +166,43 @@ WS_DLL_PUBLIC void
expert_add_info_format_text(packet_info *pinfo, proto_item *pi, expert_field *eiindex,
const char *format, ...) G_GNUC_PRINTF(4, 5);
+/** Add an expert info associated with some byte data
+ Add an expert info tree to a protocol item using registered expert info item.
+ This function is intended to replace places where
+ proto_tree_add_text or proto_tree_add_none_format + expert_add_info
+ would be used.
+ @param pinfo Packet info of the currently processed packet. May be NULL if
+ pi is supplied
+ @param pi Current protocol item (or NULL)
+ @param eiindex The registered expert info item
+ @param tvb the tv buffer of the current data
+ @param start start of data in tvb
+ @param length length of data in tvb
+ @return the newly created item above expert info tree
+ */
+WS_DLL_PUBLIC proto_item *
+proto_tree_add_expert(proto_tree *tree, packet_info *pinfo, expert_field* eiindex,
+ tvbuff_t *tvb, gint start, gint length);
+
+/** Add an expert info associated with some byte data
+ Add an expert info tree to a protocol item, using registered expert info item,
+ but with a formatted message.
+ This function is intended to replace places where
+ proto_tree_add_text or proto_tree_add_none_format + expert_add_info_format_text
+ would be used.
+ @param pinfo Packet info of the currently processed packet. May be NULL if
+ pi is supplied
+ @param pi Current protocol item (or NULL)
+ @param eiindex The registered expert info item
+ @param tvb the tv buffer of the current data
+ @param start start of data in tvb
+ @param length length of data in tvb
+ @return the newly created item above expert info tree
+ */
+WS_DLL_PUBLIC proto_item *
+proto_tree_add_expert_format(proto_tree *tree, packet_info *pinfo, expert_field* eiindex,
+ tvbuff_t *tvb, gint start, gint length, const char *format, ...) G_GNUC_PRINTF(7, 8);
+
/*
* Register that a protocol has expert info.
*/
@@ -191,6 +228,9 @@ expert_register_field_array(expert_module_t* module, ei_register_info *ei, const
WS_DLL_PUBLIC void
expert_add_undecoded_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, const int severity);
+
+WS_DLL_PUBLIC const value_string expert_checksum_vals[];
+
#ifdef __cplusplus
}
#endif /* __cplusplus */