aboutsummaryrefslogtreecommitdiffstats
path: root/epan/sequence_analysis.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-09-18 22:48:11 -0400
committerAnders Broman <a.broman58@gmail.com>2017-09-19 06:44:51 +0000
commitdd5875c487dea7e75b3653485d153c0dab909699 (patch)
treee1e6219872900d9a067dd6940389e6ede1ea84d5 /epan/sequence_analysis.h
parent8a25ac7306b9eef5c7d75ee1c610eb2b0a8144fe (diff)
Sequence analysis (flow graph) optimizations for dissectors
1. Remove protocol member from seq_analysis_item_t. It's not used by any GUI, so don't burden dissectors with populating it. 2. Allow any dissector to change colors display by flow graph 3. Provide helper functions that may be common if other dissectors want to create sequence analysis. Change-Id: I04fa3c9f3cf6879ab9a8d7d6f4896b4979d010d7 Reviewed-on: https://code.wireshark.org/review/23613 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/sequence_analysis.h')
-rw-r--r--epan/sequence_analysis.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/epan/sequence_analysis.h b/epan/sequence_analysis.h
index bcebdef3a5..247b3d5fbd 100644
--- a/epan/sequence_analysis.h
+++ b/epan/sequence_analysis.h
@@ -63,7 +63,6 @@ typedef struct _seq_analysis_item {
guint src_node; /**< this is used by graph_analysis.c to identify the node */
guint dst_node; /**< a node is an IP address that will be displayed in columns */
guint16 line_style; /**< the arrow line width in pixels*/
- gchar *protocol; /**< the label of the protocol defined in the IP packet */
} seq_analysis_item_t;
/** defines the graph analysis structure */
@@ -128,6 +127,30 @@ WS_DLL_PUBLIC tap_packet_cb sequence_analysis_get_packet_func(register_analysis_
*/
WS_DLL_PUBLIC guint sequence_analysis_get_tap_flags(register_analysis_t* analysis);
+/** Helper function to create a sequence analysis item with address fields populated
+ * Allocate a seq_analysis_item_t to return and populate the src_addr and dst_addr
+ * members based on seq_analysis_info_t any_addr member
+ *
+ * @param pinfo packet info
+ * @param sainfo info determining address type
+ * @return sequence analysis tap flags
+ */
+WS_DLL_PUBLIC seq_analysis_item_t* sequence_analysis_create_sai_with_addresses(packet_info *pinfo, seq_analysis_info_t *sainfo);
+
+/** Helper function to set colors for analysis the same as Wireshark display
+ *
+ * @param pinfo packet info
+ * @param sai item to set color
+ */
+WS_DLL_PUBLIC void sequence_analysis_use_color_filter(packet_info *pinfo, seq_analysis_item_t *sai);
+
+/** Helper function to set frame label and comments to use protocol and info column data
+ *
+ * @param pinfo packet info
+ * @param sai item to set label and comments
+ */
+WS_DLL_PUBLIC void sequence_analysis_use_col_info_as_label_comment(packet_info *pinfo, seq_analysis_item_t *sai);
+
/** Find a registered sequence analysis "protocol" by name
*
* @param name Registered sequence analysis to find